Merge remote-tracking branch 'github/pr/674'.
[gentoo.git] / dev-ruby / mini_magick / mini_magick-4.3.3.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 USE_RUBY="ruby19 ruby20 ruby21 ruby22"
8
9 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
10 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
11 RUBY_FAKEGEM_EXTRADOC="README.md"
12
13 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
14
15 RUBY_FAKEGEM_BINWRAP=""
16
17 inherit ruby-fakegem eutils
18
19 DESCRIPTION="Manipulate images with minimal use of memory"
20 HOMEPAGE="https://github.com/minimagick/minimagick"
21 SRC_URI="https://github.com/minimagick/minimagick/archive/v${PV}.tar.gz -> ${P}.tar.gz"
22 RUBY_S="minimagick-${PV}"
23
24 LICENSE="MIT"
25 SLOT="0"
26 KEYWORDS="~amd64"
27 IUSE=""
28
29 # It's only used at runtime in this case because this extension only
30 # _calls_ the commands. But when we run tests we're going to need tiff
31 # and jpeg support at a minimum.
32 RDEPEND+=" media-gfx/imagemagick"
33 DEPEND+=" test? ( media-gfx/imagemagick[tiff,jpeg,png] >=media-gfx/graphicsmagick-1.3.20[tiff,jpeg,png] )"
34
35 ruby_add_bdepend "test? ( dev-ruby/mocha dev-ruby/posix-spawn )"
36
37 all_ruby_prepare() {
38         # remove executable bit from all files
39         find "${S}" -type f -exec chmod -x {} +
40
41         sed -i -e '/\([Bb]undler\|pry\)/ s:^:#:' spec/spec_helper.rb || die
42
43         # Don't force a specific formatter but use overall Gentoo defaults.
44         sed -i -e '/config.formatter/d' spec/spec_helper.rb || die
45 }