2000-11-20 16:57:35 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.23 2000/11/20 21:57:35 jasoni Exp $
|
1998-01-24 17:33:50 -05:00
|
|
|
|
2000-11-20 16:57:35 -05:00
|
|
|
VERSION= 2.0
|
|
|
|
DISTNAME= python-${VERSION}
|
1999-12-24 21:34:05 -05:00
|
|
|
CATEGORIES= lang
|
2000-07-21 03:46:07 -04:00
|
|
|
NEED_VERSION= 1.310
|
2000-09-08 03:55:54 -04:00
|
|
|
MASTER_SITES= ftp://www.python.org/pub/python/src/
|
1998-01-24 17:33:50 -05:00
|
|
|
|
2000-06-02 13:14:45 -04:00
|
|
|
HOMEPAGE= http://www.python.org/
|
|
|
|
|
2000-10-22 10:02:46 -04:00
|
|
|
MAINTAINER= Jason Ish <jasoni@openbsd.org>
|
1998-01-24 17:33:50 -05:00
|
|
|
|
2000-03-05 13:30:21 -05:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2000-02-12 01:29:49 -05:00
|
|
|
|
2000-09-08 03:55:54 -04:00
|
|
|
FLAVORS= tk threads no_tools
|
|
|
|
FLAVOR?= threads
|
2000-04-03 13:11:44 -04:00
|
|
|
|
2000-06-10 14:11:56 -04:00
|
|
|
# don't package tools if not needed
|
2000-07-13 22:15:56 -04:00
|
|
|
.if empty(FLAVOR:L:Mno_tools)
|
2000-06-10 14:11:56 -04:00
|
|
|
MULTI_PACKAGES= -tools
|
|
|
|
.endif
|
|
|
|
|
2000-04-03 13:11:44 -04:00
|
|
|
.if ${FLAVOR:L:Mtk}
|
2000-09-08 03:55:54 -04:00
|
|
|
LIB_DEPENDS= tk83::x11/tk/8.3
|
2000-04-03 13:11:44 -04:00
|
|
|
SETUP_LOCAL+= Setup.tk
|
|
|
|
.endif
|
1999-12-24 21:34:05 -05:00
|
|
|
|
2000-07-20 00:11:04 -04:00
|
|
|
CONFIGURE_STYLE= gnu dest
|
1999-12-24 21:34:05 -05:00
|
|
|
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
|
|
|
|
CONFIGURE_ARGS+= --with-fpectl
|
|
|
|
MAKE_FLAGS+= OPT="${CFLAGS}"
|
|
|
|
|
2000-11-20 16:57:35 -05:00
|
|
|
WRKDIST= ${WRKDIR}/Python-${VERSION}
|
1998-01-24 17:33:50 -05:00
|
|
|
|
2000-11-20 16:57:35 -05:00
|
|
|
# If libc_r exists, thread support is compiled in by default.
|
2000-04-03 13:11:44 -04:00
|
|
|
.if ${FLAVOR:L:Mthreads}
|
2000-11-20 16:57:35 -05:00
|
|
|
.if !exists(/usr/lib/libc_r.a)
|
2000-04-03 13:11:44 -04:00
|
|
|
BROKEN="No thread support on this machine"
|
1999-12-24 21:34:05 -05:00
|
|
|
.else
|
2000-11-20 16:57:35 -05:00
|
|
|
CONFIGURE_ARGS+= --with-threads
|
1998-01-24 17:33:50 -05:00
|
|
|
.endif
|
2000-11-20 16:57:35 -05:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-threads
|
2000-04-03 13:11:44 -04:00
|
|
|
.endif
|
1998-01-24 17:33:50 -05:00
|
|
|
|
1999-12-12 23:53:02 -05:00
|
|
|
.if ${MACHINE_ARCH} == "alpha"
|
1999-12-24 21:34:05 -05:00
|
|
|
NO64BIT= \#
|
1999-12-12 23:53:02 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
1999-12-24 21:34:05 -05:00
|
|
|
@echo ""
|
|
|
|
@echo "***"
|
2000-04-03 13:11:44 -04:00
|
|
|
@echo "*** Building Python with ${FLAVOR}"
|
|
|
|
@echo "*** You can set ${FLAVORS} by saying"
|
|
|
|
@echo "*** make FLAVOR=\"set of options\""
|
2000-09-08 03:55:54 -04:00
|
|
|
@echo "***"
|
1999-12-24 21:34:05 -05:00
|
|
|
@echo ""
|
1999-12-12 23:53:02 -05:00
|
|
|
|
|
|
|
# Depends on NO_SHARED_LIBS.
|
1998-01-24 17:33:50 -05:00
|
|
|
post-configure:
|
2000-04-03 13:11:44 -04:00
|
|
|
cd ${.CURDIR} && make finish-setup
|
1998-01-24 17:33:50 -05:00
|
|
|
|
|
|
|
post-install:
|
1999-12-24 21:34:05 -05:00
|
|
|
@strip ${PREFIX}/bin/python
|
2000-11-20 16:57:35 -05:00
|
|
|
@cd ${WRKSRC}; tar -cf - Tools | (cd ${PREFIX}/lib/python${VERSION}; tar -xf -)
|
1999-12-12 23:53:02 -05:00
|
|
|
|
1998-01-24 17:33:50 -05:00
|
|
|
.include <bsd.port.mk>
|
1999-12-12 23:53:02 -05:00
|
|
|
|
2000-06-02 13:14:45 -04:00
|
|
|
# The tools package is not flavor dependent.
|
|
|
|
.if defined(SUBPACKAGE) && ${SUBPACKAGE} == "-tools"
|
2000-11-20 16:57:35 -05:00
|
|
|
PKGNAME=python-tools-${VERSION}
|
2000-06-02 13:14:45 -04:00
|
|
|
.endif
|
2000-07-13 22:15:56 -04:00
|
|
|
.if ${FLAVOR:L:Mno_tools}
|
|
|
|
PKGNAME:=${PKGNAME:S/-no_tools//}
|
2000-06-10 14:11:56 -04:00
|
|
|
.endif
|
2000-06-02 13:14:45 -04:00
|
|
|
|
2000-04-03 13:11:44 -04:00
|
|
|
.if defined(NO64BIT)
|
|
|
|
SED_PLIST+=-e '/%%mm%%/d'
|
|
|
|
.else
|
|
|
|
SED_PLIST+=-e '/%%mm%%/r${PKGDIR}/PFRAG.mm' -e '//d'
|
|
|
|
.endif
|
|
|
|
|
1999-12-30 23:22:42 -05:00
|
|
|
.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES
|
1999-12-24 21:34:05 -05:00
|
|
|
NOSHARED= \#
|
1999-12-12 23:53:02 -05:00
|
|
|
.endif
|
|
|
|
|
2000-04-03 13:11:44 -04:00
|
|
|
finish-setup:
|
1999-12-24 21:34:05 -05:00
|
|
|
@sed -e 's,@NOSHARED@,${NOSHARED},g' \
|
|
|
|
-e 's,@NO64BIT@,${NO64BIT},g' \
|
|
|
|
${FILESDIR}/Setup > ${WRKSRC}/Modules/Setup
|
1999-12-12 23:53:02 -05:00
|
|
|
.for file in ${SETUP_LOCAL}
|
1999-12-24 21:34:05 -05:00
|
|
|
@sed -e 's,@NOSHARED@,${NOSHARED},g' \
|
|
|
|
${FILESDIR}/${file} >> ${WRKSRC}/Modules/Setup.local
|
1999-12-12 23:53:02 -05:00
|
|
|
.endfor
|