/[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.10 - (hide annotations) (download)
Sun Sep 18 03:45:21 2011 UTC (3 years, 2 months ago) by naota
Branch: MAIN
Changes since 1.9: +10 -2 lines
Install gemspecs.

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 naota 1.10 # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.9 2011/09/18 02:06:04 naota Exp $
4 vapier 1.8
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.10 RUBY_FAKEGEM_NAME="${PN#ruby-}"
16     RUBY_FAKEGEM_TASK_TEST=""
17    
18     inherit ruby-fakegem multilib versionator
19 graaff 1.1
20     IUSE=""
21    
22 graaff 1.4 # Define EPREFIX if needed
23     has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
24    
25 naota 1.7 subbinding=${PN#ruby-}
26     if [ $(get_version_component_range "1-2") == "0.19" ]; then
27     subbinding=${subbinding/%2}
28     else
29     subbinding=${subbinding/-/_}
30     fi
31 graaff 1.1 S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
32     SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
33     HOMEPAGE="http://ruby-gnome2.sourceforge.jp/"
34     LICENSE="Ruby"
35     SLOT="0"
36    
37 naota 1.10 DEPEND="dev-util/pkgconfig"
38 naota 1.9 ruby_add_bdepend "dev-ruby/pkg-config
39     dev-ruby/rubygems"
40    
41 graaff 1.1 # @FUNCTION: each_ruby_configure
42     # @DESCRIPTION:
43     # Run the configure script in the subbinding for each specific ruby target.
44     each_ruby_configure() {
45     ${RUBY} extconf.rb || die "extconf.rb failed"
46     }
47    
48     # @FUNCTION: each_ruby_compile
49     # @DESCRIPTION:
50     # Compile the C bindings in the subbinding for each specific ruby target.
51     each_ruby_compile() {
52 flameeyes 1.2 # We have injected --no-undefined in Ruby as a safety precaution
53     # against broken ebuilds, but the Ruby-Gnome bindings
54     # unfortunately rely on the lazy load of other extensions; see bug
55     # #320545.
56     find . -name Makefile -print0 | xargs -0 \
57 naota 1.6 sed -i -e 's:-Wl,--no-undefined ::' \
58     -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \
59     || die "--no-undefined removal failed"
60 flameeyes 1.2
61 graaff 1.1 emake || die "emake failed"
62     }
63    
64     # @FUNCTION: each_ruby_install
65     # @DESCRIPTION:
66     # Install the files in the subbinding for each specific ruby target.
67     each_ruby_install() {
68     # Create the directories, or the package will create them as files.
69 graaff 1.5 local archdir=$(ruby_rbconfig_value "sitearchdir")
70 graaff 1.4 dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
71 graaff 1.1
72     emake DESTDIR="${D}" install || die "make install failed"
73 naota 1.10
74     each_fakegem_install
75 graaff 1.1 }
76    
77     # @FUNCTION: all_ruby_install
78     # @DESCRIPTION:
79     # Install the files common to all ruby targets.
80     all_ruby_install() {
81     for doc in ../AUTHORS ../NEWS ChangeLog README; do
82     [ -s "$doc" ] && dodoc $doc
83     done
84     if [[ -d sample ]]; then
85 flameeyes 1.2 insinto /usr/share/doc/${PF}
86     doins -r sample || die "sample install failed"
87 graaff 1.1 fi
88 naota 1.10
89     all_fakegem_install
90 graaff 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20