Mon Jan 11 06:51:27 2021 UTC ()
lang/ruby: add RUBYGEM_VERBOSE

Add RUBYGEM_VERBOSE user-settable variable.  It is useful for developers.

RUBYGEM_VERBOSE
	Execute gem with verbose option.
		Possible values: Yes No
		Default: No


(taca)
diff -r1.10 -r1.11 pkgsrc/lang/ruby/gem-vars.mk
diff -r1.43 -r1.44 pkgsrc/lang/ruby/gem.mk

cvs diff -r1.10 -r1.11 pkgsrc/lang/ruby/gem-vars.mk (expand / switch to unified diff)

--- pkgsrc/lang/ruby/gem-vars.mk 2020/12/19 14:41:16 1.10
+++ pkgsrc/lang/ruby/gem-vars.mk 2021/01/11 06:51:27 1.11
@@ -1,21 +1,23 @@ @@ -1,21 +1,23 @@
1# $NetBSD: gem-vars.mk,v 1.10 2020/12/19 14:41:16 taca Exp $ 1# $NetBSD: gem-vars.mk,v 1.11 2021/01/11 06:51:27 taca Exp $
2# 2#
3# This Makefile fragment defines various make(1) variables for Ruby gems 3# This Makefile fragment defines various make(1) variables for Ruby gems
4# support. 4# support.
5# 5#
6.if !defined(_RUBYGEM_VARS_MK) 6.if !defined(_RUBYGEM_VARS_MK)
7_RUBYGEM_VARS_MK= # defined 7_RUBYGEM_VARS_MK= # defined
8 8
 9RUBYGEM_VERBOSE?= No
 10
9# Specify GEM_PATH 11# Specify GEM_PATH
10GEM_PATH?= ${PREFIX}/${GEM_HOME} 12GEM_PATH?= ${PREFIX}/${GEM_HOME}
11 13
12# Base directory for Gems 14# Base directory for Gems
13MAKE_ENV+= GEM_PATH=${GEM_PATH} 15MAKE_ENV+= GEM_PATH=${GEM_PATH}
14 16
15RUBYGEM_LANG?= en_US.UTF-8 17RUBYGEM_LANG?= en_US.UTF-8
16RUBYGEM_ENV?= LANG=${RUBYGEM_LANG} LC_CTYPE=${RUBYGEM_LANG} 18RUBYGEM_ENV?= LANG=${RUBYGEM_LANG} LC_CTYPE=${RUBYGEM_LANG}
17 19
18RUBYGEM= ${LOCALBASE}/bin/${RUBYGEM_NAME} 20RUBYGEM= ${LOCALBASE}/bin/${RUBYGEM_NAME}
19 21
20GEM_EXTSDIR_NEEDS_SUBDIR?= yes 22GEM_EXTSDIR_NEEDS_SUBDIR?= yes
21 23

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

--- pkgsrc/lang/ruby/gem.mk 2020/12/19 14:41:16 1.43
+++ pkgsrc/lang/ruby/gem.mk 2021/01/11 06:51:27 1.44
@@ -1,18 +1,25 @@ @@ -1,18 +1,25 @@
1# $NetBSD: gem.mk,v 1.43 2020/12/19 14:41:16 taca Exp $ 1# $NetBSD: gem.mk,v 1.44 2021/01/11 06:51:27 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 ===
 7#
 8# RUBYGEM_VERBOSE
 9# Execute gem with verbose option.
 10# Possible values: Yes No
 11# Default: No
 12#
