| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: rubygem.mk,v 1.35 2008/03/31 15:40:43 jlam Exp $ | | 1 | # $NetBSD: rubygem.mk,v 1.36 2008/03/31 15:47:44 jlam 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 | # Package-settable variables: | | 6 | # Package-settable variables: |
7 | # | | 7 | # |
8 | # BUILD_TARGET | | 8 | # BUILD_TARGET |
9 | # The Rakefile target that creates a local gem if using the | | 9 | # The Rakefile target that creates a local gem if using the |
10 | # ``rake'' GEM_BUILD method. | | 10 | # ``rake'' GEM_BUILD method. |
11 | # | | 11 | # |
12 | # Default: gem | | 12 | # Default: gem |
13 | # | | 13 | # |
14 | # GEM_BUILD | | 14 | # GEM_BUILD |
| @@ -142,29 +142,30 @@ PRINT_PLIST_AWK+= /^(@dirrm )?${GEM_HOME | | | @@ -142,29 +142,30 @@ PRINT_PLIST_AWK+= /^(@dirrm )?${GEM_HOME |
142 | ### gem-extract | | 142 | ### gem-extract |
143 | ### | | 143 | ### |
144 | ### The gem-extract target extracts a standard gem file. It is an | | 144 | ### The gem-extract target extracts a standard gem file. It is an |
145 | ### automatic dependency for the post-extract target so it doesn't | | 145 | ### automatic dependency for the post-extract target so it doesn't |
146 | ### disturb the usual do-extract actions. | | 146 | ### disturb the usual do-extract actions. |
147 | ### | | 147 | ### |
148 | GEM_SPECFILE?= ${WRKDIR}/${DISTNAME}.gemspec | | 148 | GEM_SPECFILE?= ${WRKDIR}/${DISTNAME}.gemspec |
149 | | | 149 | |
150 | .PHONY: gem-extract | | 150 | .PHONY: gem-extract |
151 | post-extract: gem-extract | | 151 | post-extract: gem-extract |
152 | .if !target(gem-extract) | | 152 | .if !target(gem-extract) |
153 | gem-extract: | | 153 | gem-extract: |
154 | . for _gem_ in ${DISTFILES:M*.gem} | | 154 | . for _gem_ in ${DISTFILES:M*.gem} |
155 | ${RUN} cd ${WRKDIR} && ${RUBYGEM} unpack ${_DISTDIR:Q}/${_gem_:Q} | | 155 | ${RUN} cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} \ |
156 | ${RUN} cd ${WRKDIR} && ${RUBYGEM} spec ${_DISTDIR:Q}/${_gem_:Q} \ | | 156 | ${RUBYGEM} unpack ${_DISTDIR:Q}/${_gem_:Q} |
157 | > ${_gem_}spec | | 157 | ${RUN} cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} TZ= \ |
| | | 158 | ${RUBYGEM} spec ${_DISTDIR:Q}/${_gem_:Q} > ${_gem_}spec |
158 | . endfor | | 159 | . endfor |
159 | .endif | | 160 | .endif |
160 | | | 161 | |
161 | ### | | 162 | ### |
162 | ### gem-build | | 163 | ### gem-build |
163 | ### | | 164 | ### |
164 | ### The gem-build target builds a new local gem from the extracted gem's | | 165 | ### The gem-build target builds a new local gem from the extracted gem's |
165 | ### contents. The new gem as created as ${WRKSRC}/${GEM_NAME}.gem. | | 166 | ### contents. The new gem as created as ${WRKSRC}/${GEM_NAME}.gem. |
166 | ### The local gem is then installed into a special build root under | | 167 | ### The local gem is then installed into a special build root under |
167 | ### ${WRKDIR} (${_RUBYGEM_INSTALL_ROOT}), possibly compiling any extensions. | | 168 | ### ${WRKDIR} (${_RUBYGEM_INSTALL_ROOT}), possibly compiling any extensions. |
168 | ### | | 169 | ### |
169 | GEM_CLEANBUILD?= ext/* | | 170 | GEM_CLEANBUILD?= ext/* |
170 | .if !empty(GEM_CLEANBUILD:M/*) || !empty(GEM_CLEANBUILD:M*../*) | | 171 | .if !empty(GEM_CLEANBUILD:M/*) || !empty(GEM_CLEANBUILD:M*../*) |