bump product version to 4.1.6.2
[LibreOffice.git] / python3 / python-3.3.0-ssl.patch.1
bloba7c4c409f1463f516721819853197be435706d27
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_/PC/VS9.0/pcbuild.sln python3/PC/VS9.0/pcbuild.sln
28 --- python3.old_/PC/VS9.0/pcbuild.sln   2012-09-29 10:00:47.000000000 +0200
29 +++ python3/PC/VS9.0/pcbuild.sln        2012-11-13 14:44:29.329147866 +0100
30 @@ -136,11 +136,6 @@
31                 {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
32         EndProjectSection
33  EndProject
34 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
35 -       ProjectSection(ProjectDependencies) = postProject
36 -               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
37 -       EndProjectSection
38 -EndProject
39  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
40  EndProject
41  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
42 diff -ru python3.old_/PC/VS9.0/_ssl.vcproj python3/PC/VS9.0/_ssl.vcproj
43 --- python3.old_/PC/VS9.0/_ssl.vcproj   2012-09-29 10:00:47.000000000 +0200
44 +++ python3/PC/VS9.0/_ssl.vcproj        2012-11-13 14:27:15.874169273 +0100
45 @@ -42,7 +42,7 @@
46                         />
47                         <Tool
48                                 Name="VCCLCompilerTool"
49 -                               AdditionalIncludeDirectories="$(opensslDir)\inc32"
50 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
51                         />
52                         <Tool
53                                 Name="VCManagedResourceCompilerTool"
54 @@ -56,7 +56,7 @@
55                         />
56                         <Tool
57                                 Name="VCLinkerTool"
58 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
59 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
60                         />
61                         <Tool
62                                 Name="VCALinkTool"
63 @@ -104,7 +104,7 @@
64                         />
65                         <Tool
66                                 Name="VCCLCompilerTool"
67 -                               AdditionalIncludeDirectories="$(opensslDir)\inc64"
68 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
69                         />
70                         <Tool
71                                 Name="VCManagedResourceCompilerTool"
72 @@ -118,7 +118,7 @@
73                         />
74                         <Tool
75                                 Name="VCLinkerTool"
76 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
77 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
78                         />
79                         <Tool
80                                 Name="VCALinkTool"
81 @@ -166,7 +166,7 @@
82                         />
83                         <Tool
84                                 Name="VCCLCompilerTool"
85 -                               AdditionalIncludeDirectories="$(opensslDir)\inc32"
86 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
87                         />
88                         <Tool
89                                 Name="VCManagedResourceCompilerTool"
90 @@ -180,7 +180,7 @@
91                         />
92                         <Tool
93                                 Name="VCLinkerTool"
94 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
95 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
96                         />
97                         <Tool
98                                 Name="VCALinkTool"
99 @@ -229,7 +229,7 @@
100                         />
101                         <Tool
102                                 Name="VCCLCompilerTool"
103 -                               AdditionalIncludeDirectories="$(opensslDir)\inc64"
104 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
105                         />
106                         <Tool
107                                 Name="VCManagedResourceCompilerTool"
108 @@ -243,7 +243,7 @@
109                         />
110                         <Tool
111                                 Name="VCLinkerTool"
112 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
113 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
114                         />
115                         <Tool
116                                 Name="VCALinkTool"
117 @@ -291,7 +291,7 @@
118                         />
119                         <Tool
120                                 Name="VCCLCompilerTool"
121 -                               AdditionalIncludeDirectories="$(opensslDir)\inc32"
122 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
123                         />
124                         <Tool
125                                 Name="VCManagedResourceCompilerTool"
126 @@ -305,7 +305,7 @@
127                         />
128                         <Tool
129                                 Name="VCLinkerTool"
130 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
131 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
132                         />
133                         <Tool
134                                 Name="VCALinkTool"
135 @@ -354,7 +354,7 @@
136                         />
137                         <Tool
138                                 Name="VCCLCompilerTool"
139 -                               AdditionalIncludeDirectories="$(opensslDir)\inc64"
140 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
141                         />
142                         <Tool
143                                 Name="VCManagedResourceCompilerTool"
144 @@ -368,7 +368,7 @@
145                         />
146                         <Tool
147                                 Name="VCLinkerTool"
148 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
149 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
150                                 TargetMachine="17"
151                         />
152                         <Tool
153 @@ -417,7 +417,7 @@
154                         />
155                         <Tool
156                                 Name="VCCLCompilerTool"
157 -                               AdditionalIncludeDirectories="$(opensslDir)\inc32"
158 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
159                         />
160                         <Tool
161                                 Name="VCManagedResourceCompilerTool"
162 @@ -431,7 +431,7 @@
163                         />
164                         <Tool
165                                 Name="VCLinkerTool"
166 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
167 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
168                         />
169                         <Tool
170                                 Name="VCALinkTool"
171 @@ -480,7 +480,7 @@
172                         />
173                         <Tool
174                                 Name="VCCLCompilerTool"
175 -                               AdditionalIncludeDirectories="$(opensslDir)\inc64"
176 +                               AdditionalIncludeDirectories="$(WORKDIR)/UnpackedTarball/openssl/include"
177                         />
178                         <Tool
179                                 Name="VCManagedResourceCompilerTool"
180 @@ -494,7 +494,7 @@
181                         />
182                         <Tool
183                                 Name="VCLinkerTool"
184 -                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
185 +                               AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
186                                 TargetMachine="17"
187                         />
188                         <Tool
189 diff -ru python3.old_/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
190 --- python3.old_/PCbuild/pcbuild.sln    2012-09-29 10:00:48.000000000 +0200
191 +++ python3/PCbuild/pcbuild.sln 2012-11-13 14:50:39.220142472 +0100
192 @@ -58,8 +58,6 @@
193  EndProject
194  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
195  EndProject
196 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
197 -EndProject
198  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcxproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
199  EndProject
200  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
201 diff -ru python3.old_/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj
202 --- python3.old_/PCbuild/_ssl.vcxproj   2012-09-29 10:00:48.000000000 +0200
203 +++ python3/PCbuild/_ssl.vcxproj        2012-11-13 14:55:50.298137715 +0100
204 @@ -151,14 +151,14 @@
205    </PropertyGroup>
206    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
207      <ClCompile>
208 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
209 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
210      </ClCompile>
211      <PreLinkEvent>
212        <Command>
213        </Command>
214      </PreLinkEvent>
215      <Link>
216 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
217 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
218      </Link>
219    </ItemDefinitionGroup>
220    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
221 @@ -166,26 +166,26 @@
222        <TargetEnvironment>X64</TargetEnvironment>
223      </Midl>
224      <ClCompile>
225 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
226 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
227      </ClCompile>
228      <PreLinkEvent>
229        <Command>
230        </Command>
231      </PreLinkEvent>
232      <Link>
233 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
234 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
235      </Link>
236    </ItemDefinitionGroup>
237    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
238      <ClCompile>
239 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
240 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
241      </ClCompile>
242      <PreLinkEvent>
243        <Command>
244        </Command>
245      </PreLinkEvent>
246      <Link>
247 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
248 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
249      </Link>
250    </ItemDefinitionGroup>
251    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
252 @@ -193,26 +193,26 @@
253        <TargetEnvironment>X64</TargetEnvironment>
254      </Midl>
255      <ClCompile>
256 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
257 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
258      </ClCompile>
259      <PreLinkEvent>
260        <Command>
261        </Command>
262      </PreLinkEvent>
263      <Link>
264 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
265 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
266      </Link>
267    </ItemDefinitionGroup>
268    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
269      <ClCompile>
270 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
271 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
272      </ClCompile>
273      <PreLinkEvent>
274        <Command>
275        </Command>
276      </PreLinkEvent>
277      <Link>
278 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
279 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
280      </Link>
281    </ItemDefinitionGroup>
282    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
283 @@ -220,27 +220,27 @@
284        <TargetEnvironment>X64</TargetEnvironment>
285      </Midl>
286      <ClCompile>
287 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
288 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
289      </ClCompile>
290      <PreLinkEvent>
291        <Command>
292        </Command>
293      </PreLinkEvent>
294      <Link>
295 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
296 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
297        <TargetMachine>MachineX64</TargetMachine>
298      </Link>
299    </ItemDefinitionGroup>
300    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
301      <ClCompile>
302 -      <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
303 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
304      </ClCompile>
305      <PreLinkEvent>
306        <Command>
307        </Command>
308      </PreLinkEvent>
309      <Link>
310 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
311 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
312      </Link>
313    </ItemDefinitionGroup>
314    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
315 @@ -248,14 +248,14 @@
316        <TargetEnvironment>X64</TargetEnvironment>
317      </Midl>
318      <ClCompile>
319 -      <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
320 +      <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
321      </ClCompile>
322      <PreLinkEvent>
323        <Command>
324        </Command>
325      </PreLinkEvent>
326      <Link>
327 -      <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
328 +      <AdditionalDependencies>ws2_32.lib;$(SOLARVER)\$(INPATH)\lib\libeay32.lib;$(SOLARVER)\$(INPATH)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
329        <TargetMachine>MachineX64</TargetMachine>
330      </Link>
331    </ItemDefinitionGroup>
332 @@ -271,10 +271,6 @@
333        <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
334        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
335      </ProjectReference>
336 -    <ProjectReference Include="ssl.vcxproj">
337 -      <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
338 -      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
339 -    </ProjectReference>
340      <ProjectReference Include="_socket.vcxproj">
341        <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
342        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
343 diff -ru python3.old_/setup.py python3/setup.py
344 --- python3.old_/setup.py       2012-09-29 10:00:50.000000000 +0200
345 +++ python3/setup.py    2012-11-13 14:18:23.484158149 +0100
346 @@ -757,7 +757,10 @@
347          exts.append( Extension('_socket', ['socketmodule.c'],
348                                 depends = ['socketmodule.h']) )
349          # Detect SSL support for the socket module (via _ssl)
350 +        ooosslinc = os.environ.get('WORKDIR') + '/' + \
351 +            '/UnpackedTarball/openssl/include/'
352          search_for_ssl_incs_in = [
353 +                              ooosslinc,
354                                '/usr/local/ssl/include',
355                                '/usr/contrib/ssl/include/'
356                               ]
357 @@ -769,8 +774,13 @@
358                                 ['/usr/kerberos/include'])
359              if krb5_h:
360                  ssl_incs += krb5_h
361 +        ooossllib = os.environ.get('SOLARVER') + '/' + \
362 +            os.environ.get('INPATH') + '/' + \
363 +            'lib'
364 +        ooosslinc = ooosslinc + '/'
365          ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
366 -                                     ['/usr/local/ssl/lib',
367 +                                     [ooossllib,
368 +                                      '/usr/local/ssl/lib',
369                                        '/usr/contrib/ssl/lib/'
370                                       ] )