/[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 - (hide annotations) (download)
Mon Aug 22 04:46:32 2011 UTC (3 years 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 vapier 1.8 # Copyright 1999-2011 Gentoo Foundation
2 graaff 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.8 # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.7 2011/05/29 13:47:14 naota Exp $
4    
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     # @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 flameeyes 1.2 # 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 naota 1.6 sed -i -e 's:-Wl,--no-undefined ::' \
51     -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \
52     || die "--no-undefined removal failed"
53 flameeyes 1.2
54 graaff 1.1 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 graaff 1.5 local archdir=$(ruby_rbconfig_value "sitearchdir")
63 graaff 1.4 dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
64 graaff 1.1
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 flameeyes 1.2 insinto /usr/share/doc/${PF}
77     doins -r sample || die "sample install failed"
78 graaff 1.1 fi
79     }

  ViewVC Help
Powered by ViewVC 1.1.20