]> Pileus Git - ~andy/sunrise/blob - dev-ruby/rjb/rjb-1.3.4.ebuild
app-misc/qbrew: Fix qt deps, EAPI bump
[~andy/sunrise] / dev-ruby / rjb / rjb-1.3.4.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6
7 USE_RUBY="ruby18 ruby19"
8
9 RUBY_FAKEGEM_EXTRADOC="readme.txt ChangeLog"
10 RUBY_FAKEGEM_TASK_DOC=""
11 RUBY_FAKEGEM_TASK_TEST=""
12
13 inherit java-pkg-2 ruby-ng ruby-fakegem
14
15 DESCRIPTION="Rjb is a Ruby-Java software bridge"
16 HOMEPAGE="http://rjb.rubyforge.org/"
17
18 LICENSE="LGPL-2.1"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="examples"
22
23 DEPEND=">=virtual/jdk-1.5"
24 RDEPEND=">=virtual/jre-1.5"
25
26 pkg_setup() {
27         ruby-ng_pkg_setup
28         java-pkg-2_pkg_setup
29 }
30
31 each_ruby_prepare() {
32         # force compilation of class file for our JVM
33         rm -rf data
34 }
35
36 each_ruby_configure() {
37         ${RUBY} -C ext extconf.rb || die "extconf.rb failed"
38 }
39
40 each_ruby_compile() {
41         emake -C ext CFLAGS="${CFLAGS} -fPIC" archflags="${LDFLAGS}" || die "emake failed"
42 }
43
44 each_ruby_install() {
45         each_fakegem_install
46
47         # currently no elegant way to do this (bug #352765)
48         ruby_fakegem_newins ext/rjbcore.so lib/rjbcore.so
49
50         ruby_fakegem_doins -r data
51
52         if use examples; then
53                 insinto /usr/share/doc/${PF}
54                 doins -r samples || die "installing samples failed"
55         fi
56 }