/[gentoo-x86]/eclass/ruby-fakegem.eclass
Gentoo

Contents of /eclass/ruby-fakegem.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.38 - (hide annotations) (download)
Sun Feb 24 07:45:46 2013 UTC (19 months ago) by graaff
Branch: MAIN
Changes since 1.37: +5 -4 lines
Also set the RUBY_FAKEGEM_DOCDIR default for the rake recipe. This fixes a regression manifested by bug 458506.

1 graaff 1.38 # Copyright 1999-2013 Gentoo Foundation
2 a3li 1.1 # Distributed under the terms of the GNU General Public License v2
3 graaff 1.38 # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.37 2012/08/19 07:45:02 graaff Exp $
4 vapier 1.30
5 a3li 1.1 # @ECLASS: ruby-fakegem.eclass
6     # @MAINTAINER:
7     # Ruby herd <ruby@gentoo.org>
8 vapier 1.30 # @AUTHOR:
9 a3li 1.1 # Author: Diego E. Pettenò <flameeyes@gentoo.org>
10     # Author: Alex Legler <a3li@gentoo.org>
11     # @BLURB: An eclass for installing Ruby packages to behave like RubyGems.
12     # @DESCRIPTION:
13     # This eclass allows to install arbitrary Ruby libraries (including Gems),
14     # providing integration into the RubyGems system even for "regular" packages.
15    
16     inherit ruby-ng
17    
18     # @ECLASS-VARIABLE: RUBY_FAKEGEM_NAME
19     # @DESCRIPTION:
20     # Sets the Gem name for the generated fake gemspec.
21     # RUBY_FAKEGEM_NAME="${PN}"
22    
23     # @ECLASS-VARIABLE: RUBY_FAKEGEM_VERSION
24     # @DESCRIPTION:
25     # Sets the Gem version for the generated fake gemspec.
26     # RUBY_FAKEGEM_VERSION="${PV}"
27    
28     # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_DOC
29     # @DESCRIPTION:
30     # Specify the rake(1) task to run to generate documentation.
31 flameeyes 1.4 # RUBY_FAKEGEM_TASK_DOC="rdoc"
32 a3li 1.1
33 flameeyes 1.33 # @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_TEST
34     # @DESCRIPTION:
35     # Specify one of the default testing function for ruby-fakegem:
36     # - rake (default; see also RUBY_FAKEGEM_TASK_TEST)
37     # - rspec (calls ruby-ng_rspec, adds dev-ruby/rspec:2 to the dependencies)
38 flameeyes 1.34 # - cucumber (calls ruby-ng_cucumber, adds dev-util/cucumber to the
39     # dependencies; does not work on JRuby).
40 flameeyes 1.33 # - none
41     # RUBY_FAKEGEM_RECIPE_TEST="rake"
42    
43 a3li 1.1 # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_TEST
44     # @DESCRIPTION:
45 flameeyes 1.33 # Specify the rake(1) task used for executing tests. Only valid
46     # if RUBY_FAKEGEM_RECIPE_TEST is set to "rake" (the default).
47 flameeyes 1.4 # RUBY_FAKEGEM_TASK_TEST="test"
48    
49 flameeyes 1.35 # @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_DOC
50     # @DESCRIPTION:
51     # Specify one of the default API doc building function for ruby-fakegem:
52     # - rake (default; see also RUBY_FAKEGEM_TASK_DOC)
53     # - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies);
54     # - none
55     # RUBY_FAKEGEM_RECIPE_DOC="rake"
56    
57 flameeyes 1.4 # @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR
58     # @DESCRIPTION:
59     # Specify the directory under which the documentation is built;
60     # if empty no documentation will be installed automatically.
61 flameeyes 1.35 # Note: if RUBY_FAKEGEM_RECIPE_DOC is set to `rdoc`, this variable is
62     # hardwired to `doc`.
63 flameeyes 1.4 # RUBY_FAKEGEM_DOCDIR=""
64    
65     # @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRADOC
66     # @DESCRIPTION:
67     # Extra documentation to install (readme, changelogs, …).
68     # RUBY_FAKEGEM_EXTRADOC=""
69 a3li 1.1
70 flameeyes 1.35 # @ECLASS-VARIABLE: RUBY_FAKEGEM_DOC_SOURCES
71     # @DESCRIPTION:
72     # Allow settings defined sources to scan for documentation.
73     # This only applies if RUBY_FAKEGEM_DOC_TASK is set to `rdoc`.
74     # RUBY_FAKEGEM_DOC_SOURCES="lib"
75    
76 flameeyes 1.6 # @ECLASS-VARIABLE: RUBY_FAKEGEM_BINWRAP
77     # @DESCRIPTION:
78     # Binaries to wrap around (relative to the bin/ directory)
79     # RUBY_FAKEGEM_BINWRAP="*"
80    
81 flameeyes 1.8 # @ECLASS-VARIABLE: RUBY_FAKEGEM_REQUIRE_PATHS
82     # @DESCRIPTION:
83     # Extra require paths (beside lib) to add to the specification
84 flameeyes 1.10 # RUBY_FAKEGEM_REQUIRE_PATHS=""
85 flameeyes 1.8
86 graaff 1.27 # @ECLASS-VARIABLE: RUBY_FAKEGEM_GEMSPEC
87     # @DESCRIPTION:
88     # Filename of .gemspec file to install instead of generating a generic one.
89     # RUBY_FAKEGEM_GEMSPEC=""
90    
91 graaff 1.32 # @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRAINSTALL
92     # @DESCRIPTION:
93     # List of files and directories relative to the top directory that also
94     # get installed. Some gems provide extra files such as version information,
95     # Rails generators, or data that needs to be installed as well.
96     # RUBY_FAKEGEM_EXTRAINSTALL=""
97    
98 a3li 1.1 RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}"
99 flameeyes 1.15 RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV/_pre/.pre}}"
100     RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}"
101 a3li 1.1
102 flameeyes 1.35 RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}"
103 a3li 1.1 RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}"
104 flameeyes 1.35 RUBY_FAKEGEM_DOC_SOURCES="${RUBY_FAKEGEM_DOC_SOURCES-lib}"
105    
106 flameeyes 1.33 RUBY_FAKEGEM_RECIPE_TEST="${RUBY_FAKEGEM_RECIPE_TEST-rake}"
107 a3li 1.1 RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}"
108    
109 flameeyes 1.6 RUBY_FAKEGEM_BINWRAP="${RUBY_FAKEGEM_BINWRAP-*}"
110    
111 flameeyes 1.35 [[ ${RUBY_FAKEGEM_TASK_DOC} == "" ]] && RUBY_FAKEGEM_RECIPE_DOC="none"
112 a3li 1.1
113 flameeyes 1.35 case ${RUBY_FAKEGEM_RECIPE_DOC} in
114     rake)
115     IUSE+=" doc"
116     ruby_add_bdepend "doc? ( dev-ruby/rake )"
117 graaff 1.38 RUBY_FAKEGEM_DOCDIR="doc"
118 flameeyes 1.35 ;;
119     rdoc)
120     IUSE+=" doc"
121     ruby_add_bdepend "doc? ( dev-ruby/rdoc )"
122     RUBY_FAKEGEM_DOCDIR="doc"
123     ;;
124     none)
125     [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && IUSE+=" doc"
126     ;;
127     esac
128 flameeyes 1.21
129 flameeyes 1.33 [[ ${RUBY_FAKEGEM_TASK_TEST} == "" ]] && RUBY_FAKEGEM_RECIPE_TEST="none"
130    
131     case ${RUBY_FAKEGEM_RECIPE_TEST} in
132     rake)
133     IUSE+=" test"
134     ruby_add_bdepend "test? ( dev-ruby/rake )"
135     ;;
136     rspec)
137     IUSE+=" test"
138     ruby_add_bdepend "test? ( dev-ruby/rspec:2 )"
139     ;;
140 flameeyes 1.34 cucumber)
141     IUSE+=" test"
142     # Unfortunately as of August 2012, cucumber is not supported on
143     # JRuby. We work it around here to avoid repeating the same
144     # code over and over again.
145     USE_RUBY="${USE_RUBY/jruby/}" ruby_add_bdepend "test? ( dev-util/cucumber )"
146     ;;
147 flameeyes 1.33 *)
148     RUBY_FAKEGEM_RECIPE_TEST="none"
149     ;;
150     esac
151 a3li 1.1
152 flameeyes 1.15 SRC_URI="mirror://rubygems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${RUBY_FAKEGEM_SUFFIX:+-${RUBY_FAKEGEM_SUFFIX}}.gem"
153 flameeyes 1.3
154 graaff 1.31 ruby_add_bdepend virtual/rubygems
155     ruby_add_rdepend virtual/rubygems
156 a3li 1.1
157     # @FUNCTION: ruby_fakegem_gemsdir
158     # @RETURN: Returns the gem data directory
159     # @DESCRIPTION:
160     # This function returns the gems data directory for the ruby
161     # implementation in question.
162     ruby_fakegem_gemsdir() {
163 grobian 1.24 has "${EAPI}" 2 && ! use prefix && EPREFIX=
164    
165     local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir')
166     _gemsitedir=${_gemsitedir//site_ruby/gems}
167     _gemsitedir=${_gemsitedir#${EPREFIX}}
168 a3li 1.1
169     [[ -z ${_gemsitedir} ]] && {
170     eerror "Unable to find the gems dir"
171     die "Unable to find the gems dir"
172     }
173    
174     echo "${_gemsitedir}"
175     }
176    
177     # @FUNCTION: ruby_fakegem_doins
178     # @USAGE: file [file...]
179     # @DESCRIPTION:
180     # Installs the specified file(s) into the gems directory.
181     ruby_fakegem_doins() {
182     (
183     insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}
184     doins "$@"
185     ) || die "failed $0 $@"
186     }
187    
188     # @FUNCTION: ruby_fakegem_newsins()
189     # @USAGE: file filename
190     # @DESCRIPTION:
191     # Installs the specified file into the gems directory using the provided filename.
192     ruby_fakegem_newins() {
193     (
194     # Since newins does not accept full paths but just basenames
195     # for the target file, we want to extend it here.
196     local newdirname=/$(dirname "$2")
197     [[ ${newdirname} == "/." ]] && newdirname=
198    
199     local newbasename=$(basename "$2")
200    
201     insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${newdirname}
202     newins "$1" ${newbasename}
203     ) || die "failed $0 $@"
204     }
205    
206 graaff 1.27 # @FUNCTION: ruby_fakegem_install_gemspec
207     # @DESCRIPTION:
208     # Install a .gemspec file for this package. Either use the file indicated
209     # by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using
210     # ruby_fakegem_genspec.
211     ruby_fakegem_install_gemspec() {
212     local gemspec="${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation}
213    
214     (
215     if [[ ${RUBY_FAKEGEM_GEMSPEC} != "" ]]; then
216     ruby_fakegem_gemspec_gemspec ${RUBY_FAKEGEM_GEMSPEC} ${gemspec}
217     else
218     local metadata="${WORKDIR}"/${_ruby_implementation}/metadata
219    
220     if [[ -e ${metadata} ]]; then
221     ruby_fakegem_metadata_gemspec ${metadata} ${gemspec}
222     else
223     ruby_fakegem_genspec ${gemspec}
224     fi
225     fi
226 graaff 1.28 ) || die "Unable to generate gemspec file."
227 graaff 1.27
228     insinto $(ruby_fakegem_gemsdir)/specifications
229     newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file."
230     }
231    
232     # @FUNCTION: ruby_fakegem_gemspec_gemspec
233     # @USAGE: gemspec-input gemspec-output
234     # @DESCRIPTION:
235     # Generates an installable version of the specification indicated by
236     # RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification
237     # in a way similar to packaging the gemspec file.
238     ruby_fakegem_gemspec_gemspec() {
239     ${RUBY} -e "puts eval(File::open('$1').read).to_ruby" > $2
240     }
241    
242     # @FUNCTION: ruby_fakegem_metadata_gemspec
243     # @USAGE: gemspec-metadata gemspec-output
244     # @DESCRIPTION:
245     # Generates an installable version of the specification indicated by
246     # the metadata distributed by the gem itself. This is similar to how
247     # rubygems creates an installation from a .gem file.
248     ruby_fakegem_metadata_gemspec() {
249 graaff 1.37 case ${RUBY} in
250     *ruby19)
251     ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
252     ;;
253     *)
254     ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1').read).to_ruby" > $2
255     ;;
256     esac
257 graaff 1.27 }
258    
259 a3li 1.1 # @FUNCTION: ruby_fakegem_genspec
260 graaff 1.27 # @USAGE: output-gemspec
261 a3li 1.1 # @DESCRIPTION:
262     # Generates a gemspec for the package and places it into the "specifications"
263     # directory of RubyGems.
264 graaff 1.27 # If the metadata normally distributed with a gem is present then that is
265     # used to generate the gemspec file.
266     #
267     # As a fallback we can generate our own version.
268 a3li 1.1 # In the gemspec, the following values are set: name, version, summary,
269     # homepage, and require_paths=["lib"].
270     # See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version.
271 flameeyes 1.8 # See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths.
272 a3li 1.1 ruby_fakegem_genspec() {
273 graaff 1.27 local required_paths="'lib'"
274     for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do
275     required_paths="${required_paths}, '${path}'"
276     done
277 flameeyes 1.8
278 graaff 1.27 # We use the _ruby_implementation variable to avoid having stray
279     # copies with different implementations; while for now we're using
280     # the same exact content, we might have differences in the future,
281     # so better taking this into consideration.
282     local quoted_description=${DESCRIPTION//\"/\\\"}
283     cat - > $1 <<EOF
284 graaff 1.38 # generated by ruby-fakegem.eclass $Revision: 1.37 $
285 a3li 1.1 Gem::Specification.new do |s|
286     s.name = "${RUBY_FAKEGEM_NAME}"
287     s.version = "${RUBY_FAKEGEM_VERSION}"
288 graaff 1.14 s.summary = "${quoted_description}"
289 a3li 1.1 s.homepage = "${HOMEPAGE}"
290 flameeyes 1.8 s.require_paths = [${required_paths}]
291 a3li 1.1 end
292     EOF
293     }
294    
295     # @FUNCTION: ruby_fakegem_binwrapper
296     # @USAGE: command [path]
297     # @DESCRIPTION:
298     # Creates a new binary wrapper for a command installed by the RubyGem.
299     # path defaults to /usr/bin/$command
300     ruby_fakegem_binwrapper() {
301     (
302     local gembinary=$1
303     local newbinary=${2:-/usr/bin/$gembinary}
304 flameeyes 1.5 local relativegembinary=${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/bin/${gembinary}
305 flameeyes 1.12 local binpath=$(dirname $newbinary)
306     [[ ${binpath} = . ]] && binpath=/usr/bin
307 a3li 1.1
308 flameeyes 1.16 # Try to find out whether the package is going to install for
309     # one or multiple implementations; if we're installing for a
310     # *single* implementation, no need to use “/usr/bin/env ruby”
311     # in the shebang, and we can actually avoid errors when
312     # calling the script by default (see for instance the
313     # JRuby-specific commands).
314     local rubycmd=
315     for implementation in ${USE_RUBY}; do
316     # ignore non-enabled implementations
317     use ruby_targets_${implementation} || continue
318     if [ -z $rubycmd ]; then
319     # if no other implementation was set before, set it.
320 flameeyes 1.23 rubycmd="$(ruby_implementation_command ${implementation})"
321 flameeyes 1.16 else
322     # if another implementation already arrived, then make
323     # it generic and break out of the loop. This ensures
324     # that we do at most two iterations.
325     rubycmd="/usr/bin/env ruby"
326     break
327     fi
328     done
329    
330 a3li 1.1 cat - > "${T}"/gembin-wrapper-${gembinary} <<EOF
331 flameeyes 1.16 #!${rubycmd}
332 a3li 1.1 # This is a simplified version of the RubyGems wrapper
333     #
334 graaff 1.38 # Generated by ruby-fakegem.eclass $Revision: 1.37 $
335 a3li 1.1
336     require 'rubygems'
337    
338 flameeyes 1.5 load Gem::default_path[-1] + "/gems/${relativegembinary}"
339 a3li 1.1
340     EOF
341    
342 flameeyes 1.12 exeinto ${binpath:-/usr/bin}
343 a3li 1.1 newexe "${T}"/gembin-wrapper-${gembinary} $(basename $newbinary)
344     ) || die "Unable to create fakegem wrapper"
345     }
346    
347     # @FUNCTION: all_fakegem_compile
348     # @DESCRIPTION:
349     # Build documentation for the package if indicated by the doc USE flag
350     # and if there is a documetation task defined.
351     all_fakegem_compile() {
352 flameeyes 1.36 if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
353 flameeyes 1.35 case ${RUBY_FAKEGEM_RECIPE_DOC} in
354     rake)
355     rake ${RUBY_FAKEGEM_TASK_DOC} || die "failed to (re)build documentation"
356     ;;
357     rdoc)
358     rdoc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation"
359     ;;
360     esac
361 a3li 1.1 fi
362     }
363    
364     # @FUNCTION: all_ruby_unpack
365     # @DESCRIPTION:
366     # Unpack the source archive, including support for unpacking gems.
367     all_ruby_unpack() {
368     # Special support for extracting .gem files; the file need to be
369     # extracted twice and the mtime from the archive _has_ to be
370     # ignored (it's always set to epoch 0).
371 flameeyes 1.19 for archive in ${A}; do
372 flameeyes 1.22 case "${archive}" in
373     *.gem)
374 graaff 1.29 # Make sure that we're not running unpack for more than
375 flameeyes 1.22 # one .gem file, since we won't support that at all.
376     [[ -d "${S}" ]] && die "Unable to unpack ${archive}, ${S} exists"
377    
378     ebegin "Unpacking .gem file..."
379     tar -mxf ${DISTDIR}/${archive} || die
380     eend $?
381    
382 graaff 1.27 ebegin "Uncompressing metadata"
383     gunzip metadata.gz || die
384     eend $?
385    
386 flameeyes 1.22 mkdir "${S}"
387     pushd "${S}" &>/dev/null
388    
389     ebegin "Unpacking data.tar.gz"
390     tar -mxf "${my_WORKDIR}"/data.tar.gz || die
391     eend $?
392 graaff 1.27
393 flameeyes 1.22 popd &>/dev/null
394     ;;
395     *.patch.bz2)
396     # We apply the patches with RUBY_PATCHES directly from DISTDIR,
397     # as the WORKDIR variable changes value between the global-scope
398     # and the time all_ruby_unpack/_prepare are called. Since we can
399     # simply decompress them when applying, this is much easier to
400     # deal with for us.
401     einfo "Keeping ${archive} as-is"
402     ;;
403     *)
404     unpack ${archive}
405     ;;
406     esac
407 flameeyes 1.19 done
408 a3li 1.1 }
409    
410     # @FUNCTION: all_ruby_compile
411     # @DESCRIPTION:
412     # Compile the package.
413     all_ruby_compile() {
414     all_fakegem_compile
415     }
416    
417     # @FUNCTION: each_fakegem_test
418     # @DESCRIPTION:
419     # Run tests for the package for each ruby target if the test task is defined.
420     each_fakegem_test() {
421 flameeyes 1.33 case ${RUBY_FAKEGEM_RECIPE_TEST} in
422     rake)
423     ${RUBY} -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed"
424     ;;
425     rspec)
426     ruby-ng_rspec
427     ;;
428 flameeyes 1.34 cucumber)
429     ruby-ng_cucumber
430     ;;
431 flameeyes 1.33 none)
432     ewarn "each_fakegem_test called, but \${RUBY_FAKEGEM_RECIPE_TEST} is 'none'"
433     ;;
434     esac
435     }
436    
437     if [[ ${RUBY_FAKEGEM_RECIPE_TEST} != none ]]; then
438     # @FUNCTION: each_ruby_test
439     # @DESCRIPTION:
440     # Run the tests for this package.
441     each_ruby_test() {
442     each_fakegem_test
443     }
444 flameeyes 1.13 fi
445 a3li 1.1
446     # @FUNCTION: each_fakegem_install
447     # @DESCRIPTION:
448     # Install the package for each ruby target.
449     each_fakegem_install() {
450 graaff 1.27 ruby_fakegem_install_gemspec
451 a3li 1.1
452 flameeyes 1.11 local _gemlibdirs="${RUBY_FAKEGEM_EXTRAINSTALL}"
453     for directory in bin lib; do
454 a3li 1.1 [[ -d ${directory} ]] && _gemlibdirs="${_gemlibdirs} ${directory}"
455     done
456    
457 flameeyes 1.9 [[ -n ${_gemlibdirs} ]] && \
458     ruby_fakegem_doins -r ${_gemlibdirs}
459 a3li 1.1 }
460    
461     # @FUNCTION: each_ruby_install
462     # @DESCRIPTION:
463     # Install the package for each target.
464     each_ruby_install() {
465     each_fakegem_install
466     }
467    
468     # @FUNCTION: all_fakegem_install
469     # @DESCRIPTION:
470     # Install files common to all ruby targets.
471     all_fakegem_install() {
472 flameeyes 1.20 if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
473 flameeyes 1.7 for dir in ${RUBY_FAKEGEM_DOCDIR}; do
474 flameeyes 1.20 [[ -d ${dir} ]] || continue
475    
476 flameeyes 1.11 pushd ${dir} &>/dev/null
477 flameeyes 1.7 dohtml -r * || die "failed to install documentation"
478 flameeyes 1.11 popd &>/dev/null
479 flameeyes 1.7 done
480 a3li 1.1 fi
481    
482     if [[ -n ${RUBY_FAKEGEM_EXTRADOC} ]]; then
483     dodoc ${RUBY_FAKEGEM_EXTRADOC} || die "failed to install further documentation"
484     fi
485 flameeyes 1.6
486     # binary wrappers; we assume that all the implementations get the
487     # same binaries, or something is wrong anyway, so...
488     if [[ -n ${RUBY_FAKEGEM_BINWRAP} ]]; then
489     local bindir=$(find "${D}" -type d -path "*/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/bin" -print -quit)
490    
491     if [[ -d "${bindir}" ]]; then
492 flameeyes 1.11 pushd "${bindir}" &>/dev/null
493 flameeyes 1.6 local binaries=$(eval ls ${RUBY_FAKEGEM_BINWRAP})
494     for binary in $binaries; do
495     ruby_fakegem_binwrapper $binary
496     done
497 flameeyes 1.11 popd &>/dev/null
498 flameeyes 1.6 fi
499     fi
500 a3li 1.1 }
501    
502     # @FUNCTION: all_ruby_install
503     # @DESCRIPTION:
504     # Install files common to all ruby targets.
505     all_ruby_install() {
506     all_fakegem_install
507     }

  ViewVC Help
Powered by ViewVC 1.1.20