Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / external / python3 / python-3.5.4-ssl.patch.1
blobbeb6fe38882f064330ea6da51d5c5d1990f2837b
1 -*- Mode: diff -*-
3 Tweak SSL build to find OpenSSL in workdir & not build it itself in "ssl.vcproj" etc.
5 diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
6 --- python3.orig/PCbuild/pcbuild.sln    2017-08-09 23:39:15.511897077 +0200
7 +++ python3/PCbuild/pcbuild.sln 2017-08-09 23:48:41.375890717 +0200
8 @@ -86,10 +86,6 @@
9  EndProject
10  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
11  EndProject
12 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libeay", "libeay.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
13 -EndProject
14 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay", "ssleay.vcxproj", "{10615B24-73BF-4EFA-93AA-236916321317}"
15 -EndProject
16  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}"
17  EndProject
18  Global
19 diff -ru python3.orig/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj
20 --- python3.orig/PCbuild/_ssl.vcxproj   2017-08-07 09:59:11.000000000 +0200
21 +++ python3/PCbuild/_ssl.vcxproj        2017-08-09 23:50:36.871889419 +0200
22 @@ -1,4 +1,4 @@
23 -<?xml version="1.0" encoding="utf-8"?>\r
24 +<?xml version="1.0" encoding="utf-8"?>\r
25  <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
26    <ItemGroup Label="ProjectConfigurations">\r
27      <ProjectConfiguration Include="Debug|Win32">\r
28 @@ -61,10 +61,10 @@
29    </PropertyGroup>\r
30    <ItemDefinitionGroup>\r
31      <ClCompile>\r
32 -      <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
33 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
34      </ClCompile>\r
35      <Link>\r
36 -      <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>\r
37 +      <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
38      </Link>\r
39    </ItemDefinitionGroup>\r
40    <ItemGroup>\r
41 @@ -78,14 +78,6 @@
42        <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>\r
43        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
44      </ProjectReference>\r
45 -    <ProjectReference Include="libeay.vcxproj">\r
46 -      <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>\r
47 -      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
48 -    </ProjectReference>\r
49 -    <ProjectReference Include="ssleay.vcxproj">\r
50 -      <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>\r
51 -      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
52 -    </ProjectReference>\r
53      <ProjectReference Include="_socket.vcxproj">\r
54        <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>\r
55        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
56 diff -ru python3.orig/setup.py python3/setup.py
57 --- python3.orig/setup.py       2017-08-09 23:39:15.495897077 +0200
58 +++ python3/setup.py    2017-08-09 23:53:06.891887733 +0200
59 @@ -807,7 +807,10 @@
60          exts.append( Extension('_socket', ['socketmodule.c'],
61                                 depends = ['socketmodule.h']) )
62          # Detect SSL support for the socket module (via _ssl)
63 +        ooosslinc = os.environ.get('WORKDIR') + \
64 +            '/UnpackedTarball/openssl/include/'
65          search_for_ssl_incs_in = [
66 +                              ooosslinc,
67                                '/usr/local/ssl/include',
68                                '/usr/contrib/ssl/include/'
69                               ]
70 @@ -819,8 +822,12 @@
71                                 ['/usr/kerberos/include'])
72              if krb5_h:
73                  ssl_incs += krb5_h
74 +        ooossllib = os.environ.get('WORKDIR') + \
75 +            '/UnpackedTarball/openssl'
76 +        ooosslinc = ooosslinc + '/'
77          ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
78 -                                     ['/usr/local/ssl/lib',
79 +                                     [ooossllib,
80 +                                      '/usr/local/ssl/lib',
81                                        '/usr/contrib/ssl/lib/'
82                                       ] )