| @@ -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 | |
267 | RUBYGEM_INSTALL_ROOT= ${WRKDIR}/.inst | | 274 | RUBYGEM_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 | |