[Libreoffice-commits] core.git: external/gpgmepp external/libassuan external/libgpg-error

Stephan Bergmann sbergman at redhat.com
Tue Nov 28 07:35:36 UTC 2017


 external/gpgmepp/ExternalProject_gpgmepp.mk           |    3 ++-
 external/libassuan/ExternalProject_libassuan.mk       |    3 ++-
 external/libgpg-error/ExternalProject_libgpg-error.mk |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e0d94237878d4949573fc9b6d97eea3146cada6d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Nov 27 14:13:15 2017 +0100

    Use Executable_cpp instead of default gcc as preprocessor for windres
    
    ...to avoid having GCC as yet another prerequisite on Windows.
    
    Cygwin 'man windres' states:  "The default preprocessor argument is 'gcc -E
    -xc-header -DRC_INVOKED'."  Of those arguments, -E and -xc-header are not
    relevant for Executable_cpp, so only -DRC_INVOKED is kept.
    
    Additional arguments that turned out to be necessary are:
    
    -I$(ATL_INCLUDE)
    So that
      #include <afxres.h>
    in workdir/UnpackedTarball/libgpg-error/src/versioninfo.rc is found.  (Not sure
    how the original code using gcc found this.)
    
    -+
    So that using a C++ style comment in
      #include "winres.h"           // extract from windows header
    in afxres.h does not cause a "Syntax error in #include" from Executable_cpp.
    
    $(SOLARINC)
    So that
       #include "winres.h"           // extract from windows header
    in afxres.h is found.  (Not sure how the original code using gcc found this.)
    
    -DWINAPI_FAMILY=0
    Because dlgs.h (included indirectly from afxres.h) contains
      #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
      [...]
      typedef struct tagCRGB
      {
          BYTE    bRed;
          BYTE    bGreen;
          BYTE    bBlue;
          BYTE    bExtra;
      } CRGB;           /* RGB Color */
    and the WINAPI_FAMILY_PARTITION conditional (defined in winapifamily.h) would be
    true, causing the output to contain those "typedef struct tagCRGB ..." tokens
    that windres apparently doesn't expect (failing with "windres: can't open file
    `tagCRGB': No such file or directory").  (Not sure how the original code using
    gcc avoided this.)
    
    Change-Id: Ic2d031c72025f2e9dbde26c774215d2d2d0a43a9
    Reviewed-on: https://gerrit.libreoffice.org/45334
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk
index afd6ab6344f9..7aaa42a12b40 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_use_externals,gpgmepp,\
 ))
 
 ifeq ($(COM),MSC)
-$(call gb_ExternalProject_get_state_target,gpgmepp,build):
+$(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_get_target,cpp)
 	$(call gb_ExternalProject_run,build,\
 		autoreconf \
 		&& ./configure \
@@ -39,6 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build):
 				$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
 		   --host=$(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
 		   MAKE=$(MAKE) \
+		   RC='windres --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC) -I$(ATL_INCLUDE)'\' \
 	  && $(MAKE) \
 	)
 else
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk
index 21d034455dca..fdadb2851042 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_ExternalProject_use_externals,libassuan,\
 ))
 
 ifeq ($(COM),MSC)
-$(call gb_ExternalProject_get_state_target,libassuan,build):
+$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target,cpp)
 	$(call gb_ExternalProject_run,build,\
 		autoreconf \
 		&& ./configure \
@@ -32,6 +32,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build):
 		GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
 		--host=$(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
 		MAKE=$(MAKE) \
+		RC='windres --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC) -I$(ATL_INCLUDE)'\' \
 	  && $(MAKE) \
 	)
 
diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk
index ef22e3926b69..ecb96f00b496 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libgpg-error,\
 $(eval $(call gb_ExternalProject_use_autoconf,libgpg-error,build))
 
 ifeq ($(COM),MSC)
-$(call gb_ExternalProject_get_state_target,libgpg-error,build):
+$(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Executable_get_target,cpp)
 	$(call gb_ExternalProject_run,build,\
 		MAKE=$(MAKE) ./configure \
 			--enable-static \
@@ -29,6 +29,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build):
 				'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
 					-Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN') \
 			--host=$(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \
+			RC='windres --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC) -I$(ATL_INCLUDE)'\' \
 	  && $(MAKE) \
 	)
 


More information about the Libreoffice-commits mailing list