summaryrefslogtreecommitdiff
path: root/lang/python23
diff options
context:
space:
mode:
authorjschauma <jschauma>2004-11-24 20:45:10 +0000
committerjschauma <jschauma>2004-11-24 20:45:10 +0000
commit8026dafc1717f76ea4fc05e7e72fb39c59101676 (patch)
tree9a66acbba92c2cae6ac9a125282044288aefa5bc /lang/python23
parent414773dba5138ceed7f0030e273156c065d5bf6f (diff)
downloadpkgsrc-8026dafc1717f76ea4fc05e7e72fb39c59101676.tar.gz
Make this compile, install and deinstall cleanly under IRIX and IRIX64
version 6.5 by backporting some patches from Python 2.4 and leaving out some broken modules. This partially addresses PR pkg/28373, too, though fixes particular to older Irix versions still need to be tested and added.
Diffstat (limited to 'lang/python23')
-rw-r--r--lang/python23/Makefile.common26
-rw-r--r--lang/python23/PLIST.IRIX66
-rw-r--r--lang/python23/PLIST.common10
-rw-r--r--lang/python23/distinfo5
-rw-r--r--lang/python23/patches/patch-cc44
-rw-r--r--lang/python23/patches/patch-cd15
-rw-r--r--lang/python23/patches/patch-ce15
7 files changed, 169 insertions, 12 deletions
diff --git a/lang/python23/Makefile.common b/lang/python23/Makefile.common
index 262e15e82f9..3981169fbac 100644
--- a/lang/python23/Makefile.common
+++ b/lang/python23/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.20 2004/11/22 21:48:09 wiz Exp $
+# $NetBSD: Makefile.common,v 1.21 2004/11/24 20:45:10 jschauma Exp $
#
DISTNAME= Python-2.3.4
@@ -28,8 +28,10 @@ PLIST_SRC+= ${.CURDIR}/../../lang/python23/PLIST.${OPSYS}
.endif
PLIST_SRC+= ${.CURDIR}/../../lang/python23/PLIST.common_end
-.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix" || ${OPSYS} == "IRIX"
+.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
PY_PLATNAME= ${LOWER_OPSYS}
+.elif ${OPSYS} == "IRIX"
+PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
.elif ${OPSYS} == "SunOS"
PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
.else
@@ -40,7 +42,7 @@ PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME}
# the dl module isn't built for 64 bit archs and Darwin
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" \
|| ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "x86_64" \
- || ${OPSYS} == "Darwin"
+ || ${OPSYS} == "Darwin" || ( ${OPSYS} == "IRIX" && ${ABI} == "64" )
PLIST_SUBST+= DLMODULE="@comment "
.else
PLIST_SUBST+= DLMODULE=
@@ -57,7 +59,7 @@ EXTRA_SO_SUBST=
|| ${PY_PLATNAME} == "freebsd5"
OSSAUDIODEV_SUBST=
. endif
-.elif ${OPSYS} == "SunOS"
+.elif ${OPSYS} == "SunOS" || ( ${OPSYS} == "IRIX" && ${ABI} != "64" )
EXTRA_SO_SUBST=
.endif
@@ -69,11 +71,23 @@ PLIST_SUBST+= OSSAUDIODEV=${OSSAUDIODEV_SUBST}
INSTALL_UNSTRIPPED= yes
.endif
-# ensure that the bsddb185 module is built on all platforms
-.include "../../mk/bdb.buildlink3.mk"
+.if ${OPSYS} == "IRIX"
+. if ${ABI} == "64"
+PLIST_SUBST+= NISMODULE="@comment "
+. else
+PLIST_SUBST+= NISMODULE=
+. endif
+PLIST_SUBST+= BSDDBMODULE="@comment "
+PLIST_SUBST+= NOSHLIB="@comment "
+.else
+. include "../../mk/bdb.buildlink3.mk"
MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE}
MAKE_ENV+= PY_BDB_INCDIRS=${BDBBASE}/${BUILDLINK_INCDIRS.${BDB_TYPE}}
MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
+PLIST_SUBST+= BSDDBMODULE=
+PLIST_SUBST+= NOSHLIB=
+PLIST_SUBST+= NISMODULE=
+.endif
.if defined(BUILDLINK_TRANSFORM)
MAKE_ENV+= PY_BDB_TRANSFORM="${BUILDLINK_TRANSFORM}"
diff --git a/lang/python23/PLIST.IRIX b/lang/python23/PLIST.IRIX
new file mode 100644
index 00000000000..6821b50cf4e
--- /dev/null
+++ b/lang/python23/PLIST.IRIX
@@ -0,0 +1,66 @@
+@comment $NetBSD: PLIST.IRIX,v 1.1 2004/11/24 20:45:10 jschauma Exp $
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/AL.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CD.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CL.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/DEVICE.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/ERRNO.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FILE.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FL.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GET.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GL.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GLWS.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/IOCTL.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/SV.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/WAIT.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cddb.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cdplayer.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.doc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/jpeg.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panel.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panelparser.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.doc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/torgb.py
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/AL.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CD.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CL.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/DEVICE.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/ERRNO.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FILE.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FL.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GET.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GL.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GLWS.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/IOCTL.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/SV.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/WAIT.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cddb.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cdplayer.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/jpeg.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panel.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panelparser.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/torgb.pyc
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/AL.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CD.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CL.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/DEVICE.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/ERRNO.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FILE.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/FL.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GET.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GL.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/GLWS.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/IOCTL.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/SV.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/WAIT.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cddb.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/cdplayer.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/flp.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/jpeg.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panel.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/panelparser.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/readcd.pyo
+lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/torgb.pyo
diff --git a/lang/python23/PLIST.common b/lang/python23/PLIST.common
index 3687be313a7..82ebc5caef2 100644
--- a/lang/python23/PLIST.common
+++ b/lang/python23/PLIST.common
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.6 2004/06/02 12:29:28 recht Exp $
+@comment $NetBSD: PLIST.common,v 1.7 2004/11/24 20:45:10 jschauma Exp $
bin/pydoc${PY_VER_SUFFIX}
bin/python${PY_VER_SUFFIX}
include/python${PY_VER_SUFFIX}/Python.h
@@ -72,8 +72,8 @@ include/python${PY_VER_SUFFIX}/tupleobject.h
include/python${PY_VER_SUFFIX}/ucnhash.h
include/python${PY_VER_SUFFIX}/unicodeobject.h
include/python${PY_VER_SUFFIX}/weakrefobject.h
-lib/libpython${PY_VER_SUFFIX}.so
-lib/libpython${PY_VER_SUFFIX}.so.1.0
+${NOSHLIB}lib/libpython${PY_VER_SUFFIX}.so
+${NOSHLIB}lib/libpython${PY_VER_SUFFIX}.so.1.0
lib/python${PY_VER_SUFFIX}/BaseHTTPServer.py
lib/python${PY_VER_SUFFIX}/BaseHTTPServer.pyc
lib/python${PY_VER_SUFFIX}/BaseHTTPServer.pyo
@@ -1128,7 +1128,7 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/_weakref.so
lib/python${PY_VER_SUFFIX}/lib-dynload/array.so
${EXTRA_SO}lib/python${PY_VER_SUFFIX}/lib-dynload/audioop.so
lib/python${PY_VER_SUFFIX}/lib-dynload/binascii.so
-lib/python${PY_VER_SUFFIX}/lib-dynload/bsddb185.so
+${BSDDBMODULE}lib/python${PY_VER_SUFFIX}/lib-dynload/bsddb185.so
lib/python${PY_VER_SUFFIX}/lib-dynload/bz2.so
lib/python${PY_VER_SUFFIX}/lib-dynload/cPickle.so
lib/python${PY_VER_SUFFIX}/lib-dynload/cStringIO.so
@@ -1144,7 +1144,7 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/itertools.so
lib/python${PY_VER_SUFFIX}/lib-dynload/math.so
lib/python${PY_VER_SUFFIX}/lib-dynload/md5.so
lib/python${PY_VER_SUFFIX}/lib-dynload/mmap.so
-lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
+${NISMODULE}lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
lib/python${PY_VER_SUFFIX}/lib-dynload/operator.so
lib/python${PY_VER_SUFFIX}/lib-dynload/parser.so
lib/python${PY_VER_SUFFIX}/lib-dynload/pcre.so
diff --git a/lang/python23/distinfo b/lang/python23/distinfo
index 3913f6ce950..96ada663740 100644
--- a/lang/python23/distinfo
+++ b/lang/python23/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2004/06/14 02:31:13 lukem Exp $
+$NetBSD: distinfo,v 1.20 2004/11/24 20:45:10 jschauma Exp $
SHA1 (Python-2.3.4.tgz) = 7d47431febec704e766b57f12a1a5030bb2d03c3
Size (Python-2.3.4.tgz) = 8502738 bytes
@@ -13,3 +13,6 @@ SHA1 (patch-am) = df5c858b32a9a5aa118c84f6742f9d3547c0c7f3
SHA1 (patch-bb) = 7c6fe21b6328dddce2a079b0a1c7ae0bee817bae
SHA1 (patch-ca) = 95f5a515fe3dafd75d077e0591e88a34447152ff
SHA1 (patch-cb) = 301205b29db1ca60f06b2dc0423f5f911eabcd18
+SHA1 (patch-cc) = d4f82500d4151dcd3e01302af795cd21f4330f63
+SHA1 (patch-cd) = 5e980fcb567dcfc23b1ccac54a2457d5d9dba69a
+SHA1 (patch-ce) = 6b88d8177d0b1f900ee5898f113eccf8426ea756
diff --git a/lang/python23/patches/patch-cc b/lang/python23/patches/patch-cc
new file mode 100644
index 00000000000..96cb43e489c
--- /dev/null
+++ b/lang/python23/patches/patch-cc
@@ -0,0 +1,44 @@
+$NetBSD: patch-cc,v 1.1 2004/11/24 20:45:10 jschauma Exp $
+
+--- Modules/socketmodule.c.orig Mon Nov 22 22:59:27 2004
++++ Modules/socketmodule.c Mon Nov 22 23:06:49 2004
+@@ -192,8 +192,18 @@
+
+ /* XXX Using _SGIAPI is the wrong thing,
+ but I don't know what the right thing is. */
++#undef _SGIAPI /* to avoid warning */
+ #define _SGIAPI 1
+
++#undef _XOPEN_SOURCE
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#ifdef _SS_ALIGNSIZE
++#define HAVE_GETADDRINFO 1
++#define HAVE_GETNAMEINFO 1
++#endif
++
+ #define HAVE_INET_PTON
+ #include <netdb.h>
+ #endif
+@@ -259,7 +269,19 @@
+ # define O_NONBLOCK O_NDELAY
+ #endif
+
+-#include "addrinfo.h"
++/* include Python's addrinfo.h unless it causes trouble */
++#if defined(__sgi) && _COMPILER_VERSION>700 && defined(_SS_ALIGNSIZE)
++/* Do not include addinfo.h on some newer IRIX versions.
++* _SS_ALIGNSIZE is defined in sys/socket.h by 6.5.21,
++* for example, but not by 6.5.10.
++*/
++#elif defined(_MSC_VER) && _MSC_VER>1200
++/* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and
++* EAI_* constants are defined in (the already included) ws2tcpip.h.
++*/
++#else
++# include "addrinfo.h"
++#endif
+
+ #ifndef HAVE_INET_PTON
+ int inet_pton(int af, const char *src, void *dst);
diff --git a/lang/python23/patches/patch-cd b/lang/python23/patches/patch-cd
new file mode 100644
index 00000000000..5cea7a8e886
--- /dev/null
+++ b/lang/python23/patches/patch-cd
@@ -0,0 +1,15 @@
+$NetBSD: patch-cd,v 1.1 2004/11/24 20:45:10 jschauma Exp $
+
+--- Modules/_ssl.c.orig Mon Nov 22 23:18:39 2004
++++ Modules/_ssl.c Mon Nov 22 23:17:23 2004
+@@ -7,6 +7,10 @@
+
+ */
+
++#ifdef __sgi
++#include <sys/types.h>
++#endif
++
+ #include "Python.h"
+ enum py_ssl_error {
+ /* these mirror ssl.h */
diff --git a/lang/python23/patches/patch-ce b/lang/python23/patches/patch-ce
new file mode 100644
index 00000000000..1ffc18cdb7e
--- /dev/null
+++ b/lang/python23/patches/patch-ce
@@ -0,0 +1,15 @@
+$NetBSD: patch-ce,v 1.1 2004/11/24 20:45:10 jschauma Exp $
+
+--- Modules/bsddbmodule.c Tue Nov 23 09:41:44 2004
++++ Modules/bsddbmodule.c Tue Nov 23 09:43:27 2004
+@@ -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"