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

Diff of /eclass/ruby-fakegem.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.5 2009/12/16 09:51:30 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.6 2009/12/20 23:39:43 flameeyes Exp $
4# 4#
5# @ECLASS: ruby-fakegem.eclass 5# @ECLASS: ruby-fakegem.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# 8#
47# @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRADOC 47# @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRADOC
48# @DESCRIPTION: 48# @DESCRIPTION:
49# Extra documentation to install (readme, changelogs, …). 49# Extra documentation to install (readme, changelogs, …).
50# RUBY_FAKEGEM_EXTRADOC="" 50# RUBY_FAKEGEM_EXTRADOC=""
51 51
52# @ECLASS-VARIABLE: RUBY_FAKEGEM_BINWRAP
53# @DESCRIPTION:
54# Binaries to wrap around (relative to the bin/ directory)
55# RUBY_FAKEGEM_BINWRAP="*"
56
52RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}" 57RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}"
53RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV}}" 58RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV}}"
54 59
55RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}" 60RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}"
56RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}" 61RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}"
62
63RUBY_FAKEGEM_BINWRAP="${RUBY_FAKEGEM_BINWRAP-*}"
57 64
58if [[ ${RUBY_FAKEGEM_TASK_DOC} != "" ]]; then 65if [[ ${RUBY_FAKEGEM_TASK_DOC} != "" ]]; then
59 IUSE="$IUSE doc" 66 IUSE="$IUSE doc"
60 ruby_add_bdepend doc "dev-ruby/rake" 67 ruby_add_bdepend doc "dev-ruby/rake"
61fi 68fi
266 fi 273 fi
267 274
268 if [[ -n ${RUBY_FAKEGEM_EXTRADOC} ]]; then 275 if [[ -n ${RUBY_FAKEGEM_EXTRADOC} ]]; then
269 dodoc ${RUBY_FAKEGEM_EXTRADOC} || die "failed to install further documentation" 276 dodoc ${RUBY_FAKEGEM_EXTRADOC} || die "failed to install further documentation"
270 fi 277 fi
278
279 # binary wrappers; we assume that all the implementations get the
280 # same binaries, or something is wrong anyway, so...
281 if [[ -n ${RUBY_FAKEGEM_BINWRAP} ]]; then
282 local bindir=$(find "${D}" -type d -path "*/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/bin" -print -quit)
283
284 if [[ -d "${bindir}" ]]; then
285 pushd "${bindir}"
286 local binaries=$(eval ls ${RUBY_FAKEGEM_BINWRAP})
287 for binary in $binaries; do
288 ruby_fakegem_binwrapper $binary
289 done
290 popd
291 fi
292 fi
271} 293}
272 294
273# @FUNCTION: all_ruby_install 295# @FUNCTION: all_ruby_install
274# @DESCRIPTION: 296# @DESCRIPTION:
275# Install files common to all ruby targets. 297# Install files common to all ruby targets.

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20