1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby23 ruby24 ruby25 ruby26"
8 RUBY_FAKEGEM_NAME="cairo"
10 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
12 RUBY_FAKEGEM_TASK_TEST=""
14 RUBY_FAKEGEM_DOCDIR="doc"
16 RUBY_FAKEGEM_EXTRADOC="AUTHORS NEWS"
18 inherit multilib ruby-fakegem
20 DESCRIPTION="Ruby bindings for cairo"
21 HOMEPAGE="https://cairographics.org/rcairo/"
26 LICENSE="|| ( Ruby GPL-2 )"
27 KEYWORDS="amd64 ~ppc ~x86"
30 >=x11-libs/cairo-1.2.0[svg]"
32 >=x11-libs/cairo-1.2.0[svg]"
35 >=dev-ruby/pkg-config-1.2.2
37 test? ( >=dev-ruby/test-unit-2.1.0-r1:2 dev-ruby/ruby-poppler )"
40 # Avoid unneeded dependency
41 sed -i -e '/native-package-installer/ s:^:#:' ext/cairo/extconf.rb || die
42 sed -i -e '/native-package-installer/,/Gem::Dependency/ d' ../metadata || die
44 # Avoid test that requires unpackaged fixture
45 sed -i -e '/sub_test_case..FreeTypeFontFace/,/^ end/ s:^:#:' test/test_font_face.rb || die
48 each_ruby_configure() {
49 ${RUBY} -Cext/cairo extconf.rb || die "extconf failed"
55 # again, try to make it more standard, to install it more easily.
56 cp ext/cairo/cairo$(get_modname) lib/ || die
60 # don't rely on the Rakefile because it's a mess to load with
61 # their hierarchy, do it manually.
62 ${RUBY} -Ilib -r ./test/helper \
63 -e 'gem "test-unit"; require "test/unit"; Dir.glob("test/**/test_*.rb") {|f| load f}' || die "tests failed"
69 insinto $(ruby_get_hdrdir)
70 doins ext/cairo/rb_cairo.h
76 insinto /usr/share/doc/${PF}/samples