Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cucumber/
Date: Wed, 12 Dec 2018 07:33:20
Message-Id: 1544599981.6ab4ebd329bd1a700aa0e32104bfa83e1f2aa879.graaff@gentoo
1 commit: 6ab4ebd329bd1a700aa0e32104bfa83e1f2aa879
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 12 07:24:50 2018 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 12 07:33:01 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ab4ebd3
7
8 dev-util/cucumber: fix diff-lcs dependency
9
10 Fixes: https://bugs.gentoo.org/661022
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 dev-util/cucumber/cucumber-3.0.2-r1.ebuild | 88 ++++++++++++++++++++++++++++++
15 1 file changed, 88 insertions(+)
16
17 diff --git a/dev-util/cucumber/cucumber-3.0.2-r1.ebuild b/dev-util/cucumber/cucumber-3.0.2-r1.ebuild
18 new file mode 100644
19 index 00000000000..943cb2498cd
20 --- /dev/null
21 +++ b/dev-util/cucumber/cucumber-3.0.2-r1.ebuild
22 @@ -0,0 +1,88 @@
23 +# Copyright 1999-2018 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +USE_RUBY="ruby22 ruby23 ruby24"
28 +
29 +# Documentation task depends on sdoc which we currently don't have.
30 +RUBY_FAKEGEM_TASK_DOC=""
31 +RUBY_FAKEGEM_TASK_TEST="none"
32 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
33 +
34 +RUBY_FAKEGEM_GEMSPEC="cucumber.gemspec"
35 +
36 +inherit ruby-fakegem
37 +
38 +DESCRIPTION="Executable feature scenarios"
39 +HOMEPAGE="https://github.com/aslakhellesoy/cucumber/wikis"
40 +SRC_URI="https://github.com/cucumber/cucumber-ruby/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 +RUBY_S="cucumber-ruby-${PV}"
42 +LICENSE="Ruby"
43 +
44 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~sparc ~x86"
45 +SLOT="0"
46 +IUSE="examples test"
47 +
48 +ruby_add_bdepend "
49 + test? (
50 + dev-ruby/rspec:3
51 + >=dev-ruby/nokogiri-1.5.2
52 + >=dev-ruby/syntax-1.0.0
53 + >=dev-util/aruba-0.6.1 =dev-util/aruba-0.6*
54 + >=dev-ruby/json-1.7
55 + >=dev-util/cucumber-3
56 + >=dev-ruby/mime-types-2.99:2
57 + )"
58 +
59 +ruby_add_rdepend "
60 + >=dev-ruby/builder-2.1.2:*
61 + dev-util/cucumber-core:3.0
62 + dev-util/cucumber-expressions:4.0
63 + >=dev-util/cucumber-wire-0.0.1:0
64 + >=dev-ruby/diff-lcs-1.3:0
65 + dev-ruby/gherkin:4
66 + >=dev-ruby/multi_json-1.7.5
67 + >=dev-ruby/multi_test-0.1.2
68 +"
69 +
70 +all_ruby_prepare() {
71 + # Remove development dependencies from the gemspec that we don't
72 + # need or can't satisfy.
73 + sed -i -e '/\(coveralls\|spork\|simplecov\|bcat\|kramdown\|yard\|capybara\|octokit\|rack-test\|ramaze\|rubocop\|sinatra\|webrat\|mime-types\|rubyzip\)/d' ${RUBY_FAKEGEM_GEMSPEC} || die
74 +
75 + # Avoid dependency on unpackaged cucumber-pro
76 + sed -i -e '/cucumber-pro/ s:^:#:' Gemfile || die
77 +
78 + # Avoid harmless failing spec
79 + sed -i -e '/converts the snapshot path to a relative path/,/end/ s:^:#:' \
80 + spec/cucumber/formatter/html_spec.rb || die
81 +
82 + # Avoid failing features on new delegate and forwardable behavior in ruby
83 + rm -f features/docs/defining_steps/ambiguous_steps.feature features/docs/defining_steps/nested_steps.feature || die
84 +
85 + # Avoid dependency on git
86 + sed -i -e '/executables/ s/=.*/= ["cucumber"]/' \
87 + -e '/git ls-files/d' cucumber.gemspec || die
88 +
89 + sed -i -e '/pry/ s:^:#:' cucumber.gemspec spec/spec_helper.rb || die
90 +
91 + rm -f Gemfile.lock || die
92 +}
93 +
94 +each_ruby_prepare() {
95 + # Use the right interpreter
96 + sed -i -e 's:ruby:'${RUBY}':' features/lib/step_definitions/ruby_steps.rb || die
97 +}
98 +
99 +each_ruby_test() {
100 + RSPEC_VERSION=3 ruby-ng_rspec
101 + CUCUMBER_USE_RELEASED_CORE=true PATH="${S}"/bin:${PATH} RUBYLIB="${S}"/lib ${RUBY} -Ilib bin/cucumber features || die "Features failed"
102 +}
103 +
104 +all_ruby_install() {
105 + all_fakegem_install
106 +
107 + if use examples; then
108 + cp -pPR examples "${D}/usr/share/doc/${PF}" || die "Failed installing example files."
109 + fi
110 +}