/[gentoo-x86]/eclass/ruby-ng-gnome2.eclass
Gentoo

Diff of /eclass/ruby-ng-gnome2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.9
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 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 $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng-gnome2.eclass,v 1.9 2011/09/18 02:06:04 naota Exp $
4# 4
5# @ECLASS: ruby-ng-gnome2.eclass 5# @ECLASS: ruby-ng-gnome2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# 8# @AUTHOR:
9# Author: Hans de Graaff <graaff@gentoo.org> 9# Author: Hans de Graaff <graaff@gentoo.org>
10# 10# @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
11# @BLURB: 11# @DESCRIPTION:
12# This eclass simplifies installation of the various pieces of 12# This eclass simplifies installation of the various pieces of
13# ruby-gnome2 since they share a very common installation procedure. 13# ruby-gnome2 since they share a very common installation procedure.
14 14
15inherit ruby-ng multilib 15inherit ruby-ng multilib versionator
16 16
17IUSE="" 17IUSE=""
18 18
19subbinding=${PN#ruby-} ; subbinding=${subbinding%2} 19# Define EPREFIX if needed
20has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
21
22subbinding=${PN#ruby-}
23if [ $(get_version_component_range "1-2") == "0.19" ]; then
24 subbinding=${subbinding/%2}
25else
26 subbinding=${subbinding/-/_}
27fi
20S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} 28S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
21SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" 29SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
22HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" 30HOMEPAGE="http://ruby-gnome2.sourceforge.jp/"
23LICENSE="Ruby" 31LICENSE="Ruby"
24SLOT="0" 32SLOT="0"
33
34ruby_add_bdepend "dev-ruby/pkg-config
35 dev-ruby/rubygems"
25 36
26# @FUNCTION: each_ruby_configure 37# @FUNCTION: each_ruby_configure
27# @DESCRIPTION: 38# @DESCRIPTION:
28# Run the configure script in the subbinding for each specific ruby target. 39# Run the configure script in the subbinding for each specific ruby target.
29each_ruby_configure() { 40each_ruby_configure() {
32 43
33# @FUNCTION: each_ruby_compile 44# @FUNCTION: each_ruby_compile
34# @DESCRIPTION: 45# @DESCRIPTION:
35# Compile the C bindings in the subbinding for each specific ruby target. 46# Compile the C bindings in the subbinding for each specific ruby target.
36each_ruby_compile() { 47each_ruby_compile() {
48 # We have injected --no-undefined in Ruby as a safety precaution
49 # against broken ebuilds, but the Ruby-Gnome bindings
50 # unfortunately rely on the lazy load of other extensions; see bug
51 # #320545.
52 find . -name Makefile -print0 | xargs -0 \
53 sed -i -e 's:-Wl,--no-undefined ::' \
54 -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \
55 || die "--no-undefined removal failed"
56
37 emake || die "emake failed" 57 emake || die "emake failed"
38} 58}
39 59
40# @FUNCTION: each_ruby_install 60# @FUNCTION: each_ruby_install
41# @DESCRIPTION: 61# @DESCRIPTION:
42# Install the files in the subbinding for each specific ruby target. 62# Install the files in the subbinding for each specific ruby target.
43each_ruby_install() { 63each_ruby_install() {
44 # Create the directories, or the package will create them as files. 64 # Create the directories, or the package will create them as files.
45 dodir $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]') /usr/$(get_libdir)/pkgconfig 65 local archdir=$(ruby_rbconfig_value "sitearchdir")
66 dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
46 67
47 emake DESTDIR="${D}" install || die "make install failed" 68 emake DESTDIR="${D}" install || die "make install failed"
48} 69}
49 70
50# @FUNCTION: all_ruby_install 71# @FUNCTION: all_ruby_install
53all_ruby_install() { 74all_ruby_install() {
54 for doc in ../AUTHORS ../NEWS ChangeLog README; do 75 for doc in ../AUTHORS ../NEWS ChangeLog README; do
55 [ -s "$doc" ] && dodoc $doc 76 [ -s "$doc" ] && dodoc $doc
56 done 77 done
57 if [[ -d sample ]]; then 78 if [[ -d sample ]]; then
58 dodir /usr/share/doc/${PF} 79 insinto /usr/share/doc/${PF}
59 cp -a sample "${D}"/usr/share/doc/${PF} || die "cp failed" 80 doins -r sample || die "sample install failed"
60 fi 81 fi
61} 82}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20