/[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.6 - (hide annotations) (download)
Sun May 29 13:43:16 2011 UTC (3 years, 1 month ago) by naota
Branch: MAIN
Changes since 1.5: +4 -2 lines
Ensure LDFLAGS usage

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

  ViewVC Help
Powered by ViewVC 1.1.20