1 |
commit: 9eb2212e5b3920649c42715bf49c9045cbc863b4 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 26 09:48:24 2016 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 26 19:16:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eb2212e |
7 |
|
8 |
dev-ruby/rdoc: add ruby24 revision using json 2.x, add keywords for bug 603674 |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
dev-ruby/rdoc/rdoc-5.0.0-r1.ebuild | 90 ++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 90 insertions(+) |
14 |
|
15 |
diff --git a/dev-ruby/rdoc/rdoc-5.0.0-r1.ebuild b/dev-ruby/rdoc/rdoc-5.0.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000..d58e1be |
18 |
--- /dev/null |
19 |
+++ b/dev-ruby/rdoc/rdoc-5.0.0-r1.ebuild |
20 |
@@ -0,0 +1,90 @@ |
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="ruby20 ruby21 ruby22 ruby23 ruby24" |
27 |
+ |
28 |
+RUBY_FAKEGEM_TASK_DOC="" |
29 |
+RUBY_FAKEGEM_DOCDIR="doc" |
30 |
+RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc RI.rdoc TODO.rdoc" |
31 |
+ |
32 |
+RUBY_FAKEGEM_BINWRAP="" |
33 |
+RUBY_FAKEGEM_EXTRAINSTALL="exe" |
34 |
+ |
35 |
+inherit ruby-fakegem eutils |
36 |
+ |
37 |
+DESCRIPTION="An extended version of the RDoc library from Ruby 1.8" |
38 |
+HOMEPAGE="https://github.com/rdoc/rdoc/" |
39 |
+SRC_URI="https://github.com/rdoc/rdoc/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="Ruby MIT" |
42 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
43 |
+SLOT="0" |
44 |
+IUSE="" |
45 |
+ |
46 |
+ruby_add_bdepend " |
47 |
+ dev-ruby/kpeg |
48 |
+ dev-ruby/racc |
49 |
+ test? ( |
50 |
+ >=dev-ruby/minitest-5.8:5 |
51 |
+ )" |
52 |
+ |
53 |
+ruby_add_rdepend "dev-ruby/json:2" |
54 |
+ |
55 |
+all_ruby_prepare() { |
56 |
+ # Other packages also have use for a nonexistent directory, bug 321059 |
57 |
+ sed -i -e 's#/nonexistent#/nonexistent_rdoc_tests#g' test/test_rdoc*.rb || die |
58 |
+ |
59 |
+ # Avoid unneeded dependency on bundler, bug 603696 |
60 |
+ sed -i -e '/bundler/ s:^:#:' \ |
61 |
+ -e 's/Bundler::GemHelper.gemspec.full_name/"rdoc"/' Rakefile || die |
62 |
+ |
63 |
+ # Remove test that is depending on the locale, which we can't garantuee. |
64 |
+ sed -i -e '/def test_encode_with/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die |
65 |
+ |
66 |
+ # Remove test depending on FEATURES=userpriv, bug 361959 |
67 |
+ sed -i -e '/def test_check_files/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die |
68 |
+ |
69 |
+ # Remove tests for code that is not included and not listed in Manifest.txt |
70 |
+ rm -f test/test_rdoc_i18n_{locale,text}.rb \ |
71 |
+ test/test_rdoc_generator_pot* || die |
72 |
+} |
73 |
+ |
74 |
+all_ruby_compile() { |
75 |
+ all_fakegem_compile |
76 |
+ |
77 |
+ if use doc ; then |
78 |
+ ruby -Ilib -S exe/rdoc || die |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
+each_ruby_compile() { |
83 |
+ ${RUBY} -S rake generate || die |
84 |
+} |
85 |
+ |
86 |
+each_ruby_test() { |
87 |
+ ${RUBY} -Ilib:. -e 'gem "json", "~>2.0"; Dir["test/test_*.rb"].each{|f| require f}' || die |
88 |
+} |
89 |
+ |
90 |
+all_ruby_install() { |
91 |
+ all_fakegem_install |
92 |
+ |
93 |
+ for bin in rdoc ri; do |
94 |
+ ruby_fakegem_binwrapper $bin /usr/bin/$bin-2 |
95 |
+ |
96 |
+ for version in 20 21 22 23; do |
97 |
+ if use ruby_targets_ruby${version}; then |
98 |
+ ruby_fakegem_binwrapper $bin /usr/bin/${bin}${version} |
99 |
+ sed -i -e "1s/env ruby/ruby${version}/" \ |
100 |
+ "${ED}/usr/bin/${bin}${version}" || die |
101 |
+ fi |
102 |
+ done |
103 |
+ done |
104 |
+} |
105 |
+ |
106 |
+pkg_postinst() { |
107 |
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/rdoc) ]] ; then |
108 |
+ eselect ruby set $(eselect --brief --colour=no ruby show | head -n1) |
109 |
+ fi |
110 |
+} |