summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-05-30 04:59:36 +0000
committerjlam <jlam@pkgsrc.org>2001-05-30 04:59:36 +0000
commit95476730faf97bb1d39b1bc5291987bd80ca032f (patch)
tree0c9d9a7de1fe480c609fc426ba683ad90ed7fe73 /lang
parent58b3aa9094d19dbbd6c38db41b1df87ed57f5856 (diff)
downloadpkgsrc-95476730faf97bb1d39b1bc5291987bd80ca032f.tar.gz
Add code similar to MESSAGE_SUBST code for "PY_SETUP_SUBST" that
allows setting: PY_SETUP_SUBST+= FOO=${FOO} and having ${FILESDIR}/Setup.in piped through a sed expression with: s!@FOO@!${FOO}!g This allows python module package Makefiles to specify other things they would like to substitute besides just @LOCALBASE@ and @X11BASE@.
Diffstat (limited to 'lang')
-rw-r--r--lang/python/Makefile.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/lang/python/Makefile.inc b/lang/python/Makefile.inc
index f22d8c30594..6f2799b6b1a 100644
--- a/lang/python/Makefile.inc
+++ b/lang/python/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2000/10/22 20:01:48 tsarna Exp $
+# $NetBSD: Makefile.inc,v 1.2 2001/05/30 04:59:36 jlam Exp $
#
PY_VERSION= 2.0
@@ -27,13 +27,16 @@ ALL_TARGET?= default
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} -e 's%@LOCALBASE@%${LOCALBASE}%g' \
- -e 's%@X11BASE@%${X11BASE}%g' ${FILESDIR}/Setup.in \
- >${WRKSRC}/Setup.in
+ ${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)