| 1 |
# Copyright 1999-2010 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.2 2010/05/21 16:54:25 flameeyes Exp $
|
| 4 |
#
|
| 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 |
# @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
|
| 12 |
# @DESCRIPTION:
|
| 13 |
# 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 |
subbinding=${PN#ruby-} ; subbinding=${subbinding%2}
|
| 21 |
S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding}
|
| 22 |
SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz"
|
| 23 |
HOMEPAGE="http://ruby-gnome2.sourceforge.jp/"
|
| 24 |
LICENSE="Ruby"
|
| 25 |
SLOT="0"
|
| 26 |
|
| 27 |
# @FUNCTION: each_ruby_configure
|
| 28 |
# @DESCRIPTION:
|
| 29 |
# Run the configure script in the subbinding for each specific ruby target.
|
| 30 |
each_ruby_configure() {
|
| 31 |
${RUBY} extconf.rb || die "extconf.rb failed"
|
| 32 |
}
|
| 33 |
|
| 34 |
# @FUNCTION: each_ruby_compile
|
| 35 |
# @DESCRIPTION:
|
| 36 |
# Compile the C bindings in the subbinding for each specific ruby target.
|
| 37 |
each_ruby_compile() {
|
| 38 |
# We have injected --no-undefined in Ruby as a safety precaution
|
| 39 |
# against broken ebuilds, but the Ruby-Gnome bindings
|
| 40 |
# unfortunately rely on the lazy load of other extensions; see bug
|
| 41 |
# #320545.
|
| 42 |
find . -name Makefile -print0 | xargs -0 \
|
| 43 |
sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed"
|
| 44 |
|
| 45 |
emake || die "emake failed"
|
| 46 |
}
|
| 47 |
|
| 48 |
# @FUNCTION: each_ruby_install
|
| 49 |
# @DESCRIPTION:
|
| 50 |
# Install the files in the subbinding for each specific ruby target.
|
| 51 |
each_ruby_install() {
|
| 52 |
# Create the directories, or the package will create them as files.
|
| 53 |
dodir $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]') /usr/$(get_libdir)/pkgconfig
|
| 54 |
|
| 55 |
emake DESTDIR="${D}" install || die "make install failed"
|
| 56 |
}
|
| 57 |
|
| 58 |
# @FUNCTION: all_ruby_install
|
| 59 |
# @DESCRIPTION:
|
| 60 |
# Install the files common to all ruby targets.
|
| 61 |
all_ruby_install() {
|
| 62 |
for doc in ../AUTHORS ../NEWS ChangeLog README; do
|
| 63 |
[ -s "$doc" ] && dodoc $doc
|
| 64 |
done
|
| 65 |
if [[ -d sample ]]; then
|
| 66 |
insinto /usr/share/doc/${PF}
|
| 67 |
doins -r sample || die "sample install failed"
|
| 68 |
fi
|
| 69 |
}
|