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

New commits:
commit e6b7948503c276bdfe45a5ee6277ad8edbde6ebe
Author: Juergen Funk <juergen.funk...@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.st...@cib.de>
    Tested-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 7f1f1f53206c85fb0e2290e5fb2e20dcedfa2610)
    Reviewed-on: https://gerrit.libreoffice.org/56436
    Tested-by: Jenkins

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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to