dev-util/cucumber: remove unused patch.
[gentoo.git] / dev-util / cucumber / cucumber-1.3.19.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 USE_RUBY="ruby20 ruby21"
7
8 # Documentation task depends on sdoc which we currently don't have.
9 RUBY_FAKEGEM_TASK_DOC=""
10 RUBY_FAKEGEM_TASK_TEST="none"
11 RUBY_FAKEGEM_EXTRADOC="History.md README.md"
12
13 RUBY_FAKEGEM_GEMSPEC="cucumber.gemspec"
14
15 inherit ruby-fakegem
16
17 DESCRIPTION="Executable feature scenarios"
18 HOMEPAGE="https://github.com/aslakhellesoy/cucumber/wikis"
19 LICENSE="Ruby"
20
21 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
22 SLOT="0"
23 IUSE="examples test"
24
25 ruby_add_bdepend "
26         test? (
27                 >=dev-ruby/rspec-2.13.0
28                 >=dev-ruby/nokogiri-1.5.2
29                 >=dev-ruby/syntax-1.0.0
30                 >=dev-util/aruba-0.5.2
31                 >=dev-ruby/json-1.7
32                 dev-ruby/bundler
33                 >=dev-util/cucumber-1.3
34                 dev-ruby/rubyzip:0
35         )"
36
37 ruby_add_rdepend "
38         >=dev-ruby/builder-2.1.2
39         >=dev-ruby/diff-lcs-1.1.3
40         >=dev-ruby/gherkin-2.12.0:0
41         >=dev-ruby/multi_json-1.7.5
42         >=dev-ruby/multi_test-0.1.2
43 "
44
45 all_ruby_prepare() {
46         # Remove development dependencies from the gemspec that we don't
47         # need or can't satisfy.
48         sed -i -e '/\(spork\|simplecov\|bcat\|kramdown\|yard\|capybara\|rack-test\|ramaze\|sinatra\|webrat\|mime-types\|rubyzip\)/d' ${RUBY_FAKEGEM_GEMSPEC} || die
49
50         # Fix too-strict test dependencies
51         sed -e '/nokogiri/ s/~> 1.5.2/>= 1.5.2/' \
52                 -e '/aruba/ s/= 0.5.2/~> 0.5/' \
53                 -e '/rake/ s/10.2/10.5/' -i ${RUBY_FAKEGEM_GEMSPEC} || die
54
55         # Make sure spork is run in the right interpreter
56         sed -i -e 's/#{Spork::BINARY}/-S #{Spork::BINARY}/' features/support/env.rb || die
57         rm features/drb_server_integration.feature || die
58
59         # Avoid json, they most likely fail due to multi_json weirdness.
60         rm features/json_formatter.feature || die
61         # Avoid features that break with newer rspec versions.
62         sed -i -e '369,398d' features/background.feature || die
63
64         # Avoid dependency on git
65         sed -i -e '/git ls-files/d' cucumber.gemspec || die
66 }
67
68 each_ruby_test() {
69         ruby-ng_rspec
70         RUBYLIB=lib ${RUBY} -Ilib bin/cucumber features || die "Features failed"
71 }
72
73 all_ruby_install() {
74         all_fakegem_install
75
76         if use examples; then
77                 cp -pPR examples "${D}/usr/share/doc/${PF}" || die "Failed installing example files."
78         fi
79 }