1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby23 ruby24 ruby25"
8 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
9 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
10 RUBY_FAKEGEM_EXTRADOC="README.md"
12 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
14 RUBY_FAKEGEM_BINWRAP=""
16 inherit ruby-fakegem eutils
18 DESCRIPTION="Manipulate images with minimal use of memory"
19 HOMEPAGE="https://github.com/minimagick/minimagick"
20 SRC_URI="https://github.com/minimagick/minimagick/archive/v${PV}.tar.gz -> ${P}.tar.gz"
21 RUBY_S="minimagick-${PV}"
25 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
28 # It's only used at runtime in this case because this extension only
29 # _calls_ the commands. But when we run tests we're going to need tiff
30 # and jpeg support at a minimum.
31 RDEPEND+=" media-gfx/imagemagick"
32 DEPEND+=" test? ( virtual/imagemagick-tools[jpeg,png,tiff] )"
34 USE_RUBY="ruby23 ruby24" ruby_add_bdepend "test? ( dev-ruby/mocha dev-ruby/posix-spawn dev-ruby/webmock )"
37 # remove executable bit from all files
38 find "${S}" -type f -exec chmod -x {} +
40 sed -i -e '/\([Bb]undler\|pry\)/ s:^:#:' spec/spec_helper.rb || die
42 # Don't force a specific formatter but use overall Gentoo defaults.
43 sed -i -e '/config.formatter/d' spec/spec_helper.rb || die
45 # Avoid broken spec that does not assume . in path name
46 sed -i -e '/reformats a layer/,/end/ s:^:#:' spec/lib/mini_magick/image_spec.rb || die
48 # Avoid failing spec that also fails in upstream Travis
49 sed -i -e '/returns a hash of verbose information/,/^ end/ s:^:#:' spec/lib/mini_magick/image_spec.rb || die
51 # Make spec more lenient to imagemagick quoting
52 sed -i -e "/unable to open image/ s/'foo'/.foo./" spec/lib/mini_magick/shell_spec.rb || die
54 # Avoid graphicsmagick tests because installing both in parallel for
56 sed -i -e 's/:graphicsmagick//' spec/spec_helper.rb || die
57 sed -i -e '/identifies when gm exists/,/^ end/ s:^:#:' spec/lib/mini_magick/utilities_spec.rb || die
58 sed -i -e '/returns GraphicsMagick/,/^ end/ s:^:#:' spec/lib/mini_magick_spec.rb || die
67 einfo "Skipping tests due to circular dependencies with Rails"