xref: /aoo4110/main/python/python-ssl.patch (revision b1cdbd2c)
1diff -ur misc/Python-2.7.18/PC/VS9.0/build_ssl.py misc/build/Python-2.7.18/PC/VS9.0/build_ssl.py
2--- misc/Python-2.7.18/PC/VS9.0/build_ssl.py	2020-01-10 00:33:20.903051000 -0500
3+++ misc/build/Python-2.7.18/PC/VS9.0/build_ssl.py	2020-01-10 00:33:30.274973000 -0500
4@@ -235,4 +235,4 @@
5     sys.exit(rc)
6
7 if __name__=='__main__':
8-    main()
9+    sys.exit(0)
10diff -ur misc/Python-2.7.18/setup.py misc/build/Python-2.7.18/setup.py
11--- misc/Python-2.7.18/setup.py	2020-01-10 00:33:20.477509000 -0500
12+++ misc/build/Python-2.7.18/setup.py	2020-01-10 00:33:30.276902000 -0500
13@@ -854,7 +854,15 @@
14                                depends=['socketmodule.h'],
15                                libraries=math_libs) )
16         # Detect SSL support for the socket module (via _ssl)
17+        UPDMINOR = os.environ.get('UPDMINOREXT')
18+        ooosslinc = os.environ.get('SOLARVERSION') + '/' + \
19+            os.environ.get('INPATH') + '/' + \
20+            'inc'
21+        if UPDMINOR != None:
22+            ooosslinc = ooosslinc + UPDMINOR
23+        ooosslinc = ooosslinc + '/external/'
24         search_for_ssl_incs_in = [
25+                              ooosslinc,
26                               '/usr/local/ssl/include',
27                               '/usr/contrib/ssl/include/'
28                              ]
29@@ -866,8 +874,15 @@
30                                ['/usr/kerberos/include'])
31             if krb5_h:
32                 ssl_incs += krb5_h
33+        ooossllib = os.environ.get('SOLARVER') + '/' + \
34+            os.environ.get('INPATH') + '/' + \
35+            'lib'
36+        if UPDMINOR != None:
37+            ooosslinc = ooosslinc + UPDMINOR
38+        ooosslinc = ooosslinc + '/'
39         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
40-                                     ['/usr/local/ssl/lib',
41+                                     [ooossllib,
42+                                      '/usr/local/ssl/lib',
43                                       '/usr/contrib/ssl/lib/'
44                                      ] )
45
46