diff options
author | zuntum <zuntum@pkgsrc.org> | 2001-06-27 11:24:15 +0000 |
---|---|---|
committer | zuntum <zuntum@pkgsrc.org> | 2001-06-27 11:24:15 +0000 |
commit | 578c864e8144412b58a639f88465cae536b4d520 (patch) | |
tree | 046c56305461e695ec49315554bdc1a99e23b6ad /mk | |
parent | 5188766251a0b728ae231d9f51a02211f4824e44 (diff) | |
download | pkgsrc-578c864e8144412b58a639f88465cae536b4d520.tar.gz |
o introduce REPLACE_PERL
it chdir's to ${WRKSRC} and automatically replaces /usr/bin/perl,
/usr/local/bin/perl and /usr/pkg/bin/perl with ${PERL5} in each file
listed in REPLACE_PERL variable in package's Makefile
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index d81590a3f8c..2be80a3fcf7 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.768 2001/06/21 05:48:29 tron Exp $ +# $NetBSD: bsd.pkg.mk,v 1.769 2001/06/27 11:24:15 zuntum Exp $ # # This file is in the public domain. # @@ -1453,6 +1453,21 @@ do-configure: .endfor .endif +.if defined(REPLACE_PERL) +.for f in ${REPLACE_PERL} + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; if [ -f ${f} ]; then \ + ${SED} -e "s,/usr/bin/perl,${PERL5},g" \ + -e "s,/usr/local/bin/perl,${PERL5},g" \ + -e "s,/usr/pkg/bin/perl,${PERL5},g" \ + ${f} > ${f}.new; \ + if [ -x ${f} ]; then \ + ${CHMOD} a+x ${f}.new; \ + fi; \ + ${MV} ${f}.new ${f}; \ + fi +.endfor +.endif + .if defined(USE_LIBTOOL) && defined(LTCONFIG_OVERRIDE) .for ltconfig in ${LTCONFIG_OVERRIDE} ${_PKG_SILENT}${_PKG_DEBUG}\ |