1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 USE_RUBY="ruby20 ruby21 ruby22"
7 # Documentation task depends on sdoc which we currently don't have.
8 RUBY_FAKEGEM_TASK_DOC=""
9 RUBY_FAKEGEM_TASK_TEST="none"
10 RUBY_FAKEGEM_EXTRADOC="History.md README.md"
12 RUBY_FAKEGEM_GEMSPEC="cucumber.gemspec"
16 DESCRIPTION="Executable feature scenarios"
17 HOMEPAGE="https://github.com/aslakhellesoy/cucumber/wikis"
20 KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86"
26 >=dev-ruby/rspec-2.13.0
27 >=dev-ruby/nokogiri-1.5.2
28 >=dev-ruby/syntax-1.0.0
29 >=dev-util/aruba-0.5.2
32 >=dev-util/cucumber-1.3
36 >=dev-ruby/builder-2.1.2:*
37 >=dev-ruby/diff-lcs-1.1.3
38 >=dev-ruby/gherkin-2.12.0:0
39 >=dev-ruby/multi_json-1.7.5
40 >=dev-ruby/multi_test-0.1.2
44 # Remove development dependencies from the gemspec that we don't
45 # need or can't satisfy.
46 sed -i -e '/\(spork\|simplecov\|bcat\|kramdown\|yard\|capybara\|rack-test\|ramaze\|sinatra\|webrat\|mime-types\|rubyzip\)/d' ${RUBY_FAKEGEM_GEMSPEC} || die
48 # Fix too-strict test dependencies
49 sed -e '/nokogiri/ s/~> 1.5.2/>= 1.5.2/' \
50 -e '/aruba/ s/= 0.5.2/~> 0.5/' \
51 -e '/rake/ s/10.2/13/' -i ${RUBY_FAKEGEM_GEMSPEC} || die
53 # Make sure spork is run in the right interpreter
54 sed -i -e 's/#{Spork::BINARY}/-S #{Spork::BINARY}/' features/support/env.rb || die
55 rm features/drb_server_integration.feature || die
57 # Avoid json, they most likely fail due to multi_json weirdness.
58 rm features/json_formatter.feature || die
59 # Avoid features that break with newer rspec versions.
60 sed -i -e '369,398d' features/background.feature || die
62 # Avoid dependency on git
63 sed -i -e 's/git ls-files/find/' cucumber.gemspec || die
68 RUBYLIB=lib ${RUBY} -Ilib bin/cucumber features || die "Features failed"
75 cp -pPR examples "${D}/usr/share/doc/${PF}" || die "Failed installing example files."