--- a/components/python/python27/patches/02-setup.patch Fri Oct 03 14:30:07 2014 -0700
+++ b/components/python/python27/patches/02-setup.patch Sat Oct 04 14:50:43 2014 -0700
@@ -1,22 +1,27 @@
---- Python-2.7.1/setup.py.~1~ Sun Oct 31 11:40:21 2010
-+++ Python-2.7.1/setup.py Fri Jul 15 15:04:56 2011
-@@ -369,8 +369,8 @@
+This patch modifies the setup script to support Solaris.
+As it is Solaris-specific, it is not suitable for upstream.
+
+--- Python-2.7.8/setup.py.~1~ 2014-06-29 19:05:48.000000000 -0700
++++ Python-2.7.8/setup.py 2014-07-17 20:37:57.419011542 -0700
+@@ -437,9 +437,9 @@
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')
-+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+- if not cross_compiling:
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ # if not cross_compiling:
++ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
-@@ -657,6 +657,13 @@
+@@ -763,6 +763,13 @@
['/usr/lib/termcap'],
'termcap'):
readline_libs.append('termcap')
+
-+ if platform == 'sunos5':
++ if host_platform == 'sunos5':
+ # insert '-zrecord' before the readline libraries that we
+ # want to link with to avoid rl_insert() elimination
+ readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
@@ -25,20 +30,21 @@
exts.append( Extension('readline', ['readline.c'],
library_dirs=['/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
-@@ -677,6 +684,7 @@
-
+@@ -784,7 +791,7 @@
# socket(2)
- exts.append( Extension('_socket', ['socketmodule.c'],
-+ libraries = ['socket', 'nsl'],
- depends = ['socketmodule.h']) )
+ exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'],
+ depends=['socketmodule.h'],
+- libraries=math_libs) )
++ libraries=math_libs + ['socket', 'nsl']) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
-@@ -1443,9 +1451,14 @@
+ '/usr/local/ssl/include',
+@@ -1585,9 +1592,14 @@
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
+ multiproc_libs = []
-+ if platform == 'sunos5':
++ if host_platform == 'sunos5':
+ multiproc_libs = [ "xnet" ]
+
if sysconfig.get_config_var('WITH_THREAD'):
@@ -48,7 +54,7 @@
include_dirs=["Modules/_multiprocessing"]))
else:
missing.append('_multiprocessing')
-@@ -1896,7 +1909,8 @@
+@@ -2081,7 +2088,8 @@
# this option. If you want to compile ctypes with the Sun
# compiler, please research a proper solution, instead of
# finding some -z option for the Sun compiler.
@@ -56,5 +62,5 @@
+ #extra_link_args.append('-mimpure-text')
+ pass
- elif sys.platform.startswith('hp-ux'):
+ elif host_platform.startswith('hp-ux'):
extra_link_args.append('-fPIC')