| 1 | # Copyright 1999-2010 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.5 2010/12/15 12:38:47 graaff Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.10 2011/09/18 03:45:21 naota 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 | # |
8 | # @AUTHOR: |
| 9 | # Author: Hans de Graaff <graaff@gentoo.org> |
9 | # Author: Hans de Graaff <graaff@gentoo.org> |
| 10 | # |
|
|
| 11 | # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts. |
10 | # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts. |
| 12 | # @DESCRIPTION: |
11 | # @DESCRIPTION: |
| 13 | # This eclass simplifies installation of the various pieces of |
12 | # This eclass simplifies installation of the various pieces of |
| 14 | # ruby-gnome2 since they share a very common installation procedure. |
13 | # ruby-gnome2 since they share a very common installation procedure. |
| 15 | |
14 | |
| 16 | inherit ruby-ng multilib |
15 | RUBY_FAKEGEM_NAME="${PN#ruby-}" |
|
|
16 | RUBY_FAKEGEM_TASK_TEST="" |
|
|
17 | |
|
|
18 | inherit ruby-fakegem multilib versionator |
| 17 | |
19 | |
| 18 | IUSE="" |
20 | IUSE="" |
| 19 | |
21 | |
| 20 | # Define EPREFIX if needed |
22 | # Define EPREFIX if needed |
| 21 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
23 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
| 22 | |
24 | |
| 23 | subbinding=${PN#ruby-} ; subbinding=${subbinding%2} |
25 | subbinding=${PN#ruby-} |
|
|
26 | if [ $(get_version_component_range "1-2") == "0.19" ]; then |
|
|
27 | subbinding=${subbinding/%2} |
|
|
28 | else |
|
|
29 | subbinding=${subbinding/-/_} |
|
|
30 | fi |
| 24 | S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} |
31 | S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} |
| 25 | SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" |
32 | SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" |
| 26 | HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" |
33 | HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" |
| 27 | LICENSE="Ruby" |
34 | LICENSE="Ruby" |
| 28 | SLOT="0" |
35 | SLOT="0" |
|
|
36 | |
|
|
37 | DEPEND="dev-util/pkgconfig" |
|
|
38 | ruby_add_bdepend "dev-ruby/pkg-config |
|
|
39 | dev-ruby/rubygems" |
| 29 | |
40 | |
| 30 | # @FUNCTION: each_ruby_configure |
41 | # @FUNCTION: each_ruby_configure |
| 31 | # @DESCRIPTION: |
42 | # @DESCRIPTION: |
| 32 | # 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. |
| 33 | each_ruby_configure() { |
44 | each_ruby_configure() { |
| … | |
… | |
| 41 | # We have injected --no-undefined in Ruby as a safety precaution |
52 | # We have injected --no-undefined in Ruby as a safety precaution |
| 42 | # against broken ebuilds, but the Ruby-Gnome bindings |
53 | # against broken ebuilds, but the Ruby-Gnome bindings |
| 43 | # unfortunately rely on the lazy load of other extensions; see bug |
54 | # unfortunately rely on the lazy load of other extensions; see bug |
| 44 | # #320545. |
55 | # #320545. |
| 45 | find . -name Makefile -print0 | xargs -0 \ |
56 | find . -name Makefile -print0 | xargs -0 \ |
| 46 | sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed" |
57 | sed -i -e 's:-Wl,--no-undefined ::' \ |
|
|
58 | -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \ |
|
|
59 | || die "--no-undefined removal failed" |
| 47 | |
60 | |
| 48 | emake || die "emake failed" |
61 | emake || die "emake failed" |
| 49 | } |
62 | } |
| 50 | |
63 | |
| 51 | # @FUNCTION: each_ruby_install |
64 | # @FUNCTION: each_ruby_install |
| … | |
… | |
| 55 | # Create the directories, or the package will create them as files. |
68 | # Create the directories, or the package will create them as files. |
| 56 | local archdir=$(ruby_rbconfig_value "sitearchdir") |
69 | local archdir=$(ruby_rbconfig_value "sitearchdir") |
| 57 | dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig |
70 | dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig |
| 58 | |
71 | |
| 59 | emake DESTDIR="${D}" install || die "make install failed" |
72 | emake DESTDIR="${D}" install || die "make install failed" |
|
|
73 | |
|
|
74 | each_fakegem_install |
| 60 | } |
75 | } |
| 61 | |
76 | |
| 62 | # @FUNCTION: all_ruby_install |
77 | # @FUNCTION: all_ruby_install |
| 63 | # @DESCRIPTION: |
78 | # @DESCRIPTION: |
| 64 | # Install the files common to all ruby targets. |
79 | # Install the files common to all ruby targets. |
| … | |
… | |
| 68 | done |
83 | done |
| 69 | if [[ -d sample ]]; then |
84 | if [[ -d sample ]]; then |
| 70 | insinto /usr/share/doc/${PF} |
85 | insinto /usr/share/doc/${PF} |
| 71 | doins -r sample || die "sample install failed" |
86 | doins -r sample || die "sample install failed" |
| 72 | fi |
87 | fi |
|
|
88 | |
|
|
89 | all_fakegem_install |
| 73 | } |
90 | } |