[Libreoffice-commits] core.git: instsetoo_native/CustomTarget_setup.mk

Juergen Funk juergen.funk_ml at cib.de
Mon Jun 25 10:58:11 UTC 2018


 instsetoo_native/CustomTarget_setup.mk |   48 ++++++++++++++++++++++++---------
 1 file changed, 35 insertions(+), 13 deletions(-)

New commits:
commit 7f1f1f53206c85fb0e2290e5fb2e20dcedfa2610
Author: Juergen Funk <juergen.funk_ml at cib.de>
Date:   Fri Jun 22 08:39:28 2018 +0200

    tdf#118303 - Wrong converting of the Vendor-String
    
    Using the make-file function, in this case no converting
    
    this problem was introduced by switching to native Win32 make:
    
    * Makefiles don't have any metadata to specify the encoding
    * all of the Cygwin tools in the build system assume
       everything is UTF-8 encoded
    * Win32 make calls CreateProcessA(), which converts the
       arguments from some so-called "ANSI" codepage to UCS-2
    
    hence in commands invoked from make, the UTF-8 string is
    erroneously interpreted as latin1 and converted to UCS-2.
    
    Change-Id: Ibf3e573b07e7e2d9119e0ff7b4972d8065d84bea
    Reviewed-on: https://gerrit.libreoffice.org/56272
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Tested-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/instsetoo_native/CustomTarget_setup.mk b/instsetoo_native/CustomTarget_setup.mk
index 315e5c825de3..ebeb00dcd019 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -149,21 +149,43 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
 		&& echo 'UNO_SERVICES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)services.rdb $${URE_MORE_SERVICES}' \
 	) > $@
 
+
+
+
+
+define instsetoo_native_genversionini
+[Version]
+AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)
+BuildVersion=$(BUILD_VER_STRING)
+buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)
+ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update
+UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))
+ReferenceOOoMajorMinor=4.1
+UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US
+UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))
+UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)
+Vendor=$(OOO_VENDOR)
+endef
+
+
+
 .PHONY: $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,version)
 $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,version) :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
-	( \
-		echo '[Version]' \
-		&& echo 'AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)' \
-		&& echo 'BuildVersion=$(BUILD_VER_STRING)' \
-		&& echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \
-		&& echo 'ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update' \
-		&& echo 'UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))' \
-		&& echo 'ReferenceOOoMajorMinor=4.1' \
-		&& echo 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US' \
-		&& echo 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))' \
-		&& echo 'UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)' \
-		&& echo 'Vendor=$(OOO_VENDOR)' \
-	) > $@
+ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
+	printf '[Version]\n' > $@ && \
+	printf 'AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)\n' >> $@ && \
+	printf 'BuildVersion=$(BUILD_VER_STRING)\n' >> $@ && \
+	printf 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)\n' >> $@ && \
+	printf 'ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update\n' >> $@ && \
+	printf 'UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))\n' >> $@ && \
+	printf 'ReferenceOOoMajorMinor=4.1\n' >> $@ && \
+	printf 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US\n' >> $@ && \
+	printf 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))\n' >> $@ && \
+	printf 'UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)\n' >> $@ && \
+	printf 'Vendor=$(OOO_VENDOR)\n' >> $@
+else
+	$(file > $@, $(call instsetoo_native_genversionini))
+endif
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list