Allow PYTHON_PATCH_SCRIPTS to take shell wildcards.
This commit is contained in:
parent
68e548cdf0
commit
5759dae1d3
1 changed files with 10 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue