dev-ruby/ruby-net-ldap: add 0.14.0
[gentoo.git] / dev-ruby / rbpdf / rbpdf-1.19.0.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 # ruby22 support waiting on dev-ruby/action{pack,view}.
8 USE_RUBY="ruby20 ruby21"
9
10 # Avoid the complexity of the "rake" recipe and run the tests manually.
11 RUBY_FAKEGEM_RECIPE_TEST=none
12
13 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
14 RUBY_FAKEGEM_EXTRADOC="README.md"
15
16 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
17
18 inherit ruby-fakegem
19
20 DESCRIPTION="Ruby on Rails RBPDF plugin"
21 HOMEPAGE="https://github.com/naitoh/rbpdf"
22
23 LICENSE="LGPL-2.1+"
24 SLOT="0"
25 KEYWORDS="~amd64 ~x86"
26 IUSE="test"
27
28 ruby_add_bdepend "test? ( >=dev-ruby/test-unit-3 )"
29 ruby_add_rdepend "dev-ruby/actionview:*
30         dev-ruby/htmlentities
31         dev-ruby/rbpdf-font"
32
33 all_ruby_prepare() {
34         default
35
36         # This test is enabled automagically in the presence of rmagick, and
37         # then fails.
38         rm -f test/rbpdf_image_rmagick_test.rb \
39                 || die "failed to remove rmagick tests"
40
41         # Loosen very restrictive htmlentities dependency
42         sed -i -e '/htmlentities/ s/=/>=/' ${RUBY_FAKEGEM_GEMSPEC} || die
43 }
44
45 each_ruby_test() {
46         local cmd='gem "test-unit", ">= 3.0"'
47         cmd+=' and '
48         cmd+='require "test/unit"'
49         cmd+=' and '
50         cmd+='Dir["test/rbpdf_*.rb"].each{|f| require("./" +  f)}'
51         ${RUBY} -Ilib:.:test -e "${cmd}" || die "test suite failed"
52 }