1 |
commit: 99874548480cd0a0d4c12739eb06d9fed0b3fd7e |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 26 08:49:39 2021 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 26 10:06:36 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99874548 |
7 |
|
8 |
dev-ruby/rdoc: fix doc install |
9 |
|
10 |
Closes: https://bugs.gentoo.org/823479 |
11 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
12 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
13 |
|
14 |
dev-ruby/rdoc/rdoc-6.3.3-r1.ebuild | 95 ++++++++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 95 insertions(+) |
16 |
|
17 |
diff --git a/dev-ruby/rdoc/rdoc-6.3.3-r1.ebuild b/dev-ruby/rdoc/rdoc-6.3.3-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 000000000000..c77b59a31571 |
20 |
--- /dev/null |
21 |
+++ b/dev-ruby/rdoc/rdoc-6.3.3-r1.ebuild |
22 |
@@ -0,0 +1,95 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=8 |
27 |
+USE_RUBY="ruby26 ruby27 ruby30" |
28 |
+ |
29 |
+RUBY_FAKEGEM_RECIPE_DOC="" |
30 |
+RUBY_FAKEGEM_DOCDIR="doc" |
31 |
+RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc RI.rdoc TODO.rdoc" |
32 |
+ |
33 |
+RUBY_FAKEGEM_BINWRAP="" |
34 |
+RUBY_FAKEGEM_BINDIR="exe" |
35 |
+ |
36 |
+RUBY_FAKEGEM_GEMSPEC="rdoc.gemspec" |
37 |
+ |
38 |
+inherit prefix ruby-fakegem |
39 |
+ |
40 |
+DESCRIPTION="An extended version of the RDoc library from Ruby 1.8" |
41 |
+HOMEPAGE="https://github.com/ruby/rdoc/" |
42 |
+SRC_URI="https://github.com/ruby/rdoc/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="Ruby MIT" |
45 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
46 |
+SLOT="0" |
47 |
+IUSE="doc" |
48 |
+ |
49 |
+RDEPEND+=">=app-eselect/eselect-ruby-20181225" |
50 |
+ |
51 |
+ruby_add_bdepend " |
52 |
+ >=dev-ruby/kpeg-1.1.0-r1 |
53 |
+ >dev-ruby/racc-1.4.10 |
54 |
+ dev-ruby/rake |
55 |
+ test? ( |
56 |
+ dev-ruby/bundler |
57 |
+ >=dev-ruby/minitest-5.8:5 |
58 |
+ )" |
59 |
+ |
60 |
+all_ruby_prepare() { |
61 |
+ # Other packages also have use for a nonexistent directory, bug 321059 |
62 |
+ sed -i -e 's#/nonexistent#/nonexistent_rdoc_tests#g' test/rdoc/test_rdoc*.rb || die |
63 |
+ |
64 |
+ # Avoid unneeded dependency on bundler, bug 603696 |
65 |
+ sed -i -e '/bundler/ s:^:#:' \ |
66 |
+ -e 's/Bundler::GemHelper.gemspec.full_name/"rdoc"/' \ |
67 |
+ -e '/rubocop\/rake/ s:^:#:' \ |
68 |
+ -e '/RuboCop/,/end/ s:^:#:' Rakefile || die |
69 |
+ |
70 |
+ # Skip rubygems tests since the rubygems test case code is no longer installed by rubygems. |
71 |
+ sed -i -e '/^task/ s/, :rubygems_test//' Rakefile || die |
72 |
+ |
73 |
+ # Remove test that is depending on the locale, which we can't garantuee. |
74 |
+ sed -i -e '/def test_encode_with/,/^ end/ s:^:#:' test/rdoc/test_rdoc_options.rb || die |
75 |
+ |
76 |
+ # Remove test depending on FEATURES=userpriv, bug 361959 |
77 |
+ sed -i -e '/def test_check_files/,/^ end/ s:^:#:' test/rdoc/test_rdoc_options.rb || die |
78 |
+ |
79 |
+ sed -i -e 's:_relative ": "./:' ${RUBY_FAKEGEM_GEMSPEC} || die |
80 |
+} |
81 |
+ |
82 |
+all_ruby_compile() { |
83 |
+ all_fakegem_compile |
84 |
+ |
85 |
+ if use doc ; then |
86 |
+ ruby -Ilib -S exe/rdoc || die |
87 |
+ rm -f doc/js/*.gz || die |
88 |
+ fi |
89 |
+} |
90 |
+ |
91 |
+each_ruby_compile() { |
92 |
+ ${RUBY} -S rake generate || die |
93 |
+} |
94 |
+ |
95 |
+all_ruby_install() { |
96 |
+ all_fakegem_install |
97 |
+ |
98 |
+ for bin in rdoc ri; do |
99 |
+ ruby_fakegem_binwrapper $bin /usr/bin/$bin-2 |
100 |
+ |
101 |
+ for version in $(ruby_get_use_implementations); do |
102 |
+ version=`echo ${version} | cut -c 5-` |
103 |
+ if use ruby_targets_ruby${version}; then |
104 |
+ ruby_fakegem_binwrapper $bin /usr/bin/${bin}${version} |
105 |
+ sed -i -e "1s/env ruby/ruby${version}/" \ |
106 |
+ "${ED}/usr/bin/${bin}${version}" || die |
107 |
+ use prefix && hprefixify "${ED}/usr/bin/${bin}${version}" |
108 |
+ fi |
109 |
+ done |
110 |
+ done |
111 |
+} |
112 |
+ |
113 |
+pkg_postinst() { |
114 |
+ if [[ ! -n $(readlink "${ROOT}"/usr/bin/rdoc) ]] ; then |
115 |
+ eselect ruby set $(eselect --brief --colour=no ruby show | head -n1) |
116 |
+ fi |
117 |
+} |