dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-ruby / gruff / gruff-0.7.0-r2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 USE_RUBY="ruby24 ruby25 ruby26"
6
7 RUBY_FAKEGEM_TASK_DOC=""
8
9 RUBY_FAKEGEM_DOCDIR="doc"
10 RUBY_FAKEGEM_EXTRADOC="History.txt Manifest.txt README.md RELEASE.md"
11
12 RUBY_FAKEGEM_EXTRAINSTALL="assets rails_generators"
13
14 RUBY_FAKEGEM_GEMSPEC="gruff.gemspec"
15
16 inherit ruby-fakegem
17
18 DESCRIPTION="Beautiful graphs for one or multiple datasets"
19 HOMEPAGE="https://github.com/topfunky/gruff"
20
21 LICENSE="MIT"
22 SLOT="0"
23 KEYWORDS="amd64 x86 ~x86-macos"
24 IUSE=""
25
26 # imagemagick is an indirect dependency through rmagick. However, for
27 # gruff to work properly imagemagick needs to be compiled with truetype
28 # support and this cannot be expressed in the rmagick dependency. Tests
29 # also require imagemagick to have jpeg and png support.
30 DEPEND="${DEPEND} test? ( media-gfx/imagemagick[jpeg,png,truetype,webp] )"
31 RDEPEND="${RDEPEND} media-gfx/imagemagick[truetype]"
32
33 ruby_add_rdepend ">=dev-ruby/rmagick-2.13.4:*"
34 ruby_add_bdepend "
35         test? (
36                 dev-ruby/test-unit
37         )"
38
39 all_ruby_prepare() {
40         sed -i -e '/reporters/I s:^:#:' test/gruff_test_case.rb || die
41         sed -i -e '2irequire "date"' test/test_scatter.rb || die
42
43         # Relax rmagick dependency since 3.x is API compatible
44         sed -e "/rmagick/ s/'~> 2.13',//" \
45                 -e 's/git ls-files/find . -print/' \
46                 -i ${RUBY_FAKEGEM_GEMSPEC} || die
47 }
48
49 each_ruby_test() {
50         ${RUBY} -Ilib:. -e "Dir['test/test_*.rb'].each{|f| require f}" || die
51 }