summaryrefslogtreecommitdiff
path: root/lang/python23-pth/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python23-pth/Makefile')
-rw-r--r--lang/python23-pth/Makefile72
1 files changed, 55 insertions, 17 deletions
diff --git a/lang/python23-pth/Makefile b/lang/python23-pth/Makefile
index 35c1d892d12..1f5a15fb0db 100644
--- a/lang/python23-pth/Makefile
+++ b/lang/python23-pth/Makefile
@@ -1,22 +1,22 @@
-# $NetBSD: Makefile,v 1.10 2003/11/17 00:11:43 recht Exp $
+# $NetBSD: Makefile,v 1.11 2003/12/08 21:13:56 recht Exp $
#
-DISTNAME= Python-2.3
-PKGNAME= python23-pth-2.3
-PKGREVISION= 3
+DISTNAME= Python-2.3.2
+PKGNAME= python23-pth-2.3.2
CATEGORIES= lang
-MASTER_SITES= ftp://ftp.python.org/pub/python/2.3/
+MASTER_SITES= ftp://ftp.python.org/pub/python/2.3.2/
EXTRACT_SUFX= .tgz
MAINTAINER= recht@NetBSD.org
HOMEPAGE= http://www.python.org/
COMMENT= Interpreted, interactive, object-oriented programming language
-USE_BUILDLINK2= YES
-GNU_CONFIGURE= YES
-
+USE_DB185= yes
+USE_BUILDLINK2= yes
+GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ARGS+= OPT="${CFLAGS}"
+UNLIMIT_RESOURCES+= stacksize
PTHREAD_OPTS= require
.include "../../mk/pthread.buildlink2.mk"
@@ -25,15 +25,11 @@ CONFIGURE_ARGS+= --with-pth
.endif
INSTALL_TARGET= altinstall
+TEST_TARGET= test
post-extract:
${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc2p3
-# XXX should be done by the Python install process
-post-install:
- ${LN} -s ${PREFIX}/lib/libpython2p3.so.1.0 \
- ${PREFIX}/lib/libpython2p3.so
-
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "SunOS"
@@ -41,10 +37,11 @@ LOWER_OPSYS= sunos
.endif
.if ${OPSYS} == "Darwin" || ${OPSYS} == "IRIX"
-PLIST_SUBST+= PY_PLATNAME=${LOWER_OPSYS}
+PY_PLATNAME=${LOWER_OPSYS}
.else
-PLIST_SUBST+= PY_PLATNAME=${LOWER_OPSYS}${OS_VERSION:C/\..*//}
+PY_PLATNAME=${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
+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" \
@@ -55,12 +52,53 @@ PLIST_SUBST+= DLMODULE="@comment "
PLIST_SUBST+= DLMODULE=
.endif
-.if ${OPSYS} != "NetBSD"
+X86_SUBST= "@comment "
+OSSAUDIODEV_SUBST= "@comment "
+.if ${MACHINE_ARCH} == "i386"
+# activate X86_ONLY modules
+X86_SUBST=
+# ossaudiodev is only available on x86 for the following platforms
+.if ${PY_PLATNAME} == "linux2" || ${PY_PLATNAME} == "freebsd4" \
+ || ${PY_PLATNAME} == "freebsd5"
+OSSAUDIODEV_SUBST=
+.endif
+.endif
+PLIST_SUBST+= X86_ONLY=${X86_SUBST}
+PLIST_SUBST+= OSSAUDIODEV=${OSSAUDIODEV_SUBST}
+
+# ensure that the bsddb185 module is build on all platforms
.include "../../databases/db/buildlink2.mk"
-CPPFLAGS+= -I${BUILDLINK_PREFIX.db}/include/db2
+
+SUBST_CLASSES+= setup
+SUBST_MESSAGE.setup= "Fixing paths for db 1.85."
+SUBST_STAGE.setup= post-patch
+SUBST_FILES.setup= setup.py
+SUBST_SED.setup= -e 's,%%DB185_H%%,${DB185_H},g'
+SUBST_SED.setup+= -e 's,%%DB185_INCS%%,${DB185_INCS},g'
+SUBST_SED.setup+= -e 's,%%DB185_LIBS%%,${DB185_LIBS},g'
+SUBST_SED.setup+= -e 's,%%DB185_LIBDIR%%,${DB185_LIBDIR},g'
+
+DB185_LIBDIR= ${BUILDLINK_PREFIX.db}/lib
+
+.if !empty(BUILDLINK_CPPFLAGS.db)
+LDFLAGS+= ${BUILDLINK_LDFLAGS.db}
+DBINCDIR= ${BUILDLINK_CPPFLAGS.db:S/-I//}
+DB185_INCS= ${DBINCDIR}
+DB185_LIBS= ${BUILDLINK_LIBS.db:S/-l//}
+
+.if ${_NEED_DB2} == "YES"
+DB185_H= ${DBINCDIR}/db_185.h
+.else
+DB185_H= ${DBINCDIR}/db.h
+.endif
+.else
+DB185_H= /usr/include/db.h
+DB185_INCS= /usr/include
+DB185_LIBS=
.endif
.include "../../archivers/bzip2/buildlink2.mk"
.include "../../devel/zlib/buildlink2.mk"
.include "../../security/openssl/buildlink2.mk"
+.include "../../mk/ossaudio.buildlink2.mk"
.include "../../mk/bsd.pkg.mk"