diff options
Diffstat (limited to 'lang/python21/patches/patch-ac')
-rw-r--r-- | lang/python21/patches/patch-ac | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/lang/python21/patches/patch-ac b/lang/python21/patches/patch-ac index cd3e6bbfb65..876aa59c66f 100644 --- a/lang/python21/patches/patch-ac +++ b/lang/python21/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.7 2005/05/29 07:35:54 minskim Exp $ +$NetBSD: patch-ac,v 1.8 2005/05/29 08:03:25 minskim Exp $ --- setup.py.orig 2001-12-27 15:51:02.000000000 -0600 +++ setup.py @@ -68,7 +68,34 @@ $NetBSD: patch-ac,v 1.7 2005/05/29 07:35:54 minskim Exp $ if (ssl_incs is not None and ssl_libs is not None): -@@ -408,8 +409,8 @@ class PyBuildExt(build_ext): +@@ -346,16 +347,20 @@ class PyBuildExt(build_ext): + # (See http://electricrain.com/greg/python/bsddb3/ for an interface to + # BSD DB 3.x.) + ++ bdb_type = os.environ['PY_BDB_TYPE'] ++ dblib_dir = [os.environ['PY_BDB_LIBDIRS']] + dblib = [] +- if self.compiler.find_library_file(lib_dirs, 'db'): ++ if self.compiler.find_library_file(dblib_dir, 'db'): + dblib = ['db'] ++ elif self.compiler.find_library_file(dblib_dir, bdb_type): ++ dblib = [bdb_type] + +- db185_incs = find_file('db_185.h', inc_dirs, +- ['/usr/include/db3', '/usr/include/db2']) +- db_inc = find_file('db.h', inc_dirs, ['/usr/include/db1']) +- if db185_incs is not None: ++ db_inc = [os.environ['PY_BDB_INCDIRS']] ++ if bdb_type in ['db2', 'db3', 'db4']: + exts.append( Extension('bsddb', ['bsddbmodule.c'], +- include_dirs = db185_incs, ++ include_dirs = db_inc, ++ library_dirs = dblib_dir, ++ runtime_library_dirs = dblib_dir, + define_macros=[('HAVE_DB_185_H',1)], + libraries = dblib ) ) + elif db_inc is not None: +@@ -408,8 +413,8 @@ class PyBuildExt(build_ext): if (self.compiler.find_library_file(lib_dirs, 'ncurses')): curses_libs = ['ncurses'] @@ -79,7 +106,7 @@ $NetBSD: patch-ac,v 1.7 2005/05/29 07:35:54 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 +418,8 @@ class PyBuildExt(build_ext): +@@ -417,8 +422,8 @@ class PyBuildExt(build_ext): else: curses_libs = ['curses', 'termcap'] @@ -90,7 +117,7 @@ $NetBSD: patch-ac,v 1.7 2005/05/29 07:35:54 minskim Exp $ # If the curses module is enabled, check for the panel module if (os.path.exists('Modules/_curses_panel.c') and -@@ -451,23 +452,7 @@ class PyBuildExt(build_ext): +@@ -451,23 +456,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/ @@ -115,7 +142,7 @@ $NetBSD: patch-ac,v 1.7 2005/05/29 07:35:54 minskim Exp $ # Interface to the Expat XML parser # -@@ -609,7 +594,7 @@ def main(): +@@ -609,7 +598,7 @@ def main(): ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install |