diff options
-rw-r--r-- | lang/python26/Makefile | 7 | ||||
-rw-r--r-- | lang/python26/PLIST.common | 6 | ||||
-rw-r--r-- | lang/python26/distinfo | 29 | ||||
-rw-r--r-- | lang/python26/patches/patch-aa | 6 | ||||
-rw-r--r-- | lang/python26/patches/patch-ab | 6 | ||||
-rw-r--r-- | lang/python26/patches/patch-ac | 6 | ||||
-rw-r--r-- | lang/python26/patches/patch-ae | 42 | ||||
-rw-r--r-- | lang/python26/patches/patch-af | 326 | ||||
-rw-r--r-- | lang/python26/patches/patch-ah | 94 | ||||
-rw-r--r-- | lang/python26/patches/patch-al | 25 | ||||
-rw-r--r-- | lang/python26/patches/patch-am | 53 | ||||
-rw-r--r-- | lang/python26/patches/patch-ap | 82 | ||||
-rw-r--r-- | lang/python26/patches/patch-au | 4 | ||||
-rw-r--r-- | lang/python26/patches/patch-av | 6 |
14 files changed, 193 insertions, 499 deletions
diff --git a/lang/python26/Makefile b/lang/python26/Makefile index e9ff485a490..b9666533130 100644 --- a/lang/python26/Makefile +++ b/lang/python26/Makefile @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2010/06/29 08:15:42 tron Exp $ +# $NetBSD: Makefile,v 1.25 2010/09/04 05:12:00 obache Exp $ -DISTNAME= Python-2.6.5 +DISTNAME= Python-2.6.6 PKGNAME= ${DISTNAME:S/Python/python26/} -PKGREVISION= 1 CATEGORIES= lang python -MASTER_SITES= http://www.python.org/ftp/python/2.6.5/ +MASTER_SITES= http://www.python.org/ftp/python/${PKGVERSION_NOREV}/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/lang/python26/PLIST.common b/lang/python26/PLIST.common index b0ef4bbcd99..52022e13069 100644 --- a/lang/python26/PLIST.common +++ b/lang/python26/PLIST.common @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.common,v 1.10 2010/05/02 14:09:11 wiz Exp $ +@comment $NetBSD: PLIST.common,v 1.11 2010/09/04 05:12:00 obache Exp $ bin/2to3 bin/pydoc${PY_VER_SUFFIX} bin/python${PY_VER_SUFFIX} @@ -1839,6 +1839,9 @@ lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_exec.pyo lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_execfile.py lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_execfile.pyc lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_execfile.pyo +lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_exitfunc.py +lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_exitfunc.pyc +lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_exitfunc.pyo lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_filter.py lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_filter.pyc lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_filter.pyo @@ -2646,6 +2649,7 @@ lib/python${PY_VER_SUFFIX}/test/seq_tests.py lib/python${PY_VER_SUFFIX}/test/seq_tests.pyc lib/python${PY_VER_SUFFIX}/test/seq_tests.pyo lib/python${PY_VER_SUFFIX}/test/sgml_input.html +lib/python${PY_VER_SUFFIX}/test/sha256.pem lib/python${PY_VER_SUFFIX}/test/sortperf.py lib/python${PY_VER_SUFFIX}/test/sortperf.pyc lib/python${PY_VER_SUFFIX}/test/sortperf.pyo diff --git a/lang/python26/distinfo b/lang/python26/distinfo index fcfd4ef87fa..1619178d19e 100644 --- a/lang/python26/distinfo +++ b/lang/python26/distinfo @@ -1,19 +1,18 @@ -$NetBSD: distinfo,v 1.22 2010/06/29 08:15:42 tron Exp $ +$NetBSD: distinfo,v 1.23 2010/09/04 05:12:00 obache Exp $ -SHA1 (Python-2.6.5.tar.bz2) = 24c94f5428a8c94c9d0b316e3019fee721fdb5d1 -RMD160 (Python-2.6.5.tar.bz2) = 909c6a13749396f2b19fed51821d3e2577b2833b -Size (Python-2.6.5.tar.bz2) = 11095581 bytes -SHA1 (patch-aa) = d44e67645dc86ff14f5daf5705de02c6f330cc48 -SHA1 (patch-ab) = d35025df83e70d129f9fbcd277652b0eea83b026 -SHA1 (patch-ac) = 858580a4e5c7474127eafb27bdfa96dc96cafad5 +SHA1 (Python-2.6.6.tar.bz2) = a1daf2c2c7cffe0939c015260447572fe75c7e50 +RMD160 (Python-2.6.6.tar.bz2) = 2d63f4f0ad3c124a8e62215ca94bd0231350e912 +Size (Python-2.6.6.tar.bz2) = 11080872 bytes +SHA1 (patch-aa) = 0528fc5da76d5f1d19586ea3dda1acd09a4b0113 +SHA1 (patch-ab) = b47aa9d18a7c1a99ac8cc8b29c64867443f303e5 +SHA1 (patch-ac) = 57c88d47f82630e67bcd27ab61bf4362035da2f2 SHA1 (patch-ad) = a997e39d16a8f0023125362b180d19ee97ab519b -SHA1 (patch-ae) = 5425515c6bf130eee204ca2749386f6447eaa35b -SHA1 (patch-af) = 42a93a321f6f480133513082c54bcab30e91445f -SHA1 (patch-ah) = f973ac5a82ba5c665d2ec4b0f6130e903b5a5d7c -SHA1 (patch-al) = d753e00ab65564a08988f7934870716aca9b02a9 -SHA1 (patch-am) = 77f8ca811777d53d7a1972c177e59568dc49651b +SHA1 (patch-ae) = a6d578b5f12eb42fbbcc11791576d2686a4807d9 +SHA1 (patch-ah) = 501d220b41e578402f3400fe88e582aa2408a147 +SHA1 (patch-al) = e5bf2a7f50534a18bb18f7111b3c5d097b528778 +SHA1 (patch-am) = d16a765ef8dfdf78d3208016d4300dad170a6cf2 SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab SHA1 (patch-ao) = 8c6a156b0f0c2a6d319658477fff348e6a0c3603 -SHA1 (patch-ap) = 39d81b01fa9e1b894be9ae0922881337bb4d17da -SHA1 (patch-au) = cf68c1975f60d18bf37262fa41cbfef1585aeb55 -SHA1 (patch-av) = a1d41cb3a93879d54f0964ff84a63a297c333156 +SHA1 (patch-ap) = d23a869a449ab9dc166cfa149913b20c9acad9cb +SHA1 (patch-au) = e0e6595311d4ee1eda45d381cab87cbba46b21d3 +SHA1 (patch-av) = d6bf0419015656a8d2f13d3132873e453c8a6b6e diff --git a/lang/python26/patches/patch-aa b/lang/python26/patches/patch-aa index 01d3545f06e..788cee0def0 100644 --- a/lang/python26/patches/patch-aa +++ b/lang/python26/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $ +$NetBSD: patch-aa,v 1.2 2010/09/04 05:12:00 obache Exp $ ---- Include/py_curses.h.orig 2003-06-29 11:46:21.000000000 -0400 +--- Include/py_curses.h.orig 2009-09-06 21:23:05.000000000 +0000 +++ Include/py_curses.h -@@ -39,6 +39,21 @@ +@@ -44,6 +44,21 @@ #endif #endif diff --git a/lang/python26/patches/patch-ab b/lang/python26/patches/patch-ab index 2b433e26531..015f1260d08 100644 --- a/lang/python26/patches/patch-ab +++ b/lang/python26/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $ +$NetBSD: patch-ab,v 1.2 2010/09/04 05:12:00 obache Exp $ ---- Lib/distutils/command/build_ext.py.orig 2007-04-24 09:27:25.000000000 -0600 +--- Lib/distutils/command/build_ext.py.orig 2010-08-02 20:26:41.000000000 +0000 +++ Lib/distutils/command/build_ext.py -@@ -496,8 +496,19 @@ class build_ext (Command): +@@ -514,8 +514,19 @@ class build_ext (Command): # that go into the mix. if ext.extra_objects: objects.extend(ext.extra_objects) diff --git a/lang/python26/patches/patch-ac b/lang/python26/patches/patch-ac index 0ab198f97a8..7a0bf5e6c7f 100644 --- a/lang/python26/patches/patch-ac +++ b/lang/python26/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $ +$NetBSD: patch-ac,v 1.2 2010/09/04 05:12:00 obache Exp $ ---- Misc/build.sh.orig 2009-04-07 19:27:36.000000000 +0000 +--- Misc/build.sh.orig 2010-03-12 21:29:25.000000000 +0000 +++ Misc/build.sh -@@ -275,7 +275,7 @@ fi +@@ -269,7 +269,7 @@ fi F="make-doc-dist.out" start=`current_time` diff --git a/lang/python26/patches/patch-ae b/lang/python26/patches/patch-ae index 6162654d3a3..1ad5cdab50f 100644 --- a/lang/python26/patches/patch-ae +++ b/lang/python26/patches/patch-ae @@ -1,43 +1,43 @@ -$NetBSD: patch-ae,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $ +$NetBSD: patch-ae,v 1.2 2010/09/04 05:12:00 obache 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.orig 2010-05-09 15:15:40.000000000 +0000 +++ Modules/sunaudiodev.c @@ -224,7 +224,11 @@ sad_ibufcount(sadobject *self) { - audio_info_t ai; - + audio_info_t ai; + +#if defined(__NetBSD__) && defined(AUDIO_GETBUFINFO) -+ if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) { ++ if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) { +#else - if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) { + if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) { +#endif - PyErr_SetFromErrno(SunAudioError); - return NULL; - } + PyErr_SetFromErrno(SunAudioError); + return NULL; + } @@ -236,7 +240,11 @@ sad_obufcount(sadobject *self) { - audio_info_t ai; - + audio_info_t ai; + +#if defined(__NetBSD__) && defined(AUDIO_GETBUFINFO) -+ if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) { ++ if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) { +#else - if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) { + if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) { +#endif - PyErr_SetFromErrno(SunAudioError); - return NULL; - } + 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) { ++ if (ioctl(self->x_fd, AUDIO_FLUSH, NULL) < 0) { +#else - if (ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0) { + if (ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0) { +#endif - PyErr_SetFromErrno(SunAudioError); - return NULL; - } + PyErr_SetFromErrno(SunAudioError); + return NULL; + } diff --git a/lang/python26/patches/patch-af b/lang/python26/patches/patch-af deleted file mode 100644 index e5076ae5888..00000000000 --- a/lang/python26/patches/patch-af +++ /dev/null @@ -1,326 +0,0 @@ -$NetBSD: patch-af,v 1.1 2010/06/29 08:15:42 tron Exp $ - -Fix for the memory corruption caused by the "audioop" module reported -in CVE-2010-2089. Patch taken from here: - -https://bugzilla.redhat.com/attachment.cgi?id=418359&action=diff - ---- Modules/audioop.c.orig 2010-06-29 09:09:00.000000000 +0100 -+++ Modules/audioop.c 2010-06-29 09:09:00.000000000 +0100 -@@ -295,6 +295,29 @@ - - static PyObject *AudioopError; - -+static int -+audioop_check_size(int size) -+{ -+ if ( size != 1 && size != 2 && size != 4 ) { -+ PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -+ return 0; -+ } else { -+ return 1; -+ } -+} -+ -+static int -+audioop_check_parameters(int len, int size) -+{ -+ if (!audioop_check_size(size)) -+ return 0; -+ if ( len % size != 0 ) { -+ PyErr_SetString(AudioopError, "not a whole number of frames"); -+ return 0; -+ } -+ return 1; -+} -+ - static PyObject * - audioop_getsample(PyObject *self, PyObject *args) - { -@@ -304,10 +327,8 @@ - - if ( !PyArg_ParseTuple(args, "s#ii:getsample", &cp, &len, &size, &i) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - if ( i < 0 || i >= len/size ) { - PyErr_SetString(AudioopError, "Index out of range"); - return 0; -@@ -328,10 +349,8 @@ - - if ( !PyArg_ParseTuple(args, "s#i:max", &cp, &len, &size) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - for ( i=0; i<len; i+= size) { - if ( size == 1 ) val = (int)*CHARP(cp, i); - else if ( size == 2 ) val = (int)*SHORTP(cp, i); -@@ -352,10 +371,8 @@ - - if (!PyArg_ParseTuple(args, "s#i:minmax", &cp, &len, &size)) - return NULL; -- if (size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -+ if (!audioop_check_parameters(len, size)) - return NULL; -- } - for (i = 0; i < len; i += size) { - if (size == 1) val = (int) *CHARP(cp, i); - else if (size == 2) val = (int) *SHORTP(cp, i); -@@ -376,10 +393,8 @@ - - if ( !PyArg_ParseTuple(args, "s#i:avg", &cp, &len, &size) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - for ( i=0; i<len; i+= size) { - if ( size == 1 ) val = (int)*CHARP(cp, i); - else if ( size == 2 ) val = (int)*SHORTP(cp, i); -@@ -403,10 +418,8 @@ - - if ( !PyArg_ParseTuple(args, "s#i:rms", &cp, &len, &size) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - for ( i=0; i<len; i+= size) { - if ( size == 1 ) val = (int)*CHARP(cp, i); - else if ( size == 2 ) val = (int)*SHORTP(cp, i); -@@ -614,10 +627,8 @@ - - if ( !PyArg_ParseTuple(args, "s#i:avgpp", &cp, &len, &size) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - /* Compute first delta value ahead. Also automatically makes us - ** skip the first extreme value - */ -@@ -671,10 +682,8 @@ - - if ( !PyArg_ParseTuple(args, "s#i:maxpp", &cp, &len, &size) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - /* Compute first delta value ahead. Also automatically makes us - ** skip the first extreme value - */ -@@ -722,10 +731,8 @@ - - if ( !PyArg_ParseTuple(args, "s#i:cross", &cp, &len, &size) ) - return 0; -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - ncross = -1; - prevval = 17; /* Anything <> 0,1 */ - for ( i=0; i<len; i+= size) { -@@ -750,6 +757,8 @@ - - if ( !PyArg_ParseTuple(args, "s#id:mul", &cp, &len, &size, &factor ) ) - return 0; -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - - if ( size == 1 ) maxval = (double) 0x7f; - else if ( size == 2 ) maxval = (double) 0x7fff; -@@ -792,6 +801,12 @@ - if ( !PyArg_ParseTuple(args, "s#idd:tomono", - &cp, &len, &size, &fac1, &fac2 ) ) - return 0; -+ if (!audioop_check_parameters(len, size)) -+ return NULL; -+ if ( ((len / size) & 1) != 0 ) { -+ PyErr_SetString(AudioopError, "not a whole number of frames"); -+ return NULL; -+ } - - if ( size == 1 ) maxval = (double) 0x7f; - else if ( size == 2 ) maxval = (double) 0x7fff; -@@ -837,6 +852,8 @@ - if ( !PyArg_ParseTuple(args, "s#idd:tostereo", - &cp, &len, &size, &fac1, &fac2 ) ) - return 0; -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - - if ( size == 1 ) maxval = (double) 0x7f; - else if ( size == 2 ) maxval = (double) 0x7fff; -@@ -896,7 +913,8 @@ - if ( !PyArg_ParseTuple(args, "s#s#i:add", - &cp1, &len1, &cp2, &len2, &size ) ) - return 0; -- -+ if (!audioop_check_parameters(len1, size)) -+ return NULL; - if ( len1 != len2 ) { - PyErr_SetString(AudioopError, "Lengths should be the same"); - return 0; -@@ -950,11 +968,8 @@ - if ( !PyArg_ParseTuple(args, "s#ii:bias", - &cp, &len, &size , &bias) ) - return 0; -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - - rv = PyString_FromStringAndSize(NULL, len); - if ( rv == 0 ) -@@ -986,12 +1001,9 @@ - if ( !PyArg_ParseTuple(args, "s#i:reverse", - &cp, &len, &size) ) - return 0; -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - -- if ( size != 1 && size != 2 && size != 4 ) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -- - rv = PyString_FromStringAndSize(NULL, len); - if ( rv == 0 ) - return 0; -@@ -1023,12 +1035,10 @@ - if ( !PyArg_ParseTuple(args, "s#ii:lin2lin", - &cp, &len, &size, &size2) ) - return 0; -- -- if ( (size != 1 && size != 2 && size != 4) || -- (size2 != 1 && size2 != 2 && size2 != 4)) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; -+ if (!audioop_check_size(size2)) -+ return NULL; - - new_len = (len/size)*size2; - if (new_len < 0) { -@@ -1080,10 +1090,8 @@ - &nchannels, &inrate, &outrate, &state, - &weightA, &weightB)) - return NULL; -- if (size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -+ if (!audioop_check_size(size)) - return NULL; -- } - if (nchannels < 1) { - PyErr_SetString(AudioopError, "# of channels should be >= 1"); - return NULL; -@@ -1269,11 +1277,8 @@ - if ( !PyArg_ParseTuple(args, "s#i:lin2ulaw", - &cp, &len, &size) ) - return 0 ; -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - - rv = PyString_FromStringAndSize(NULL, len/size); - if ( rv == 0 ) -@@ -1303,11 +1308,8 @@ - if ( !PyArg_ParseTuple(args, "s#i:ulaw2lin", - &cp, &len, &size) ) - return 0; -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_size(size)) -+ return NULL; - - new_len = len*size; - if (new_len < 0) { -@@ -1343,11 +1345,8 @@ - if ( !PyArg_ParseTuple(args, "s#i:lin2alaw", - &cp, &len, &size) ) - return 0; -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - - rv = PyString_FromStringAndSize(NULL, len/size); - if ( rv == 0 ) -@@ -1377,11 +1376,8 @@ - if ( !PyArg_ParseTuple(args, "s#i:alaw2lin", - &cp, &len, &size) ) - return 0; -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_size(size)) -+ return NULL; - - new_len = len*size; - if (new_len < 0) { -@@ -1418,12 +1414,8 @@ - if ( !PyArg_ParseTuple(args, "s#iO:lin2adpcm", - &cp, &len, &size, &state) ) - return 0; -- -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_parameters(len, size)) -+ return NULL; - - str = PyString_FromStringAndSize(NULL, len/(size*2)); - if ( str == 0 ) -@@ -1526,11 +1518,8 @@ - if ( !PyArg_ParseTuple(args, "s#iO:adpcm2lin", - &cp, &len, &size, &state) ) - return 0; -- -- if ( size != 1 && size != 2 && size != 4) { -- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); -- return 0; -- } -+ if (!audioop_check_size(size)) -+ return NULL; - - /* Decode state, should have (value, step) */ - if ( state == Py_None ) { diff --git a/lang/python26/patches/patch-ah b/lang/python26/patches/patch-ah index cd4bc79d83a..c40d427a252 100644 --- a/lang/python26/patches/patch-ah +++ b/lang/python26/patches/patch-ah @@ -1,6 +1,6 @@ -$NetBSD: patch-ah,v 1.2 2010/05/02 14:09:11 wiz Exp $ +$NetBSD: patch-ah,v 1.3 2010/09/04 05:12:00 obache Exp $ ---- Modules/_cursesmodule.c.orig 2010-02-22 17:06:22.000000000 +0000 +--- Modules/_cursesmodule.c.orig 2010-08-05 16:35:53.000000000 +0000 +++ Modules/_cursesmodule.c @@ -317,17 +317,9 @@ Window_NoArg2TupleReturnFunction(getpary @@ -21,66 +21,66 @@ $NetBSD: patch-ah,v 1.2 2010/05/02 14:09:11 wiz Exp $ Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)") Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines") @@ -886,11 +878,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje - return Py_BuildValue("c", rtn); - } else { - const char *knp; + return Py_BuildValue("c", rtn); + } else { + const char *knp; -#if defined(__NetBSD__) -- knp = unctrl(rtn); +- knp = unctrl(rtn); -#else - knp = keyname(rtn); + knp = keyname(rtn); -#endif - return PyString_FromString((knp == NULL) ? "" : knp); - } - } -@@ -2100,7 +2088,6 @@ PyCurses_Is_Term_Resized(PyObject *self, + return PyString_FromString((knp == NULL) ? "" : knp); + } } +@@ -2100,7 +2088,6 @@ PyCursesWindow_NoOutRefresh(PyCursesWind + } #endif /* HAVE_CURSES_IS_TERM_RESIZED */ -#if !defined(__NetBSD__) - static PyObject * - PyCurses_KeyName(PyObject *self, PyObject *args) - { -@@ -2119,7 +2106,6 @@ PyCurses_KeyName(PyObject *self, PyObjec + static PyObject * + PyCurses_KeyName(PyObject *self, PyObject *args) + { +@@ -2119,7 +2106,6 @@ PyCursesWindow_NoOutRefresh(PyCursesWind - return PyString_FromString((knp == NULL) ? "" : (char *)knp); - } + return PyString_FromString((knp == NULL) ? "" : (char *)knp); + } -#endif - static PyObject * - PyCurses_KillChar(PyObject *self) -@@ -2664,9 +2650,7 @@ static PyMethodDef PyCurses_methods[] = + static PyObject * + PyCurses_KillChar(PyObject *self) +@@ -2664,9 +2650,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind #ifdef HAVE_CURSES_IS_TERM_RESIZED - {"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS}, + {"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS}, #endif -#if !defined(__NetBSD__) - {"keyname", (PyCFunction)PyCurses_KeyName, METH_VARARGS}, + {"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}, -@@ -2775,9 +2759,7 @@ init_curses(void) - SetDictInt("A_DIM", A_DIM); - SetDictInt("A_BOLD", A_BOLD); - SetDictInt("A_ALTCHARSET", A_ALTCHARSET); + {"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS}, + {"longname", (PyCFunction)PyCurses_longname, METH_NOARGS}, + {"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS}, +@@ -2775,9 +2759,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind + SetDictInt("A_DIM", A_DIM); + SetDictInt("A_BOLD", A_BOLD); + SetDictInt("A_ALTCHARSET", A_ALTCHARSET); -#if !defined(__NetBSD__) - SetDictInt("A_INVIS", A_INVIS); + SetDictInt("A_INVIS", A_INVIS); -#endif - SetDictInt("A_PROTECT", A_PROTECT); - SetDictInt("A_CHARTEXT", A_CHARTEXT); - SetDictInt("A_COLOR", A_COLOR); -@@ -2849,7 +2831,6 @@ init_curses(void) - int key; - char *key_n; - char *key_n2; + SetDictInt("A_PROTECT", A_PROTECT); + SetDictInt("A_CHARTEXT", A_CHARTEXT); + SetDictInt("A_COLOR", A_COLOR); +@@ -2849,7 +2831,6 @@ PyCursesWindow_NoOutRefresh(PyCursesWind + 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) -@@ -2877,7 +2858,6 @@ init_curses(void) - if (key_n2 != key_n) - free(key_n2); - } + for (key=KEY_MIN;key < KEY_MAX; key++) { + key_n = (char *)keyname(key); + if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0) +@@ -2877,7 +2858,6 @@ PyCursesWindow_NoOutRefresh(PyCursesWind + if (key_n2 != key_n) + free(key_n2); + } -#endif - SetDictInt("KEY_MIN", KEY_MIN); - SetDictInt("KEY_MAX", KEY_MAX); - } + SetDictInt("KEY_MIN", KEY_MIN); + SetDictInt("KEY_MAX", KEY_MAX); + } diff --git a/lang/python26/patches/patch-al b/lang/python26/patches/patch-al index 5ac6b89baeb..b9664275fe9 100644 --- a/lang/python26/patches/patch-al +++ b/lang/python26/patches/patch-al @@ -1,8 +1,8 @@ -$NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $ +$NetBSD: patch-al,v 1.5 2010/09/04 05:12:00 obache Exp $ ---- configure.orig 2010-03-09 21:47:28.000000000 +0000 +--- configure.orig 2010-05-25 02:27:03.000000000 +0000 +++ configure -@@ -4166,17 +4166,18 @@ _ACEOF +@@ -4736,17 +4736,18 @@ $as_echo "#define Py_ENABLE_SHARED 1" >> RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} INSTSONAME="$LDLIBRARY".$SOVERSION ;; @@ -27,16 +27,7 @@ $NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $ hp*|HP*) case `uname -m` in ia64) -@@ -4578,7 +4579,7 @@ fi - # tweak OPT based on compiler and platform, only if the user didn't set - # it on the command line - --if test "${OPT-unset}" == "unset" -+if test "${OPT-unset}" = "unset" - then - case $GCC in - yes) -@@ -13261,8 +13262,8 @@ then +@@ -7359,8 +7360,8 @@ then LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' else # No framework, use the Python app as bundle-loader @@ -47,7 +38,7 @@ $NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $ fi ;; Darwin/*) # Use -undefined dynamic_lookup whenever possible (10.3 and later). -@@ -13283,12 +13284,12 @@ then +@@ -7381,12 +7382,12 @@ then LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' else # No framework, use the Python app as bundle-loader @@ -63,7 +54,7 @@ $NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $ BSD/OS*/4*) LDSHARED="gcc -shared";; FreeBSD*) if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] -@@ -13312,6 +13313,7 @@ then +@@ -7410,6 +7411,7 @@ then esac fi;; NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";; @@ -71,7 +62,7 @@ $NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $ OpenUNIX*|UnixWare*) if test "$GCC" = "yes" then LDSHARED='$(CC) -shared' -@@ -13347,6 +13349,7 @@ then +@@ -7445,6 +7447,7 @@ then Linux*|GNU*) CCSHARED="-fPIC";; BSD/OS*/4*) CCSHARED="-fpic";; FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; @@ -79,7 +70,7 @@ $NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $ OpenUNIX*|UnixWare*) if test "$GCC" = "yes" then CCSHARED="-fPIC" -@@ -13404,6 +13407,7 @@ then +@@ -7502,6 +7505,7 @@ then then LINKFORSHARED="-Wl,--export-dynamic" fi;; diff --git a/lang/python26/patches/patch-am b/lang/python26/patches/patch-am index fc81ea8c838..0fcdc658e3f 100644 --- a/lang/python26/patches/patch-am +++ b/lang/python26/patches/patch-am @@ -1,4 +1,4 @@ -$NetBSD: patch-am,v 1.11 2010/05/02 14:09:12 wiz Exp $ +$NetBSD: patch-am,v 1.12 2010/09/04 05:12:00 obache Exp $ Disabled modules for normal build: bsdddb @@ -12,10 +12,10 @@ headers and libraries from the system. Build the 1.85 compat module all the time against the BDB version of choice. ---- setup.py.orig 2010-03-08 07:08:25.000000000 +0000 +--- setup.py.orig 2010-07-17 12:31:09.000000000 +0000 +++ setup.py -@@ -17,7 +17,7 @@ from distutils.command.install import in - from distutils.command.install_lib import install_lib +@@ -18,7 +18,7 @@ from distutils.command.install_lib impor + from distutils.spawn import find_executable # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] @@ -23,7 +23,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. 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): +@@ -355,9 +355,15 @@ class PyBuildExt(build_ext): return sys.platform def detect_modules(self): @@ -42,7 +42,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. -@@ -629,9 +635,7 @@ class PyBuildExt(build_ext): +@@ -703,9 +709,7 @@ class PyBuildExt(build_ext): if krb5_h: ssl_incs += krb5_h ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, @@ -53,7 +53,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. if (ssl_incs is not None and ssl_libs is not None): -@@ -741,151 +745,6 @@ class PyBuildExt(build_ext): +@@ -815,172 +819,6 @@ class PyBuildExt(build_ext): else: raise ValueError("unknown major BerkeleyDB version", major) @@ -108,12 +108,19 @@ Build the 1.85 compat module all the time against the BDB version of choice. - - db_ver_inc_map = {} - +- if sys.platform == 'darwin': +- sysroot = macosx_sdk_root() +- - class db_found(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 sys.platform == 'darwin' and is_macosx_sdk_path(d): +- f = os.path.join(sysroot, d[1:], "db.h") +- - if db_setup_debug: print "db: looking for db.h in", f - if os.path.exists(f): - f = open(f).read() @@ -160,7 +167,21 @@ Build the 1.85 compat module all the time against the BDB version of choice. - db_incdir.replace("include", 'lib64'), - db_incdir.replace("include", 'lib'), - ] -- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) +- +- if sys.platform != 'darwin': +- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) +- +- else: +- # Same as other branch, but takes OSX SDK into account +- tmp = [] +- for dn in db_dirs_to_check: +- if is_macosx_sdk_path(dn): +- if os.path.isdir(os.path.join(sysroot, dn[1:])): +- tmp.append(dn) +- else: +- if os.path.isdir(dn): +- tmp.append(dn) +- db_dirs_to_check = tmp - - # Look for a version specific db-X.Y before an ambiguoius dbX - # XXX should we -ever- look for a dbX name? Do any @@ -205,11 +226,17 @@ Build the 1.85 compat module all the time against the BDB version of choice. # The sqlite interface sqlite_setup_debug = False # verbose debug prints from this script? -@@ -992,25 +851,12 @@ class PyBuildExt(build_ext): +@@ -1094,31 +932,12 @@ class PyBuildExt(build_ext): # we do not build this one. Otherwise this build will pick up # the more recent berkeleydb's db.h file first in the include path # when attempting to compile and it will fail. - f = "/usr/include/db.h" +- +- if sys.platform == 'darwin': +- if is_macosx_sdk_path(f): +- sysroot = macosx_sdk_root() +- f = os.path.join(sysroot, f[1:]) +- - if os.path.exists(f) and not db_incs: - data = open(f).read() - m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) @@ -236,7 +263,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. # The standard Unix dbm module: if platform not in ['cygwin']: -@@ -1023,7 +869,7 @@ class PyBuildExt(build_ext): +@@ -1131,7 +950,7 @@ class PyBuildExt(build_ext): exts.append( Extension('dbm', ['dbmmodule.c'], define_macros=[('HAVE_NDBM_H',None)], libraries = ndbm_libs ) ) @@ -245,7 +272,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. gdbm_libs = ['gdbm'] if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): gdbm_libs.append('gdbm_compat') -@@ -1039,14 +885,11 @@ class PyBuildExt(build_ext): +@@ -1147,14 +966,11 @@ class PyBuildExt(build_ext): libraries = gdbm_libs ) ) else: missing.append('dbm') @@ -262,7 +289,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. else: missing.append('dbm') -@@ -1304,6 +1147,14 @@ class PyBuildExt(build_ext): +@@ -1408,6 +1224,14 @@ class PyBuildExt(build_ext): ) libraries = [] @@ -277,7 +304,7 @@ Build the 1.85 compat module all the time against the BDB version of choice. else: # Linux and other unices macros = dict( HAVE_SEM_OPEN=1, -@@ -1909,9 +1760,9 @@ def main(): +@@ -2026,9 +1850,9 @@ def main(): ext_modules=[Extension('_struct', ['_struct.c'])], # Scripts to install diff --git a/lang/python26/patches/patch-ap b/lang/python26/patches/patch-ap index 3be7e8580e0..4d9f889e6c3 100644 --- a/lang/python26/patches/patch-ap +++ b/lang/python26/patches/patch-ap @@ -1,7 +1,7 @@ -$NetBSD: patch-ap,v 1.2 2009/04/24 01:32:50 hasso Exp $ +$NetBSD: patch-ap,v 1.3 2010/09/04 05:12:00 obache Exp $ ---- Modules/socketmodule.c.orig 2009-03-31 21:20:48 +0300 -+++ Modules/socketmodule.c 2009-04-20 16:16:04 +0300 +--- Modules/socketmodule.c.orig 2010-05-23 15:22:08.000000000 +0000 ++++ Modules/socketmodule.c @@ -379,7 +379,7 @@ const char *inet_ntop(int af, const void #define SOCKETCLOSE close #endif @@ -27,56 +27,56 @@ $NetBSD: patch-ap,v 1.2 2009/04/24 01:32:50 hasso Exp $ #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; + case BTPROTO_HCI: + { + struct sockaddr_hci *a = (struct sockaddr_hci *) addr; +#if defined(__NetBSD__) || defined(__DragonFly__) -+ return makebdaddr(&_BT_HCI_MEMB(a, bdaddr)); ++ return makebdaddr(&_BT_HCI_MEMB(a, bdaddr)); +#else - PyObject *ret = NULL; - ret = Py_BuildValue("i", _BT_HCI_MEMB(a, dev)); - return ret; + 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; +@@ -1350,12 +1356,25 @@ getsockaddrarg(PySocketSockObject *s, Py + case BTPROTO_HCI: + { + struct sockaddr_hci *addr = (struct sockaddr_hci *)addr_ret; +#if defined(__NetBSD__) || defined(__DragonFly__) -+ char *straddr = PyString_AsString(args); ++ 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; ++ _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; - } + _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); + *len_ret = sizeof *addr; + return 1; + } +@@ -4588,9 +4607,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__) && !defined(__DragonFly__) - PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER); + PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER); +#endif #if !defined(__FreeBSD__) +#if !defined(__NetBSD__) && !defined(__DragonFly__) - PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP); + 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); + PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR); + PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO); #endif diff --git a/lang/python26/patches/patch-au b/lang/python26/patches/patch-au index 3016f1bc119..1fefe024c9a 100644 --- a/lang/python26/patches/patch-au +++ b/lang/python26/patches/patch-au @@ -1,4 +1,4 @@ -$NetBSD: patch-au,v 1.5 2009/10/21 11:33:32 tron Exp $ +$NetBSD: patch-au,v 1.6 2010/09/04 05:12:00 obache Exp $ --- Makefile.pre.in.orig 2009-02-24 11:07:44.000000000 +0000 +++ Makefile.pre.in @@ -8,7 +8,7 @@ $NetBSD: patch-au,v 1.5 2009/10/21 11:33:32 tron Exp $ +libpython$(VERSION).dylib: $(LIBRARY_OBJS) + $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ \ -+ -current_version 2.6.2 -compatibility_version $(VERSION) \ ++ -current_version 2.6.6 -compatibility_version $(VERSION) \ + -o $@ -flat_namespace -undefined suppress $(LDFLAGS) \ + $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) + diff --git a/lang/python26/patches/patch-av b/lang/python26/patches/patch-av index dd5e1555d6d..ca454f96863 100644 --- a/lang/python26/patches/patch-av +++ b/lang/python26/patches/patch-av @@ -1,11 +1,11 @@ -$NetBSD: patch-av,v 1.1.1.1 2009/04/19 14:42:50 wiz Exp $ +$NetBSD: patch-av,v 1.2 2010/09/04 05:12:00 obache 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.orig 2008-05-06 22:41:46.000000000 +0000 +++ Lib/distutils/command/install.py -@@ -601,7 +601,8 @@ class install (Command): +@@ -680,7 +680,8 @@ class install (Command): ('install_headers', has_headers), ('install_scripts', has_scripts), ('install_data', has_data), |