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-ruby/railties/
Date: Sun, 04 Sep 2016 06:03:24
Message-Id: 1472968623.9503ffb687573854a7d7ea6ecdd728de3993d8e5.graaff@gentoo
1 commit: 9503ffb687573854a7d7ea6ecdd728de3993d8e5
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 3 08:53:59 2016 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 4 05:57:03 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9503ffb6
7
8 dev-ruby/railties: fix installation of binwrapper
9
10 Package-Manager: portage-2.2.28
11
12 dev-ruby/railties/railties-5.0.0.1-r1.ebuild | 79 ++++++++++++++++++++++++++++
13 1 file changed, 79 insertions(+)
14
15 diff --git a/dev-ruby/railties/railties-5.0.0.1-r1.ebuild b/dev-ruby/railties/railties-5.0.0.1-r1.ebuild
16 new file mode 100644
17 index 00000000..c65d0ae
18 --- /dev/null
19 +++ b/dev-ruby/railties/railties-5.0.0.1-r1.ebuild
20 @@ -0,0 +1,79 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +USE_RUBY="ruby22 ruby23"
27 +
28 +RUBY_FAKEGEM_TASK_TEST="test:regular"
29 +RUBY_FAKEGEM_TASK_DOC=""
30 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.rdoc"
31 +
32 +RUBY_FAKEGEM_GEMSPEC="railties.gemspec"
33 +
34 +RUBY_FAKEGEM_BINWRAP=""
35 +RUBY_FAKEGEM_EXTRAINSTALL="exe"
36 +
37 +inherit ruby-fakegem versionator
38 +
39 +DESCRIPTION="Tools for creating, working with, and running Rails applications"
40 +HOMEPAGE="https://github.com/rails/rails"
41 +SRC_URI="https://github.com/rails/rails/archive/v${PV}.tar.gz -> rails-${PV}.tgz"
42 +
43 +LICENSE="MIT"
44 +SLOT="$(get_version_component_range 1-2)"
45 +KEYWORDS="~amd64 ~arm ~amd64-linux"
46 +IUSE=""
47 +
48 +RUBY_S="rails-${PV}/${PN}"
49 +
50 +# The test suite has many failures, most likely due to a mismatch in
51 +# exact dependencies or environment specifics. Needs further
52 +# investigation.
53 +RESTRICT="test"
54 +
55 +RDEPEND+=">=app-eselect/eselect-rails-0.22"
56 +
57 +ruby_add_rdepend "
58 + ~dev-ruby/activesupport-${PV}
59 + ~dev-ruby/actionpack-${PV}
60 + >=dev-ruby/thor-0.18.1
61 + >=dev-ruby/rake-0.8.7
62 + dev-ruby/method_source
63 +"
64 +
65 +ruby_add_bdepend "
66 + test? (
67 + ~dev-ruby/actionview-${PV}
68 + dev-ruby/mocha:0.14
69 + )"
70 +
71 +all_ruby_prepare() {
72 + rm "${S}/../Gemfile" || die "Unable to remove Gemfile"
73 + sed -i -e '/load_paths/d' test/abstract_unit.rb || die "Unable to remove load paths"
74 + sed -i -e '1igem "minitest", "~>4.0"' test/abstract_unit.rb || die
75 +
76 + # Also allow rdoc 4.x
77 + sed -i -e 's/~> 3.4/>= 3.4/' ${RUBY_FAKEGEM_GEMSPEC} || die
78 +
79 + # Also install rails in bin to let our binwrapper work
80 + mkdir bin || die
81 + cp -f exe/rails bin/ || die
82 +}
83 +
84 +all_ruby_install() {
85 + all_fakegem_install
86 +
87 + ruby_fakegem_binwrapper rails rails-${PV}
88 +}
89 +
90 +pkg_postinst() {
91 + elog "To select between slots of rails, use:"
92 + elog "\teselect rails"
93 +
94 + eselect rails update
95 +}
96 +
97 +pkg_postrm() {
98 + eselect rails update
99 +}