cucumber-1.3.17.ebuild 2.0 KB

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