summaryrefslogtreecommitdiff
path: root/lang/python/Makefile.inc
blob: 6f2799b6b1a7ce0791b8b71ce63d2c6fa4c73e37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $NetBSD: Makefile.inc,v 1.2 2001/05/30 04:59:36 jlam Exp $
#

PY_VERSION=	2.0
PY_DISTNAME=	BeOpen-Python-${PY_VERSION}
PY_MASTER_SITES=http://www.pythonlabs.com/products/python${PY_VERSION}/downloads/
DIST_SUBDIR?=	python

PY_WRKSRC=	${WRKDIR}/Python-${PY_VERSION}/Modules
PY_MODULES=	Python-${PY_VERSION}/Modules

PY_CONFIGDIR=	${LOCALBASE}/lib/python${PY_VERSION}/config
PY_LIBPATH=	lib/python${PY_VERSION}
PY_LIBDIR=	${LOCALBASE}/${PY_LIBPATH}
PY_SITEPATH=	${PY_LIBPATH}/site-packages
PY_SITEPKG=	${PY_LIBDIR}/site-packages
PY_PROG=	${LOCALBASE}/bin/python${PY_VERSION}
PY_INCDIR=	${LOCALBASE}/include/python${PY_VERSION}

PY_COMPILEDIR=	${PY_PROG} ${PY_LIBDIR}/compileall.py

DEPENDS+=	python-${PY_VERSION}*:../../lang/python

ALL_TARGET?=	default

.if ${MACHINE_ARCH} == "sparc64"
IGNORE="${PKGNAME} needs dynamic loading"
.endif

# Set PY_SETUP_SUBST to substitute "${variable}" for "@value@" in Setup.in.
PY_SETUP_SUBST+=	LOCALBASE=${LOCALBASE}
PY_SETUP_SUBST+=	X11BASE=${X11BASE}

# This is used for standard modules shipped with Python but build as
# separate packages.

python-std-do-configure:
	${SED} ${PY_SETUP_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}		\
		${FILESDIR}/Setup.in > ${WRKSRC}/Setup.in
	( cd ${WRKSRC} ;\
	 ${CP} ${PY_CONFIGDIR}/Makefile.pre.in .;\
	 ${MAKE} -f Makefile.pre.in boot)