summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2004-03-02 15:25:23 +0000
committerdrochner <drochner@pkgsrc.org>2004-03-02 15:25:23 +0000
commit630848934b5c3b703d92f590ba1969e4cb351567 (patch)
tree8642663e121d1834f83913934fb3e6bf8723d071
parent0bf07f955ca07daf705945ef5b471f9eebdc53ca (diff)
downloadpkgsrc-630848934b5c3b703d92f590ba1969e4cb351567.tar.gz
extend REPLACE_INTERPRETER to accept shell wildcards
-rw-r--r--mk/bsd.pkg.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index f17edd761b8..de6593801b5 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1414 2004/02/28 07:12:21 jdolecek Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1415 2004/03/02 15:25:23 drochner Exp $
#
# This file is in the public domain.
#
@@ -2330,11 +2330,12 @@ _CONFIGURE_PREREQ+= replace-interpreter
.PHONY: replace-interpreter
replace-interpreter:
. for lang in ${REPLACE_INTERPRETER}
+. for pattern in ${_REPLACE_FILES.${lang}}
${_PKG_SILENT}${_PKG_DEBUG} \
cd ${WRKSRC}; \
- for f in ${_REPLACE_FILES.${lang}}; do \
+ for f in ${pattern}; do \
if [ -f $${f} ]; then \
- ${SED} -e 's|#!${_REPLACE.${lang}.old}|#!${_REPLACE.${lang}.new}|' \
+ ${SED} -e '1s|^#!${_REPLACE.${lang}.old}|#!${_REPLACE.${lang}.new}|' \
$${f} > $${f}.new; \
if [ -x $${f} ]; then \
${CHMOD} a+x $${f}.new; \
@@ -2342,6 +2343,7 @@ replace-interpreter:
${MV} -f $${f}.new $${f}; \
fi; \
done
+. endfor
. endfor
.endif