summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2019-02-18 14:10:37 +0000
committerbsiegert <bsiegert@pkgsrc.org>2019-02-18 14:10:37 +0000
commit052bfedb1e618d22c452928d774d00e47be9e60b (patch)
treec835a15bf46353ffeb48d042abd5d29b4fe9b4e0 /mk
parent5f6b07131ea94145ebb1dca7def11b9bcb86de92 (diff)
downloadpkgsrc-052bfedb1e618d22c452928d774d00e47be9e60b.tar.gz
replace-interpreter.mk: support REPLACE_PERL6.
This is basically the same as REPLACE_PERL, except that there is a default for ${PERL6} inline if it is not otherwise defined.
Diffstat (limited to 'mk')
-rw-r--r--mk/configure/replace-interpreter.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/configure/replace-interpreter.mk b/mk/configure/replace-interpreter.mk
index 3991da5d4fd..719568a17ce 100644
--- a/mk/configure/replace-interpreter.mk
+++ b/mk/configure/replace-interpreter.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace-interpreter.mk,v 1.16 2018/04/17 09:31:41 adam Exp $
+# $NetBSD: replace-interpreter.mk,v 1.17 2019/02/18 14:10:37 bsiegert Exp $
# This file provides common templates for replacing #! interpreters
# in script files.
@@ -10,6 +10,7 @@
# REPLACE_CSH
# REPLACE_KSH
# REPLACE_PERL
+# REPLACE_PERL6
# REPLACE_SH
# Lists of files relative to WRKSRC in which the #! interpreter
# should be replaced by the pkgsrc one. If any directories
@@ -84,6 +85,14 @@ REPLACE.sys-Perl.new= ${PERL5}
REPLACE_FILES.sys-Perl= ${REPLACE_PERL}
.endif
+.if !empty(REPLACE_PERL6:M*)
+PERL6?= ${PREFIX}/bin/perl6
+REPLACE_INTERPRETER+= sys-Perl6
+REPLACE.sys-Perl6.old= .*perl6[^[:space:]]*
+REPLACE.sys-Perl6.new= ${PERL6}
+REPLACE_FILES.sys-Perl6=${REPLACE_PERL6}
+.endif
+
.if !empty(REPLACE_SH:M*)
REPLACE_INTERPRETER+= sys-sh
REPLACE.sys-sh.old= [^[:space:]]*sh
@@ -125,7 +134,7 @@ replace-interpreter:
.endfor
_VARGROUPS+= interp
-.for varname in REPLACE_AWK REPLACE_BASH REPLACE_CSH REPLACE_KSH REPLACE_PERL REPLACE_SH
+.for varname in REPLACE_AWK REPLACE_BASH REPLACE_CSH REPLACE_KSH REPLACE_PERL REPLACE_PERL6 REPLACE_SH
_PKG_VARS.interp+= ${varname}
.endfor
_PKG_VARS.interp+= REPLACE_INTERPRETER