Sat Mar 20 06:01:53 2021 UTC ()
lang/ruby/gem.mk: support ${RUBY_SUFFIX} in print-PLIST

Add limited support for replacing ${RUBY_SUFFIX} in ${PREFIX}/bin
directory.  Notifed by tsutsui@.


(taca)
diff -r1.45 -r1.46 pkgsrc/lang/ruby/gem.mk

cvs diff -r1.45 -r1.46 pkgsrc/lang/ruby/gem.mk (expand / switch to unified diff)

--- pkgsrc/lang/ruby/gem.mk 2021/01/11 11:21:31 1.45
+++ pkgsrc/lang/ruby/gem.mk 2021/03/20 06:01:53 1.46
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gem.mk,v 1.45 2021/01/11 11:21:31 taca Exp $ 1# $NetBSD: gem.mk,v 1.46 2021/03/20 06:01:53 taca Exp $
2# 2#
3# This Makefile fragment is intended to be included by packages that build 3# This Makefile fragment is intended to be included by packages that build
4# and install Ruby gems. 4# and install Ruby gems.
5# 5#
6# === User-settable variables === 6# === User-settable variables ===
7# 7#
8# RUBYGEM_VERBOSE 8# RUBYGEM_VERBOSE
9# Execute gem with verbose option. 9# Execute gem with verbose option.
10# Possible values: Yes No 10# Possible values: Yes No
11# Default: No 11# Default: No
12# 12#
13# Package-settable variables: 13# Package-settable variables:
14# 14#
@@ -374,22 +374,25 @@ RUBYGEM_GENERATE_PLIST= \ @@ -374,22 +374,25 @@ RUBYGEM_GENERATE_PLIST= \
374 ${FIND} ${GEM_DOCDIR} \! -type d -print | ${SORT} ) || true; 374 ${FIND} ${GEM_DOCDIR} \! -type d -print | ${SORT} ) || true;
375 375
376_GEM_INSTALL_TARGETS= _gem-build-install-root 376_GEM_INSTALL_TARGETS= _gem-build-install-root
377_GEM_INSTALL_TARGETS+= _gem-build-install-root-check 377_GEM_INSTALL_TARGETS+= _gem-build-install-root-check
378.if !empty(GEM_CLEANBUILD) 378.if !empty(GEM_CLEANBUILD)
379_GEM_INSTALL_TARGETS+= _gem-build-cleanbuild 379_GEM_INSTALL_TARGETS+= _gem-build-cleanbuild
380.endif 380.endif
381_GEM_INSTALL_TARGETS+= _gem-install 381_GEM_INSTALL_TARGETS+= _gem-install
382 382
383.ORDER: ${_GEM_INSTALL_TARGETS} 383.ORDER: ${_GEM_INSTALL_TARGETS}
384 384
385USE_TOOLS+= pax 385USE_TOOLS+= pax
386 386
 387PRINT_PLIST_AWK+= /^bin\/.*${RUBY_SUFFIX}$$/ \
 388 { sub(/${RUBY_SUFFIX}$$/, "$${RUBY_SUFFIX}"); }
 389
387do-install: ${_GEM_INSTALL_TARGETS} 390do-install: ${_GEM_INSTALL_TARGETS}
388 391
389.PHONY: _gem-install 392.PHONY: _gem-install
390_gem-install: 393_gem-install:
391 @${STEP_MSG} "gem install" 394 @${STEP_MSG} "gem install"
392 ${RUN} cd ${RUBYGEM_INSTALL_ROOT}${PREFIX} && \ 395 ${RUN} cd ${RUBYGEM_INSTALL_ROOT}${PREFIX} && \
393 pax -rwpp . ${DESTDIR}${PREFIX} 396 pax -rwpp . ${DESTDIR}${PREFIX}
394 397
395.endif 398.endif