/[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.8 - (show annotations) (download)
Mon Aug 22 04:46:32 2011 UTC (3 years, 4 months ago) by vapier
Branch: MAIN
Changes since 1.7: +4 -5 lines
fix random bugs in eclass documentation, and convert to new @AUTHOR tag

1 # Copyright 1999-2011 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.7 2011/05/29 13:47:14 naota Exp $
4
5 # @ECLASS: ruby-ng-gnome2.eclass
6 # @MAINTAINER:
7 # Ruby herd <ruby@gentoo.org>
8 # @AUTHOR:
9 # Author: Hans de Graaff <graaff@gentoo.org>
10 # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
11 # @DESCRIPTION:
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 versionator
16
17 IUSE=""
18
19 # Define EPREFIX if needed
20 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
21
22 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 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 # @FUNCTION: each_ruby_configure
35 # @DESCRIPTION:
36 # Run the configure script in the subbinding for each specific ruby target.
37 each_ruby_configure() {
38 ${RUBY} extconf.rb || die "extconf.rb failed"
39 }
40
41 # @FUNCTION: each_ruby_compile
42 # @DESCRIPTION:
43 # Compile the C bindings in the subbinding for each specific ruby target.
44 each_ruby_compile() {
45 # We have injected --no-undefined in Ruby as a safety precaution
46 # against broken ebuilds, but the Ruby-Gnome bindings
47 # unfortunately rely on the lazy load of other extensions; see bug
48 # #320545.
49 find . -name Makefile -print0 | xargs -0 \
50 sed -i -e 's:-Wl,--no-undefined ::' \
51 -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \
52 || die "--no-undefined removal failed"
53
54 emake || die "emake failed"
55 }
56
57 # @FUNCTION: each_ruby_install
58 # @DESCRIPTION:
59 # Install the files in the subbinding for each specific ruby target.
60 each_ruby_install() {
61 # Create the directories, or the package will create them as files.
62 local archdir=$(ruby_rbconfig_value "sitearchdir")
63 dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
64
65 emake DESTDIR="${D}" install || die "make install failed"
66 }
67
68 # @FUNCTION: all_ruby_install
69 # @DESCRIPTION:
70 # Install the files common to all ruby targets.
71 all_ruby_install() {
72 for doc in ../AUTHORS ../NEWS ChangeLog README; do
73 [ -s "$doc" ] && dodoc $doc
74 done
75 if [[ -d sample ]]; then
76 insinto /usr/share/doc/${PF}
77 doins -r sample || die "sample install failed"
78 fi
79 }

  ViewVC Help
Powered by ViewVC 1.1.20