Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rcairo/
Date: Sun, 30 Jul 2017 07:00:35
Message-Id: 1501397765.c63154253d9b64a95c1f675538793d2b48b40d1e.graaff@gentoo
1 commit: c63154253d9b64a95c1f675538793d2b48b40d1e
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 30 06:38:42 2017 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 30 06:56:05 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6315425
7
8 dev-ruby/rcairo: avoid dependency on unpackaged gem, bug 626518
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 dev-ruby/rcairo/rcairo-1.15.9-r1.ebuild | 81 +++++++++++++++++++++++++++++++++
13 1 file changed, 81 insertions(+)
14
15 diff --git a/dev-ruby/rcairo/rcairo-1.15.9-r1.ebuild b/dev-ruby/rcairo/rcairo-1.15.9-r1.ebuild
16 new file mode 100644
17 index 00000000000..8a16b08ca4d
18 --- /dev/null
19 +++ b/dev-ruby/rcairo/rcairo-1.15.9-r1.ebuild
20 @@ -0,0 +1,81 @@
21 +# Copyright 1999-2017 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +
26 +USE_RUBY="ruby21 ruby22 ruby23 ruby24"
27 +
28 +RUBY_FAKEGEM_NAME="cairo"
29 +
30 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
31 +
32 +RUBY_FAKEGEM_TASK_TEST=""
33 +
34 +RUBY_FAKEGEM_DOCDIR="doc"
35 +
36 +RUBY_FAKEGEM_EXTRADOC="AUTHORS NEWS"
37 +
38 +inherit multilib ruby-fakegem
39 +
40 +DESCRIPTION="Ruby bindings for cairo"
41 +HOMEPAGE="https://cairographics.org/rcairo/"
42 +
43 +IUSE=""
44 +
45 +SLOT="0"
46 +LICENSE="|| ( Ruby GPL-2 )"
47 +KEYWORDS="~amd64 ~ppc ~x86"
48 +
49 +RDEPEND="${RDEPEND}
50 + >=x11-libs/cairo-1.2.0[svg]"
51 +DEPEND="${DEPEND}
52 + >=x11-libs/cairo-1.2.0[svg]"
53 +
54 +ruby_add_bdepend "
55 + >=dev-ruby/pkg-config-1.1.5
56 + dev-ruby/ruby-glib2
57 + test? ( >=dev-ruby/test-unit-2.1.0-r1:2 )"
58 +
59 +all_ruby_prepare() {
60 + # Avoid development dependency.
61 + sed -i -e '/notify/ s:^:#:' test/cairo-test-utils.rb || die
62 +
63 + # Avoid unneeded dependency
64 + sed -i -e '/native-package-installer/ s:^:#:' ext/cairo/extconf.rb || die
65 + sed -i -e '/native-package-installer/,/Gem::Dependency/ d' ../metadata || die
66 +
67 + # Avoid test that requires unpackaged fixture
68 + sed -i -e '/sub_test_case..FreeTypeFontFace/,/^ end/ s:^:#:' test/test_font_face.rb || die
69 +}
70 +
71 +each_ruby_configure() {
72 + ${RUBY} -Cext/cairo extconf.rb || die "extconf failed"
73 +}
74 +
75 +each_ruby_compile() {
76 + emake V=1 -Cext/cairo
77 +
78 + # again, try to make it more standard, to install it more easily.
79 + cp ext/cairo/cairo$(get_modname) lib/ || die
80 +}
81 +
82 +each_ruby_test() {
83 + # don't rely on the Rakefile because it's a mess to load with
84 + # their hierarchy, do it manually.
85 + ${RUBY} -Ilib -r ./test/cairo-test-utils.rb \
86 + -e 'gem "test-unit"; require "test/unit"; Dir.glob("test/**/test_*.rb") {|f| load f}' || die "tests failed"
87 +}
88 +
89 +each_ruby_install() {
90 + each_fakegem_install
91 +
92 + insinto $(ruby_get_hdrdir)
93 + doins ext/cairo/rb_cairo.h
94 +}
95 +
96 +all_ruby_install() {
97 + all_fakegem_install
98 +
99 + insinto /usr/share/doc/${PF}/samples
100 + doins -r samples/*
101 +}