[Libreoffice-commits] core.git: external/coinmp external/cppunit external/freetype external/glew external/lcms2 external/openssl external/python3

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Mon May 19 10:58:42 PDT 2014


 external/coinmp/ExternalProject_coinmp.mk              |    2 
 external/cppunit/ExternalProject_cppunit.mk            |    4 
 external/freetype/ExternalProject_freetype.mk          |    2 
 external/glew/ExternalProject_glew.mk                  |    2 
 external/lcms2/ExternalProject_lcms2.mk                |    2 
 external/openssl/UnpackedTarball_openssl.mk            |    1 
 external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1 |   20 ++
 external/python3/ExternalProject_python3.mk            |    2 
 external/python3/UnpackedTarball_python3.mk            |    2 
 external/python3/python-3.3.3-msvc2012-winxp.patch.1   |  117 +++++++++++++++++
 external/python3/python-3.3.3-py17797.patch.1          |   44 ++++++
 11 files changed, 191 insertions(+), 7 deletions(-)

New commits:
commit e175eb3cedded28909247f4d46f2c17ff2f58be2
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 19 19:48:35 2014 +0200

    fdo#77891 fix python crash when in GUI mode, target WinXP with VS2012
    
    VS2012 did change return value of fileno function, this results in a
    crash when run in GUI mode (but not when launching from a shell), as
    python tries to access the nonexisting stdin/stdout/stderr
    Also explicitly target Windows XP
    
    Change-Id: Ic783713b55453f3c38b2e766a664b7f4678711de

diff --git a/external/coinmp/ExternalProject_coinmp.mk b/external/coinmp/ExternalProject_coinmp.mk
index 422cc94..22769e3 100644
--- a/external/coinmp/ExternalProject_coinmp.mk
+++ b/external/coinmp/ExternalProject_coinmp.mk
@@ -20,7 +20,7 @@ $(call gb_ExternalProject_get_state_target,coinmp,build) :
 			/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
 			/p:Platform=Win32 \
 			$(if $(filter 100,$(VCVER)),/p:PlatformToolset=v100 /p:VisualStudioVersion=10.0) \
-			$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+			$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 	,CoinMP/MSVisualStudio/v9)
 
 else
diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk
index 8e74259..9a163e7 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -18,10 +18,10 @@ ifeq ($(OS)$(COM),WNTMSC)
 $(call gb_ExternalProject_get_state_target,cppunit,build) :
 	$(call gb_ExternalProject_run,build,\
 		msbuild.exe cppunit_dll.vcxproj /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 		&& cd ../DllPlugInTester \
 		&& msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 	,src/cppunit)
 else
 
diff --git a/external/freetype/ExternalProject_freetype.mk b/external/freetype/ExternalProject_freetype.mk
index 464a221..17f2a5d 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -18,7 +18,7 @@ $(call gb_ExternalProject_get_state_target,freetype,build) :
 	$(call gb_ExternalProject_run,build,\
 		cd ../builds/win32/vc2010/ && \
 		msbuild.exe freetype.vcxproj /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 	,objs)
 else
 $(call gb_ExternalProject_get_state_target,freetype,build) :
diff --git a/external/glew/ExternalProject_glew.mk b/external/glew/ExternalProject_glew.mk
index 97ad954..79b4a58 100644
--- a/external/glew/ExternalProject_glew.mk
+++ b/external/glew/ExternalProject_glew.mk
@@ -17,7 +17,7 @@ ifeq ($(COM),MSC)
 $(call gb_ExternalProject_get_state_target,glew,build) :
 	$(call gb_ExternalProject_run,build,\
 		msbuild.exe glew_shared.vcxproj /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+		$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 	,build/vc10)
 
 else
diff --git a/external/lcms2/ExternalProject_lcms2.mk b/external/lcms2/ExternalProject_lcms2.mk
index 80472f5..1636bae 100644
--- a/external/lcms2/ExternalProject_lcms2.mk
+++ b/external/lcms2/ExternalProject_lcms2.mk
@@ -20,7 +20,7 @@ $(call gb_ExternalProject_get_state_target,lcms2,build):
 		MSBuild.exe lcms2_DLL.vcxproj \
 			/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
 			/p:Platform=Win32 /p:TargetName=lcms2 \
