mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
python: fixes 2.7.6 patchset for libs and headers.
* should help for hashlib, etc
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From b06b5f1a27ce987aba1de80599a8082065399dde Mon Sep 17 00:00:00 2001
|
||||
From 3a159ca3a63ebdddbd2802c08589049e26fbdf40 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 12 Mar 2014 21:17:06 +0000
|
||||
Subject: initial Haiku patch
|
||||
@@ -673,22 +673,23 @@ index 891d568..24959b3 100644
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 40ad843..5ea9c94 100644
|
||||
index 40ad843..24621ef 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -523,6 +523,11 @@ class PyBuildExt(build_ext):
|
||||
@@ -523,6 +523,12 @@ class PyBuildExt(build_ext):
|
||||
lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
|
||||
inc_dirs += ['/system/include', '/atheos/autolnk/include']
|
||||
inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
|
||||
+
|
||||
+ # Haiku-specific include and library locations
|
||||
+ if host_platform == 'haiku1':
|
||||
+ inc_dirs += ['/boot/develop/headers/posix', '/boot/develop/headers/3rdparty']
|
||||
+ lib_dirs += ['/boot/system/lib', '/boot/develop/lib/x86']
|
||||
+ inc_dirs += ['/boot/develop/headers/posix',
|
||||
+ '/boot/system/develop/headers']
|
||||
+ lib_dirs += ['/boot/system/develop/lib']
|
||||
|
||||
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
|
||||
if host_platform in ['osf1', 'unixware7', 'openunix8']:
|
||||
@@ -551,7 +556,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -551,7 +557,7 @@ class PyBuildExt(build_ext):
|
||||
|
||||
# Check for MacOS X, which doesn't need libm.a at all
|
||||
math_libs = ['m']
|
||||
@@ -697,7 +698,55 @@ index 40ad843..5ea9c94 100644
|
||||
math_libs = []
|
||||
|
||||
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
|
||||
@@ -1324,7 +1329,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -788,15 +794,22 @@ class PyBuildExt(build_ext):
|
||||
'/usr/local/ssl/include',
|
||||
'/usr/contrib/ssl/include/'
|
||||
]
|
||||
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
|
||||
+ ssl_incs = find_file('openssl/ssl.h', [],
|
||||
+ inc_dirs + search_for_ssl_incs_in
|
||||
+ )
|
||||
+ ssl_incs_to_add = find_file('openssl/ssl.h', inc_dirs,
|
||||
search_for_ssl_incs_in
|
||||
)
|
||||
if ssl_incs is not None:
|
||||
krb5_h = find_file('krb5.h', inc_dirs,
|
||||
['/usr/kerberos/include'])
|
||||
if krb5_h:
|
||||
- ssl_incs += krb5_h
|
||||
- ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
||||
+ ssl_incs_to_add += krb5_h
|
||||
+ ssl_libs = find_library_file(self.compiler, 'ssl', [],
|
||||
+ lib_dirs + ['/usr/local/ssl/lib',
|
||||
+ '/usr/contrib/ssl/lib/'
|
||||
+ ] )
|
||||
+ ssl_libs_to_add = find_library_file(self.compiler, 'ssl', lib_dirs,
|
||||
['/usr/local/ssl/lib',
|
||||
'/usr/contrib/ssl/lib/'
|
||||
] )
|
||||
@@ -804,8 +817,8 @@ class PyBuildExt(build_ext):
|
||||
if (ssl_incs is not None and
|
||||
ssl_libs is not None):
|
||||
exts.append( Extension('_ssl', ['_ssl.c'],
|
||||
- include_dirs = ssl_incs,
|
||||
- library_dirs = ssl_libs,
|
||||
+ include_dirs = ssl_incs_to_add,
|
||||
+ library_dirs = ssl_libs_to_add,
|
||||
libraries = ['ssl', 'crypto'],
|
||||
depends = ['socketmodule.h']), )
|
||||
else:
|
||||
@@ -843,8 +856,8 @@ class PyBuildExt(build_ext):
|
||||
# The _hashlib module wraps optimized implementations
|
||||
# of hash functions from the OpenSSL library.
|
||||
exts.append( Extension('_hashlib', ['_hashopenssl.c'],
|
||||
- include_dirs = ssl_incs,
|
||||
- library_dirs = ssl_libs,
|
||||
+ include_dirs = ssl_incs_to_add,
|
||||
+ library_dirs = ssl_libs_to_add,
|
||||
libraries = ['ssl', 'crypto']) )
|
||||
else:
|
||||
print ("warning: openssl 0x%08x is too old for _hashlib" %
|
||||
@@ -1324,7 +1337,7 @@ class PyBuildExt(build_ext):
|
||||
missing.append('resource')
|
||||
|
||||
# Sun yellow pages. Some systems have the functions in libc.
|
||||
|
||||
Reference in New Issue
Block a user