summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-09-10 03:13:59 +0000
committertaca <taca@pkgsrc.org>2010-09-10 03:13:59 +0000
commit716568f989365dfa6d304b581257982da748a4b3 (patch)
tree81fd586e73bafdbb91cc18376e29b6516736c149 /lang
parent1a68c4475cc18bdf5d11a35b8a73e8693d1e3a42 (diff)
downloadpkgsrc-716568f989365dfa6d304b581257982da748a4b3.tar.gz
Allow RUBY_ENCODING_ARG to add extra option to shbang line.
Diffstat (limited to 'lang')
-rw-r--r--lang/ruby/replace.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/lang/ruby/replace.mk b/lang/ruby/replace.mk
index 3f5b3a80b35..f1fae51c797 100644
--- a/lang/ruby/replace.mk
+++ b/lang/ruby/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.13 2009/02/19 12:15:15 obache Exp $
+# $NetBSD: replace.mk,v 1.14 2010/09/10 03:13:59 taca Exp $
#
.if !defined(_RUBY_REPLACE_MK)
@@ -14,7 +14,12 @@ _RUBY_REPLACE_MK= # defined
REPLACE_INTERPRETER+= ${RUBY_NAME}
REPLACE.${RUBY_NAME}.old= .*ruby[0-9.]*
+
+.if empty(RUBY_ENCODING_ARG)
REPLACE.${RUBY_NAME}.new= ${RUBY}
+.else
+REPLACE.${RUBY_NAME}.new= ${RUBY} ${RUBY_ENCODING_ARG}
+.endif
REPLACE_FILES.${RUBY_NAME}= ${REPLACE_RUBY}
.endif # defined(REPLACE_RUBY)