diff options
Diffstat (limited to 'lang/python21/patches/patch-ac')
-rw-r--r-- | lang/python21/patches/patch-ac | 69 |
1 files changed, 63 insertions, 6 deletions
diff --git a/lang/python21/patches/patch-ac b/lang/python21/patches/patch-ac index 876aa59c66f..96923258705 100644 --- a/lang/python21/patches/patch-ac +++ b/lang/python21/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ +$NetBSD: patch-ac,v 1.9 2005/05/29 08:41:34 minskim Exp $ --- setup.py.orig 2001-12-27 15:51:02.000000000 -0600 +++ setup.py @@ -68,7 +68,27 @@ $NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ if (ssl_incs is not None and ssl_libs is not None): -@@ -346,16 +347,20 @@ class PyBuildExt(build_ext): +@@ -322,19 +323,6 @@ class PyBuildExt(build_ext): + # implementation independent wrapper for these; dumbdbm.py provides + # similar functionality (but slower of course) implemented in Python. + +- # The standard Unix dbm module: +- if platform not in ['cygwin']: +- if (self.compiler.find_library_file(lib_dirs, 'ndbm')): +- exts.append( Extension('dbm', ['dbmmodule.c'], +- libraries = ['ndbm'] ) ) +- else: +- exts.append( Extension('dbm', ['dbmmodule.c']) ) +- +- # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: +- if (self.compiler.find_library_file(lib_dirs, 'gdbm')): +- exts.append( Extension('gdbm', ['gdbmmodule.c'], +- libraries = ['gdbm'] ) ) +- + # Berkeley DB interface. + # + # This requires the Berkeley DB code, see +@@ -346,16 +334,20 @@ class PyBuildExt(build_ext): # (See http://electricrain.com/greg/python/bsddb3/ for an interface to # BSD DB 3.x.) @@ -95,7 +115,44 @@ $NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ define_macros=[('HAVE_DB_185_H',1)], libraries = dblib ) ) elif db_inc is not None: -@@ -408,8 +413,8 @@ class PyBuildExt(build_ext): +@@ -363,6 +355,36 @@ class PyBuildExt(build_ext): + include_dirs = db_inc, + libraries = dblib) ) + ++ # The standard Unix dbm module: ++ if platform not in ['cygwin']: ++ if find_file("ndbm.h", inc_dirs, []) is not None: ++ if (self.compiler.find_library_file(lib_dirs, 'ndbm')): ++ ndbm_libs = ['ndbm'] ++ else: ++ ndbm_libs = [] ++ exts.append( Extension('dbm', ['dbmmodule.c'], ++ libraries = ndbm_libs ) ) ++ elif find_file("ndbm.h", db_inc, []) is not None: ++ exts.append( Extension('dbm', ['dbmmodule.c'], ++ library_dirs=dblib_dir, ++ runtime_library_dirs=dblib_dir, ++ include_dirs=db_inc, ++ define_macros=[('HAVE_NDBM_H',None)], ++ libraries=dblib)) ++ elif db_inc is not None: ++ exts.append( Extension('dbm', ['dbmmodule.c'], ++ library_dirs=dblib_dir, ++ runtime_library_dirs=dblib_dir, ++ include_dirs=db_inc, ++ define_macros=[('HAVE_BERKDB_H',None), ++ ('DB_DBM_HSEARCH',None)], ++ libraries=dblib)) ++ ++ # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: ++ if (self.compiler.find_library_file(lib_dirs, 'gdbm')): ++ exts.append( Extension('gdbm', ['gdbmmodule.c'], ++ libraries = ['gdbm'] ) ) ++ + # The mpz module interfaces to the GNU Multiple Precision library. + # You need to ftp the GNU MP library. + # This was originally written and tested against GMP 1.2 and 1.3.2. +@@ -408,8 +430,8 @@ class PyBuildExt(build_ext): if (self.compiler.find_library_file(lib_dirs, 'ncurses')): curses_libs = ['ncurses'] @@ -106,7 +163,7 @@ $NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ elif (self.compiler.find_library_file(lib_dirs, 'curses')) and platform[:6] != 'darwin': # OSX has an old Berkeley curses, not good enough for the _curses module. if (self.compiler.find_library_file(lib_dirs, 'terminfo')): -@@ -417,8 +422,8 @@ class PyBuildExt(build_ext): +@@ -417,8 +439,8 @@ class PyBuildExt(build_ext): else: curses_libs = ['curses', 'termcap'] @@ -117,7 +174,7 @@ $NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ # If the curses module is enabled, check for the panel module if (os.path.exists('Modules/_curses_panel.c') and -@@ -451,23 +456,7 @@ class PyBuildExt(build_ext): +@@ -451,23 +473,7 @@ class PyBuildExt(build_ext): # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ @@ -142,7 +199,7 @@ $NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ # Interface to the Expat XML parser # -@@ -609,7 +598,7 @@ def main(): +@@ -609,7 +615,7 @@ def main(): ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install |