config_host.mk.in | 1 + configure.ac | 33 +++++++++++++++++++++++++++++++++ extras/Module_extras.mk | 13 +++++++++---- 3 files changed, 43 insertions(+), 4 deletions(-)
New commits: commit dd928ed5627a0807f8a0763cdbb9447a6705817a Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Thu Oct 5 18:21:48 2023 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Fri Oct 6 14:31:48 2023 +0200 tdf#101970 Introduce config option for building with or without the not necessary template files. The default is building with all templates, otherwise we can use: --with-templates=no/yes --with-templates -->yes --without-templates -->no Change-Id: I13f5b411057254771ad4021aa9521c153702af16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157600 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit dc3eb1ea334c2912ce6b1f15e07422c82c8857c0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157618 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/config_host.mk.in b/config_host.mk.in index 92c8a2f99c3b..fe5e2fa49eff 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -727,6 +727,7 @@ export WITH_EXTENSION_INTEGRATION=@WITH_EXTENSION_INTEGRATION@ export WITH_EXTRA_EXTENSIONS=@WITH_EXTRA_EXTENSIONS@ export WITH_FONTS=@WITH_FONTS@ export WITH_GALLERY_BUILD=@WITH_GALLERY_BUILD@ +export WITH_TEMPLATES=@WITH_TEMPLATES@ export WITH_GSSAPI=@WITH_GSSAPI@ export WITH_KRB5=@WITH_KRB5@ export WITH_LINKER_HASH_STYLE=@WITH_LINKER_HASH_STYLE@ diff --git a/configure.ac b/configure.ac index 53f42597aef1..92b0881f54eb 100644 --- a/configure.ac +++ b/configure.ac @@ -2125,6 +2125,13 @@ AC_ARG_WITH(galleries, or to disable them ("no")]), ) +AC_ARG_WITH(templates, + AS_HELP_STRING([--with-templates], + [Specify we build with or without template files. It is possible either to + build with templates ("yes"), + or to disable them ("no")]), +) + AC_ARG_WITH(theme, AS_HELP_STRING([--with-theme="theme1 theme2..."], [Choose which themes to include. By default those themes with an '*' are included. @@ -3073,6 +3080,7 @@ if test "$enable_wasm_strip" = "yes"; then test_libzmf=no test_webdav=no with_galleries=no + with_templates=no with_webdav=no with_x=no @@ -3223,6 +3231,30 @@ else fi AC_SUBST(WITH_GALLERY_BUILD) +dnl =================================================================== +dnl Sort out various templates compilation options +dnl =================================================================== +WITH_TEMPLATES=TRUE +AC_MSG_CHECKING([build with or without template files]) +if test -n "${with_templates}"; then + if test "$with_templates" = "yes"; then + AC_MSG_RESULT([enable all templates]) + elif test "$with_templates" = "no"; then + WITH_TEMPLATES= + AC_MSG_RESULT([disable non-internal templates]) + else + AC_MSG_ERROR([unknown value --with-templates=$with_templates]) + fi +else + if test $_os != iOS -a $_os != Android -a $_os != Emscripten; then + AC_MSG_RESULT([enable all templates]) + else + WITH_TEMPLATES= + AC_MSG_RESULT([disable non-internal templates]) + fi +fi +AC_SUBST(WITH_TEMPLATES) + dnl =================================================================== dnl Checks if ccache is available dnl =================================================================== @@ -5705,6 +5737,7 @@ if test "$cross_compiling" = "yes"; then fi test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION" test "$with_galleries" = "no" -o -z "$WITH_GALLERY_BUILD" && sub_conf_opts="$sub_conf_opts --with-galleries=no --disable-database-connectivity" + test "$with_templates" = "no" -o -z "$WITH_TEMPLATES" && sub_conf_opts="$sub_conf_opts --with-templates=no" test -n "$with_help" -a "$with_help" != "no" && sub_conf_opts="$sub_conf_opts --with-help=$with_help" test "$enable_extensions" = yes || sub_conf_opts="$sub_conf_opts --disable-extensions" test "${enable_ld+set}" = set -a "$build_cpu" = "$host_cpu" && sub_conf_opts="$sub_conf_opts --enable-ld=${enable_ld}" diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk index fb4ca1d4a354..497a188cc142 100644 --- a/extras/Module_extras.mk +++ b/extras/Module_extras.mk @@ -34,10 +34,6 @@ $(eval $(call gb_Module_add_targets,extras,\ Package_labels \ $(if $(filter WNT,$(OS)),Package_newfiles) \ Package_palettes \ - Package_templates \ - Package_tplpresnt \ - Package_tplwizard \ - Package_tplwizbitmap \ Package_tplwizdesktop \ Package_wordbook \ )) @@ -54,6 +50,15 @@ $(eval $(call gb_Module_add_targets,extras,\ )) endif +ifneq ($(WITH_TEMPLATES),) +$(eval $(call gb_Module_add_targets,extras,\ + Package_templates \ + Package_tplpresnt \ + Package_tplwizard \ + Package_tplwizbitmap \ +)) +endif + $(eval $(call gb_Module_add_targets,extras,\ Personas \ ))