forgot to add this
authorlaca
Thu, 27 Oct 2005 20:32:33 +0000
changeset 6194 61ff457d14ec
parent 6193 011617068c65
child 6195 b3b577f4eca0
forgot to add this
patches/Python-01-solaris-lib-dirs.diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/Python-01-solaris-lib-dirs.diff	Thu Oct 27 20:32:33 2005 +0000
@@ -0,0 +1,90 @@
+--- Python-2.4.1/setup.py	2005-03-09 17:27:24.000000000 -0500
++++ Python-2.4.1.new/setup.py	2005-10-27 14:38:05.973836000 -0400
+@@ -238,9 +238,10 @@
+         return sys.platform
+ 
+     def detect_modules(self):
+-        # Ensure that /usr/local is always used
+-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++        if sys.platform != 'sunos5':
++            # Ensure that /usr/local is always used
++            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ 
+         # Add paths to popular package managers on OS X/darwin
+         if sys.platform == "darwin":
+@@ -267,7 +268,7 @@
+         # be assumed that no additional -I,-L directives are needed.
+         lib_dirs = self.compiler.library_dirs + [
+             '/lib64', '/usr/lib64',
+-            '/lib', '/usr/lib',
++            '/lib', '/usr/lib'
+             ]
+         inc_dirs = self.compiler.include_dirs + ['/usr/include']
+         exts = []
+@@ -450,6 +451,12 @@
+         # socket(2)
+         exts.append( Extension('_socket', ['socketmodule.c'],
+                                depends = ['socketmodule.h']) )
++	socket_libs = []
++        if self.compiler.find_library_file(lib_dirs,
++                                           'socket'):
++            socket_libs.append('socket')
++        exts.append( Extension('_socket', ['socketmodule.c'],
++                                   libraries = socket_libs) )
+         # Detect SSL support for the socket module (via _ssl)
+         ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+                              ['/usr/local/ssl/include',
+@@ -974,13 +981,23 @@
+ 
+         # Assume we haven't found any of the libraries or include files
+         # The versions with dots are used on Unix, and the versions without
+-        # dots on Windows, for detection by cygwin.
++        # dots on Windows, for detection by cygwin. 
++	added_lib_dirs = []
++	tcl_tk_lib_dirs = ['/usr/sfw/lib']
++	tcl_tk_inc_dirs = ['/usr/sfw/include']
+         tcllib = tklib = tcl_includes = tk_includes = None
+         for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
+                         '82', '8.1', '81', '8.0', '80']:
+-            tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
+-            tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
++            tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version, tcl_tk_lib_dirs)
++            tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version, tcl_tk_lib_dirs)
++            if tklib and tcllib:
++                # Exit the loop when we've found the Tcl/Tk libraries
++                break
++            tklib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tk' + version)
++            tcllib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tcl' + version)
+             if tklib and tcllib:
++		# found the libs in a non-standard dir
++		added_lib_dirs.append(os.path.dirname(tcllib))
+                 # Exit the loop when we've found the Tcl/Tk libraries
+                 break
+ 
+@@ -998,6 +1015,7 @@
+             for dir in inc_dirs:
+                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
+                 tk_include_sub += [dir + os.sep + "tk" + dotversion]
++	    tcl_include_sub += tcl_tk_inc_dirs
+             tk_include_sub += tcl_include_sub
+             tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub)
+             tk_includes = find_file('tk.h', inc_dirs, tk_include_sub)
+@@ -1009,7 +1027,7 @@
+ 
+         # OK... everything seems to be present for Tcl/Tk.
+ 
+-        include_dirs = [] ; libs = [] ; defs = [] ; added_lib_dirs = []
++        include_dirs = [] ; libs = [] ; defs = []
+         for dir in tcl_includes + tk_includes:
+             if dir not in include_dirs:
+                 include_dirs.append(dir)
+@@ -1062,6 +1080,7 @@
+                         include_dirs = include_dirs,
+                         libraries = libs,
+                         library_dirs = added_lib_dirs,
++                        runtime_library_dirs = added_lib_dirs
+                         )
+         self.extensions.append(ext)
+