-			$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+			$(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 	,Projects/VC2010/lcms2_DLL)
 else
 $(call gb_ExternalProject_get_state_target,lcms2,build):
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index cec09d2..2509960 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,openssl,\
 	$(if $(filter LINUX FREEBSD ANDROID,$(OS)),external/openssl/openssllnx.patch) \
 	$(if $(filter WNTGCC,$(OS)$(COM)),external/openssl/opensslmingw.patch) \
 	$(if $(filter MSC,$(COM)),external/openssl/opensslwnt.patch) \
+	$(if $(filter MSC,$(COM)),external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1) \
 	$(if $(filter SOLARIS,$(OS)),external/openssl/opensslsol.patch) \
 	$(if $(filter IOS,$(OS)),external/openssl/opensslios.patch) \
 ))
diff --git a/external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1 b/external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1
new file mode 100644
index 0000000..611ffbc
--- /dev/null
+++ b/external/openssl/openssl-1.0.1g-msvc2012-winxp.patch.1
@@ -0,0 +1,20 @@
+--- openssl.org/util/pl/VC-32.pl	2014-05-18 23:41:39.336594400 +0200
++++ openssl/util/pl/VC-32.pl	2014-05-18 23:47:40.055279300 +0200
+@@ -49,7 +49,7 @@
+     $lib_cflag='/Zl' if (!$shlib);	# remove /DEFAULTLIBs from static lib
+     $opt_cflags=$f.' /Ox';
+     $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
+-    $lflags="/nologo /subsystem:console /opt:ref";
++    $lflags="/nologo /subsystem:console,5.02 /opt:ref";
+ 
+     *::perlasm_compile_target = sub {
+ 	my ($target,$source,$bname)=@_;
+@@ -131,7 +131,7 @@
+     $ff = "/fixed";
+     $opt_cflags=$f.' -Ox -O2 -Ob2';
+     $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
+-    $lflags="/nologo /subsystem:console /opt:ref";
++    $lflags="/nologo /subsystem:console,5.01 /opt:ref";
+     }
+ $mlflags='';
+ 
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 1e6f4c8..1f7be7f 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -37,7 +37,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
 			/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
 			$(if $(filter 100,$(VCVER)), \
 				/ToolsVersion:4.0, \
-				/p:PlatformToolset=v110 /p:VisualStudioVersion=11.0) \
+				/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0) \
 		&& cd $(EXTERNAL_WORKDIR) \
 		&& ln -s PCbuild LO_lib \
 	,PCBuild)
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 15ca76a..d08ba1f 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -29,6 +29,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 	external/python3/python-3.3.0-pythreadstate.patch.1 \
 	external/python3/python-3.3.0-clang.patch.1 \
 	external/python3/python-3.3.3-quoted-printable.patch.1 \