6# Package-settable variables: 13# Package-settable variables:
7# 14#
8# OVERRIDE_GEMSPEC 15# OVERRIDE_GEMSPEC
9# Fix version of depending gem or modify files in gemspec. 16# Fix version of depending gem or modify files in gemspec.
10# 17#
11# (1) Specify as gem and dependency pattern as usual pkgsrc's one. 18# (1) Specify as gem and dependency pattern as usual pkgsrc's one.
12# 19#
13# Example: 20# Example:
14# When gemspec contains "json~>1.4.7" as runtime dependency 21# When gemspec contains "json~>1.4.7" as runtime dependency
15# (i.e. json>=1.4.7<1.5) and if you want to relax it to 22# (i.e. json>=1.4.7<1.5) and if you want to relax it to
16# "json>=1.4.6" then use: 23# "json>=1.4.6" then use:
17# 24#
18# OVERRIDE_GEMSPEC+= json>=1.4.6 25# OVERRIDE_GEMSPEC+= json>=1.4.6
@@ -260,26 +267,29 @@ _gem-rake-build: @@ -260,26 +267,29 @@ _gem-rake-build:
260 ${RUN} cd ${WRKSRC} && rm -f ${GEM_NAME}.gem 267 ${RUN} cd ${WRKSRC} && rm -f ${GEM_NAME}.gem
261 ${RUN} cd ${WRKSRC} && find . -name ${GEM_NAME}.gem -print | \ 268 ${RUN} cd ${WRKSRC} && find . -name ${GEM_NAME}.gem -print | \
262 while read file; do \ 269 while read file; do \
263 ln -fs "$$file" ${GEM_NAME}.gem; \ 270 ln -fs "$$file" ${GEM_NAME}.gem; \
264 exit 0; \ 271 exit 0; \
265 done 272 done
266 273
267RUBYGEM_INSTALL_ROOT= ${WRKDIR}/.inst 274RUBYGEM_INSTALL_ROOT= ${WRKDIR}/.inst
268_RUBYGEM_OPTIONS= --no-update-sources # don't cache the gem index 275_RUBYGEM_OPTIONS= --no-update-sources # don't cache the gem index
269_RUBYGEM_OPTIONS+= --install-dir ${PREFIX}/${GEM_HOME} 276_RUBYGEM_OPTIONS+= --install-dir ${PREFIX}/${GEM_HOME}
270_RUBYGEM_OPTIONS+= ${RUBYGEM_INSTALL_ROOT_OPTION} 277_RUBYGEM_OPTIONS+= ${RUBYGEM_INSTALL_ROOT_OPTION}
271_RUBYGEM_OPTIONS+= --ignore-dependencies 278_RUBYGEM_OPTIONS+= --ignore-dependencies
272_RUBYGEM_OPTIONS+= --local ${WRKSRC}/${GEM_NAME}.gem 279_RUBYGEM_OPTIONS+= --local ${WRKSRC}/${GEM_NAME}.gem
 280.if !empty(RUBYGEM_VERBOSE:M[Yy][Ee][Ss])
 281_RUBYGEM_OPTIONS+= -V
 282.endif
273.if !empty(RUBY_BUILD_DOCUMENT:M[nN][oO]) 283.if !empty(RUBY_BUILD_DOCUMENT:M[nN][oO])
274_RUBYGEM_OPTIONS+= --no-document 284_RUBYGEM_OPTIONS+= --no-document
275.endif 285.endif
276.if !empty(CONFIGURE_ARGS) || !empty(RUBY_EXTCONF_ARGS) 286.if !empty(CONFIGURE_ARGS) || !empty(RUBY_EXTCONF_ARGS)
277_RUBYGEM_OPTIONS+= -- 287_RUBYGEM_OPTIONS+= --
278. if !empty(RUBY_EXTCONF_ARGS) 288. if !empty(RUBY_EXTCONF_ARGS)
279_RUBYGEM_OPTIONS+= ${RUBY_EXTCONF_ARGS} 289_RUBYGEM_OPTIONS+= ${RUBY_EXTCONF_ARGS}
280. endif 290. endif
281. if !empty(CONFIGURE_ARGS) 291. if !empty(CONFIGURE_ARGS)
282_RUBYGEM_OPTIONS+= --build-args ${CONFIGURE_ARGS} 292_RUBYGEM_OPTIONS+= --build-args ${CONFIGURE_ARGS}
283. endif 293. endif
284.endif 294.endif
285 295