diff options
author | recht <recht@pkgsrc.org> | 2005-01-23 22:57:19 +0000 |
---|---|---|
committer | recht <recht@pkgsrc.org> | 2005-01-23 22:57:19 +0000 |
commit | 25f60414596c54746089931f9d877c27c6a17c30 (patch) | |
tree | 6d774ff2b2c2245cddd059ad1510a349b329f624 /lang | |
parent | 1bfddbb7731a0a8316d6266316d9304ac2bf4a73 (diff) | |
download | pkgsrc-25f60414596c54746089931f9d877c27c6a17c30.tar.gz |
Intial import of Python 2.3.4 / without thread
support (what used to be the python23 package).
Python is an interpreted, interactive, object-oriented
programming language that combines remarkable power with
very clear syntax. For an introduction to programming in
Python you are referred to the Python Tutorial. The
Python Library Reference documents built-in and standard
types, constants, functions and modules. Finally, the
Python Reference Manual describes the syntax and semantics
of the core language in (perhaps too) much detail.
Python's basic power can be extended with your own modules
written in C or C++. On most systems such modules may be
dynamically loaded. Python is also adaptable as an exten-
sion language for existing applications. See the internal
documentation for hints.
This package has been compiled without support for threads.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python23-nth/DESCR | 16 | ||||
-rw-r--r-- | lang/python23-nth/Makefile | 10 | ||||
-rw-r--r-- | lang/python23-nth/buildlink3.mk | 27 | ||||
-rw-r--r-- | lang/python23-nth/distinfo | 19 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-aa | 13 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-ab | 26 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-ad | 23 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-ae | 13 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-af | 19 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-ah | 55 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-al | 91 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-am | 350 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-ba | 86 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-bb | 34 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-ca | 54 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-cb | 24 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-da | 17 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-db | 35 | ||||
-rw-r--r-- | lang/python23-nth/patches/patch-dc | 20 |
19 files changed, 932 insertions, 0 deletions
diff --git a/lang/python23-nth/DESCR b/lang/python23-nth/DESCR new file mode 100644 index 00000000000..183a2d26438 --- /dev/null +++ b/lang/python23-nth/DESCR @@ -0,0 +1,16 @@ +Python is an interpreted, interactive, object-oriented +programming language that combines remarkable power with +very clear syntax. For an introduction to programming in +Python you are referred to the Python Tutorial. The +Python Library Reference documents built-in and standard +types, constants, functions and modules. Finally, the +Python Reference Manual describes the syntax and semantics +of the core language in (perhaps too) much detail. + +Python's basic power can be extended with your own modules +written in C or C++. On most systems such modules may be +dynamically loaded. Python is also adaptable as an exten- +sion language for existing applications. See the internal +documentation for hints. + +This package has been compiled without support for threads. diff --git a/lang/python23-nth/Makefile b/lang/python23-nth/Makefile new file mode 100644 index 00000000000..2218af646db --- /dev/null +++ b/lang/python23-nth/Makefile @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ +# + +PKGNAME= python23-nth-2.3.4 + +CONFIGURE_ARGS+= --without-threads + +PY_VER_SUFFIX= 2n3 + +.include "../../lang/python23/Makefile.common" diff --git a/lang/python23-nth/buildlink3.mk b/lang/python23-nth/buildlink3.mk new file mode 100644 index 00000000000..ba92c7a5637 --- /dev/null +++ b/lang/python23-nth/buildlink3.mk @@ -0,0 +1,27 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +BUILDLINK_DENTH:= ${BUILDLINK_DENTH}+ +PYTHON23_NTH_BUILDLINK3_MK:= ${PYTHON23_NTH_BUILDLINK3_MK}+ + +.if !empty(BUILDLINK_DENTH:M+) +BUILDLINK_DEPENDS+= python23-nth +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npython23-nth} +BUILDLINK_PACKAGES+= python23-nth + +.if !empty(PYTHON23_NTH_BUILDLINK3_MK:M+) +BUILDLINK_DEPENDS.python23-nth+= python23-nth>=2.3.4 +BUILDLINK_PKGSRCDIR.python23-nth?= ../../lang/python23-nth + +.if defined(BUILDLINK_DEPMETHOD.python) +BUILDLINK_DEPMETHOD.python23nth?= ${BUILDLINK_DEPMETHOD.python} +.endif + +BUILDLINK_INCDIRS.python23-nth+= include/python2n3 +BUILDLINK_LIBDIRS.python23-nth+= lib/python2n3/config +BUILDLINK_TRANSFORM+= l:python:python2n3 + +.endif # PYTHON23_NTH_BUILDLINK3_MK + +BUILDLINK_DENTH:= ${BUILDLINK_DENTH:S/+$//} diff --git a/lang/python23-nth/distinfo b/lang/python23-nth/distinfo new file mode 100644 index 00000000000..f4ca1000bd7 --- /dev/null +++ b/lang/python23-nth/distinfo @@ -0,0 +1,19 @@ +$NetBSD: distinfo,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +SHA1 (Python-2.3.4.tgz) = 7d47431febec704e766b57f12a1a5030bb2d03c3 +Size (Python-2.3.4.tgz) = 8502738 bytes +SHA1 (patch-aa) = e1cc7d9beda2ac131e8d0b3dc8136deb4b182ac3 +SHA1 (patch-ab) = 111d7fa8adbb7001bacad36e3bdbe23ae6ce8b9b +SHA1 (patch-ad) = c8f6ea08e68dae3bd9ad639c38e74cf654c0b41e +SHA1 (patch-ae) = 35d27825ea4f3930cce651761e192a7302696eba +SHA1 (patch-af) = d23d42d5d5fc31aeaf1fca89448873cc4179ccf6 +SHA1 (patch-ah) = f9a46bfe82acec594cf44afd43f359a5248edadb +SHA1 (patch-al) = 358edaa5be92249182f0c4644f9a3cc944218ebc +SHA1 (patch-am) = 6d5d24b5a58bd577e8b88527793b27e624455643 +SHA1 (patch-ba) = dd8f89952d7f40c9a979e362758775f093e047bc +SHA1 (patch-bb) = 7c6fe21b6328dddce2a079b0a1c7ae0bee817bae +SHA1 (patch-ca) = 95f5a515fe3dafd75d077e0591e88a34447152ff +SHA1 (patch-cb) = 301205b29db1ca60f06b2dc0423f5f911eabcd18 +SHA1 (patch-da) = b082eff79571726701aab53c37d8d53a8115e204 +SHA1 (patch-db) = ac37d14f55c165fee1d8225304d6c3c8ec203fec +SHA1 (patch-dc) = 151159e0bafd248040ab57e5c05152a91fe44ac6 diff --git a/lang/python23-nth/patches/patch-aa b/lang/python23-nth/patches/patch-aa new file mode 100644 index 00000000000..b66239f5b4d --- /dev/null +++ b/lang/python23-nth/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +--- Include/patchlevel.h.orig 2004-05-19 05:14:27.000000000 +0200 ++++ Include/patchlevel.h 2004-06-02 14:00:51.000000000 +0200 +@@ -26,7 +26,7 @@ + #define PY_RELEASE_SERIAL 0 + + /* Version as a string */ +-#define PY_VERSION "2.3.4" ++#define PY_VERSION "2n3.4" + + /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. + Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ diff --git a/lang/python23-nth/patches/patch-ab b/lang/python23-nth/patches/patch-ab new file mode 100644 index 00000000000..8fba1457b6a --- /dev/null +++ b/lang/python23-nth/patches/patch-ab @@ -0,0 +1,26 @@ +$NetBSD: patch-ab,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +--- Include/py_curses.h.orig 2003-06-29 17:46:21.000000000 +0200 ++++ Include/py_curses.h +@@ -39,6 +39,21 @@ + #endif + #endif + ++#ifdef __NetBSD__ ++/* ++** On NetBSD, [n]curses.h and stdlib.h/wchar.h use different guards ++** against multiple definition of wchar_t and wint_t. ++*/ ++#ifdef _XOPEN_SOURCE_EXTENDED ++#ifndef _WCHAR_T ++#define _WCHAR_T ++#endif ++#ifndef _WINT_T ++#define _WINT_T ++#endif ++#endif ++#endif ++ + #ifdef HAVE_NCURSES_H + #include <ncurses.h> + #else diff --git a/lang/python23-nth/patches/patch-ad b/lang/python23-nth/patches/patch-ad new file mode 100644 index 00000000000..f2f746bdadf --- /dev/null +++ b/lang/python23-nth/patches/patch-ad @@ -0,0 +1,23 @@ +$NetBSD: patch-ad,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +--- Lib/distutils/command/build_ext.py.orig 2002-11-19 14:12:28.000000000 +0100 ++++ Lib/distutils/command/build_ext.py +@@ -475,8 +475,18 @@ class build_ext (Command): + # that go into the mix. + if ext.extra_objects: + objects.extend(ext.extra_objects) ++ ++ # Two possible sources for extra linker arguments: ++ # - 'extra_link_args' in Extension object ++ # - LDFLAGS environment variable ++ # The environment variable should take precedence, and ++ # any sensible compiler will give precedence to later ++ # command line args. Hence we combine them in order: + extra_args = ext.extra_link_args or [] + ++ if os.environ.has_key('LDFLAGS'): ++ extra_args.extend(string.split(os.environ['LDFLAGS'])) ++ + # Detect target language, if not provided + language = ext.language or self.compiler.detect_language(sources) + diff --git a/lang/python23-nth/patches/patch-ae b/lang/python23-nth/patches/patch-ae new file mode 100644 index 00000000000..b1a1dcc79c7 --- /dev/null +++ b/lang/python23-nth/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +--- Lib/distutils/command/build_scripts.py.orig 2004-04-01 05:56:46.000000000 +0200 ++++ Lib/distutils/command/build_scripts.py 2004-06-02 13:58:52.000000000 +0200 +@@ -101,7 +101,7 @@ + outf.write("#!%s%s\n" % + (os.path.join( + sysconfig.get_config_var("BINDIR"), +- "python" + sysconfig.get_config_var("EXE")), ++ "python%s" % sys.version[:3] + sysconfig.get_config_var("EXE")), + post_interp)) + outf.writelines(f.readlines()) + outf.close() diff --git a/lang/python23-nth/patches/patch-af b/lang/python23-nth/patches/patch-af new file mode 100644 index 00000000000..95910dcbd52 --- /dev/null +++ b/lang/python23-nth/patches/patch-af @@ -0,0 +1,19 @@ +$NetBSD: patch-af,v 1.1.1.1 2005/01/23 22:57:20 recht Exp $ + +--- Lib/test/test_fcntl.py.orig 2002-07-23 21:03:51.000000000 +0200 ++++ Lib/test/test_fcntl.py +@@ -20,11 +20,11 @@ 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', + 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', + 'bsdos2', 'bsdos3', 'bsdos4', + 'openbsd', 'openbsd2', 'openbsd3'): +- lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, fcntl.F_WRLCK, 0) ++ lockdata = struct.pack('qqihh', 0, 0, 0, fcntl.F_WRLCK, 0) + elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']: + lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0) + elif sys.platform in ['os2emx']: + diff --git a/lang/python23-nth/patches/patch-ah b/lang/python23-nth/patches/patch-ah new file mode 100644 index 00000000000..77eb599b4d1 --- /dev/null +++ b/lang/python23-nth/patches/patch-ah @@ -0,0 +1,55 @@ +$NetBSD: patch-ah,v 1.1.1.1 2005/01/23 22:57:20 recht Exp $ + +--- Makefile.pre.in.orig Tue Nov 18 20:54:00 2003 ++++ Makefile.pre.in Thu Nov 11 18:54:35 2004 +@@ -56,7 +56,7 @@ + OPT= @OPT@ + BASECFLAGS= @BASECFLAGS@ + CFLAGS= $(BASECFLAGS) $(OPT) +-CPPFLAGS= -I. -I$(srcdir)/Include ++CPPFLAGS+= @CPPFLAGS@ -I. -I$(srcdir)/Include + LDFLAGS= @LDFLAGS@ + LDLAST= @LDLAST@ + SGI_ABI= @SGI_ABI@ +@@ -305,7 +305,7 @@ + $(BUILDPYTHON): Modules/$(MAINOBJ) $(LIBRARY) $(LDLIBRARY) + $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ + Modules/$(MAINOBJ) \ +- $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) ++ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) ${LINK_ALL_LIBGCC_HACK} + + platform: $(BUILDPYTHON) + $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform +@@ -345,7 +345,7 @@ + + libpython$(VERSION).so: $(LIBRARY_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ +- $(LDSHARED) -Wl,-soname=$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ ++ $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ + $(LN) -f $(INSTSONAME) $@; \ + else\ + $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ +@@ -354,6 +354,9 @@ + libpython$(VERSION).sl: $(LIBRARY_OBJS) + $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM) + ++libpython$(VERSION).dylib: $(LIBRARY_OBJS) ++ $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ -current_version 2.3.4 -compatibility_version 2.3 -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 + # directory. +@@ -613,7 +616,12 @@ + (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \ + fi \ + fi; \ +- else true; \ ++ else \ ++ if test -f libpython$(VERSION).dylib; then \ ++ $(INSTALL_SHARED) libpython$(VERSION).dylib $(DESTDIR)$(LIBDIR)/libpython$(VERSION).dylib; \ ++ else \ ++ true; \ ++ fi \ + fi + + # Install the manual page diff --git a/lang/python23-nth/patches/patch-al b/lang/python23-nth/patches/patch-al new file mode 100644 index 00000000000..22fdae1f585 --- /dev/null +++ b/lang/python23-nth/patches/patch-al @@ -0,0 +1,91 @@ +$NetBSD: patch-al,v 1.1.1.1 2005/01/23 22:57:20 recht Exp $ + +--- configure.orig 2004-05-07 14:13:40.000000000 -0500 ++++ configure +@@ -1318,7 +1318,7 @@ rm confdefs.h + mv confdefs.h.new confdefs.h + + +-VERSION=2.3 ++VERSION=2n3 + + + SOVERSION=1.0 +@@ -1440,6 +1440,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.[01234]) + 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) +@@ -3603,7 +3605,7 @@ _ACEOF + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; +- Linux*|GNU*|NetBSD*) ++ Linux*|GNU*|NetBSD*|FreeBSD*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} +@@ -3624,6 +3626,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 + # DG/UX requires some fancy ld contortions to produce a .so from an .a + case $MACHDEP in +@@ -4021,7 +4031,12 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing + ;; + # is there any other compiler on Darwin besides gcc? + Darwin*) +- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd" ++ if [[ `/usr/bin/arch` = 'ppc' ]] ++ then ++ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common" ++ else ++ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -fno-common" ++ fi + ;; + esac + ;; +@@ -10082,7 +10097,7 @@ then + LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' + else + # No framework. Ignore undefined symbols, assuming they come from Python +- LDSHARED="$LDSHARED -undefined suppress" ++ LDSHARED="$LDSHARED -flat_namespace -undefined suppress" + fi ;; + Darwin/*) + LDSHARED='$(CC) $(LDFLAGS) -bundle' +@@ -10091,10 +10106,10 @@ then + LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' + else + # No framework, use the Python app as bundle-loader +- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' +- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' ++ BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)' ++ LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' + fi ;; +- Linux*|GNU*) LDSHARED='$(CC) -shared';; ++ Linux*|GNU*) LDSHARED='$(CC) -shared ${LDFLAGS}';; + dgux*) LDSHARED="ld -G";; + BSD/OS*/4*) LDSHARED="gcc -shared";; + OpenBSD*|FreeBSD*) +@@ -13855,6 +13870,7 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + #include "confdefs.h" ++#include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> diff --git a/lang/python23-nth/patches/patch-am b/lang/python23-nth/patches/patch-am new file mode 100644 index 00000000000..175e9be5a5e --- /dev/null +++ b/lang/python23-nth/patches/patch-am @@ -0,0 +1,350 @@ +$NetBSD: patch-am,v 1.1.1.1 2005/01/23 22:57:20 recht Exp $ + +--- setup.py.orig 2003-10-21 15:01:21.000000000 -0500 ++++ 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. +-disabled_module_list = [] ++disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_tkinter", "gdbm", "mpz", "pyexpat", "readline"] + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if +@@ -240,9 +240,15 @@ class PyBuildExt(build_ext): + return sys.platform + + def detect_modules(self): +- # Ensure that /usr/local is always used +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ # Add the buildlink directories for pkgsrc ++ if os.environ.has_key('BUILDLINK_DIR'): ++ dir = os.environ['BUILDLINK_DIR'] ++ libdir = dir + '/lib' ++ incdir = dir + '/include' ++ if libdir not in self.compiler.library_dirs: ++ self.compiler.library_dirs.insert(0, libdir) ++ if incdir not in self.compiler.include_dirs: ++ self.compiler.include_dirs.insert(0, incdir) + + # fink installs lots of goodies in /sw/... - make sure we + # check there +@@ -436,9 +442,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, +- ['/usr/local/ssl/include', +- '/usr/contrib/ssl/include/' +- ] ++ [] + ) + if ssl_incs is not None: + krb5_h = find_file('krb5.h', inc_dirs, +@@ -446,9 +450,7 @@ class PyBuildExt(build_ext): + if krb5_h: + ssl_incs += krb5_h + ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, +- ['/usr/local/ssl/lib', +- '/usr/contrib/ssl/lib/' +- ] ) ++ [] ) + + if (ssl_incs is not None and + ssl_libs is not None): +@@ -479,116 +481,162 @@ class PyBuildExt(build_ext): + + # 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', 'db-3.1', 'db3',), +- 'libdirs': ('/usr/local/BerkeleyDB.3.3/lib', +- '/usr/local/BerkeleyDB.3.2/lib', +- '/usr/local/BerkeleyDB.3.1/lib', +- '/usr/local/lib', +- '/opt/sfw/lib', +- '/sw/lib', +- ), +- 'incdirs': ('/usr/local/BerkeleyDB.3.3/include', +- '/usr/local/BerkeleyDB.3.2/include', +- '/usr/local/BerkeleyDB.3.1/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() ++ #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', 'db-3.1', 'db3',), ++ #'libdirs': ('/usr/local/BerkeleyDB.3.3/lib', ++ #'/usr/local/BerkeleyDB.3.2/lib', ++ #'/usr/local/BerkeleyDB.3.1/lib', ++ #'/usr/local/lib', ++ #'/opt/sfw/lib', ++ #'/sw/lib', ++ #), ++ #'incdirs': ('/usr/local/BerkeleyDB.3.3/include', ++ #'/usr/local/BerkeleyDB.3.2/include', ++ #'/usr/local/BerkeleyDB.3.1/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() ++ ++ #class found(Exception): pass ++ #try: ++ ## See whether there is a Sleepycat header in the standard ++ ## search path. ++ #std_dbinc = None ++ #for d in inc_dirs: ++ #f = os.path.join(d, "db.h") ++ #if os.path.exists(f): ++ #f = open(f).read() ++ #m = re.search(r"#define\WDB_VERSION_MAJOR\W([1-9]+)", 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'], ++ #library_dirs=dblib_dir, ++ #runtime_library_dirs=dblib_dir, ++ #include_dirs=db_incs, ++ #libraries=dblibs)) ++ #else: ++ #db_incs = None ++ #dblibs = [] ++ #dblib_dir = None + +- class found(Exception): pass ++ # 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 ++ # available. A very restrictive search is performed to avoid ++ # accidentally building this module with a later version of the ++ # underlying db library. May BSD-ish Unixes incorporate db 1.85 ++ # symbols into libc and place the include file in /usr/include. ++ #f = "/usr/include/db.h" ++ #if os.path.exists(f): ++ #data = open(f).read() ++ #m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) ++ #if m is not None: ++ ## bingo - old version used hash file format version 2 ++ #### XXX this should be fixed to not be platform-dependent ++ #### but I don't have direct access to an osf1 platform and ++ #### seemed to be muffing the search somehow ++ #libraries = platform == "osf1" and ['db'] or None ++ #if libraries is not None: ++ #exts.append(Extension('bsddb185', ['bsddbmodule.c'], ++ #libraries=libraries)) ++ #else: ++ #exts.append(Extension('bsddb185', ['bsddbmodule.c'])) ++ ++ # rely on pkgsrc for Berkeley DB ++ 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: +- f = os.path.join(d, "db.h") ++ 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) +- 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'], ++ 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: ++ except: + db_incs = None + dblibs = [] +- dblib_dir = 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 +- # available. A very restrictive search is performed to avoid +- # accidentally building this module with a later version of the +- # underlying db library. May BSD-ish Unixes incorporate db 1.85 +- # symbols into libc and place the include file in /usr/include. +- f = "/usr/include/db.h" +- if os.path.exists(f): +- data = open(f).read() +- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) +- if m is not None: +- # bingo - old version used hash file format version 2 +- ### XXX this should be fixed to not be platform-dependent +- ### but I don't have direct access to an osf1 platform and +- ### seemed to be muffing the search somehow +- libraries = platform == "osf1" and ['db'] or None +- if libraries is not None: +- exts.append(Extension('bsddb185', ['bsddbmodule.c'], +- libraries=libraries)) +- else: +- exts.append(Extension('bsddb185', ['bsddbmodule.c'])) +- ++ dblib_dir = None ++ + # The standard Unix dbm module: + if platform not in ['cygwin']: + if find_file("ndbm.h", inc_dirs, []) is not None: +@@ -600,6 +648,13 @@ class PyBuildExt(build_ext): + exts.append( Extension('dbm', ['dbmmodule.c'], + define_macros=[('HAVE_NDBM_H',None)], + libraries = ndbm_libs ) ) ++ elif find_file("ndbm.h", db_incs, []) is not None: ++ exts.append( Extension('dbm', ['dbmmodule.c'], ++ library_dirs=dblib_dir, ++ runtime_library_dirs=dblib_dir, ++ include_dirs=db_incs, ++ define_macros=[('HAVE_NDBM_H',None)], ++ libraries=dblibs)) + 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'], +@@ -770,7 +825,7 @@ class PyBuildExt(build_ext): + # Linux-specific modules + exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) + +- if platform in ('linux2', 'freebsd4'): ++ if platform in ('linux2', 'freebsd4', 'freebsd5'): + exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) + + if platform == 'sunos5': +@@ -1140,7 +1195,7 @@ def main(): + ext_modules=[Extension('struct', ['structmodule.c'])], + + # Scripts to install +- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle'] ++ scripts = ['Tools/scripts/pydoc2n3'] + ) + + # --install-platlib diff --git a/lang/python23-nth/patches/patch-ba b/lang/python23-nth/patches/patch-ba new file mode 100644 index 00000000000..bf13d666587 --- /dev/null +++ b/lang/python23-nth/patches/patch-ba @@ -0,0 +1,86 @@ +$NetBSD: patch-ba,v 1.1.1.1 2005/01/23 22:57:21 recht Exp $ + +--- Modules/_cursesmodule.c.orig 2002-11-21 15:17:51.000000000 +0100 ++++ Modules/_cursesmodule.c 2004-04-09 12:45:06.000000000 +0200 +@@ -313,17 +313,9 @@ + Window_OneArgNoReturnFunction(wattrset, attr_t, "l;attr") + Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)") + Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)") +-#if defined(__NetBSD__) +-Window_OneArgNoReturnVoidFunction(keypad, int, "i;True(1) or False(0)") +-#else + Window_OneArgNoReturnFunction(keypad, int, "i;True(1) or False(0)") +-#endif + Window_OneArgNoReturnFunction(leaveok, int, "i;True(1) or False(0)") +-#if defined(__NetBSD__) +-Window_OneArgNoReturnVoidFunction(nodelay, int, "i;True(1) or False(0)") +-#else + Window_OneArgNoReturnFunction(nodelay, int, "i;True(1) or False(0)") +-#endif + Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)") + Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)") + Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines") +@@ -784,11 +776,7 @@ + } else if (rtn<=255) + return Py_BuildValue("c", rtn); + else +-#if defined(__NetBSD__) +- return PyString_FromString(unctrl(rtn)); +-#else + return PyString_FromString((char *)keyname(rtn)); +-#endif + } + + static PyObject * +@@ -1946,7 +1934,6 @@ + return PyCursesCheckERR(intrflush(NULL,ch), "intrflush"); + } + +-#if !defined(__NetBSD__) + static PyObject * + PyCurses_KeyName(PyObject *self, PyObject *args) + { +@@ -1965,7 +1952,6 @@ + + return PyString_FromString((knp == NULL) ? "" : (char *)knp); + } +-#endif + + static PyObject * + PyCurses_KillChar(PyObject *self) +@@ -2392,9 +2378,7 @@ + {"initscr", (PyCFunction)PyCurses_InitScr, METH_NOARGS}, + {"intrflush", (PyCFunction)PyCurses_IntrFlush, METH_VARARGS}, + {"isendwin", (PyCFunction)PyCurses_isendwin, METH_NOARGS}, +-#if !defined(__NetBSD__) + {"keyname", (PyCFunction)PyCurses_KeyName, METH_VARARGS}, +-#endif + {"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS}, + {"longname", (PyCFunction)PyCurses_longname, METH_NOARGS}, + {"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS}, +@@ -2490,9 +2474,7 @@ + SetDictInt("A_DIM", A_DIM); + SetDictInt("A_BOLD", A_BOLD); + SetDictInt("A_ALTCHARSET", A_ALTCHARSET); +-#if !defined(__NetBSD__) + SetDictInt("A_INVIS", A_INVIS); +-#endif + SetDictInt("A_PROTECT", A_PROTECT); + SetDictInt("A_CHARTEXT", A_CHARTEXT); + SetDictInt("A_COLOR", A_COLOR); +@@ -2564,7 +2546,6 @@ + int key; + char *key_n; + char *key_n2; +-#if !defined(__NetBSD__) + for (key=KEY_MIN;key < KEY_MAX; key++) { + key_n = (char *)keyname(key); + if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0) +@@ -2588,7 +2569,6 @@ + if (key_n2 != key_n) + free(key_n2); + } +-#endif + SetDictInt("KEY_MIN", KEY_MIN); + SetDictInt("KEY_MAX", KEY_MAX); + } diff --git a/lang/python23-nth/patches/patch-bb b/lang/python23-nth/patches/patch-bb new file mode 100644 index 00000000000..d13abcc3656 --- /dev/null +++ b/lang/python23-nth/patches/patch-bb @@ -0,0 +1,34 @@ +$NetBSD: patch-bb,v 1.1.1.1 2005/01/23 22:57:21 recht Exp $ + +--- Lib/posixfile.py.orig 2004-06-07 16:19:35.000000000 +0200 ++++ Lib/posixfile.py +@@ -182,11 +182,11 @@ class _posixfile_: + # Hack by davem@magnet.com to get locking to go on freebsd; + # additions for AIX by Vladimir.Marangozov@imag.fr + import sys, os +- if sys.platform in ('netbsd1', ++ if sys.platform in ('netbsd1', 'netbsd2', + 'openbsd2', + 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', + 'bsdos2', 'bsdos3', 'bsdos4'): +- flock = struct.pack('lxxxxlxxxxlhh', \ ++ flock = struct.pack('qqihh', \ + l_start, l_len, os.getpid(), l_type, l_whence) + elif sys.platform in ['aix3', 'aix4']: + flock = struct.pack('hhlllii', \ +@@ -198,12 +198,12 @@ class _posixfile_: + flock = fcntl.fcntl(self._file_.fileno(), cmd, flock) + + if '?' in how: +- if sys.platform in ('netbsd1', ++ if sys.platform in ('netbsd1', 'netbsd2' + 'openbsd2', + 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', + 'bsdos2', 'bsdos3', 'bsdos4'): + l_start, l_len, l_pid, l_type, l_whence = \ +- struct.unpack('lxxxxlxxxxlhh', flock) ++ struct.unpack('qqihh', flock) + elif sys.platform in ['aix3', 'aix4']: + l_type, l_whence, l_start, l_len, l_sysid, l_pid, l_vfs = \ + struct.unpack('hhlllii', flock) + diff --git a/lang/python23-nth/patches/patch-ca b/lang/python23-nth/patches/patch-ca new file mode 100644 index 00000000000..fa17ad87619 --- /dev/null +++ b/lang/python23-nth/patches/patch-ca @@ -0,0 +1,54 @@ +$NetBSD: patch-ca,v 1.1.1.1 2005/01/23 22:57:21 recht Exp $ + +--- Python/pythonrun.c.orig 2004-03-23 07:41:47.000000000 +1100 ++++ Python/pythonrun.c +@@ -1581,13 +1581,13 @@ initsigs(void) + { + #ifdef HAVE_SIGNAL_H + #ifdef SIGPIPE +- signal(SIGPIPE, SIG_IGN); ++ PyOS_setsig(SIGPIPE, SIG_IGN); + #endif + #ifdef SIGXFZ +- signal(SIGXFZ, SIG_IGN); ++ PyOS_setsig(SIGXFZ, SIG_IGN); + #endif + #ifdef SIGXFSZ +- signal(SIGXFSZ, SIG_IGN); ++ PyOS_setsig(SIGXFSZ, SIG_IGN); + #endif + #endif /* HAVE_SIGNAL_H */ + PyOS_InitInterrupts(); /* May imply initsignal() */ +@@ -1684,20 +1684,19 @@ PyOS_sighandler_t + PyOS_setsig(int sig, PyOS_sighandler_t handler) + { + #ifdef HAVE_SIGACTION +- struct sigaction context; +- PyOS_sighandler_t oldhandler; +- /* Initialize context.sa_handler to SIG_ERR which makes about as +- * much sense as anything else. It should get overwritten if +- * sigaction actually succeeds and otherwise we avoid an +- * uninitialized memory read. +- */ +- context.sa_handler = SIG_ERR; +- sigaction(sig, NULL, &context); +- oldhandler = context.sa_handler; ++ struct sigaction context, ocontext; + context.sa_handler = handler; +- sigaction(sig, &context, NULL); +- return oldhandler; ++ sigemptyset(&context.sa_mask); ++ context.sa_flags = 0; ++ if (sigaction(sig, &context, &ocontext) == -1) ++ return SIG_ERR; ++ return ocontext.sa_handler; + #else +- return signal(sig, handler); ++ PyOS_sighandler_t oldhandler; ++ oldhandler = signal(sig, handler); ++#ifdef HAVE_SIGINTERRUPT ++ siginterrupt(sig, 1); ++#endif ++ return oldhandler; + #endif + } diff --git a/lang/python23-nth/patches/patch-cb b/lang/python23-nth/patches/patch-cb new file mode 100644 index 00000000000..90bb64e5b93 --- /dev/null +++ b/lang/python23-nth/patches/patch-cb @@ -0,0 +1,24 @@ +$NetBSD: patch-cb,v 1.1.1.1 2005/01/23 22:57:21 recht Exp $ + +--- Modules/signalmodule.c.orig 2003-03-14 00:56:53.000000000 +1100 ++++ Modules/signalmodule.c +@@ -137,9 +137,6 @@ signal_handler(int sig_num) + return; + } + #endif +-#ifdef HAVE_SIGINTERRUPT +- siginterrupt(sig_num, 1); +-#endif + PyOS_setsig(sig_num, signal_handler); + } + +@@ -217,9 +214,6 @@ signal_signal(PyObject *self, PyObject * + } + else + func = signal_handler; +-#ifdef HAVE_SIGINTERRUPT +- siginterrupt(sig_num, 1); +-#endif + if (PyOS_setsig(sig_num, func) == SIG_ERR) { + PyErr_SetFromErrno(PyExc_RuntimeError); + return NULL; diff --git a/lang/python23-nth/patches/patch-da b/lang/python23-nth/patches/patch-da new file mode 100644 index 00000000000..15019c1e3ac --- /dev/null +++ b/lang/python23-nth/patches/patch-da @@ -0,0 +1,17 @@ +$NetBSD: patch-da,v 1.1.1.1 2005/01/23 22:57:19 recht Exp $ + +--- Misc/setuid-prog.c.orig Thu Nov 25 13:11:28 2004 ++++ Misc/setuid-prog.c Thu Nov 25 13:11:27 2004 +@@ -70,6 +70,12 @@ + #define environ _environ + #endif + ++#if defined(__APPLE__) ++# include <sys/time.h> ++# include <crt_externs.h> ++# define environ (*_NSGetEnviron()) ++#endif /* __APPLE__ */ ++ + /* don't change def_IFS */ + char def_IFS[] = "IFS= \t\n"; + /* you may want to change def_PATH, but you should really change it in */ diff --git a/lang/python23-nth/patches/patch-db b/lang/python23-nth/patches/patch-db new file mode 100644 index 00000000000..1c91d34b259 --- /dev/null +++ b/lang/python23-nth/patches/patch-db @@ -0,0 +1,35 @@ +$NetBSD: patch-db,v 1.1.1.1 2005/01/23 22:57:21 recht Exp $ + +--- Modules/getpath.c.orig Thu Nov 11 18:08:55 2004 ++++ Modules/getpath.c Thu Nov 11 18:10:13 2004 +@@ -374,6 +374,9 @@ + #ifdef WITH_NEXT_FRAMEWORK + NSModule pythonModule; + #endif ++#ifdef __APPLE__ ++ unsigned long nsexeclength = MAXPATHLEN; ++#endif + + /* If there is no slash in the argv0 path, then we have to + * assume python is on the user's $PATH, since there's no +@@ -382,6 +385,20 @@ + */ + if (strchr(prog, SEP)) + strncpy(progpath, prog, MAXPATHLEN); ++#ifdef __APPLE__ ++ /* On Mac OS X, if a script uses an interpreter of the form ++ * "#!/opt/python2.3/bin/python", the kernel only passes "python" ++ * as argv[0], which falls through to the $PATH search below. ++ * If /opt/python2.3/bin isn't in your path, or is near the end, ++ * this algorithm may incorrectly find /usr/bin/python. To work ++ * around this, we can use _NSGetExecutablePath to get a better ++ * hint of what the intended interpreter was, although this ++ * will fail if a relative path was used. but in that case, ++ * absolutize() should help us out below ++ */ ++ else if(0 == _NSGetExecutablePath(progpath, &nsexeclength) && progpath[0] == SEP) ++ ; ++#endif // __APPLE__ + else if (path) { + while (1) { + char *delim = strchr(path, DELIM); diff --git a/lang/python23-nth/patches/patch-dc b/lang/python23-nth/patches/patch-dc new file mode 100644 index 00000000000..077ed6d0587 --- /dev/null +++ b/lang/python23-nth/patches/patch-dc @@ -0,0 +1,20 @@ +--- Modules/posixmodule.c.orig Thu Nov 25 12:56:28 2004 ++++ Modules/posixmodule.c Thu Nov 25 12:57:24 2004 +@@ -304,7 +304,7 @@ + #endif + + /* Return a dictionary corresponding to the POSIX environment table */ +-#ifdef WITH_NEXT_FRAMEWORK ++#ifdef __APPLE__ + /* On Darwin/MacOSX a shared library or framework has no access to + ** environ directly, we must obtain it with _NSGetEnviron(). + */ +@@ -322,7 +322,7 @@ + d = PyDict_New(); + if (d == NULL) + return NULL; +-#ifdef WITH_NEXT_FRAMEWORK ++#ifdef __APPLE__ + if (environ == NULL) + environ = *_NSGetEnviron(); + #endif |