+	external/python3/python-3.3.3-py17797.patch.1 \
+	external/python3/python-3.3.3-msvc2012-winxp.patch.1 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/python-3.3.3-msvc2012-winxp.patch.1 b/external/python3/python-3.3.3-msvc2012-winxp.patch.1
new file mode 100644
index 0000000..2addd49
--- /dev/null
+++ b/external/python3/python-3.3.3-msvc2012-winxp.patch.1
@@ -0,0 +1,117 @@
+without explicit subsystem set, the linker tries to open a file
+with the name of the comptibility version
+(fatal error LNK1181: cannot open input file ",5.01")
+diff -ur python3.org/PCbuild/_ctypes.vcxproj python3/PCbuild/_ctypes.vcxproj
+--- python3.org/PCbuild/_ctypes.vcxproj	2014-05-19 19:06:01.274114800 +0200
++++ python3/PCbuild/_ctypes.vcxproj	2014-05-19 19:07:13.649079800 +0200
+@@ -174,7 +174,7 @@
+     </ClCompile>
+     <Link>
+       <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -187,7 +187,7 @@
+     </ClCompile>
+     <Link>
+       <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -197,7 +197,7 @@
+     </ClCompile>
+     <Link>
+       <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -210,7 +210,7 @@
+     </ClCompile>
+     <Link>
+       <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+       <TargetMachine>MachineX64</TargetMachine>
+     </Link>
+@@ -221,7 +221,7 @@
+     </ClCompile>
+     <Link>
+       <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -234,7 +234,7 @@
+     </ClCompile>
+     <Link>
+       <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+       <TargetMachine>MachineX64</TargetMachine>
+     </Link>
+diff -ur python3.org/PCbuild/_decimal.vcxproj python3/PCbuild/_decimal.vcxproj
+--- python3.org/PCbuild/_decimal.vcxproj	2014-05-19 19:06:01.274114800 +0200
++++ python3/PCbuild/_decimal.vcxproj	2014-05-19 19:07:13.649079800 +0200
+@@ -176,7 +176,7 @@
+       <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+     </ClCompile>
+     <Link>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -189,7 +189,7 @@
+       <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;..\Include;..\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+     </ClCompile>
+     <Link>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -199,7 +199,7 @@
+       <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+     </ClCompile>
+     <Link>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -212,7 +212,7 @@
+       <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+     </ClCompile>
+     <Link>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+       <TargetMachine>MachineX64</TargetMachine>
+     </Link>
+@@ -223,7 +223,7 @@
+       <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+     </ClCompile>
+     <Link>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+     </Link>
+   </ItemDefinitionGroup>
+@@ -236,7 +236,7 @@
+       <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+     </ClCompile>
+     <Link>
+-      <SubSystem>NotSet</SubSystem>
++      <SubSystem>Console</SubSystem>
+       <BaseAddress>0x1D1A0000</BaseAddress>
+       <TargetMachine>MachineX64</TargetMachine>
+     </Link>
diff --git a/external/python3/python-3.3.3-py17797.patch.1 b/external/python3/python-3.3.3-py17797.patch.1
new file mode 100644
index 0000000..3c43fb1
--- /dev/null
+++ b/external/python3/python-3.3.3-py17797.patch.1
@@ -0,0 +1,44 @@
+http://bugs.python.org/issue17797
+http://connect.microsoft.com/VisualStudio/feedback/details/785119/
+
+Visual Studio 2012 changed return value for fileno function that breaks
+when python tries to check/setup stdin/out/err
+diff -ur python3.org/Python/pythonrun.c python3/Python/pythonrun.c
+--- python3.org/Python/pythonrun.c	2014-05-19 19:06:01.305362400 +0200
++++ python3/Python/pythonrun.c	2014-05-19 19:07:13.649079800 +0200
+@@ -1083,7 +1083,11 @@
+      * and fileno() may point to an invalid file descriptor. For example
+      * GUI apps don't have valid standard streams by default.
+      */
++#ifdef MS_WINDOWS
++    if (!is_valid_fd(fd) || GetStdHandle(STD_INPUT_HANDLE) == NULL) {
++#else
+     if (!is_valid_fd(fd)) {
++#endif
+         std = Py_None;
+         Py_INCREF(std);
+     }
+@@ -1098,7 +1102,11 @@
+ 
+     /* Set sys.stdout */
+     fd = fileno(stdout);
++#ifdef MS_WINDOWS
++    if (!is_valid_fd(fd) || GetStdHandle(STD_OUTPUT_HANDLE) == NULL) {
++#else
+     if (!is_valid_fd(fd)) {
++#endif
+         std = Py_None;
+         Py_INCREF(std);
+     }
+@@ -1114,7 +1122,11 @@
+ #if 1 /* Disable this if you have trouble debugging bootstrap stuff */
+     /* Set sys.stderr, replaces the preliminary stderr */
+     fd = fileno(stderr);
++#ifdef MS_WINDOWS
++    if (!is_valid_fd(fd) || GetStdHandle(STD_ERROR_HANDLE) == NULL) {
++#else
+     if (!is_valid_fd(fd)) {
++#endif
+         std = Py_None;
+         Py_INCREF(std);
+     }


More information about the Libreoffice-commits mailing list