patches/Python-01-solaris-lib-dirs.diff
author lp117937
Mon, 18 Sep 2006 23:09:23 +0000
changeset 8162 ab63e00d2219
parent 7696 5a6471b4785b
child 16364 f8f2a02122dd
permissions -rw-r--r--
2006-09-18 Laszlo (Laca) Peter <[email protected]> Python 64-bit changes, mostly from John.Levon. * patches/Python-01-solaris-lib-dirs.diff: (update) merge for 2.4.3 and fix ssl libdir part so that it uses a 64-bit libdir when built in 64-bit mode * patches/Python-02-pycc.diff: (update) reset IFS correctly; use = not ==; add some hacks at the bottom to use the right gcc options, so 64-bit can build * patches/Python-03-distutils-pycc.diff: force using pycc/pyCC so that CC/CXX/FLAGS/LDFLAGS are picked up from the environment * patches/Python-04-distutils-log.diff: fix log.info commands so that they work when the '%' char appears in a compiler flags * patches/Python-05-isalibs.diff: (new) make .so's be generated as foo.so, 64/foo.so; some really nasty fixes to pyconfig.h: we cannot use the compile-time version of SIZEOF, so we hack them in using _LP64. We use PY_CHECK_SIZEOF to avoid autoconf automatically adding them to pyconfig.h; in the Makefile, make python obey libdir for libpython, but still put the generic stuff in /usr/lib/python2.4 (not /usr/lib/amd64/python2.4...) 2006-09-18 Laszlo (Laca) Peter <[email protected]> * pygtk2.spec: re-enable optimisation as the compiler bug that prevented it has been fixed spec-files/Solaris: 2006-09-18 Laszlo (Laca) Peter <[email protected]> Python 64-bit changes * SUNWPython.spec: added patched 3,4,5 (see ../ChangeLog for defails); build 32-bit and 64-bit versions of python 2.4.3; upgraded to 2.4.3; moved smtpd.py to /usr/demo/python * Solaris.inc: define cxx_optflags64 -- 64-bit c++ compiler flags 2006-09-18 Laszlo (Laca) Peter <[email protected]> * .pkgtoolrc: add ${tarballdirs} to the tarball dir search path so that you can specify additional directories in ~/.pkgtoolrc * SUNWbrltty.spec: delete some unnecessary env variables * SUNWdbus.spec: revert to normal optimisation flags, the build problems were caused by ld(1) bug 6467925 * SUNWevolution-data-server.spec: delete some unnecessary env variables * SUNWevolution-exchange.spec: delete some unnecessary env variables * SUNWevolution-jescs.spec: delete some unnecessary env variables * SUNWevolution-libs.spec: delete some unnecessary env variables * SUNWevolution-webcal.spec: delete some unnecessary env variables * SUNWevolution.spec: delete some unnecessary env variables * SUNWfsexam.spec: delete some unnecessary env variables * SUNWgnome-a11y-gok.spec: delete some unnecessary env variables * SUNWgnome-a11y-libs.spec: delete some unnecessary env variables * SUNWgnome-a11y-reader.spec: delete some unnecessary env variables * SUNWgnome-applets.spec: delete some unnecessary env variables * SUNWgnome-archive-mgr.spec: delete some unnecessary env variables * SUNWgnome-calculator.spec: delete some unnecessary env variables * SUNWgnome-camera.spec: delete some unnecessary env variables * SUNWgnome-cd-burner.spec: delete some unnecessary env variables * SUNWgnome-character-map.spec: delete some unnecessary env variables * SUNWgnome-component.spec: set PERL to /usr/perl5/bin/perl as per CR6454456 * SUNWgnome-config-editor.spec: delete some unnecessary env variables * SUNWgnome-desktop-prefs.spec: delete some unnecessary env variables * SUNWgnome-dialog.spec: delete some unnecessary env variables * SUNWgnome-doc-utils.spec: delete some unnecessary env variables * SUNWgnome-file-mgr.spec: delete some unnecessary env variables * SUNWgnome-games.spec: delete some unnecessary env variables * SUNWgnome-help-viewer.spec: delete some unnecessary env variables * SUNWgnome-img-editor.spec: delete some unnecessary env variables * SUNWgnome-img-viewer.spec: delete some unnecessary env variables * SUNWgnome-keyring-manager.spec: delete some unnecessary env variables * SUNWgnome-libs.spec: delete some unnecessary env variables
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
     1
