various: no need to link against libsocket
[unleashed-userland.git] / components / python / python27 / patches / 02-setup.patch
blob47e5841d9833e81affca6cafe141013a28f533b2
1 --- Python-2.7.6/setup.py.~1~ 2013-11-10 11:36:41.000000000 +0400
2 +++ Python-2.7.6/setup.py 2014-06-04 10:11:58.356029565 +0400
3 @@ -437,9 +437,9 @@
5 def detect_modules(self):
6 # Ensure that /usr/local is always used
7 - if not cross_compiling:
8 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
9 - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
10 + # if not cross_compiling:
11 + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
12 + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
13 if cross_compiling:
14 self.add_gcc_paths()
15 self.add_multiarch_paths()
16 @@ -761,6 +761,13 @@
17 ['/usr/lib/termcap'],
18 'termcap'):
19 readline_libs.append('termcap')
21 + if host_platform == 'sunos5':
22 + # insert '-zrecord' before the readline libraries that we
23 + # want to link with to avoid rl_insert() elimination
24 + readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
25 + readline_libs = ()
27 exts.append( Extension('readline', ['readline.c'],
28 library_dirs=['/usr/lib/termcap'],
29 extra_link_args=readline_extra_link_args,
30 @@ -780,9 +787,10 @@
31 exts.append( Extension('_csv', ['_csv.c']) )
33 # socket(2)
34 + socket_libs = math_libs + [ 'nsl' ]
35 exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'],
36 depends=['socketmodule.h'],
37 - libraries=math_libs) )
38 + libraries=socket_libs) )
39 # Detect SSL support for the socket module (via _ssl)
40 search_for_ssl_incs_in = [
41 '/usr/local/ssl/include',
42 @@ -1579,9 +1587,14 @@
43 sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
44 multiprocessing_srcs.append('_multiprocessing/semaphore.c')
46 + multiproc_libs = []
47 + if host_platform == 'sunos5':
48 + multiproc_libs = []
50 if sysconfig.get_config_var('WITH_THREAD'):
51 exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
52 define_macros=macros.items(),
53 + libraries=multiproc_libs,
54 include_dirs=["Modules/_multiprocessing"]))
55 else:
56 missing.append('_multiprocessing')
57 @@ -2075,7 +2088,8 @@
58 # this option. If you want to compile ctypes with the Sun
59 # compiler, please research a proper solution, instead of
60 # finding some -z option for the Sun compiler.
61 - extra_link_args.append('-mimpure-text')
62 + #extra_link_args.append('-mimpure-text')
63 + pass
65 elif host_platform.startswith('hp-ux'):
66 extra_link_args.append('-fPIC')