/[gentoo-x86]/dev-ruby/rcairo/rcairo-1.10.0-r3.ebuild
Gentoo

Contents of /dev-ruby/rcairo/rcairo-1.10.0-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jul 1 18:31:41 2012 UTC (2 years ago) by armin76
Branch: MAIN
Changes since 1.3: +2 -2 lines
drop alpha keywords

(Portage version: 2.1.10.53/cvs/Linux ia64)

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.0-r3.ebuild,v 1.3 2012/05/04 18:47:55 jdhore Exp $
4
5 EAPI=2
6
7 # ruby19 → fails, and even crashes Ruby
8 # jruby → cannot work, it's a compiled extension
9 USE_RUBY="ruby18"
10
11 RUBY_FAKEGEM_NAME="cairo"
12
13 # Documentation depends on files that are not distributed.
14 RUBY_FAKEGEM_TASK_DOC=""
15
16 # Depends on test-unit-2 which is currently masked.
17 RUBY_FAKEGEM_TASK_TEST=""
18
19 RUBY_FAKEGEM_DOCDIR="doc"
20
21 RUBY_FAKEGEM_EXTRADOC="AUTHORS NEWS"
22
23 inherit multilib ruby-fakegem
24
25 DESCRIPTION="Ruby bindings for cairo"
26 HOMEPAGE="http://cairographics.org/rcairo/"
27
28 IUSE=""
29
30 SLOT="0"
31 LICENSE="|| ( Ruby GPL-2 )"
32 KEYWORDS="amd64 ppc x86"
33
34 RDEPEND="${RDEPEND}
35 >=x11-libs/cairo-1.2.0[svg]"
36 DEPEND="${DEPEND}
37 >=x11-libs/cairo-1.2.0[svg]
38 virtual/pkgconfig"
39
40 ruby_add_bdepend "
41 dev-ruby/ruby-glib2
42 test? ( >=dev-ruby/test-unit-2.1.0-r1:2 )"
43
44 all_ruby_prepare() {
45 # Remove a failing test for the new recording surface. It's not
46 # clear if this is a test failure or not, but we need to move on
47 # with cairo 1.10.
48 rm test/test_recording_surface.rb || die
49
50 # We don't need pkg-config since we compile directly so remove
51 # metadata because otherwise rubygems or bundler may get confused.
52 rm ../metadata || die
53 }
54
55 each_ruby_configure() {
56 ${RUBY} extconf.rb || die "extconf failed"
57 }
58
59 each_ruby_compile() {
60 emake || die "make failed"
61
62 # again, try to make it more standard, to install it more easily.
63 cp ext/cairo/cairo$(get_modname) lib/ || die
64 }
65
66 each_ruby_test() {
67 # don't rely on the Rakefile because it's a mess to load with
68 # their hierarchy, do it manually.
69 ${RUBY} -Ilib -r ./test/cairo-test-utils.rb \
70 -e 'gem "test-unit"; require "test/unit"; Dir.glob("test/**/test_*.rb") {|f| load f}' || die "tests failed"
71 }
72
73 each_ruby_install() {
74 each_fakegem_install
75
76 insinto $(ruby_get_hdrdir)
77 doins ext/cairo/rb_cairo.h || die "Cannot install header file."
78 }
79
80 all_ruby_install() {
81 all_fakegem_install
82
83 insinto /usr/share/doc/${PF}/samples
84 doins -r samples/* || die "Cannot install sample files."
85 }

  ViewVC Help
Powered by ViewVC 1.1.20