dev-ruby/rr: keyword ~arm64
[gentoo.git] / dev-ruby / fakeweb / fakeweb-1.3.0.20131201-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 USE_RUBY="ruby20 ruby21 ruby22 ruby23"
7
8 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
9 RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.rdoc"
10
11 COMMIT=48208f9bf053577befe5723746b6ff35b99b45d0
12
13 inherit ruby-fakegem
14
15 DESCRIPTION="Helper for faking web requests in Ruby"
16 HOMEPAGE="https://github.com/chrisk/fakeweb"
17 SRC_URI="https://github.com/chrisk/fakeweb/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
18 RUBY_S="${PN}-${COMMIT}"
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
23 IUSE=""
24
25 RUBY_PATCHES=( fakeweb-ruby22.patch
26         fakeweb-ruby23.patch )
27
28 ruby_add_bdepend "
29         test? (
30                 dev-ruby/mocha:0.14
31                 dev-ruby/test-unit
32         )"
33
34 all_ruby_prepare() {
35         # The package bundles samuel and right_http_connection, remove
36         # them
37         rm -r test/vendor || die "failed to remove bundled gems"
38
39         # We don't package sdoc and we don't have the direct template.
40         sed -i -e 's/sdoc/rdoc/' -e '/template/d' Rakefile || die
41
42         # Require an old enough version of mocha
43         sed -i -e '1igem "mocha", "~> 0.14.0"' test/test_helper.rb || die
44
45         # Use the test-unit gem to make jruby compatible with newer mocha.
46         sed -i -e '1igem "test-unit"' \
47                 -e '/bundler/I s:^:#:' \
48                 -e '/simplecov/ s:^:#:' test/test_helper.rb || die
49
50         # Avoid test dependencies on unmaintained packages that no longer work
51         rm test/test_other_net_http_libraries.rb || die
52
53         sed -i -e '/test:preflight/ s:^:#:' Rakefile || die
54 }