Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 239099 Details for
Bug 269111
Make python modules cross-compile
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixed patch for python-2.6.5-r3
python-2.6-cross-setup-sysroot.patch (text/plain), 7.19 KB, created by
NickNill
on 2010-07-16 22:32:56 UTC
(
hide
)
Description:
fixed patch for python-2.6.5-r3
Filename:
MIME Type:
Creator:
NickNill
Created:
2010-07-16 22:32:56 UTC
Size:
7.19 KB
patch
obsolete
>--- setup.py 2010-07-16 21:51:44.000000000 +0000 >+++ setup.py.new 2010-07-16 20:53:29.000000000 +0000 >@@ -372,9 +372,15 @@ > > def detect_modules(self): > global disable_ssl >+ >+ # We must respect the user specified sysroot! >+ sysroot=os.getenv('PYTHON_SYSROOT') >+ if sysroot is None: >+ sysroot='' >+ > # 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, sysroot+'/usr/local/lib') >+ add_dir_to_list(self.compiler.include_dirs, sysroot+'/usr/local/include') > > # Add paths specified in the environment variables LDFLAGS and > # CPPFLAGS for header and library files. >@@ -410,12 +416,20 @@ > for directory in reversed(options.dirs): > add_dir_to_list(dir_list, directory) > >- if os.path.normpath(sys.prefix) != '/usr': >+ if os.path.normpath(sys.prefix) != '/usr' and sysroot == '': > add_dir_to_list(self.compiler.library_dirs, > sysconfig.get_config_var("LIBDIR")) > add_dir_to_list(self.compiler.include_dirs, > sysconfig.get_config_var("INCLUDEDIR")) > >+ # We should always look into sysroot/usr/include and consider >+ # also the lib dirs there for searching for files >+ add_dir_to_list(self.compiler.include_dirs, sysroot+'/usr/include') >+ add_dir_to_list(self.compiler.library_dirs, sysroot+'/lib') >+ add_dir_to_list(self.compiler.library_dirs, sysroot+'/lib64') >+ add_dir_to_list(self.compiler.library_dirs, sysroot+'/usr/lib') >+ add_dir_to_list(self.compiler.library_dirs, sysroot+'/usr/lib64') >+ > try: > have_unicode = unicode > except NameError: >@@ -424,11 +438,8 @@ > # lib_dirs and inc_dirs are used to search for files; > # if a file is found in one of those directories, it can > # be assumed that no additional -I,-L directives are needed. >- lib_dirs = self.compiler.library_dirs + [ >- '/lib64', '/usr/lib64', >- '/lib', '/usr/lib', >- ] >- inc_dirs = self.compiler.include_dirs + ['/usr/include'] >+ lib_dirs = self.compiler.library_dirs >+ inc_dirs = self.compiler.include_dirs > exts = [] > missing = [] > >@@ -677,11 +688,11 @@ > elif curses_library: > readline_libs.append(curses_library) > elif self.compiler.find_library_file(lib_dirs + >- ['/usr/@@GENTOO_LIBDIR@@/termcap'], >+ [sysroot+'/usr/@@GENTOO_LIBDIR@@/termcap'], > 'termcap'): > readline_libs.append('termcap') > exts.append( Extension('readline', ['readline.c'], >- library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'], >+ library_dirs=[sysroot+'/usr/@@GENTOO_LIBDIR@@/termcap'], > extra_link_args=readline_extra_link_args, > libraries=readline_libs) ) > else: >@@ -706,20 +717,20 @@ > depends = ['socketmodule.h']) ) > # Detect SSL support for the socket module (via _ssl) > search_for_ssl_incs_in = [ >- '/usr/local/ssl/include', >- '/usr/contrib/ssl/include/' >+ sysroot+'/usr/local/ssl/include', >+ sysroot+'/usr/contrib/ssl/include/' > ] > ssl_incs = find_file('openssl/ssl.h', inc_dirs, > search_for_ssl_incs_in > ) > if ssl_incs is not None and not disable_ssl: > krb5_h = find_file('krb5.h', inc_dirs, >- ['/usr/kerberos/include']) >+ [sysroot+'/usr/kerberos/include']) > if krb5_h: > ssl_incs += krb5_h > ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, >- ['/usr/local/ssl/lib', >- '/usr/contrib/ssl/lib/' >+ [sysroot+'/usr/local/ssl/lib', >+ sysroot+'/usr/contrib/ssl/lib/' > ] ) > > if (ssl_incs is not None and >@@ -837,33 +848,33 @@ > # construct a list of paths to look for the header file in on > # top of the normal inc_dirs. > db_inc_paths = [ >- '/usr/include/db4', >- '/usr/local/include/db4', >- '/opt/sfw/include/db4', >- '/usr/include/db3', >- '/usr/local/include/db3', >- '/opt/sfw/include/db3', >+ sysroot+'/usr/include/db4', >+ sysroot+'/usr/local/include/db4', >+ sysroot+'/opt/sfw/include/db4', >+ sysroot+'/usr/include/db3', >+ sysroot+'/usr/local/include/db3', >+ sysroot+'/opt/sfw/include/db3', > # Fink defaults (http://fink.sourceforge.net/) >- '/sw/include/db4', >- '/sw/include/db3', >+ sysroot+'/sw/include/db4', >+ sysroot+'/sw/include/db3', > ] > # 4.x minor number specific paths > for x in gen_db_minor_ver_nums(4): >- db_inc_paths.append('/usr/include/db4%d' % x) >- db_inc_paths.append('/usr/include/db4.%d' % x) >- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) >- db_inc_paths.append('/usr/local/include/db4%d' % x) >- db_inc_paths.append('/pkg/db-4.%d/include' % x) >- db_inc_paths.append('/opt/db-4.%d/include' % x) >+ db_inc_paths.append(sysroot+'/usr/include/db4%d' % x) >+ db_inc_paths.append(sysroot+'/usr/include/db4.%d' % x) >+ db_inc_paths.append(sysroot+'/usr/local/BerkeleyDB.4.%d/include' % x) >+ db_inc_paths.append(sysroot+'/usr/local/include/db4%d' % x) >+ db_inc_paths.append(sysroot+'/pkg/db-4.%d/include' % x) >+ db_inc_paths.append(sysroot+'/opt/db-4.%d/include' % x) > # MacPorts default (http://www.macports.org/) > db_inc_paths.append('/opt/local/include/db4%d' % x) > # 3.x minor number specific paths > for x in gen_db_minor_ver_nums(3): >- db_inc_paths.append('/usr/include/db3%d' % x) >- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) >- db_inc_paths.append('/usr/local/include/db3%d' % x) >- db_inc_paths.append('/pkg/db-3.%d/include' % x) >- db_inc_paths.append('/opt/db-3.%d/include' % x) >+ db_inc_paths.append(sysroot+'/usr/include/db3%d' % x) >+ db_inc_paths.append(sysroot+'/usr/local/BerkeleyDB.3.%d/include' % x) >+ db_inc_paths.append(sysroot+'/usr/local/include/db3%d' % x) >+ db_inc_paths.append(sysroot+'/pkg/db-3.%d/include' % x) >+ db_inc_paths.append(sysroot+'/opt/db-3.%d/include' % x) > > # Add some common subdirectories for Sleepycat DB to the list, > # based on the standard include directories. This way DB3/4 gets
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269111
:
190749
|
190750
|
190751
|
190753
| 239099 |
253831
|
254741