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

Diff of /eclass/ruby-ng.eclass

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

Revision 1.38 Revision 1.42
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2011 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-ng.eclass,v 1.38 2011/07/22 09:41:17 graaff Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.42 2011/10/22 10:08:44 scarabeus Exp $
4# 4
5# @ECLASS: ruby-ng.eclass 5# @ECLASS: ruby-ng.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# 8# @AUTHOR:
9# Author: Diego E. Pettenò <flameeyes@gentoo.org> 9# Author: Diego E. Pettenò <flameeyes@gentoo.org>
10#
11# Author: Alex Legler <a3li@gentoo.org> 10# Author: Alex Legler <a3li@gentoo.org>
12#
13# Author: Hans de Graaff <graaff@gentoo.org> 11# Author: Hans de Graaff <graaff@gentoo.org>
14#
15# @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots. 12# @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots.
16# @DESCRIPTION: 13# @DESCRIPTION:
17# The Ruby eclass is designed to allow an easier installation of Ruby packages 14# The Ruby eclass is designed to allow an easier installation of Ruby packages
18# and their incorporation into the Gentoo Linux system. 15# and their incorporation into the Gentoo Linux system.
19# 16#
20# Currently available targets are: 17# Currently available targets are:
21# * ruby18 - Ruby (MRI) 1.8.x 18# * ruby18 - Ruby (MRI) 1.8.x
22# * ruby19 - Ruby (MRI) 1.9.x 19# * ruby19 - Ruby (MRI) 1.9.x
23# * ree18 - Ruby Enterprise Edition 1.8.x 20# * ree18 - Ruby Enterprise Edition 1.8.x
24# * jruby - JRuby 21# * jruby - JRuby
22# * rbx - Rubinius
25# 23#
26# This eclass does not define the implementation of the configure, 24# This eclass does not define the implementation of the configure,
27# compile, test, or install phases. Instead, the default phases are 25# compile, test, or install phases. Instead, the default phases are
28# used. Specific implementations of these phases can be provided in 26# used. Specific implementations of these phases can be provided in
29# the ebuild either to be run for each Ruby implementation, or for all 27# the ebuild either to be run for each Ruby implementation, or for all
69# is linked against libruby. There are cases were this is not the case 67# is linked against libruby. There are cases were this is not the case
70# and the shared object is generic code to be used in some other way 68# and the shared object is generic code to be used in some other way
71# (e.g. selenium's firefox driver extension). When set this argument is 69# (e.g. selenium's firefox driver extension). When set this argument is
72# passed to "grep -E" to remove reporting of these shared objects. 70# passed to "grep -E" to remove reporting of these shared objects.
73 71
74inherit eutils toolchain-funcs 72inherit eutils java-utils-2 toolchain-funcs
75 73
76EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup 74EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
77 75
78case ${EAPI} in 76case ${EAPI} in
79 0|1) 77 0|1)
114 rubypn="dev-lang/ruby-enterprise" 112 rubypn="dev-lang/ruby-enterprise"
115 rubyslot=":1.8" 113 rubyslot=":1.8"
116 ;; 114 ;;
117 jruby) 115 jruby)
118 rubypn="dev-java/jruby" 116 rubypn="dev-java/jruby"
117 rubyslot=""
118 ;;
119 rbx)
120 rubypn="dev-lang/rubinius"
119 rubyslot="" 121 rubyslot=""
120 ;; 122 ;;
121 *) die "$1: unknown Ruby implementation" 123 *) die "$1: unknown Ruby implementation"
122 esac 124 esac
123 125
395ruby-ng_pkg_setup() { 397ruby-ng_pkg_setup() {
396 # This only checks that at least one implementation is present 398 # This only checks that at least one implementation is present
397 # before doing anything; by leaving the parameters empty we know 399 # before doing anything; by leaving the parameters empty we know
398 # it's a special case. 400 # it's a special case.
399 _ruby_each_implementation 401 _ruby_each_implementation
402
403 has ruby_targets_jruby ${IUSE} && use ruby_targets_jruby && java-pkg_setup-vm
400} 404}
401 405
402# @FUNCTION: ruby-ng_src_unpack 406# @FUNCTION: ruby-ng_src_unpack
403# @DESCRIPTION: 407# @DESCRIPTION:
404# Unpack the source archive. 408# Unpack the source archive.
610 echo "ree" 614 echo "ree"
611 ;; 615 ;;
612 *jruby*) 616 *jruby*)
613 echo "jruby" 617 echo "jruby"
614 ;; 618 ;;
619 *rubinius*)
620 echo "rbx"
621 ;;
615 *) 622 *)
616 echo "mri" 623 echo "mri"
617 ;; 624 ;;
618 esac 625 esac
619} 626}

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20