fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / python3 / python-3.3.0-ssl.patch.1
blobb85fe076fff83565391e0b23b647ba9306bc8d88
1 -*- Mode: diff -*-
3 Tweak SSL build to find OpenSSL in solver & not build it itself in "ssl.vcproj" etc.
5 diff -ru python3.old_/Modules/Setup.dist python3/Modules/Setup.dist
6 --- python3.old_/Modules/Setup.dist     2012-09-29 10:00:42.000000000 +0200
7 +++ python3/Modules/Setup.dist  2012-11-13 14:19:01.994158111 +0100
8 @@ -236,14 +236,14 @@
9  # The _md5 module implements the RSA Data Security, Inc. MD5
10  # Message-Digest Algorithm, described in RFC 1321.
12 -#_md5 md5module.c
13 +_md5 md5module.c
16  # The _sha module implements the SHA checksum algorithms.
17  # (NIST's Secure Hash Algorithms.)
18 -#_sha1 sha1module.c
19 -#_sha256 sha256module.c
20 -#_sha512 sha512module.c
21 +_sha1 sha1module.c
22 +_sha256 sha256module.c
23 +_sha512 sha512module.c
26  # The _tkinter module.
27 diff -ru python3.old_/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
28 --- python3.old_/PCbuild/pcbuild.sln    2012-09-29 10:00:48.000000000 +0200
29 +++ python3/PCbuild/pcbuild.sln 2012-11-13 14:50:39.220142472 +0100
30 @@ -58,8 +58,6 @@
31  EndProject
32  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
33  EndProject
34 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
35 -EndProject
36  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcxproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
37  EndProject
38  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
39 diff -ru python3.old_/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj
40 --- python3.old_/PCbuild/_ssl.vcxproj   2012-09-29 10:00:48.000000000 +0200
41 +++ python3/PCbuild/_ssl.vcxproj        2012-11-13 14:55:50.298137715 +0100
42 @@ -151,14 +151,14 @@
43    </PropertyGroup>
44    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
45      <ClCompile>
46 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
47 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
48      </ClCompile>
49      <PreLinkEvent>
50        <Command>
51        </Command>
52      </PreLinkEvent>
53      <Link>
54 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
55 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
56      </Link>
57    </ItemDefinitionGroup>
58    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
59 @@ -166,26 +166,26 @@
60        <TargetEnvironment>X64</TargetEnvironment>
61      </Midl>
62      <ClCompile>
63 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
64 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
65      </ClCompile>
66      <PreLinkEvent>
67        <Command>
68        </Command>
69      </PreLinkEvent>
70      <Link>
71 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
72 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
73      </Link>
74    </ItemDefinitionGroup>
75    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
76      <ClCompile>
77 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
78 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
79      </ClCompile>
80      <PreLinkEvent>
81        <Command>
82        </Command>
83      </PreLinkEvent>
84      <Link>
85 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
86 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
87      </Link>
88    </ItemDefinitionGroup>
89    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
90 @@ -193,26 +193,26 @@
91        <TargetEnvironment>X64</TargetEnvironment>
92      </Midl>
93      <ClCompile>
94 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
95 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
96      </ClCompile>
97      <PreLinkEvent>
98        <Command>
99        </Command>
100      </PreLinkEvent>
101      <Link>
102 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
103 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
104      </Link>
105    </ItemDefinitionGroup>
106    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
107      <ClCompile>
108 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
109 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
110      </ClCompile>
111      <PreLinkEvent>
112        <Command>
113        </Command>
114      </PreLinkEvent>
115      <Link>
116 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
117 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
118      </Link>
119    </ItemDefinitionGroup>
120    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
121 @@ -220,27 +220,27 @@
122        <TargetEnvironment>X64</TargetEnvironment>
123      </Midl>
124      <ClCompile>
125 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
126 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
127      </ClCompile>
128      <PreLinkEvent>
129        <Command>
130        </Command>
131      </PreLinkEvent>
132      <Link>
133 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
134 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
135        <TargetMachine>MachineX64</TargetMachine>
136      </Link>
137    </ItemDefinitionGroup>
138    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
139      <ClCompile>
140 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
141 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
142      </ClCompile>
143      <PreLinkEvent>
144        <Command>
145        </Command>
146      </PreLinkEvent>
147      <Link>
148 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
149 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
150      </Link>
151    </ItemDefinitionGroup>
152    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
153 @@ -248,14 +248,14 @@
154        <TargetEnvironment>X64</TargetEnvironment>
155      </Midl>
156      <ClCompile>
157 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
158 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
159      </ClCompile>
160      <PreLinkEvent>
161        <Command>
162        </Command>
163      </PreLinkEvent>
164      <Link>
165 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
166 +      <AdditionalDependencies>ws2_32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
167        <TargetMachine>MachineX64</TargetMachine>
168      </Link>
169    </ItemDefinitionGroup>
170 @@ -271,10 +271,6 @@
171        <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
172        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
173      </ProjectReference>
174 -    <ProjectReference Include="ssl.vcxproj">
175 -      <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
176 -      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
177 -    </ProjectReference>
178      <ProjectReference Include="_socket.vcxproj">
179        <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
180        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
181 diff -ru python3.old_/setup.py python3/setup.py
182 --- python3.old_/setup.py       2012-09-29 10:00:50.000000000 +0200
183 +++ python3/setup.py    2012-11-13 14:18:23.484158149 +0100
184 @@ -757,7 +757,10 @@
185          exts.append( Extension('_socket', ['socketmodule.c'],
186                                 depends = ['socketmodule.h']) )
187          # Detect SSL support for the socket module (via _ssl)
188 +        ooosslinc = os.environ.get('WORKDIR') + \
189 +            '/UnpackedTarball/openssl/include/'
190          search_for_ssl_incs_in = [
191 +                              ooosslinc,
192                                '/usr/local/ssl/include',
193                                '/usr/contrib/ssl/include/'
194                               ]
195 @@ -769,8 +774,12 @@
196                                 ['/usr/kerberos/include'])
197              if krb5_h:
198                  ssl_incs += krb5_h
199 +        ooossllib = os.environ.get('WORKDIR') + \
200 +            '/UnpackedTarball/openssl'
201 +        ooosslinc = ooosslinc + '/'
202          ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
203 -                                     ['/usr/local/ssl/lib',
204 +                                     [ooossllib,
205 +                                      '/usr/local/ssl/lib',
206                                        '/usr/contrib/ssl/lib/'
207                                       ] )