summaryrefslogtreecommitdiff
path: root/lang/python26/patches
diff options
context:
space:
mode:
authorwiz <wiz>2009-04-19 14:42:48 +0000
committerwiz <wiz>2009-04-19 14:42:48 +0000
commit89afe51ca1b1199020eb5c47ea971e0a6abec06f (patch)
treedd73ee5062cd2077e199b8b10050da6160551926 /lang/python26/patches
parentd53f0cb1047414f136ccaec313ceda3472f53444 (diff)
downloadpkgsrc-89afe51ca1b1199020eb5c47ea971e0a6abec06f.tar.gz
Initial import of python26-2.6.2.
Compiles, installs, and runs on NetBSD-5.99.10/amd64; no further tests done. Please test and fix on your platform! What's new in Python-2.6: The major theme of Python 2.6 is preparing the migration path to Python 3.0, a major redesign of the language. Whenever possible, Python 2.6 incorporates new features and syntax from 3.0 while remaining compatible with existing code by not removing older features or syntax. When it tries to do what it can, adding compatibility functions in a future_builtins module and a -3 switch to warn about usages that will become unsupported in 3.0. Some significant new packages have been added to the standard library, such as the multiprocessing and json modules, but there aren way. Python 2.6 also sees a number of improvements and bugfixes throughout the source. A search through the change logs finds there were 259 patches applied and 612 bugs fixed between Python 2.5 and 2.6. Both figures are likely to be underestimates. More details at http://docs.python.org/whatsnew/2.6.html
Diffstat (limited to 'lang/python26/patches')
-rw-r--r--lang/python26/patches/patch-aa26
-rw-r--r--lang/python26/patches/patch-ab24
-rw-r--r--lang/python26/patches/patch-ac13
-rw-r--r--lang/python26/patches/patch-ae43
-rw-r--r--lang/python26/patches/patch-ag17
-rw-r--r--lang/python26/patches/patch-ah86
-rw-r--r--lang/python26/patches/patch-ai15
-rw-r--r--lang/python26/patches/patch-aj15
-rw-r--r--lang/python26/patches/patch-ak22
-rw-r--r--lang/python26/patches/patch-al80
-rw-r--r--lang/python26/patches/patch-am55
-rw-r--r--lang/python26/patches/patch-an12
-rw-r--r--lang/python26/patches/patch-ao13
-rw-r--r--lang/python26/patches/patch-ap67
-rw-r--r--lang/python26/patches/patch-ar17
-rw-r--r--lang/python26/patches/patch-at13
-rw-r--r--lang/python26/patches/patch-au27
-rw-r--r--lang/python26/patches/patch-av17
18 files changed, 562 insertions, 0 deletions
diff --git a/lang/python26/patches/patch-aa b/lang/python26/patches/patch-aa
new file mode 100644
index 00000000000..01d3545f06e
--- /dev/null
+++ b/lang/python26/patches/patch-aa
@@ -0,0 +1,26 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Include/py_curses.h.orig 2003-06-29 11:46:21.000000000 -0400
++++ 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/python26/patches/patch-ab b/lang/python26/patches/patch-ab
new file mode 100644
index 00000000000..2b433e26531
--- /dev/null
+++ b/lang/python26/patches/patch-ab
@@ -0,0 +1,24 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Lib/distutils/command/build_ext.py.orig 2007-04-24 09:27:25.000000000 -0600
++++ Lib/distutils/command/build_ext.py
+@@ -496,8 +496,19 @@ 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 = list(extra_args)
++ 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/python26/patches/patch-ac b/lang/python26/patches/patch-ac
new file mode 100644
index 00000000000..0ab198f97a8
--- /dev/null
+++ b/lang/python26/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Misc/build.sh.orig 2009-04-07 19:27:36.000000000 +0000
++++ Misc/build.sh
+@@ -275,7 +275,7 @@ fi
+
+ F="make-doc-dist.out"
+ start=`current_time`
+-if [ $conflict_count == 0 ]; then
++if [ $conflict_count = 0 ]; then
+ make dist >& ../build/$F
+ err=$?
+ fi
diff --git a/lang/python26/patches/patch-ae b/lang/python26/patches/patch-ae
new file mode 100644
index 00000000000..6162654d3a3
--- /dev/null
+++ b/lang/python26/patches/patch-ae
@@ -0,0 +1,43 @@
+$NetBSD: patch-ae,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+XXXbjs: I use amd64, and audioop is broken on 64-bit platforms.
+Thus, this needs to be tested.
+
+--- Modules/sunaudiodev.c.orig 2006-01-19 01:09:39.000000000 -0500
++++ Modules/sunaudiodev.c
+@@ -224,7 +224,11 @@ sad_ibufcount(sadobject *self)
+ {
+ audio_info_t ai;
+
++#if defined(__NetBSD__) && defined(AUDIO_GETBUFINFO)
++ if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) {
++#else
+ if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
++#endif
+ PyErr_SetFromErrno(SunAudioError);
+ return NULL;
+ }
+@@ -236,7 +240,11 @@ sad_obufcount(sadobject *self)
+ {
+ audio_info_t ai;
+
++#if defined(__NetBSD__) && defined(AUDIO_GETBUFINFO)
++ if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) {
++#else
+ if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
++#endif
+ PyErr_SetFromErrno(SunAudioError);
+ return NULL;
+ }
+@@ -275,7 +283,11 @@ sad_getdev(sadobject *self)
+ static PyObject *
+ sad_flush(sadobject *self)
+ {
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ if (ioctl(self->x_fd, AUDIO_FLUSH, NULL) < 0) {
++#else
+ if (ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0) {
++#endif
+ PyErr_SetFromErrno(SunAudioError);
+ return NULL;
+ }
diff --git a/lang/python26/patches/patch-ag b/lang/python26/patches/patch-ag
new file mode 100644
index 00000000000..dc9bb6a0fe3
--- /dev/null
+++ b/lang/python26/patches/patch-ag
@@ -0,0 +1,17 @@
+$NetBSD: patch-ag,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Misc/setuid-prog.c.orig 1998-09-10 16:18:09.000000000 -0400
++++ Misc/setuid-prog.c
+@@ -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/python26/patches/patch-ah b/lang/python26/patches/patch-ah
new file mode 100644
index 00000000000..2a020a20df9
--- /dev/null
+++ b/lang/python26/patches/patch-ah
@@ -0,0 +1,86 @@
+$NetBSD: patch-ah,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/_cursesmodule.c.orig 2008-01-26 15:03:51.000000000 +0100
++++ Modules/_cursesmodule.c
+@@ -314,17 +314,9 @@ Window_NoArg2TupleReturnFunction(getpary
+
+ 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")
+@@ -827,11 +819,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
+ } 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 *
+@@ -2039,7 +2027,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
+ }
+ #endif /* HAVE_CURSES_IS_TERM_RESIZED */
+
+-#if !defined(__NetBSD__)
+ static PyObject *
+ PyCurses_KeyName(PyObject *self, PyObject *args)
+ {
+@@ -2058,7 +2045,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
+
+ return PyString_FromString((knp == NULL) ? "" : (char *)knp);
+ }
+-#endif
+
+ static PyObject *
+ PyCurses_KillChar(PyObject *self)
+@@ -2603,9 +2589,7 @@ static PyMethodDef PyCurses_methods[] =
+ #ifdef HAVE_CURSES_IS_TERM_RESIZED
+ {"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
+ #endif
+-#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},
+@@ -2714,9 +2698,7 @@ init_curses(void)
+ 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);
+@@ -2788,7 +2770,6 @@ init_curses(void)
+ 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)
+@@ -2816,7 +2797,6 @@ init_curses(void)
+ if (key_n2 != key_n)
+ free(key_n2);
+ }
+-#endif
+ SetDictInt("KEY_MIN", KEY_MIN);
+ SetDictInt("KEY_MAX", KEY_MAX);
+ }
diff --git a/lang/python26/patches/patch-ai b/lang/python26/patches/patch-ai
new file mode 100644
index 00000000000..bc1f97e85ce
--- /dev/null
+++ b/lang/python26/patches/patch-ai
@@ -0,0 +1,15 @@
+$NetBSD: patch-ai,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/_ssl.c.orig 2009-01-26 16:55:41.000000000 +0000
++++ Modules/_ssl.c
+@@ -13,6 +13,10 @@
+ XXX what about SSL_MODE_AUTO_RETRY?
+ */
+
++#ifdef __sgi
++#include <sys/types.h>
++#endif
++
+ #include "Python.h"
+
+ #ifdef WITH_THREAD
diff --git a/lang/python26/patches/patch-aj b/lang/python26/patches/patch-aj
new file mode 100644
index 00000000000..99a9825fbbe
--- /dev/null
+++ b/lang/python26/patches/patch-aj
@@ -0,0 +1,15 @@
+$NetBSD: patch-aj,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/bsddbmodule.c.orig 2006-02-15 12:27:45.000000000 -0500
++++ Modules/bsddbmodule.c
+@@ -13,6 +13,10 @@
+ www.nightmare.com/software.html
+ */
+
++#if defined(__sgi) && _COMPILER_VERSION>700 && !_SGIAPI
++#define _BSD_TYPES
++#endif
++
+ #include "Python.h"
+ #ifdef WITH_THREAD
+ #include "pythread.h"
diff --git a/lang/python26/patches/patch-ak b/lang/python26/patches/patch-ak
new file mode 100644
index 00000000000..9bc0a138c00
--- /dev/null
+++ b/lang/python26/patches/patch-ak
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/posixmodule.c.orig 2007-04-04 14:30:56.000000000 -0400
++++ Modules/posixmodule.c
+@@ -339,7 +339,7 @@ extern int lstat(const char *, struct st
+ #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().
+ */
+@@ -357,7 +357,7 @@ convertenviron(void)
+ d = PyDict_New();
+ if (d == NULL)
+ return NULL;
+-#ifdef WITH_NEXT_FRAMEWORK
++#ifdef __APPLE__
+ if (environ == NULL)
+ environ = *_NSGetEnviron();
+ #endif
diff --git a/lang/python26/patches/patch-al b/lang/python26/patches/patch-al
new file mode 100644
index 00000000000..aa2b11bd1f7
--- /dev/null
+++ b/lang/python26/patches/patch-al
@@ -0,0 +1,80 @@
+$NetBSD: patch-al,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- configure.orig 2009-03-30 17:56:14.000000000 +0000
++++ configure
+@@ -4108,17 +4108,18 @@ _ACEOF
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ INSTSONAME="$LDLIBRARY".$SOVERSION
+ ;;
+- 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}
+- case $ac_sys_system in
+- FreeBSD*)
+- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
+- ;;
+- esac
+ INSTSONAME="$LDLIBRARY".$SOVERSION
+ ;;
++ Darwin*)
++ LDLIBRARY='libpython$(VERSION).dylib'
++ BLDLIBRARY='-L. -lpython$(VERSION)'
++ RUNSHARED=DYLD_FALLBACK_LIBRARY_PATH=`pwd`:${DYLD_FALLBACK_LIBRARY_PATH}
++ INSTSONAME="$LDLIBRARY"
++ ;;
+ hp*|HP*)
+ case `uname -m` in
+ ia64)
+@@ -13064,8 +13065,8 @@ then
+ LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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 ;;
+ Darwin/*)
+ # Use -undefined dynamic_lookup whenever possible (10.3 and later).
+@@ -13086,12 +13087,12 @@ then
+ LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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
+ fi
+ ;;
+- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
++ Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared'" ${LDFLAGS}";;
+ BSD/OS*/4*) LDSHARED="gcc -shared";;
+ FreeBSD*)
+ if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
+@@ -13115,6 +13116,7 @@ then
+ esac
+ fi;;
+ 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'
+@@ -13150,6 +13152,7 @@ then
+ Linux*|GNU*) CCSHARED="-fPIC";;
+ BSD/OS*/4*) CCSHARED="-fpic";;
+ FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
++ Interix*) CCSHARED="";;
+ OpenUNIX*|UnixWare*)
+ if test "$GCC" = "yes"
+ then CCSHARED="-fPIC"
+@@ -13207,6 +13210,7 @@ then
+ then
+ LINKFORSHARED="-Wl,--export-dynamic"
+ fi;;
++ Interix*) LINKFORSHARED="-Wl,-E";;
+ SunOS/5*) case $CC in
+ *gcc*)
+ if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
diff --git a/lang/python26/patches/patch-am b/lang/python26/patches/patch-am
new file mode 100644
index 00000000000..1316dd41d77
--- /dev/null
+++ b/lang/python26/patches/patch-am
@@ -0,0 +1,55 @@
+$NetBSD: patch-am,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- setup.py.orig 2009-03-31 18:20:48.000000000 +0000
++++ setup.py
+@@ -17,7 +17,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", "_elementtree", "_sqlite", "_tkinter", "bsddb", "cjkcodecs" "gdbm", "mpz", "expat", "readline"]
+
+ def add_dir_to_list(dirlist, dir):
+ """Add the directory 'dir' to the list 'dirlist' (at the front) if
+@@ -309,9 +309,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)
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -626,9 +632,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):
+@@ -1891,9 +1902,9 @@ def main():
+ ext_modules=[Extension('_struct', ['_struct.c'])],
+
+ # Scripts to install
+- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
++ scripts = ['Tools/scripts/pydoc2.6', 'Tools/scripts/idle',
+ 'Tools/scripts/2to3',
+- 'Lib/smtpd.py']
++ 'Lib/smtpd2.6.py']
+ )
+
+ # --install-platlib
diff --git a/lang/python26/patches/patch-an b/lang/python26/patches/patch-an
new file mode 100644
index 00000000000..d1f98ede8ea
--- /dev/null
+++ b/lang/python26/patches/patch-an
@@ -0,0 +1,12 @@
+$NetBSD: patch-an,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/makesetup.orig 2002-03-29 13:00:19.000000000 -0500
++++ Modules/makesetup
+@@ -164,6 +164,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
+ -rpath) libs="$libs $arg"; skip=libs;;
+ --rpath) libs="$libs $arg"; skip=libs;;
+ -[A-Zl]*) libs="$libs $arg";;
++ -pthread) libs="$libs $arg";;
+ *.a) libs="$libs $arg";;
+ *.so) libs="$libs $arg";;
+ *.sl) libs="$libs $arg";;
diff --git a/lang/python26/patches/patch-ao b/lang/python26/patches/patch-ao
new file mode 100644
index 00000000000..fd680c9a7d1
--- /dev/null
+++ b/lang/python26/patches/patch-ao
@@ -0,0 +1,13 @@
+$NetBSD: patch-ao,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Lib/distutils/util.py.orig 2006-05-23 17:54:23.000000000 -0400
++++ Lib/distutils/util.py
+@@ -115,6 +115,8 @@ def get_platform ():
+ elif machine in ('PowerPC', 'Power_Macintosh'):
+ # Pick a sane name for the PPC architecture.
+ machine = 'ppc'
++ elif osname[:9] == "dragonfly":
++ release = string.split(release, "-")[0]
+
+ return "%s-%s-%s" % (osname, release, machine)
+
diff --git a/lang/python26/patches/patch-ap b/lang/python26/patches/patch-ap
new file mode 100644
index 00000000000..f5ffb86f2b9
--- /dev/null
+++ b/lang/python26/patches/patch-ap
@@ -0,0 +1,67 @@
+$NetBSD: patch-ap,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/socketmodule.c.orig 2009-03-31 18:20:48.000000000 +0000
++++ Modules/socketmodule.c
+@@ -398,6 +398,8 @@ const char *inet_ntop(int af, const void
+ #define sockaddr_rc sockaddr_bt
+ #define sockaddr_hci sockaddr_bt
+ #define sockaddr_sco sockaddr_bt
++#define SOL_HCI BTPROTO_HCI
++#define HCI_DATA_DIR SO_HCI_DIRECTION
+ #define _BT_L2_MEMB(sa, memb) ((sa)->bt_##memb)
+ #define _BT_RC_MEMB(sa, memb) ((sa)->bt_##memb)
+ #define _BT_HCI_MEMB(sa, memb) ((sa)->bt_##memb)
+@@ -1076,9 +1078,13 @@ makesockaddr(int sockfd, struct sockaddr
+ case BTPROTO_HCI:
+ {
+ struct sockaddr_hci *a = (struct sockaddr_hci *) addr;
++#if defined(__NetBSD__)
++ return makebdaddr(&_BT_HCI_MEMB(a, bdaddr));
++#else
+ PyObject *ret = NULL;
+ ret = Py_BuildValue("i", _BT_HCI_MEMB(a, dev));
+ return ret;
++#endif
+ }
+
+ #if !defined(__FreeBSD__)
+@@ -1345,12 +1351,25 @@ getsockaddrarg(PySocketSockObject *s, Py
+ case BTPROTO_HCI:
+ {
+ struct sockaddr_hci *addr = (struct sockaddr_hci *)addr_ret;
++#if defined(__NetBSD__)
++ char *straddr = PyString_AsString(args);
++
++ _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
++ if (straddr == NULL) {
++ PyErr_SetString(socket_error, "getsockaddrarg: "
++ "wrong format");
++ return 0;
++ }
++ if (setbdaddr(straddr, &_BT_HCI_MEMB(addr, bdaddr)) < 0)
++ return 0;
++#else
+ _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
+ if (!PyArg_ParseTuple(args, "i", &_BT_HCI_MEMB(addr, dev))) {
+ PyErr_SetString(socket_error, "getsockaddrarg: "
+ "wrong format");
+ return 0;
+ }
++#endif
+ *len_ret = sizeof *addr;
+ return 1;
+ }
+@@ -4564,9 +4583,13 @@ init_socket(void)
+ PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
+ PyModule_AddIntConstant(m, "BTPROTO_HCI", BTPROTO_HCI);
+ PyModule_AddIntConstant(m, "SOL_HCI", SOL_HCI);
++#if !defined(__NetBSD__)
+ PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER);
++#endif
+ #if !defined(__FreeBSD__)
++#if !defined(__NetBSD__)
+ PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP);
++#endif
+ PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR);
+ PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO);
+ #endif
diff --git a/lang/python26/patches/patch-ar b/lang/python26/patches/patch-ar
new file mode 100644
index 00000000000..820aa18eed7
--- /dev/null
+++ b/lang/python26/patches/patch-ar
@@ -0,0 +1,17 @@
+$NetBSD: patch-ar,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Mac/BuildScript/scripts/postflight.patch-profile.orig 2006-10-08 14:19:28.000000000 -0400
++++ Mac/BuildScript/scripts/postflight.patch-profile
+@@ -36,10 +36,10 @@ esac
+ # Now ensure that our bin directory is on $P and before /usr/bin at that
+ for elem in `echo $P | tr ':' ' '`
+ do
+- if [ "${elem}" == "${PYTHON_ROOT}/bin" ]; then
++ if [ "${elem}" = "${PYTHON_ROOT}/bin" ]; then
+ echo "All right, you're a python lover already"
+ exit 0
+- elif [ "${elem}" == "/usr/bin" ]; then
++ elif [ "${elem}" = "/usr/bin" ]; then
+ break
+ fi
+ done
diff --git a/lang/python26/patches/patch-at b/lang/python26/patches/patch-at
new file mode 100644
index 00000000000..030d92be849
--- /dev/null
+++ b/lang/python26/patches/patch-at
@@ -0,0 +1,13 @@
+$NetBSD: patch-at,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Modules/mmapmodule.c.orig 2009-03-31 20:22:13.000000000 +0000
++++ Modules/mmapmodule.c
+@@ -508,6 +508,8 @@ mmap_resize_method(mmap_object *self,
+
+ #ifdef MREMAP_MAYMOVE
+ newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE);
++#elif defined(__NetBSD__)
++ newmap = mremap(self->data, self->size, self->data, new_size, 0);
+ #else
+ #if defined(__NetBSD__)
+ newmap = mremap(self->data, self->size, self->data, new_size, 0);
diff --git a/lang/python26/patches/patch-au b/lang/python26/patches/patch-au
new file mode 100644
index 00000000000..02b20a14697
--- /dev/null
+++ b/lang/python26/patches/patch-au
@@ -0,0 +1,27 @@
+$NetBSD: patch-au,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+--- Makefile.pre.in.orig 2009-02-24 11:07:44.000000000 +0000
++++ Makefile.pre.in
+@@ -425,6 +425,12 @@ libpython$(VERSION).dylib: $(LIBRARY_OBJ
+ libpython$(VERSION).sl: $(LIBRARY_OBJS)
+ $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
+
++libpython$(VERSION).dylib: $(LIBRARY_OBJS)
++ $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ \
++ -current_version 2.5.2 -compatibility_version $(VERSION) \
++ -o $@ -flat_namespace -undefined suppress $(LDFLAGS) \
++ $(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.
+@@ -785,7 +791,8 @@ altbininstall: $(BUILDPYTHON)
+ (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
+ fi \
+ fi; \
+- else true; \
++ elif test -f $(INSTSONAME); then \
++ $(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \
+ fi
+
+ # Install the manual page
diff --git a/lang/python26/patches/patch-av b/lang/python26/patches/patch-av
new file mode 100644
index 00000000000..dd5e1555d6d
--- /dev/null
+++ b/lang/python26/patches/patch-av
@@ -0,0 +1,17 @@
+$NetBSD: patch-av,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $
+
+Add a knob (enviroment variable) for disabling installation of egg metadata
+in extensions until we have infrastructure in place for dealing w/ it.
+
+--- Lib/distutils/command/install.py.orig 2006-03-27 23:55:21.000000000 +0200
++++ Lib/distutils/command/install.py
+@@ -601,7 +601,8 @@ class install (Command):
+ ('install_headers', has_headers),
+ ('install_scripts', has_scripts),
+ ('install_data', has_data),
+- ('install_egg_info', lambda self:True),
+ ]
++ if not os.environ.has_key('PKGSRC_PYTHON_NO_EGG'):
++ sub_commands += [('install_egg_info', lambda self:True),]
+
+ # class install