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