| 1 | # Copyright 1999-2011 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-gnome2.eclass,v 1.9 2011/09/18 02:06:04 naota Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.13 2011/10/09 09:39:59 graaff Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: ruby-ng-gnome2.eclass |
5 | # @ECLASS: ruby-ng-gnome2.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Ruby herd <ruby@gentoo.org> |
7 | # Ruby herd <ruby@gentoo.org> |
| 8 | # @AUTHOR: |
8 | # @AUTHOR: |
| … | |
… | |
| 10 | # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts. |
10 | # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts. |
| 11 | # @DESCRIPTION: |
11 | # @DESCRIPTION: |
| 12 | # This eclass simplifies installation of the various pieces of |
12 | # This eclass simplifies installation of the various pieces of |
| 13 | # ruby-gnome2 since they share a very common installation procedure. |
13 | # ruby-gnome2 since they share a very common installation procedure. |
| 14 | |
14 | |
|
|
15 | RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}" |
|
|
16 | RUBY_FAKEGEM_TASK_TEST="" |
|
|
17 | RUBY_FAKEGEM_TASK_DOC="" |
|
|
18 | |
| 15 | inherit ruby-ng multilib versionator |
19 | inherit ruby-fakegem multilib versionator |
| 16 | |
20 | |
| 17 | IUSE="" |
21 | IUSE="" |
| 18 | |
22 | |
| 19 | # Define EPREFIX if needed |
23 | # Define EPREFIX if needed |
| 20 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
24 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
| … | |
… | |
| 22 | subbinding=${PN#ruby-} |
26 | subbinding=${PN#ruby-} |
| 23 | if [ $(get_version_component_range "1-2") == "0.19" ]; then |
27 | if [ $(get_version_component_range "1-2") == "0.19" ]; then |
| 24 | subbinding=${subbinding/%2} |
28 | subbinding=${subbinding/%2} |
| 25 | else |
29 | else |
| 26 | subbinding=${subbinding/-/_} |
30 | subbinding=${subbinding/-/_} |
|
|
31 | DEPEND="dev-util/pkgconfig" |
|
|
32 | ruby_add_bdepend "dev-ruby/pkg-config |
|
|
33 | dev-ruby/rubygems" |
| 27 | fi |
34 | fi |
| 28 | S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} |
35 | S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} |
| 29 | SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" |
36 | SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" |
| 30 | HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" |
37 | HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" |
| 31 | LICENSE="Ruby" |
38 | LICENSE="Ruby" |
| 32 | SLOT="0" |
39 | SLOT="0" |
| 33 | |
|
|
| 34 | ruby_add_bdepend "dev-ruby/pkg-config |
|
|
| 35 | dev-ruby/rubygems" |
|
|
| 36 | |
40 | |
| 37 | # @FUNCTION: each_ruby_configure |
41 | # @FUNCTION: each_ruby_configure |
| 38 | # @DESCRIPTION: |
42 | # @DESCRIPTION: |
| 39 | # Run the configure script in the subbinding for each specific ruby target. |
43 | # Run the configure script in the subbinding for each specific ruby target. |
| 40 | each_ruby_configure() { |
44 | each_ruby_configure() { |
| … | |
… | |
| 64 | # Create the directories, or the package will create them as files. |
68 | # Create the directories, or the package will create them as files. |
| 65 | local archdir=$(ruby_rbconfig_value "sitearchdir") |
69 | local archdir=$(ruby_rbconfig_value "sitearchdir") |
| 66 | dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig |
70 | dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig |
| 67 | |
71 | |
| 68 | emake DESTDIR="${D}" install || die "make install failed" |
72 | emake DESTDIR="${D}" install || die "make install failed" |
|
|
73 | |
|
|
74 | each_fakegem_install |
| 69 | } |
75 | } |
| 70 | |
76 | |
| 71 | # @FUNCTION: all_ruby_install |
77 | # @FUNCTION: all_ruby_install |
| 72 | # @DESCRIPTION: |
78 | # @DESCRIPTION: |
| 73 | # Install the files common to all ruby targets. |
79 | # Install the files common to all ruby targets. |
| … | |
… | |
| 77 | done |
83 | done |
| 78 | if [[ -d sample ]]; then |
84 | if [[ -d sample ]]; then |
| 79 | insinto /usr/share/doc/${PF} |
85 | insinto /usr/share/doc/${PF} |
| 80 | doins -r sample || die "sample install failed" |
86 | doins -r sample || die "sample install failed" |
| 81 | fi |
87 | fi |
|
|
88 | |
|
|
89 | all_fakegem_install |
| 82 | } |
90 | } |