/[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.2 - (show annotations) (download)
Fri May 21 16:54:25 2010 UTC (4 years, 3 months ago) by flameeyes
Branch: MAIN
Changes since 1.1: +10 -3 lines
Solve bug #320545 in the least hacky way: disable --no-undefined for
the Ruby-Gnome2 bindings. Unfortunately they rely on a
partially-undefined behaviour, let's just hope they'll never come
giving us trouble for this.

Also avoid using cp -a (non-portable) for installing samples, use
insinto/doins instead.

1 # Copyright 1999-2010 Gentoo Foundation
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.1 2010/01/13 18:33:32 graaff Exp $
4 #
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 # @BLURB:
12 # This eclass simplifies installation of the various pieces of
13 # ruby-gnome2 since they share a very common installation procedure.
14
15 inherit ruby-ng multilib
16
17 IUSE=""
18
19 subbinding=${PN#ruby-} ; subbinding=${subbinding%2}
20 S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
21 SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
22 HOMEPAGE="http://ruby-gnome2.sourceforge.jp/"
23 LICENSE="Ruby"
24 SLOT="0"
25
26 # @FUNCTION: each_ruby_configure
27 # @DESCRIPTION:
28 # Run the configure script in the subbinding for each specific ruby target.
29 each_ruby_configure() {
30 ${RUBY} extconf.rb || die "extconf.rb failed"
31 }
32
33 # @FUNCTION: each_ruby_compile
34 # @DESCRIPTION:
35 # Compile the C bindings in the subbinding for each specific ruby target.
36 each_ruby_compile() {
37 # We have injected --no-undefined in Ruby as a safety precaution
38 # against broken ebuilds, but the Ruby-Gnome bindings
39 # unfortunately rely on the lazy load of other extensions; see bug
40 # #320545.
41 find . -name Makefile -print0 | xargs -0 \
42 sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed"
43
44 emake || die "emake failed"
45 }
46
47 # @FUNCTION: each_ruby_install
48 # @DESCRIPTION:
49 # Install the files in the subbinding for each specific ruby target.
50 each_ruby_install() {
51 # 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
53
54 emake DESTDIR="${D}" install || die "make install failed"
55 }
56
57 # @FUNCTION: all_ruby_install
58 # @DESCRIPTION:
59 # Install the files common to all ruby targets.
60 all_ruby_install() {
61 for doc in ../AUTHORS ../NEWS ChangeLog README; do
62 [ -s "$doc" ] && dodoc $doc
63 done
64 if [[ -d sample ]]; then
65 insinto /usr/share/doc/${PF}
66 doins -r sample || die "sample install failed"
67 fi
68 }

  ViewVC Help
Powered by ViewVC 1.1.20