diff options
author | jlam <jlam@pkgsrc.org> | 2002-10-18 16:28:25 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-10-18 16:28:25 +0000 |
commit | 5759dae1d3811d0ac9d4128c0b23a8a24364ba22 (patch) | |
tree | b89f85073831fa1056d0c5e201c7d954e65ce3d8 /lang/python | |
parent | 68e548cdf049dcf1fd758778966d02c4f6a83c2b (diff) | |
download | pkgsrc-5759dae1d3811d0ac9d4128c0b23a8a24364ba22.tar.gz |
Allow PYTHON_PATCH_SCRIPTS to take shell wildcards.
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/application.mk | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lang/python/application.mk b/lang/python/application.mk index ce6f21679cb..282d9441fb8 100644 --- a/lang/python/application.mk +++ b/lang/python/application.mk @@ -1,4 +1,4 @@ -# $NetBSD: application.mk,v 1.1 2002/09/21 23:47:03 jlam Exp $ +# $NetBSD: application.mk,v 1.2 2002/10/18 16:28:25 jlam Exp $ .include "../../lang/python/pyversion.mk" @@ -10,10 +10,15 @@ _PYTHON_PATCH_SCRIPT_SED= -e "1s;^\#!.*python;\#!${PYTHONBIN};" .if defined(PYTHON_PATCH_SCRIPTS) python-patch-scripts: -.for s in ${PYTHON_PATCH_SCRIPTS} - ${CP} ${WRKSRC}/$s ${WRKSRC}/$s.tmp - ${CHMOD} +w ${WRKSRC}/$s - ${SED} ${_PYTHON_PATCH_SCRIPT_SED} <${WRKSRC}/$s.tmp >${WRKSRC}/$s +.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 |