/[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.9 - (hide annotations) (download)
Sun Sep 18 02:06:04 2011 UTC (2 years, 10 months ago) by naota
Branch: MAIN
Changes since 1.8: +4 -1 lines
Add common dependencies

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

  ViewVC Help
Powered by ViewVC 1.1.20