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

Contents of /eclass/ruby-ng-gnome2.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Sun May 29 13:47:14 2011 UTC (3 years, 3 months ago) by naota
Branch: MAIN
Changes since 1.6: +8 -3 lines
Support >=ruby-gnome2-0.90 file structure. Based on a code from Shunsuke Shimizu.

1 graaff 1.1 # Copyright 1999-2010 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 naota 1.7 # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.6 2011/05/29 13:43:16 naota Exp $
4 graaff 1.1 #
5     # @ECLASS: ruby-ng-gnome2.eclass
6     # @MAINTAINER:
7     # Ruby herd <ruby@gentoo.org>
8     #
9     # Author: Hans de Graaff <graaff@gentoo.org>
10     #
11 graaff 1.3 # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
12     # @DESCRIPTION:
13 graaff 1.1 # This eclass simplifies installation of the various pieces of
14     # ruby-gnome2 since they share a very common installation procedure.
15    
16 naota 1.7 inherit ruby-ng multilib versionator
17 graaff 1.1
18     IUSE=""
19    
20 graaff 1.4 # Define EPREFIX if needed
21     has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
22    
23 naota 1.7 subbinding=${PN#ruby-}
24     if [ $(get_version_component_range "1-2") == "0.19" ]; then
25     subbinding=${subbinding/%2}
26     else
27     subbinding=${subbinding/-/_}
28     fi
29 graaff 1.1 S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
30     SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
31     HOMEPAGE="http://ruby-gnome2.sourceforge.jp/"
32     LICENSE="Ruby"
33     SLOT="0"
34    
35     # @FUNCTION: each_ruby_configure
36     # @DESCRIPTION:
37     # Run the configure script in the subbinding for each specific ruby target.
38     each_ruby_configure() {
39     ${RUBY} extconf.rb || die "extconf.rb failed"
40     }
41    
42     # @FUNCTION: each_ruby_compile
43     # @DESCRIPTION:
44     # Compile the C bindings in the subbinding for each specific ruby target.
45     each_ruby_compile() {
46 flameeyes 1.2 # We have injected --no-undefined in Ruby as a safety precaution
47     # against broken ebuilds, but the Ruby-Gnome bindings
48     # unfortunately rely on the lazy load of other extensions; see bug
49     # #320545.
50     find . -name Makefile -print0 | xargs -0 \
51 naota 1.6 sed -i -e 's:-Wl,--no-undefined ::' \
52     -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \
53     || die "--no-undefined removal failed"
54 flameeyes 1.2
55 graaff 1.1 emake || die "emake failed"
56     }
57    
58     # @FUNCTION: each_ruby_install
59     # @DESCRIPTION:
60     # Install the files in the subbinding for each specific ruby target.
61     each_ruby_install() {
62     # Create the directories, or the package will create them as files.
63 graaff 1.5 local archdir=$(ruby_rbconfig_value "sitearchdir")
64 graaff 1.4 dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
65 graaff 1.1
66     emake DESTDIR="${D}" install || die "make install failed"
67     }
68    
69     # @FUNCTION: all_ruby_install
70     # @DESCRIPTION:
71     # Install the files common to all ruby targets.
72     all_ruby_install() {
73     for doc in ../AUTHORS ../NEWS ChangeLog README; do
74     [ -s "$doc" ] && dodoc $doc
75     done
76     if [[ -d sample ]]; then
77 flameeyes 1.2 insinto /usr/share/doc/${PF}
78     doins -r sample || die "sample install failed"
79 graaff 1.1 fi
80     }

  ViewVC Help
Powered by ViewVC 1.1.20