--- a/components/python/python26/patches/Python26-01-solaris-lib-dirs.patch Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-01-solaris-lib-dirs.patch Wed May 30 12:40:14 2012 -0700
@@ -16,7 +16,7 @@
new file mode 100644
--- Python-2.6.4/setup.py
+++ Python-2.6.4/setup.py
-@@ -309,10 +309,10 @@
+@@ -355,10 +355,10 @@
return sys.platform
def detect_modules(self):
@@ -31,7 +31,7 @@
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
# We must get the values from the Makefile and not the environment
-@@ -610,11 +610,22 @@
+@@ -687,11 +687,22 @@
exts.append( Extension('_csv', ['_csv.c']) )
# socket(2)
@@ -56,7 +56,7 @@
'/usr/contrib/ssl/include/'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
-@@ -625,8 +636,12 @@
+@@ -702,8 +713,12 @@
['/usr/kerberos/include'])
if krb5_h:
ssl_incs += krb5_h
@@ -70,7 +70,7 @@
'/usr/contrib/ssl/lib/'
] )
-@@ -635,6 +650,7 @@
+@@ -712,6 +727,7 @@
exts.append( Extension('_ssl', ['_ssl.c'],
include_dirs = ssl_incs,
library_dirs = ssl_libs,
@@ -78,7 +78,7 @@
libraries = ['ssl', 'crypto'],
depends = ['socketmodule.h']), )
else:
-@@ -1079,6 +1095,16 @@
+@@ -1191,16 +1207,34 @@
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
@@ -93,25 +93,34 @@
+ else:
+ curses_lib_dirs.append('/usr/gnu/lib/amd64')
panel_library = 'panel'
- if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
- curses_libs = ['ncursesw']
-@@ -1087,10 +1111,13 @@
- panel_library = 'panelw'
+- if curses_library.startswith('ncurses'):
+- if curses_library == 'ncursesw':
+- # Bug 1464056: If _curses.so links with ncursesw,
+- # _curses_panel.so must link with panelw.
+- panel_library = 'panelw'
+- curses_libs = [curses_library]
++ if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
++ curses_libs = ['ncursesw']
++ # Bug 1464056: If _curses.so links with ncursesw,
++ # _curses_panel.so must link with panelw.
++ panel_library = 'panelw'
exts.append( Extension('_curses', ['_cursesmodule.c'],
libraries = curses_libs) )
-- elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
+- elif curses_library == 'curses' and platform != 'darwin':
+ elif (self.compiler.find_library_file(lib_dirs + curses_lib_dirs, 'ncurses')):
- curses_libs = ['ncurses']
- exts.append( Extension('_curses', ['_cursesmodule.c'],
-- libraries = curses_libs) )
++ curses_libs = ['ncurses']
++ exts.append( Extension('_curses', ['_cursesmodule.c'],
+ libraries = curses_libs,
+ library_dirs = curses_lib_dirs,
+ runtime_library_dirs = curses_lib_dirs,
+ include_dirs = curses_inc_dirs ) )
- elif (self.compiler.find_library_file(lib_dirs, 'curses')
- and platform != 'darwin'):
++
++ elif (self.compiler.find_library_file(lib_dirs, 'curses')
++ and platform != 'darwin'):
# OSX has an old Berkeley curses, not good enough for
-@@ -1109,9 +1136,12 @@
+ # the _curses module.
+ if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
+@@ -1217,9 +1251,12 @@
# If the curses module is enabled, check for the panel module
if (module_enabled(exts, '_curses') and
@@ -126,7 +135,7 @@
else:
missing.append('_curses_panel')
-@@ -1324,8 +1354,13 @@
+@@ -1432,9 +1469,14 @@
if macros.get('HAVE_SEM_OPEN', False):
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
@@ -134,13 +143,14 @@
+ if platform == 'sunos5':
+ multiproc_libs = [ "xnet" ]
+
- exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
- define_macros=macros.items(),
-+ libraries=multiproc_libs,
- include_dirs=["Modules/_multiprocessing"]))
- # End multiprocessing
-
-@@ -1549,15 +1584,26 @@
+ if sysconfig.get_config_var('WITH_THREAD'):
+ exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+ define_macros=macros.items(),
++ libraries=multiproc_libs,
+ include_dirs=["Modules/_multiprocessing"]))
+ else:
+ missing.append('_multiprocessing')
+@@ -1674,12 +1716,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.
@@ -154,22 +164,19 @@
- 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
-+ 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
-+
- # Now check for the header files
- if tklib and tcllib:
- # Check for the include files on Debian and {Free,Open}BSD, where
-@@ -1572,6 +1618,7 @@
+@@ -1697,6 +1750,7 @@
for dir in inc_dirs:
tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
tk_include_sub += [dir + os.sep + "tk" + dotversion]
@@ -177,7 +184,7 @@
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)
-@@ -1636,6 +1683,7 @@
+@@ -1761,6 +1815,7 @@
include_dirs = include_dirs,
libraries = libs,
library_dirs = added_lib_dirs,