Repository.mk               |   12 ++++++++----
 desktop/Module_desktop.mk   |   10 ++++++----
 desktop/Package_scripts.mk  |    2 ++
 solenv/gbuild/Conditions.mk |    4 ++++
 4 files changed, 20 insertions(+), 8 deletions(-)

New commits:
commit 4cb6f75b390760c52f7f59fc973eaf07dfb11f44
Author:     Jan-Marek Glogowski <[email protected]>
AuthorDate: Fri Jan 7 12:45:01 2022 +0100
Commit:     Jan-Marek Glogowski <[email protected]>
CommitDate: Fri Jan 7 19:34:40 2022 +0100

    Don't build a static unopkg
    
    Currently we don't destinguish between between extensions without
    code, which couldn't be executed with DISABLE_DYNLOADING, and all
    other extensions, like translations, dictionaries, etc., so there
    is no need for a static unopkg.
    
    Change-Id: I427a51b3174d074e467a582e808490a85e98e8eb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128114
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <[email protected]>

diff --git a/Repository.mk b/Repository.mk
index bb3c995ddaa2..7d5d0cf3546b 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -147,14 +147,18 @@ $(eval $(call 
gb_Helper_register_executables_for_install,OOO,brand, \
        $(call gb_Helper_optional,FUZZERS,dbffuzzer) \
        $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
        soffice_bin \
-       $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
+    $(call gb_CondBuildUnopkg, \
+        unopkg_bin \
+        $(if $(filter WNT,$(OS)), \
+            unopkg \
+            unopkg_com \
+        ) \
+    ) \
        $(if $(filter WNT,$(OS)), \
                soffice_exe \
                soffice_com \
                soffice_safe \
                unoinfo \
-               unopkg \
-               unopkg_com \
                $(if $(filter-out AARCH64,$(CPUNAME)),twain32shim) \
        ) \
 ))
@@ -634,7 +638,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
     $(call gb_Helper_optional,XMLHELP,ucpchelp1) \
        ucphier1 \
        ucppkg1 \
-       unopkgapp \
+    $(call gb_CondBuildUnopkg,unopkgapp) \
        xmlsecurity \
        xsec_xmlsec \
        xstor \
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index ef74bd87aab4..67ba27fbe2f0 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -33,11 +33,11 @@ $(eval $(call gb_Module_add_l10n_targets,desktop,\
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
 $(eval $(call gb_Module_add_targets,desktop,\
     Executable_soffice_bin \
-    Executable_unopkg_bin \
+    $(call gb_CondBuildUnopkg,Executable_unopkg_bin) \
     $(if $(ENABLE_BREAKPAD),Executable_minidump_upload) \
     Library_migrationoo2 \
     Library_migrationoo3 \
-    Library_unopkgapp \
+    $(call gb_CondBuildUnopkg,Library_unopkgapp) \
     Package_scripts \
     $(if $(ENABLE_PAGEIN), \
         Pagein_calc \
@@ -79,8 +79,10 @@ $(eval $(call gb_Module_add_targets,desktop,\
     Executable_sweb \
     Executable_swriter \
     Executable_unoinfo \
-    Executable_unopkg \
-    Executable_unopkg_com \
+    $(call gb_CondBuildUnopkg, \
+        Executable_unopkg \
+        Executable_unopkg_com \
+    ) \
     WinResTarget_quickstart \
     WinResTarget_sbase \
     WinResTarget_scalc \
diff --git a/desktop/Package_scripts.mk b/desktop/Package_scripts.mk
index fbd74f43539b..0c9b1c3ec648 100644
--- a/desktop/Package_scripts.mk
+++ b/desktop/Package_scripts.mk
@@ -12,7 +12,9 @@ $(eval $(call 
gb_Package_Package,desktop_scripts_install,$(SRCDIR)/desktop/scrip
 ifeq (,$(filter MACOSX WNT,$(OS)))
 
 $(eval $(call 
gb_Package_add_file,desktop_scripts_install,$(LIBO_BIN_FOLDER)/gdbtrace,gdbtrace))
+ifneq (,$(call gb_CondBuildUnopkg,$(true)))
 $(eval $(call 
gb_Package_add_file,desktop_scripts_install,$(LIBO_BIN_FOLDER)/unopkg,unopkg.sh))
+endif
 
 endif
 
diff --git a/solenv/gbuild/Conditions.mk b/solenv/gbuild/Conditions.mk
index fb92e14bcef6..d3f05402b78a 100644
--- a/solenv/gbuild/Conditions.mk
+++ b/solenv/gbuild/Conditions.mk
@@ -7,6 +7,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
+define gb_CondBuildUnopkg
+$(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if 
$(DISABLE_DYNLOADING),,$(true))),$(1),$(2))
+endef
+
 define gb_CondBuildLockfile
 $(if $(and $(filter-out ANDROID MACOSX iOS WNT,$(OS))),$(1),$(2))
 endef

Reply via email to