openbsd-ports/lang/python/Makefile

98 lines
2.1 KiB
Makefile
Raw Normal View History

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}
CATEGORIES= lang
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
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
# don't package tools if not needed
.if empty(FLAVOR:L:Mno_tools)
MULTI_PACKAGES= -tools
.endif
.if ${FLAVOR:L:Mtk}
2000-09-08 03:55:54 -04:00
LIB_DEPENDS= tk83::x11/tk/8.3
SETUP_LOCAL+= Setup.tk
.endif
CONFIGURE_STYLE= gnu dest
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.
.if ${FLAVOR:L:Mthreads}
2000-11-20 16:57:35 -05:00
.if !exists(/usr/lib/libc_r.a)
BROKEN="No thread support on this machine"
.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
.endif
1998-01-24 17:33:50 -05:00
.if ${MACHINE_ARCH} == "alpha"
NO64BIT= \#
.endif
pre-configure:
@echo ""
@echo "***"
@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 "***"
@echo ""
# Depends on NO_SHARED_LIBS.
1998-01-24 17:33:50 -05:00
post-configure:
cd ${.CURDIR} && make finish-setup
1998-01-24 17:33:50 -05:00
post-install:
@strip ${PREFIX}/bin/python
2000-11-20 16:57:35 -05:00
@cd ${WRKSRC}; tar -cf - Tools | (cd ${PREFIX}/lib/python${VERSION}; tar -xf -)
1998-01-24 17:33:50 -05:00
.include <bsd.port.mk>
# The tools package is not flavor dependent.
.if defined(SUBPACKAGE) && ${SUBPACKAGE} == "-tools"
2000-11-20 16:57:35 -05:00
PKGNAME=python-tools-${VERSION}
.endif
.if ${FLAVOR:L:Mno_tools}
PKGNAME:=${PKGNAME:S/-no_tools//}
.endif
.if defined(NO64BIT)
SED_PLIST+=-e '/%%mm%%/d'
.else
SED_PLIST+=-e '/%%mm%%/r${PKGDIR}/PFRAG.mm' -e '//d'
.endif
.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES
NOSHARED= \#
.endif
finish-setup:
@sed -e 's,@NOSHARED@,${NOSHARED},g' \
-e 's,@NO64BIT@,${NO64BIT},g' \
${FILESDIR}/Setup > ${WRKSRC}/Modules/Setup
.for file in ${SETUP_LOCAL}
@sed -e 's,@NOSHARED@,${NOSHARED},g' \
${FILESDIR}/${file} >> ${WRKSRC}/Modules/Setup.local
.endfor