--- Python-2.4.3/setup.py.patch1	2006-03-23 14:07:46.000000000 -0500
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
     2
+++ Python-2.4.3/setup.py	2006-09-14 22:12:55.808430000 -0400
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
     3
@@ -239,9 +239,10 @@
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
     4
         return sys.platform
61ff457d14ec forgot to add this
laca
parents:
diff changeset
     5
 
61ff457d14ec forgot to add this
laca
parents:
diff changeset
     6
     def detect_modules(self):
61ff457d14ec forgot to add this
laca
parents:
diff changeset
     7
-        # Ensure that /usr/local is always used
61ff457d14ec forgot to add this
laca
parents:
diff changeset
     8
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
61ff457d14ec forgot to add this
laca
parents:
diff changeset
     9
-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    10
+        if sys.platform != 'sunos5':
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    11
+            # Ensure that /usr/local is always used
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    12
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    13
+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    14
 
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    15
         # Add paths to popular package managers on OS X/darwin
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    16
         if sys.platform == "darwin":
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    17
@@ -268,7 +269,7 @@
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    18
         # be assumed that no additional -I,-L directives are needed.
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    19
         lib_dirs = self.compiler.library_dirs + [
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    20
             '/lib64', '/usr/lib64',
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    21
-            '/lib', '/usr/lib',
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    22
+            '/lib', '/usr/lib'
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    23
             ]
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    24
         inc_dirs = self.compiler.include_dirs + ['/usr/include']
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    25
         exts = []
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    26
@@ -452,11 +453,23 @@
6215
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    27
         exts.append( Extension('_csv', ['_csv.c']) )
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    28
 
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    29
         # socket(2)
7696
5a6471b4785b Undo last commit; not updating Python.
dc144907
parents: 7694
diff changeset
    30
+	socket_libs = []
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    31
+        if self.compiler.find_library_file(lib_dirs,
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    32
+                                           'socket'):
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    33
+            socket_libs.append('socket')
6197
ea9345b668d7 update to look for -lnsl too
laca
parents: 6194
diff changeset
    34
+        if self.compiler.find_library_file(lib_dirs,
ea9345b668d7 update to look for -lnsl too
laca
parents: 6194
diff changeset
    35
+                                           'nsl'):
ea9345b668d7 update to look for -lnsl too
laca
parents: 6194
diff changeset
    36
+            socket_libs.append('nsl')
6202
4869cc687625 2005-10-28 Brian Cameron <[email protected]>
bc99092
parents: 6197
diff changeset
    37
+        if self.compiler.find_library_file(lib_dirs,
4869cc687625 2005-10-28 Brian Cameron <[email protected]>
bc99092
parents: 6197
diff changeset
    38
+                                           'resolv'):
4869cc687625 2005-10-28 Brian Cameron <[email protected]>
bc99092
parents: 6197
diff changeset
    39
+            socket_libs.append('resolv')
6215
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    40
         exts.append( Extension('_socket', ['socketmodule.c'],
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    41
-                               depends = ['socketmodule.h']) )
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    42
+                               depends = ['socketmodule.h'],
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    43
+                               libraries = socket_libs) )
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    44
         # Detect SSL support for the socket module (via _ssl)
7696
5a6471b4785b Undo last commit; not updating Python.
dc144907
parents: 7694
diff changeset
    45
         ssl_incs = find_file('openssl/ssl.h', inc_dirs,
5a6471b4785b Undo last commit; not updating Python.
dc144907
parents: 7694
diff changeset
    46
-                             ['/usr/local/ssl/include',
5a6471b4785b Undo last commit; not updating Python.
dc144907
parents: 7694
diff changeset
    47
+                             ['/usr/sfw/include',
5a6471b4785b Undo last commit; not updating Python.
dc144907
parents: 7694
diff changeset
    48
+                              '/usr/local/ssl/include',
7404
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    49
                               '/usr/contrib/ssl/include/'
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    50
                              ]
7696
5a6471b4785b Undo last commit; not updating Python.
dc144907
parents: 7694
diff changeset
    51
                              )
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    52
@@ -465,8 +478,13 @@
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    53
                                ['/usr/kerberos/include'])
