/[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.5 - (hide annotations) (download)
Wed Dec 15 12:38:47 2010 UTC (3 years, 6 months ago) by graaff
Branch: MAIN
Changes since 1.4: +2 -2 lines
Use a subshell to properly catch the echo.

1 graaff 1.1 # Copyright 1999-2010 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 graaff 1.5 # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.4 2010/12/15 12:36:46 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     sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed"
47    
48 graaff 1.1 emake || die "emake failed"
49     }
50    
51     # @FUNCTION: each_ruby_install
52     # @DESCRIPTION:
53     # Install the files in the subbinding for each specific ruby target.
54     each_ruby_install() {
55     # Create the directories, or the package will create them as files.
56 graaff 1.5 local archdir=$(ruby_rbconfig_value "sitearchdir")
57 graaff 1.4 dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
58 graaff 1.1
59     emake DESTDIR="${D}" install || die "make install failed"
60     }
61    
62     # @FUNCTION: all_ruby_install
63     # @DESCRIPTION:
64     # Install the files common to all ruby targets.
65     all_ruby_install() {
66     for doc in ../AUTHORS ../NEWS ChangeLog README; do
67     [ -s "$doc" ] && dodoc $doc
68     done
69     if [[ -d sample ]]; then
70 flameeyes 1.2 insinto /usr/share/doc/${PF}
71     doins -r sample || die "sample install failed"
72 graaff 1.1 fi
73     }

  ViewVC Help
Powered by ViewVC 1.1.20