diff options
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python24/Makefile | 9 | ||||
-rw-r--r-- | lang/python24/PLIST.common | 24 | ||||
-rw-r--r-- | lang/python24/PLIST.common_end | 3 | ||||
-rw-r--r-- | lang/python24/distinfo | 16 | ||||
-rw-r--r-- | lang/python24/patches/patch-af | 4 | ||||
-rw-r--r-- | lang/python24/patches/patch-al | 62 | ||||
-rw-r--r-- | lang/python24/patches/patch-am | 288 | ||||
-rw-r--r-- | lang/python24/patches/patch-an | 82 |
8 files changed, 210 insertions, 278 deletions
diff --git a/lang/python24/Makefile b/lang/python24/Makefile index 40def9b986b..e79e49adc8f 100644 --- a/lang/python24/Makefile +++ b/lang/python24/Makefile @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.6 2005/04/11 21:46:16 tv Exp $ +# $NetBSD: Makefile,v 1.7 2005/05/09 20:37:51 recht Exp $ # -DISTNAME= Python-2.4 -PKGNAME= python24-2.4 -PKGREVISION= 5 +DISTNAME= Python-2.4.1 +PKGNAME= python24-2.4.1 CATEGORIES= lang python -MASTER_SITES= ftp://ftp.python.org/pub/python/2.4/ +MASTER_SITES= ftp://ftp.python.org/pub/python/2.4.1/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= recht@NetBSD.org diff --git a/lang/python24/PLIST.common b/lang/python24/PLIST.common index 94c5aafcaed..3ef283d2229 100644 --- a/lang/python24/PLIST.common +++ b/lang/python24/PLIST.common @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.common,v 1.3 2005/02/18 22:25:22 recht Exp $ +@comment $NetBSD: PLIST.common,v 1.4 2005/05/09 20:37:51 recht Exp $ bin/pydoc${PY_VER_SUFFIX} bin/python${PY_VER_SUFFIX} bin/smtpd${PY_VER_SUFFIX}.py @@ -493,6 +493,27 @@ lib/python${PY_VER_SUFFIX}/distutils/spawn.pyo lib/python${PY_VER_SUFFIX}/distutils/sysconfig.py lib/python${PY_VER_SUFFIX}/distutils/sysconfig.pyc lib/python${PY_VER_SUFFIX}/distutils/sysconfig.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/__init__.py +lib/python${PY_VER_SUFFIX}/distutils/tests/__init__.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/__init__.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/support.py +lib/python${PY_VER_SUFFIX}/distutils/tests/support.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/support.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/test_build_py.py +lib/python${PY_VER_SUFFIX}/distutils/tests/test_build_py.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/test_build_py.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/test_build_scripts.py +lib/python${PY_VER_SUFFIX}/distutils/tests/test_build_scripts.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/test_build_scripts.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/test_dist.py +lib/python${PY_VER_SUFFIX}/distutils/tests/test_dist.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/test_dist.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/test_install.py +lib/python${PY_VER_SUFFIX}/distutils/tests/test_install.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/test_install.pyo +lib/python${PY_VER_SUFFIX}/distutils/tests/test_install_scripts.py +lib/python${PY_VER_SUFFIX}/distutils/tests/test_install_scripts.pyc +lib/python${PY_VER_SUFFIX}/distutils/tests/test_install_scripts.pyo lib/python${PY_VER_SUFFIX}/distutils/text_file.py lib/python${PY_VER_SUFFIX}/distutils/text_file.pyc lib/python${PY_VER_SUFFIX}/distutils/text_file.pyo @@ -628,6 +649,7 @@ lib/python${PY_VER_SUFFIX}/email/test/data/msg_39.txt 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/test_email.py lib/python${PY_VER_SUFFIX}/email/test/test_email.pyc lib/python${PY_VER_SUFFIX}/email/test/test_email.pyo diff --git a/lang/python24/PLIST.common_end b/lang/python24/PLIST.common_end index 053f04fdbe1..cd932bc2fb1 100644 --- a/lang/python24/PLIST.common_end +++ b/lang/python24/PLIST.common_end @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.common_end,v 1.2 2005/01/23 20:41:48 recht Exp $ +@comment $NetBSD: PLIST.common_end,v 1.3 2005/05/09 20:37:51 recht Exp $ @dirrm lib/python${PY_VER_SUFFIX}/xml/sax @dirrm lib/python${PY_VER_SUFFIX}/xml/parsers @dirrm lib/python${PY_VER_SUFFIX}/xml/dom @@ -20,6 +20,7 @@ @dirrm lib/python${PY_VER_SUFFIX}/email/test @dirrm lib/python${PY_VER_SUFFIX}/email @dirrm lib/python${PY_VER_SUFFIX}/distutils/command +@dirrm lib/python${PY_VER_SUFFIX}/distutils/tests @dirrm lib/python${PY_VER_SUFFIX}/distutils @dirrm lib/python${PY_VER_SUFFIX}/curses @dirrm lib/python${PY_VER_SUFFIX}/config diff --git a/lang/python24/distinfo b/lang/python24/distinfo index a7e4f09913d..96a90dc94c3 100644 --- a/lang/python24/distinfo +++ b/lang/python24/distinfo @@ -1,19 +1,19 @@ -$NetBSD: distinfo,v 1.7 2005/02/24 09:03:11 agc Exp $ +$NetBSD: distinfo,v 1.8 2005/05/09 20:37:51 recht Exp $ -SHA1 (Python-2.4.tar.bz2) = 80c06f491a4b2a629e868540150faf22c5d0e41e -RMD160 (Python-2.4.tar.bz2) = b0c0ee7b791432323012de38be903362dea847a7 -Size (Python-2.4.tar.bz2) = 7840762 bytes +SHA1 (Python-2.4.1.tar.bz2) = a4b58cf31359198dbb123b789440bcaf9052d198 +RMD160 (Python-2.4.1.tar.bz2) = 8c682c9af21666cc6b8eaa08f8719eed231ab3ad +Size (Python-2.4.1.tar.bz2) = 7847025 bytes +SHA1 (patch-am.old) = 85ed6ef1ffa004dd98b9904864fa857779234be0 SHA1 (patch-aa) = 310309e6778fd809b7758efa8db7333ed498e5e5 SHA1 (patch-ab) = 5402e5b8f0c8e919fdf5c2c4baab0423eb74ada5 SHA1 (patch-ac) = 97d2dcbc93986dc13d7866025269ae5f15827a24 SHA1 (patch-ad) = 0fa1c66fa0ad9ce345c44b13fd3897975837c72e SHA1 (patch-ae) = 7232b64cc3d201daf0bc00476eb58aa694a6df2a -SHA1 (patch-af) = 82486cc06585a05a0151b3508e5bbcb3c7281681 +SHA1 (patch-af) = e7c0f100b2255942d5f8b8c02723b184cdaeceac SHA1 (patch-ag) = 0cdc08af9d37ae7d00a06ab81c30efa021ef28ac SHA1 (patch-ah) = 6f5cff1f9f2482c59ef442bf019a1f3ad9fe21e8 SHA1 (patch-ai) = 6435c5a7269c14d94eab6fb9777b9d059507e7b8 SHA1 (patch-aj) = e471737ade95423039661b475f2dd0fc27aa9dac SHA1 (patch-ak) = f2e1d4087a94490bd3589a8c829ec72e04f31f72 -SHA1 (patch-al) = 2cd3088f1d8b4e827c89fa75c2f7663f842451af -SHA1 (patch-am) = aa71ec2f9cc8f434ff38b19df23b5dd433e13e5a -SHA1 (patch-an) = 02222a16fb6b5eac69098e8c310f62bb75fa559b +SHA1 (patch-al) = d8365c06b5a309c6fc196a607fafa8cda27cb982 +SHA1 (patch-am) = 9ce50340d76e8612384f94d4b03414d3f38e35d3 diff --git a/lang/python24/patches/patch-af b/lang/python24/patches/patch-af index ad58d2d2ed5..2f0a6af5f66 100644 --- a/lang/python24/patches/patch-af +++ b/lang/python24/patches/patch-af @@ -1,4 +1,4 @@ -$NetBSD: patch-af,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $ +$NetBSD: patch-af,v 1.2 2005/05/09 20:37:51 recht Exp $ --- Makefile.pre.in.orig Sun Sep 26 19:26:55 2004 +++ Makefile.pre.in @@ -25,7 +25,7 @@ $NetBSD: patch-af,v 1.1.1.1 2004/12/05 23:27:49 recht Exp $ $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM) +libpython$(VERSION).dylib: $(LIBRARY_OBJS) -+ $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version 2.4.0 -compatibility_version 2.4 -o $@ -flat_namespace -undefined suppress $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) ++ $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version 2.4.1 -compatibility_version 2.4 -o $@ -flat_namespace -undefined suppress $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) + # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary # minimal framework (not including the Lib directory and such) in the current diff --git a/lang/python24/patches/patch-al b/lang/python24/patches/patch-al index 8100f85f9be..6e248daf62e 100644 --- a/lang/python24/patches/patch-al +++ b/lang/python24/patches/patch-al @@ -1,8 +1,8 @@ -$NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ +$NetBSD: patch-al,v 1.6 2005/05/09 20:37:51 recht Exp $ ---- configure.orig 2004-11-06 20:24:12.000000000 -0500 -+++ configure -@@ -1479,6 +1479,8 @@ case $ac_sys_system/$ac_sys_release in +--- configure.orig 2005-03-29 01:23:02.000000000 +0200 ++++ configure 2005-05-09 21:14:53.000000000 +0200 +@@ -1482,6 +1482,8 @@ # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. OpenBSD/2.* | OpenBSD/3.[0123456]) define_xopen_source=no;; @@ -11,31 +11,16 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ # On Solaris 2.6, sys/wait.h is inconsistent in the usage # of union __?sigval. Reported by Stuart Bishop. SunOS/5.6) -@@ -3392,7 +3394,7 @@ _ACEOF +@@ -3402,7 +3404,7 @@ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} INSTSONAME="$LDLIBRARY".$SOVERSION ;; - Linux*|GNU*|NetBSD*|FreeBSD*) -+ Linux*|GNU*|NetBSD*|FreeBSD*|Interix*) ++ Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*) LDLIBRARY='libpython$(VERSION).so' BLDLIBRARY='-L. -lpython$(VERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} -@@ -3418,6 +3420,14 @@ _ACEOF - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} - ;; -+ Darwin*) -+ if test -z "$enable_framework"; then -+ LDLIBRARY='libpython$(VERSION).dylib' -+ BLDLIBRARY='-L. -lpython$(VERSION)' -+ RUNSHARED=DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH} -+ fi -+ ;; -+ - esac - else # shared is disabled - case $ac_sys_system in -@@ -3816,7 +3826,12 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing +@@ -3826,7 +3828,12 @@ ;; # is there any other compiler on Darwin besides gcc? Darwin*) @@ -49,7 +34,7 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ ;; esac ;; -@@ -10165,7 +10180,10 @@ fi +@@ -10186,7 +10193,10 @@ case "$enable_toolbox_glue" in yes) extra_machdep_objs="Python/mactoolboxglue.o" @@ -61,8 +46,8 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ cat >>confdefs.h <<\_ACEOF #define USE_TOOLBOX_OBJECT_GLUE 1 -@@ -10295,7 +10313,7 @@ then - LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)' +@@ -10332,7 +10342,7 @@ + LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' else # No framework. Ignore undefined symbols, assuming they come from Python - LDSHARED="$LDSHARED -undefined suppress" @@ -70,8 +55,8 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ fi ;; Darwin/1.4*|Darwin/5.*|Darwin/6.*) LDSHARED='$(CC) $(LDFLAGS) -bundle' -@@ -10305,8 +10323,8 @@ then - LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)' +@@ -10342,8 +10352,8 @@ + LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' else # No framework, use the Python app as bundle-loader - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' @@ -81,8 +66,8 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ fi ;; Darwin/*) # Use -undefined dynamic_lookup whenever possible (10.3 and later). -@@ -10324,12 +10342,12 @@ then - LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)' +@@ -10362,12 +10372,12 @@ + LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' else # No framework, use the Python app as bundle-loader - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' @@ -97,27 +82,34 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ BSD/OS*/4*) LDSHARED="gcc -shared";; OpenBSD*|FreeBSD*) if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] -@@ -10338,7 +10356,8 @@ then +@@ -10376,7 +10386,8 @@ else LDSHARED="ld -Bshareable ${LDFLAGS}" fi;; - NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";; -+ NetBSD*) LDSHARED='$(CC) -shared ${LDFLAGS}';; ++ NetBSD*|DragonFly*) LDSHARED='$(CC) -shared ${LDFLAGS}';; + Interix*) LDSHARED='$(CC) -shared ${LDFLAGS}';; # XXX tv needs image-base hack OpenUNIX*|UnixWare*) if test "$GCC" = "yes" then LDSHARED='$(CC) -shared' -@@ -10370,7 +10389,9 @@ then +@@ -10408,7 +10419,9 @@ fi;; Linux*|GNU*) CCSHARED="-fPIC";; BSD/OS*/4*) CCSHARED="-fpic";; +- FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; + Darwin/7*) CCSHARED="-fPIC -fno-common";; - FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; ++ FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; + Interix*) CCSHARED="";; OpenUNIX*|UnixWare*) if test "$GCC" = "yes" then CCSHARED="-fPIC" -@@ -10428,6 +10449,7 @@ then +@@ -10461,11 +10474,12 @@ + OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; + SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; + ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; +- FreeBSD*|NetBSD*|OpenBSD*) ++ FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) + if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] then LINKFORSHARED="-Wl,--export-dynamic" fi;; @@ -125,7 +117,7 @@ $NetBSD: patch-al,v 1.5 2005/01/24 21:46:33 tv Exp $ SunOS/5*) case $CC in *gcc*) if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null -@@ -14297,6 +14319,7 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -14335,6 +14349,7 @@ /* end confdefs.h. */ #include "confdefs.h" diff --git a/lang/python24/patches/patch-am b/lang/python24/patches/patch-am index ee5cb025e23..033dd93f9b6 100644 --- a/lang/python24/patches/patch-am +++ b/lang/python24/patches/patch-am @@ -1,17 +1,17 @@ -$NetBSD: patch-am,v 1.1.1.1 2004/12/05 23:27:52 recht Exp $ +$NetBSD: patch-am,v 1.2 2005/05/09 20:37:51 recht Exp $ ---- setup.py.orig Sat Nov 13 12:13:34 2004 -+++ setup.py -@@ -15,7 +15,7 @@ from distutils.command.install import in +--- 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 @@ from distutils.command.install_lib import install_lib # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] -+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_tkinter", "gdbm", "mpz", "pyexpat", "readline"] ++disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_tkinter", "bsddb", "gdbm", "mpz", "pyexpat", "readline"] def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -238,9 +238,15 @@ class PyBuildExt(build_ext): +@@ -238,9 +238,15 @@ return sys.platform def detect_modules(self): @@ -30,7 +30,7 @@ $NetBSD: patch-am,v 1.1.1.1 2004/12/05 23:27:52 recht Exp $ # Add paths to popular package managers on OS X/darwin if sys.platform == "darwin": -@@ -452,9 +458,7 @@ class PyBuildExt(build_ext): +@@ -452,9 +458,7 @@ 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.1.1.1 2004/12/05 23:27:52 recht Exp $ ) if ssl_incs is not None: krb5_h = find_file('krb5.h', inc_dirs, -@@ -462,9 +466,7 @@ class PyBuildExt(build_ext): +@@ -462,9 +466,7 @@ if krb5_h: ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, @@ -52,167 +52,148 @@ $NetBSD: patch-am,v 1.1.1.1 2004/12/05 23:27:52 recht Exp $ if (ssl_incs is not None and ssl_libs is not None): -@@ -491,113 +493,90 @@ class PyBuildExt(build_ext): +@@ -482,148 +484,52 @@ + # similar functionality (but slower of course) implemented in Python. - # when sorted in reverse order, keys for this dict must appear in the - # order you wish to search - e.g., search for db4 before db3 -- db_try_this = { -- 'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',), -- 'libdirs': ('/usr/local/BerkeleyDB.4.2/lib', -- '/usr/local/BerkeleyDB.4.1/lib', -- '/usr/local/BerkeleyDB.4.0/lib', -- '/usr/local/lib', -- '/opt/sfw', -- '/sw/lib', -- ), -- 'incdirs': ('/usr/local/BerkeleyDB.4.2/include', -- '/usr/local/include/db42', -- '/usr/local/BerkeleyDB.4.1/include', -- '/usr/local/include/db41', -- '/usr/local/BerkeleyDB.4.0/include', -- '/usr/local/include/db4', -- '/opt/sfw/include/db4', -- '/sw/include/db4', -- '/usr/include/db4', -- )}, -- 'db3': {'libs': ('db-3.3', 'db-3.2', 'db3',), -- 'libdirs': ('/usr/local/BerkeleyDB.3.3/lib', -- '/usr/local/BerkeleyDB.3.2/lib', -- '/usr/local/lib', -- '/opt/sfw/lib', -- '/sw/lib', -- ), -- 'incdirs': ('/usr/local/BerkeleyDB.3.3/include', -- '/usr/local/BerkeleyDB.3.2/include', -- '/usr/local/include/db3', -- '/opt/sfw/include/db3', -- '/sw/include/db3', -- '/usr/include/db3', -- )}, -- } + # 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 available releases can be found at +- # +- # http://www.sleepycat.com/update/index.html - -- db_search_order = db_try_this.keys() -- db_search_order.sort() -- db_search_order.reverse() -+ #db_try_this = { -+ #'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',), -+ #'libdirs': ('/usr/local/BerkeleyDB.4.2/lib', -+ #'/usr/local/BerkeleyDB.4.1/lib', -+ #'/usr/local/BerkeleyDB.4.0/lib', -+ #'/usr/local/lib', -+ #'/opt/sfw', -+ #'/sw/lib', -+ #), -+ #'incdirs': ('/usr/local/BerkeleyDB.4.2/include', -+ #'/usr/local/include/db42', -+ #'/usr/local/BerkeleyDB.4.1/include', -+ #'/usr/local/include/db41', -+ #'/usr/local/BerkeleyDB.4.0/include', -+ #'/usr/local/include/db4', -+ #'/opt/sfw/include/db4', -+ #'/sw/include/db4', -+ #'/usr/include/db4', -+ #)}, -+ #'db3': {'libs': ('db-3.3', 'db-3.2', 'db3',), -+ #'libdirs': ('/usr/local/BerkeleyDB.3.3/lib', -+ #'/usr/local/BerkeleyDB.3.2/lib', -+ #'/usr/local/lib', -+ #'/opt/sfw/lib', -+ #'/sw/lib', -+ #), -+ #'incdirs': ('/usr/local/BerkeleyDB.3.3/include', -+ #'/usr/local/BerkeleyDB.3.2/include', -+ #'/usr/local/include/db3', -+ #'/opt/sfw/include/db3', -+ #'/sw/include/db3', -+ #'/usr/include/db3', -+ #)}, -+ #} -+ -+ #db_search_order = db_try_this.keys() -+ #db_search_order.sort() -+ #db_search_order.reverse() +- max_db_ver = (4, 3) +- min_db_ver = (3, 2) +- db_setup_debug = False # verbose debug prints from this script? +- +- # 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', +- '/sw/include/db4', +- '/usr/include/db3', +- '/usr/local/include/db3', +- '/opt/sfw/include/db3', +- '/sw/include/db3', +- ] +- # 4.x minor number specific paths +- for x in (0,1,2,3): +- 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) +- # 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_ver_inc_map = {} -- class found(Exception): pass +- class db_found(Exception): pass + class NotFound(Exception): pass try: -- # See whether there is a Sleepycat header in the standard -- # search path. -- std_dbinc = None -- for d in inc_dirs: + # 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): - f = open(f).read() -- m = re.search(r"#define\WDB_VERSION_MAJOR\W([1-9]+)", f) +- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) - if m: -- std_dbinc = 'db' + m.group(1) -- for dbkey in db_search_order: -- dbd = db_try_this[dbkey] -- for dblib in dbd['libs']: -- # Prefer version-specific includes over standard -- # include locations. -- db_incs = find_file('db.h', [], dbd['incdirs']) -- dblib_dir = find_library_file(self.compiler, -- dblib, -- lib_dirs, -- list(dbd['libdirs'])) -- if (db_incs or dbkey == std_dbinc) and \ -- dblib_dir is not None: -- dblibs = [dblib] -- raise found -- except found: -- dblibs = [dblib] -- # A default source build puts Berkeley DB in something like -- # /usr/local/Berkeley.3.3 and the lib dir under that isn't -- # normally on ld.so's search path, unless the sysadmin has hacked -- # /etc/ld.so.conf. We add the directory to runtime_library_dirs -- # so the proper -R/--rpath flags get passed to the linker. This -- # is usually correct and most trouble free, but may cause problems -- # in some unusual system configurations (e.g. the directory is on -- # an NFS server that goes away). -- exts.append(Extension('_bsddb', ['_bsddb.c'], +- db_major = int(m.group(1)) +- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) +- db_minor = int(m.group(1)) +- db_ver = (db_major, db_minor) +- +- if ( (not db_ver_inc_map.has_key(db_ver)) and +- (db_ver <= max_db_ver and db_ver >= min_db_ver) ): +- # save the include directory with the db.h version +- # (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: -+ raise NotFound -+ try: -+ bltransform = os.environ['PY_BDB_TRANSFORM'] -+ m = re.search(r"l:db:(db.)\s*", bltransform) -+ if m is not None and m.group(1) is not None: -+ dblibs = [m.group(1)] -+ except: -+ pass -+ -+ # build the bsddb185 extension module -+ exts.append(Extension('bsddb185', ['bsddbmodule.c'], - library_dirs=dblib_dir, - runtime_library_dirs=dblib_dir, - include_dirs=db_incs, -+ define_macros=bsddb185_define_macros, - libraries=dblibs)) + else: +- # we already found a header for this library version +- if db_setup_debug: print "db.h: ignoring", d +- else: +- # ignore this header, it didn't contain a version number +- if db_setup_debug: print "db.h: unsupported version", db_ver, "in", d +- +- db_found_vers = db_ver_inc_map.keys() +- db_found_vers.sort() +- +- while db_found_vers: +- db_ver = db_found_vers.pop() +- db_incdir = db_ver_inc_map[db_ver] +- +- # check lib directories parallel to the location of the header +- db_dirs_to_check = [ +- os.path.join(db_incdir, '..', 'lib64'), +- os.path.join(db_incdir, '..', 'lib'), +- os.path.join(db_incdir, '..', '..', 'lib64'), +- os.path.join(db_incdir, '..', '..', 'lib'), +- ] +- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) +- +- # Look for a version specific db-X.Y before an ambiguoius dbX +- # XXX should we -ever- look for a dbX name? Do any +- # systems really not name their library by version and +- # symlink to more general names? +- for dblib in (('db-%d.%d' % db_ver), +- ('db%d%d' % db_ver), +- ('db%d' % db_ver[0])): +- dblib_file = self.compiler.find_library_file( +- db_dirs_to_check + lib_dirs, dblib ) +- if dblib_file: +- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] +- raise db_found +- else: +- if db_setup_debug: print "db lib: ", dblib, "not found" +- +- except db_found: +- print "db lib: using", db_ver, dblib +- if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir +- db_incs = [db_incdir] +- dblibs = [dblib] +- # We add the runtime_library_dirs argument because the +- # BerkeleyDB lib we're linking against often isn't in the +- # system dynamic library search path. This is usually +- # correct and most trouble free, but may cause problems in +- # some unusual system configurations (e.g. the directory +- # is on an NFS server that goes away). +- exts.append(Extension('_bsddb', ['_bsddb.c'], +- library_dirs=dblib_dir, +- runtime_library_dirs=dblib_dir, +- include_dirs=db_incs, +- libraries=dblibs)) - else: -+ except: - db_incs = None - dblibs = [] +- if db_setup_debug: print "db: no appropriate library found" +- db_incs = None +- dblibs = [] - dblib_dir = None - - @@ -237,11 +218,30 @@ $NetBSD: patch-am,v 1.1.1.1 2004/12/05 23:27:52 recht Exp $ - libraries=libraries)) - else: - exts.append(Extension('bsddb185', ['bsddbmodule.c'])) -+ dblib_dir = None ++ raise NotFound ++ try: ++ bltransform = os.environ['PY_BDB_TRANSFORM'] ++ m = re.search(r"l:db:(db.)\s*", bltransform) ++ if m is not None and m.group(1) is not None: ++ dblibs = [m.group(1)] ++ except: ++ pass ++ ++ # build the bsddb185 extension module ++ exts.append(Extension('bsddb185', ['bsddbmodule.c'], ++ library_dirs=dblib_dir, ++ runtime_library_dirs=dblib_dir, ++ include_dirs=db_incs, ++ define_macros=bsddb185_define_macros, ++ libraries=dblibs)) ++ except: ++ db_incs = None ++ dblibs = [] ++ dblib_dir = None # The standard Unix dbm module: if platform not in ['cygwin']: -@@ -610,6 +589,13 @@ class PyBuildExt(build_ext): +@@ -636,6 +542,13 @@ exts.append( Extension('dbm', ['dbmmodule.c'], define_macros=[('HAVE_NDBM_H',None)], libraries = ndbm_libs ) ) @@ -255,7 +255,7 @@ $NetBSD: patch-am,v 1.1.1.1 2004/12/05 23:27:52 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'], -@@ -1148,8 +1134,8 @@ def main(): +@@ -1175,8 +1088,8 @@ ext_modules=[Extension('struct', ['structmodule.c'])], # Scripts to install diff --git a/lang/python24/patches/patch-an b/lang/python24/patches/patch-an deleted file mode 100644 index 00cf610e3ac..00000000000 --- a/lang/python24/patches/patch-an +++ /dev/null @@ -1,82 +0,0 @@ -$NetBSD: patch-an,v 1.1 2005/02/04 15:39:04 drochner Exp $ - ---- Lib/SimpleXMLRPCServer.py.orig 2004-10-04 01:21:44.000000000 +0200 -+++ Lib/SimpleXMLRPCServer.py -@@ -106,14 +106,22 @@ import BaseHTTPServer - import sys - import os - --def resolve_dotted_attribute(obj, attr): -+def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): - """resolve_dotted_attribute(a, 'b.c.d') => a.b.c.d - - Resolves a dotted attribute name to an object. Raises - an AttributeError if any attribute in the chain starts with a '_'. -+ -+ If the optional allow_dotted_names argument is false, dots are not -+ supported and this function operates similar to getattr(obj, attr). - """ - -- for i in attr.split('.'): -+ if allow_dotted_names: -+ attrs = attr.split('.') -+ else: -+ attrs = [attr] -+ -+ for i in attrs: - if i.startswith('_'): - raise AttributeError( - 'attempt to access private attribute "%s"' % i -@@ -155,7 +163,7 @@ class SimpleXMLRPCDispatcher: - self.funcs = {} - self.instance = None - -- def register_instance(self, instance): -+ def register_instance(self, instance, allow_dotted_names=False): - """Registers an instance to respond to XML-RPC requests. - - Only one instance can be installed at a time. -@@ -173,9 +181,23 @@ class SimpleXMLRPCDispatcher: - - If a registered function matches a XML-RPC request, then it - will be called instead of the registered instance. -+ -+ If the optional allow_dotted_names argument is true and the -+ instance does not have a _dispatch method, method names -+ containing dots are supported and resolved, as long as none of -+ the name segments start with an '_'. -+ -+ *** SECURITY WARNING: *** -+ -+ Enabling the allow_dotted_names options allows intruders -+ to access your module's global variables and may allow -+ intruders to execute arbitrary code on your machine. Only -+ use this option on a secure, closed network. -+ - """ - - self.instance = instance -+ self.allow_dotted_names = allow_dotted_names - - def register_function(self, function, name = None): - """Registers a function to respond to XML-RPC requests. -@@ -294,7 +316,8 @@ class SimpleXMLRPCDispatcher: - try: - method = resolve_dotted_attribute( - self.instance, -- method_name -+ method_name, -+ self.allow_dotted_names - ) - except AttributeError: - pass -@@ -373,7 +396,8 @@ class SimpleXMLRPCDispatcher: - try: - func = resolve_dotted_attribute( - self.instance, -- method -+ method, -+ self.allow_dotted_names - ) - except AttributeError: - pass |