7404
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    54
             if krb5_h:
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    55
                 ssl_incs += krb5_h
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    56
+	if sys.maxint == 2147483647L:
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    57
+	    sfw_libdir = '/usr/sfw/lib';
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    58
+	else:
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    59
+	    sfw_libdir = '/usr/sfw/lib/64';
7404
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    60
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    61
-                                     ['/usr/local/ssl/lib',
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    62
+                                     [sfw_libdir,
7404
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    63
+                                      '/usr/local/ssl/lib',
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    64
                                       '/usr/contrib/ssl/lib/'
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    65
                                      ] )
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    66
 
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    67
@@ -475,6 +493,7 @@
7404
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    68
             exts.append( Extension('_ssl', ['_ssl.c'],
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    69
                                    include_dirs = ssl_incs,
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    70
                                    library_dirs = ssl_libs,
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    71
+                                   runtime_library_dirs = ssl_libs,
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    72
                                    libraries = ['ssl', 'crypto'],
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    73
                                    depends = ['socketmodule.h']), )
c402f57165b4 2006-06-08 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 6215
diff changeset
    74
 
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
    75
@@ -985,15 +1004,25 @@
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    76
 
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    77
         # Assume we haven't found any of the libraries or include files
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    78
         # The versions with dots are used on Unix, and the versions without
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    79
-        # dots on Windows, for detection by cygwin.
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    80
+        # dots on Windows, for detection by cygwin. 
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    81
+	added_lib_dirs = []
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    82
+	tcl_tk_lib_dirs = ['/usr/sfw/lib']
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    83
+	tcl_tk_inc_dirs = ['/usr/sfw/include']
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    84
         tcllib = tklib = tcl_includes = tk_includes = None
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    85
         for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    86
                         '82', '8.1', '81', '8.0', '80']:
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    87
-            tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    88
-            tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    89
+            tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version, tcl_tk_lib_dirs)
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    90
+            tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version, tcl_tk_lib_dirs)
6215
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    91
             if tklib and tcllib:
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    92
                 # Exit the loop when we've found the Tcl/Tk libraries
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    93
                 break
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    94
+            tklib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tk' + version)
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    95
+            tcllib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tcl' + version)
6215
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    96
+            if tklib and tcllib:
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    97
+		# found the libs in a non-standard dir
61ff457d14ec forgot to add this
laca
parents:
diff changeset
    98
+		added_lib_dirs.append(os.path.dirname(tcllib))
6215
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
    99
+                # Exit the loop when we've found the Tcl/Tk libraries
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
   100
+                break
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   101
 
6215
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
   102
         # Now check for the header files
2653e6560475 2005-10-30 Laszlo Peter <[email protected]>
laca
parents: 6202
diff changeset
   103
         if tklib and tcllib:
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
   104
@@ -1009,6 +1038,7 @@
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   105
             for dir in inc_dirs:
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   106
                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   107
                 tk_include_sub += [dir + os.sep + "tk" + dotversion]
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   108
+	    tcl_include_sub += tcl_tk_inc_dirs
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   109
             tk_include_sub += tcl_include_sub
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   110
             tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub)
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   111
             tk_includes = find_file('tk.h', inc_dirs, tk_include_sub)
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
   112
@@ -1020,7 +1050,7 @@
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   113
 
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   114
         # OK... everything seems to be present for Tcl/Tk.
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   115
 
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   116
-        include_dirs = [] ; libs = [] ; defs = [] ; added_lib_dirs = []
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   117
+        include_dirs = [] ; libs = [] ; defs = []
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   118
         for dir in tcl_includes + tk_includes:
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   119
             if dir not in include_dirs:
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   120
                 include_dirs.append(dir)
8162
ab63e00d2219 2006-09-18 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7696
diff changeset
   121
@@ -1073,6 +1103,7 @@
6194
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   122
                         include_dirs = include_dirs,
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   123
                         libraries = libs,
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   124
                         library_dirs = added_lib_dirs,
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   125
+                        runtime_library_dirs = added_lib_dirs
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   126
                         )
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   127
         self.extensions.append(ext)
61ff457d14ec forgot to add this
laca
parents:
diff changeset
   128