use REPLACE_INTERPRETER instead of our private implementation

This commit is contained in:
drochner 2004-03-02 15:26:02 +00:00
parent 630848934b
commit 2aadeff11c

View file

@ -1,4 +1,4 @@
# $NetBSD: application.mk,v 1.5 2004/01/14 03:22:47 xtraeme Exp $
# $NetBSD: application.mk,v 1.6 2004/03/02 15:26:02 drochner Exp $
.include "../../lang/python/pyversion.mk"
@ -6,21 +6,9 @@
# PYTHON_PATCH_SCRIPTS is a list of Python scripts to be installed,
# relative to ${WRKSRC}
_PYTHON_PATCH_SCRIPT_SED= -e "1s;^\#!.*python[^ ]*;\#!${PYTHONBIN};"
_PYTHON_PATCH_SCRIPT_SED+= ${PYTHON_PATCH_SCRIPT_SED}
.if defined(PYTHON_PATCH_SCRIPTS)
python-patch-scripts:
.for FILE in ${PYTHON_PATCH_SCRIPTS}
cd ${WRKSRC}; for file in ${FILE}; do \
${SED} ${_PYTHON_PATCH_SCRIPT_SED} \
$${file} > $${file}.fixed; \
if [ -x $${file} ]; then \
${CHMOD} +x $${file}.fixed; \
fi; \
${MV} -f $${file}.fixed $${file}; \
done
.endfor
post-patch: python-patch-scripts
REPLACE_INTERPRETER+= python
_REPLACE.python.old= .*python[^ ]*
_REPLACE.python.new= ${PYTHONBIN}
_REPLACE_FILES.python= ${PYTHON_PATCH_SCRIPTS}
.endif