Mercurial > gub
changeset 6197:13f63473dac4
tools::python: explicitly set flags for building dbm module
Comment from Jan:
in target/tools/src/python-2.4.5/setup.py:527 (and below):
db_setup_debug = False # verbose debug prints from this script?
Setup.py looks for /usr/include/*db*3,4*/db.h, which is entirely broken:
it should ask GCC if it can find db.h (and/or look at the include
flags); we are cross compiling and it entirely ignores that option.
This holds for all of the extension modules that are checked here. It
would be nice if we could add %(system_prefix)s for where it looks for
all extensions; on the other hand: trusting GUB's dependencies and
patching Setup.dist is OK too.
author | John Mandereau <john.mandereau@gmail.com> |
---|---|
date | Mon, 27 Aug 2012 12:16:16 +0200 |
parents | a20b5d52d48d |
children | a82f41987a16 |
files | gub/specs/python.py patches/python-2.4.5-Setup-dbm.patch |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/specs/python.py Sun Aug 26 19:32:51 2012 +0200 +++ b/gub/specs/python.py Mon Aug 27 12:16:16 2012 +0200 @@ -182,6 +182,7 @@ 'python-2.4.5-regen.patch', 'python-2.4.5-gcc-R.patch', 'python-2.4.5-Setup-crypt.patch', + 'python-2.4.5-Setup-dbm.patch', ] dependencies = [ 'autoconf', @@ -190,6 +191,6 @@ ] force_autoupdate = True parallel_build_broken = True - make_flags = Python.make_flags + ' LIBC=-lcrypt' + make_flags = Python.make_flags + ' LIBC="-lcrypt -ldb"' def patch (self): Python.patch (self)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/python-2.4.5-Setup-dbm.patch Mon Aug 27 12:16:16 2012 +0200 @@ -0,0 +1,11 @@ +--- python-2.4.5/Modules/Setup.dist~ 2012-08-26 17:54:57.188647513 +0200 ++++ python-2.4.5/Modules/Setup.dist 2012-08-26 18:10:03.592290524 +0200 +@@ -377,7 +377,7 @@ + # + # First, look at Setup.config; configure may have set this for you. + +-#dbm dbmmodule.c # dbm(3) may require -lndbm or similar ++dbm dbmmodule.c -DHAVE_BERKDB_H -DDB_DBM_HSEARCH -ldb # dbm(3) may require -lndbm or similar + + # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: + #