From fa7bc2f8ccf2278355d0efb6629e30309bf4e0d0 Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 12 Apr 2006 20:21:48 +0000 Subject: update python24 to 2.4.3 Python 2.4 is now in bugfix-only mode, no new features are being added. At least 50 bugs have been squashed since Python 2.4.2, including a number of bugs and potential bugs found by Coverity. --- lang/python/srcdist.mk | 6 +-- lang/python24/Makefile | 10 ++--- lang/python24/PLIST.common | 11 +++++- lang/python24/distinfo | 16 ++++---- lang/python24/patches/patch-ad | 6 +-- lang/python24/patches/patch-ae | 10 ++--- lang/python24/patches/patch-al | 85 ++++++++++++++++++------------------------ lang/python24/patches/patch-am | 77 ++++++++++++++++++++------------------ 8 files changed, 110 insertions(+), 111 deletions(-) (limited to 'lang') diff --git a/lang/python/srcdist.mk b/lang/python/srcdist.mk index 195caf99e77..38fd99b24de 100644 --- a/lang/python/srcdist.mk +++ b/lang/python/srcdist.mk @@ -1,14 +1,14 @@ -# $NetBSD: srcdist.mk,v 1.17 2005/10/02 10:50:57 recht Exp $ +# $NetBSD: srcdist.mk,v 1.18 2006/04/12 20:21:48 drochner Exp $ .include "../../lang/python/pyversion.mk" .if ${_PYTHON_VERSION} == "24" -DISTNAME= Python-2.4.2 +DISTNAME= Python-2.4.3 EXTRACT_SUFX= .tar.bz2 DISTINFO_FILE= ${.CURDIR}/../../lang/python24/distinfo PATCHDIR= ${.CURDIR}/../../lang/python24/patches -PYSUBDIR= Python-2.4.2 +PYSUBDIR= Python-2.4.3 WRKSRC= ${WRKDIR}/${PYSUBDIR} MASTER_SITES= ftp://ftp.python.org/pub/python/2.4/ diff --git a/lang/python24/Makefile b/lang/python24/Makefile index 1bc46b3a4fb..947626beecf 100644 --- a/lang/python24/Makefile +++ b/lang/python24/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.22 2006/03/13 12:59:08 rillig Exp $ +# $NetBSD: Makefile,v 1.23 2006/04/12 20:21:48 drochner Exp $ # -DISTNAME= Python-2.4.2 -PKGNAME= python24-2.4.2 -PKGREVISION= 5 +DISTNAME= Python-2.4.3 +PKGNAME= python24-2.4.3 CATEGORIES= lang python -MASTER_SITES= ftp://ftp.python.org/pub/python/2.4.2/ +MASTER_SITES= ftp://ftp.python.org/pub/python/2.4.3/ \ + http://www.python.org/ftp/python/2.4.3/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= recht@NetBSD.org diff --git a/lang/python24/PLIST.common b/lang/python24/PLIST.common index 3ef283d2229..6d298e99562 100644 --- a/lang/python24/PLIST.common +++ b/lang/python24/PLIST.common @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.common,v 1.4 2005/05/09 20:37:51 recht Exp $ +@comment $NetBSD: PLIST.common,v 1.5 2006/04/12 20:21:48 drochner Exp $ bin/pydoc${PY_VER_SUFFIX} bin/python${PY_VER_SUFFIX} bin/smtpd${PY_VER_SUFFIX}.py @@ -200,6 +200,9 @@ lib/python${PY_VER_SUFFIX}/bsddb/dbutils.pyo lib/python${PY_VER_SUFFIX}/bsddb/test/__init__.py lib/python${PY_VER_SUFFIX}/bsddb/test/__init__.pyc lib/python${PY_VER_SUFFIX}/bsddb/test/__init__.pyo +lib/python${PY_VER_SUFFIX}/bsddb/test/test_1413192.py +lib/python${PY_VER_SUFFIX}/bsddb/test/test_1413192.pyc +lib/python${PY_VER_SUFFIX}/bsddb/test/test_1413192.pyo lib/python${PY_VER_SUFFIX}/bsddb/test/test_all.py lib/python${PY_VER_SUFFIX}/bsddb/test/test_all.pyc lib/python${PY_VER_SUFFIX}/bsddb/test/test_all.pyo @@ -650,6 +653,7 @@ lib/python${PY_VER_SUFFIX}/email/test/data/msg_40.txt lib/python${PY_VER_SUFFIX}/email/test/data/msg_41.txt lib/python${PY_VER_SUFFIX}/email/test/data/msg_42.txt lib/python${PY_VER_SUFFIX}/email/test/data/msg_43.txt +lib/python${PY_VER_SUFFIX}/email/test/data/msg_44.txt lib/python${PY_VER_SUFFIX}/email/test/test_email.py lib/python${PY_VER_SUFFIX}/email/test/test_email.pyc lib/python${PY_VER_SUFFIX}/email/test/test_email.pyo @@ -1290,7 +1294,6 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/mmap.so ${NISMODULE}lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so lib/python${PY_VER_SUFFIX}/lib-dynload/operator.so lib/python${PY_VER_SUFFIX}/lib-dynload/parser.so -lib/python${PY_VER_SUFFIX}/lib-dynload/pwd.so lib/python${PY_VER_SUFFIX}/lib-dynload/regex.so lib/python${PY_VER_SUFFIX}/lib-dynload/resource.so ${EXTRA_SO}lib/python${PY_VER_SUFFIX}/lib-dynload/rgbimg.so @@ -1693,6 +1696,7 @@ lib/python${PY_VER_SUFFIX}/test/badsyntax_future8.py lib/python${PY_VER_SUFFIX}/test/badsyntax_future9.py lib/python${PY_VER_SUFFIX}/test/badsyntax_nocaret.py lib/python${PY_VER_SUFFIX}/test/cfgparser.1 +lib/python${PY_VER_SUFFIX}/test/check_soundcard.vbs lib/python${PY_VER_SUFFIX}/test/cjkencodings_test.py lib/python${PY_VER_SUFFIX}/test/cjkencodings_test.pyc lib/python${PY_VER_SUFFIX}/test/cjkencodings_test.pyo @@ -1931,6 +1935,9 @@ lib/python${PY_VER_SUFFIX}/test/test_class.pyo lib/python${PY_VER_SUFFIX}/test/test_cmath.py lib/python${PY_VER_SUFFIX}/test/test_cmath.pyc lib/python${PY_VER_SUFFIX}/test/test_cmath.pyo +lib/python${PY_VER_SUFFIX}/test/test_cmd_line.py +lib/python${PY_VER_SUFFIX}/test/test_cmd_line.pyc +lib/python${PY_VER_SUFFIX}/test/test_cmd_line.pyo lib/python${PY_VER_SUFFIX}/test/test_codeccallbacks.py lib/python${PY_VER_SUFFIX}/test/test_codeccallbacks.pyc lib/python${PY_VER_SUFFIX}/test/test_codeccallbacks.pyo diff --git a/lang/python24/distinfo b/lang/python24/distinfo index fd29c555e05..141eaa160c1 100644 --- a/lang/python24/distinfo +++ b/lang/python24/distinfo @@ -1,19 +1,19 @@ -$NetBSD: distinfo,v 1.16 2006/01/23 08:00:02 recht Exp $ +$NetBSD: distinfo,v 1.17 2006/04/12 20:21:48 drochner Exp $ -SHA1 (Python-2.4.2.tar.bz2) = a1f1c466fb4a06f612faac75dbaa8bc81e609c2e -RMD160 (Python-2.4.2.tar.bz2) = c511d2b76b5394742d285e71570a2bcd3c1fa871 -Size (Python-2.4.2.tar.bz2) = 7853169 bytes +SHA1 (Python-2.4.3.tar.bz2) = d6b81e1aec0045b5acff99676f2abe303da1b384 +RMD160 (Python-2.4.3.tar.bz2) = c86247554975e6c44f91d05e44e68e280d5244dc +Size (Python-2.4.3.tar.bz2) = 8005915 bytes SHA1 (patch-aa) = 310309e6778fd809b7758efa8db7333ed498e5e5 SHA1 (patch-ab) = 5402e5b8f0c8e919fdf5c2c4baab0423eb74ada5 SHA1 (patch-ac) = 97d2dcbc93986dc13d7866025269ae5f15827a24 -SHA1 (patch-ad) = 0fa1c66fa0ad9ce345c44b13fd3897975837c72e -SHA1 (patch-ae) = e5dfe40afe9b1e4354a273f4ce76340f1440e1ee +SHA1 (patch-ad) = 44a13d3f9814d471f266ab641024ad74be046ec1 +SHA1 (patch-ae) = ccf62e62129f6f09bf46bb026bfb03d131a3aa1a SHA1 (patch-af) = 15fa49e81d2a8d05654a7ad1ab0a37b58364ec3d SHA1 (patch-ag) = 0cdc08af9d37ae7d00a06ab81c30efa021ef28ac SHA1 (patch-ah) = 8d56adee024b29e5d538a9fcd1994e38eb2b33c1 SHA1 (patch-ai) = 6435c5a7269c14d94eab6fb9777b9d059507e7b8 SHA1 (patch-aj) = e471737ade95423039661b475f2dd0fc27aa9dac SHA1 (patch-ak) = f2e1d4087a94490bd3589a8c829ec72e04f31f72 -SHA1 (patch-al) = b4050c86c0fdfe7df8bd90579646f9fa0c987211 -SHA1 (patch-am) = 9ce50340d76e8612384f94d4b03414d3f38e35d3 +SHA1 (patch-al) = 3dccd19d56685ab447c3629c4c360881dcca4c3d +SHA1 (patch-am) = a8be9e5d3558c27e38d4323601335ad3bcde1f85 SHA1 (patch-an) = 0ae5b3d547c7dbe1366c5ae6c60c11516e4550b8 diff --git a/lang/python24/patches/patch-ad b/lang/python24/patches/patch-ad index 29f29ea7dbd..112442919b1 100644 --- a/lang/python24/patches/patch-ad +++ b/lang/python24/patches/patch-ad @@ -1,4 +1,4 @@ -$NetBSD: patch-ad,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $ +$NetBSD: patch-ad,v 1.2 2006/04/12 20:21:48 drochner Exp $ --- Lib/posixfile.py.orig Wed Aug 18 17:13:40 2004 +++ Lib/posixfile.py @@ -6,7 +6,7 @@ $NetBSD: patch-ad,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $ # additions for AIX by Vladimir.Marangozov@imag.fr import sys, os if sys.platform in ('netbsd1', -+ 'netbsd2', ++ 'netbsd2', 'netbsd3', 'openbsd2', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'freebsd6', 'bsdos2', 'bsdos3', 'bsdos4'): @@ -19,7 +19,7 @@ $NetBSD: patch-ad,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $ if '?' in how: if sys.platform in ('netbsd1', -+ 'netbsd2', ++ 'netbsd2', 'netbsd3', 'openbsd2', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4'): diff --git a/lang/python24/patches/patch-ae b/lang/python24/patches/patch-ae index b5f0b9e68a9..3b844fb41c5 100644 --- a/lang/python24/patches/patch-ae +++ b/lang/python24/patches/patch-ae @@ -1,12 +1,12 @@ -$NetBSD: patch-ae,v 1.3 2005/10/01 21:12:05 recht Exp $ +$NetBSD: patch-ae,v 1.4 2006/04/12 20:21:48 drochner Exp $ ---- Lib/test/test_fcntl.py.orig 2005-04-04 17:28:18.000000000 +0200 -+++ Lib/test/test_fcntl.py 2005-10-01 22:24:49.000000000 +0200 -@@ -20,7 +20,7 @@ +--- Lib/test/test_fcntl.py.orig 2006-02-20 11:32:05.000000000 +0100 ++++ Lib/test/test_fcntl.py +@@ -20,7 +20,7 @@ else: if sys.platform.startswith('atheos'): start_len = "qq" --if sys.platform in ('netbsd1', 'Darwin1.2', 'darwin', +-if sys.platform in ('netbsd1', 'netbsd2', 'Darwin1.2', 'darwin', +if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3', 'Darwin1.2', 'darwin', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'freebsd6', 'bsdos2', 'bsdos3', 'bsdos4', diff --git a/lang/python24/patches/patch-al b/lang/python24/patches/patch-al index 44578a7b372..1915bd2eaa8 100644 --- a/lang/python24/patches/patch-al +++ b/lang/python24/patches/patch-al @@ -1,8 +1,8 @@ -$NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ +$NetBSD: patch-al,v 1.10 2006/04/12 20:21:48 drochner Exp $ ---- configure.orig 2005-12-11 23:02:37.000000000 +0100 -+++ configure 2005-12-11 23:02:22.000000000 +0100 -@@ -312,7 +312,7 @@ +--- configure.orig 2006-02-17 09:39:55.000000000 +0100 ++++ configure +@@ -312,7 +312,7 @@ ac_includes_default="\ # include #endif" @@ -11,7 +11,7 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ ac_subst_files='' # Initialize some variables set by options. -@@ -859,7 +859,9 @@ +@@ -859,7 +859,9 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-gcc never use gcc @@ -22,16 +22,16 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ --with-suffix=.exe set executable suffix --with-pydebug build with Py_DEBUG defined --with-libs='lib1 ...' link against additional libs -@@ -1482,6 +1484,8 @@ +@@ -1482,6 +1484,8 @@ case $ac_sys_system/$ac_sys_release in # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. - OpenBSD/2.* | OpenBSD/3.[0123456]) + OpenBSD/2.* | OpenBSD/3.[012345678]) define_xopen_source=no;; + NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S]) + define_xopen_source=no;; # On Solaris 2.6, sys/wait.h is inconsistent in the usage # of union __?sigval. Reported by Stuart Bishop. SunOS/5.6) -@@ -1667,258 +1671,6 @@ +@@ -1676,258 +1680,6 @@ fi; echo "$as_me:$LINENO: result: $without_gcc" >&5 echo "${ECHO_T}$without_gcc" >&6 @@ -290,12 +290,17 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ # If the user switches compilers, we can't believe the cache if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" then -@@ -2755,111 +2507,467 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --$ac_declaration --#include +@@ -2758,117 +2510,473 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + 'extern "C" void exit (int);' \ + 'void exit (int);' + do +- cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ +$ac_declaration +#include +int @@ -582,11 +587,13 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-$ac_declaration +-#include + int main () @@ -833,7 +840,7 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ # checks for UNIX variants that set C preprocessor variables ac_ext=c -@@ -3262,22 +3370,7 @@ +@@ -3271,22 +3379,7 @@ echo "$as_me:$LINENO: checking LINKCC" > echo $ECHO_N "checking LINKCC... $ECHO_C" >&6 if test -z "$LINKCC" then @@ -857,16 +864,16 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ case $ac_sys_system in AIX*) exp_extra="\"\"" -@@ -3404,7 +3497,7 @@ +@@ -3413,7 +3506,7 @@ _ACEOF RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} INSTSONAME="$LDLIBRARY".$SOVERSION ;; -- Linux*|GNU*|NetBSD*|FreeBSD*) +- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) + Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*) LDLIBRARY='libpython$(VERSION).so' BLDLIBRARY='-L. -lpython$(VERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} -@@ -3828,7 +3921,12 @@ +@@ -3837,7 +3930,12 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing ;; # is there any other compiler on Darwin besides gcc? Darwin*) @@ -880,7 +887,7 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ ;; esac ;; -@@ -10364,12 +10462,12 @@ +@@ -10373,12 +10471,12 @@ then LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' else # No framework, use the Python app as bundle-loader @@ -896,33 +903,23 @@ $NetBSD: patch-al,v 1.9 2006/01/23 08:00:02 recht Exp $ BSD/OS*/4*) LDSHARED="gcc -shared";; OpenBSD*|FreeBSD*) if [ "`$CC -dM -E - &1 | grep export-dynamic >/dev/null -@@ -14337,6 +14438,7 @@ - /* end confdefs.h. */ - - #include "confdefs.h" -+#include - #include - #include - #include -@@ -21044,15 +21146,15 @@ +@@ -21203,15 +21304,15 @@ s,@SGI_ABI@,$SGI_ABI,;t t s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t diff --git a/lang/python24/patches/patch-am b/lang/python24/patches/patch-am index 033dd93f9b6..330bda371e1 100644 --- a/lang/python24/patches/patch-am +++ b/lang/python24/patches/patch-am @@ -1,8 +1,8 @@ -$NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ +$NetBSD: patch-am,v 1.3 2006/04/12 20:21:48 drochner Exp $ ---- setup.py.orig 2005-03-09 23:27:24.000000000 +0100 -+++ setup.py 2005-05-09 15:11:47.000000000 +0200 -@@ -15,7 +15,7 @@ +--- setup.py.orig 2006-03-23 20:07:46.000000000 +0100 ++++ setup.py +@@ -15,7 +15,7 @@ from distutils.command.install import in from distutils.command.install_lib import install_lib # This global variable is used to hold the list of modules to be disabled. @@ -11,7 +11,7 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -238,9 +238,15 @@ +@@ -239,9 +239,15 @@ class PyBuildExt(build_ext): return sys.platform def detect_modules(self): @@ -30,7 +30,7 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ # Add paths to popular package managers on OS X/darwin if sys.platform == "darwin": -@@ -452,9 +458,7 @@ +@@ -456,9 +462,7 @@ class PyBuildExt(build_ext): depends = ['socketmodule.h']) ) # Detect SSL support for the socket module (via _ssl) ssl_incs = find_file('openssl/ssl.h', inc_dirs, @@ -41,7 +41,7 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ ) if ssl_incs is not None: krb5_h = find_file('krb5.h', inc_dirs, -@@ -462,9 +466,7 @@ +@@ -466,9 +470,7 @@ class PyBuildExt(build_ext): if krb5_h: ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, @@ -52,18 +52,18 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ if (ssl_incs is not None and ssl_libs is not None): -@@ -482,148 +484,52 @@ +@@ -486,151 +488,52 @@ class PyBuildExt(build_ext): # similar functionality (but slower of course) implemented in Python. # Sleepycat Berkeley DB interface. http://www.sleepycat.com - # - # This requires the Sleepycat DB code. The earliest supported version -- # of that library is 3.2, the latest supported version is 4.3. A list +- # of that library is 3.2, the latest supported version is 4.4. A list - # of available releases can be found at - # - # http://www.sleepycat.com/update/index.html - -- max_db_ver = (4, 3) +- max_db_ver = (4, 4) - min_db_ver = (3, 2) - db_setup_debug = False # verbose debug prints from this script? - @@ -80,42 +80,32 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ - '/sw/include/db3', - ] - # 4.x minor number specific paths -- for x in (0,1,2,3): +- for x in (0,1,2,3,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) - # 3.x minor number specific paths - for x in (2,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_ver_inc_map = {} - class db_found(Exception): pass -+ class NotFound(Exception): pass ++ class Notfound(Exception): pass try: # See whether there is a Sleepycat header in the standard # search path. - for d in inc_dirs + db_inc_paths: - f = os.path.join(d, "db.h") - if db_setup_debug: print "db: looking for db.h in", f -+ bdb_type = os.environ['PY_BDB_TYPE'] -+ db_incs = [os.environ['PY_BDB_INCDIRS']] -+ dblib_dir = None -+ dblibs = None -+ -+ # check if need to use the db_185.h compat header -+ bsddb185_define_macros=[] -+ if bdb_type == "db2" or bdb_type == "db3" or bdb_type == "db4": -+ bsddb185_define_macros=[('HAVE_DB_185_H',1)] -+ dblib_dir = [os.environ['PY_BDB_LIBDIRS']] -+ else: -+ # check if db_incs/db.h really is db 1.85 -+ f = "%s/db.h" % db_incs[0] - if os.path.exists(f): +- if os.path.exists(f): - f = open(f).read() - m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) - if m: @@ -130,13 +120,7 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ - # (first occurrance only) - db_ver_inc_map[db_ver] = d - print "db.h: found", db_ver, "in", d -+ data = open(f).read() -+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) -+ if m is None: -+ # check for 1.85 compat header -+ if os.path.exists("%s/db_185.h" % db_incs[0]): -+ bsddb185_define_macros=[('HAVE_DB_185_H',1)] - else: +- else: - # we already found a header for this library version - if db_setup_debug: print "db.h: ignoring", d - else: @@ -194,8 +178,11 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ - if db_setup_debug: print "db: no appropriate library found" - db_incs = None - dblibs = [] -- dblib_dir = None -- ++ bdb_type = os.environ['PY_BDB_TYPE'] ++ db_incs = [os.environ['PY_BDB_INCDIRS']] + dblib_dir = None ++ dblibs = None + - - # Look for Berkeley db 1.85. Note that it is built as a different - # module name so it can be included even when later versions are @@ -218,6 +205,22 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ - libraries=libraries)) - else: - exts.append(Extension('bsddb185', ['bsddbmodule.c'])) ++ # check if need to use the db_185.h compat header ++ bsddb185_define_macros=[] ++ if bdb_type == "db2" or bdb_type == "db3" or bdb_type == "db4": ++ bsddb185_define_macros=[('HAVE_DB_185_H',1)] ++ dblib_dir = [os.environ['PY_BDB_LIBDIRS']] ++ else: ++ # check if db_incs/db.h really is db 1.85 ++ f = "%s/db.h" % db_incs[0] ++ if os.path.exists(f): ++ data = open(f).read() ++ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) ++ if m is None: ++ # check for 1.85 compat header ++ if os.path.exists("%s/db_185.h" % db_incs[0]): ++ bsddb185_define_macros=[('HAVE_DB_185_H',1)] ++ else: + raise NotFound + try: + bltransform = os.environ['PY_BDB_TRANSFORM'] @@ -241,7 +244,7 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ # The standard Unix dbm module: if platform not in ['cygwin']: -@@ -636,6 +542,13 @@ +@@ -643,6 +546,13 @@ class PyBuildExt(build_ext): exts.append( Extension('dbm', ['dbmmodule.c'], define_macros=[('HAVE_NDBM_H',None)], libraries = ndbm_libs ) ) @@ -255,7 +258,7 @@ $NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ elif (self.compiler.find_library_file(lib_dirs, 'gdbm') and find_file("gdbm/ndbm.h", inc_dirs, []) is not None): exts.append( Extension('dbm', ['dbmmodule.c'], -@@ -1175,8 +1088,8 @@ +@@ -1186,8 +1096,8 @@ def main(): ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install -- cgit v1.2.3