| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rcairo/rcairo-1.10.2-r1.ebuild,v 1.4 2012/08/17 13:02:53 johu Exp $
|
| 4 |
|
| 5 |
EAPI=2
|
| 6 |
|
| 7 |
# jruby → cannot work, it's a compiled extension
|
| 8 |
USE_RUBY="ruby18 ree18 ruby19"
|
| 9 |
|
| 10 |
RUBY_FAKEGEM_NAME="cairo"
|
| 11 |
|
| 12 |
# Documentation depends on files that are not distributed.
|
| 13 |
RUBY_FAKEGEM_TASK_DOC=""
|
| 14 |
|
| 15 |
# Depends on test-unit-2 which is currently masked.
|
| 16 |
RUBY_FAKEGEM_TASK_TEST=""
|
| 17 |
|
| 18 |
RUBY_FAKEGEM_DOCDIR="doc"
|
| 19 |
|
| 20 |
RUBY_FAKEGEM_EXTRADOC="AUTHORS NEWS"
|
| 21 |
|
| 22 |
inherit multilib ruby-fakegem
|
| 23 |
|
| 24 |
DESCRIPTION="Ruby bindings for cairo"
|
| 25 |
HOMEPAGE="http://cairographics.org/rcairo/"
|
| 26 |
|
| 27 |
IUSE=""
|
| 28 |
|
| 29 |
SLOT="0"
|
| 30 |
LICENSE="|| ( Ruby GPL-2 )"
|
| 31 |
KEYWORDS="amd64 ppc x86"
|
| 32 |
|
| 33 |
RDEPEND="${RDEPEND}
|
| 34 |
>=x11-libs/cairo-1.2.0[svg]"
|
| 35 |
DEPEND="${DEPEND}
|
| 36 |
>=x11-libs/cairo-1.2.0[svg]"
|
| 37 |
|
| 38 |
ruby_add_bdepend "
|
| 39 |
dev-ruby/pkg-config
|
| 40 |
dev-ruby/ruby-glib2
|
| 41 |
test? ( >=dev-ruby/test-unit-2.1.0-r1:2 )"
|
| 42 |
|
| 43 |
each_ruby_configure() {
|
| 44 |
${RUBY} -Cext/cairo extconf.rb || die "extconf failed"
|
| 45 |
}
|
| 46 |
|
| 47 |
each_ruby_compile() {
|
| 48 |
emake -Cext/cairo || die "make failed"
|
| 49 |
|
| 50 |
# again, try to make it more standard, to install it more easily.
|
| 51 |
cp ext/cairo/cairo$(get_modname) lib/ || die
|
| 52 |
}
|
| 53 |
|
| 54 |
each_ruby_test() {
|
| 55 |
# don't rely on the Rakefile because it's a mess to load with
|
| 56 |
# their hierarchy, do it manually.
|
| 57 |
${RUBY} -Ilib -r ./test/cairo-test-utils.rb \
|
| 58 |
-e 'gem "test-unit"; require "test/unit"; Dir.glob("test/**/test_*.rb") {|f| load f}' || die "tests failed"
|
| 59 |
}
|
| 60 |
|
| 61 |
each_ruby_install() {
|
| 62 |
each_fakegem_install
|
| 63 |
|
| 64 |
insinto $(ruby_get_hdrdir)
|
| 65 |
doins ext/cairo/rb_cairo.h || die "Cannot install header file."
|
| 66 |
}
|
| 67 |
|
| 68 |
all_ruby_install() {
|
| 69 |
all_fakegem_install
|
| 70 |
|
| 71 |
insinto /usr/share/doc/${PF}/samples
|
| 72 |
doins -r samples/* || die "Cannot install sample files."
|
| 73 |
}
|