summaryrefslogtreecommitdiff
path: root/dev-ruby/rdoc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-ruby/rdoc
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-ruby/rdoc')
-rw-r--r--dev-ruby/rdoc/Manifest12
-rw-r--r--dev-ruby/rdoc/files/rdoc-3.0.1-bin-require.patch20
-rw-r--r--dev-ruby/rdoc/metadata.xml11
-rw-r--r--dev-ruby/rdoc/rdoc-4.2.0.ebuild97
-rw-r--r--dev-ruby/rdoc/rdoc-4.3.0.ebuild94
-rw-r--r--dev-ruby/rdoc/rdoc-5.0.0-r3.ebuild92
-rw-r--r--dev-ruby/rdoc/rdoc-5.1.0.ebuild92
7 files changed, 418 insertions, 0 deletions
diff --git a/dev-ruby/rdoc/Manifest b/dev-ruby/rdoc/Manifest
new file mode 100644
index 000000000000..ecb8b09d8ba3
--- /dev/null
+++ b/dev-ruby/rdoc/Manifest
@@ -0,0 +1,12 @@
+AUX rdoc-3.0.1-bin-require.patch 632 SHA256 5b8468ba10d6767620ee6ecad9719f213744c6de207ecab078dd48f96147ad50 SHA512 d8840d320582f1b744597a4a48008508dfcfe7537b24570e977f7e10f1bc6e5955cf9319182d2546db23d96fa31a55320bf54f49d127623c9d9cac9d639c572f WHIRLPOOL d716e4c6ea8da7c52ab20cf52146fd7128f5071f390f25fc66012770c59fa283473fdb9214b942cad789be8df2ed66286617d8f9dd4e3c8d82ffd91d757cc8a7
+DIST rdoc-4.2.0.gem 735232 SHA256 391bfe3484a69db2cfa0fa32eed9010a7878b33ae645d67558d1806c847290cc SHA512 d58aebd7969fa8ea795fd4a2b35ba92d0f7368526ae0fc7fa64956db4e3d80c1b61f472384fe7e5eaa628e9c1ee637c967caf1a52362422cb7c2757e486594de WHIRLPOOL b2b8ee2500c901b8638d1dcd1b8194ee12f447a8ecf56205f77999e75a0f038583382efc6147719d4782befd6a3e4106697ea3158deb00c6183c4388223a720c
+DIST rdoc-4.3.0.gem 738816 SHA256 8cd820f70ec4b315ffff8e0653c8ce46cc9e444f3f8e7ed21c57338c61156a8d SHA512 7ec5c8055262300c159ff2dbca3bcd09e169002acad8602db89086d2b9409a096209a1152dca68c79dcd1b5e3c1fdf55e7f89d82b33fa2ce65c816695350b029 WHIRLPOOL 98f36bf06b3cf1f6f7fc7ee57395d794d17100dc7d996f95780ecd46a2d7fb9a0990e8c8c5e424790ac5dd32382f4e3e876bfdb91ba419cc6963b7ba360c11ac
+DIST rdoc-5.0.0.tar.gz 701335 SHA256 bf7b8be4afbec4f4fe38ed2d5cb4bbcccf7c4c7288547cbee12739a867488318 SHA512 922c1fc36a3186eb2784754297930306b420a27ed2dcae879ed34b9325158e1e9c4e0721a44a027805c3e921f9b975b69009ffbf734173d668ba9df1d959c061 WHIRLPOOL af68197e6681ef8f17f9d857fdadd6b628eefe0ae65abfe663b399339877977fdbea63763e0293b00da045b84e3b673b4e262ac3b7be9bd97303a6bb187c6fc1
+DIST rdoc-5.1.0.tar.gz 702376 SHA256 d2cd37fd5f8f78a84ac73806f1b2c232d3a07f2177d616d21c3410a1c8dfe4df SHA512 cd2ed37e8502a3e9093c88c258ac5e39542a23c3dcaedb9b5eb48ce391a694e5b35fbcfd62f01ec6353ac9c40a4b7043b2ff11bbc403d2e03de9a84c52bcefe7 WHIRLPOOL 0f6266b82b254774222d7b1ac1fb88fc90f62221bc04827e9ef78811a5d10c17fc877a840d38570e9eabc8abf54bd272a937b460d01be689d1f948e96a940172
+EBUILD rdoc-4.2.0.ebuild 2796 SHA256 d231d3f7c231ba88dbc9b5694d4f629f00cb06c6166327a002eb32ff4c23e69f SHA512 20f754838e46a669b0bfa35479bd203b8bbec48b38b4a374d931672f76ac47013f5bb44951fac909c8dacc687e53261e53269a12e6d8a3c35cf12b77cd479ed1 WHIRLPOOL c05ad6dd9ab9db841821eacc1804fb2f108589533922aeee81a0258821b1c2a67d54987f842b190aa513e4b0c89984c4af8c358a9da5768b25fc3fdb4b7c05cb
+EBUILD rdoc-4.3.0.ebuild 2707 SHA256 0198dacffbb79397837dda504e276adb8a1889954b8841d9962d699c324a8750 SHA512 c4718a527c6b5f909c1ce50127bbe6df1194e0b785289098f919b008a9e986674850c6ae0ab1d60cb5a82ecfb3072404aee3dd1e3ae1e304ea0def1d04a35df7 WHIRLPOOL 02308110e1041e79eb3b86eadc4b1688ccb359b1e41a85eecd0a62d76f2c91db50db0c8ae7d46b101d928a2533b4385510e11583c3fc3696e4f76765adc4f922
+EBUILD rdoc-5.0.0-r3.ebuild 2484 SHA256 58b24693e22ccb28d384aed64259564eb91cbed7b2f935e9cda7f534d4357dfc SHA512 1f5e26c651945069ba5e20ba7b1941b44a39d93253a57c36974ef2e486e1f5f60be9b134e80b83d9a661e90b12083045778a231751436188fde1f2b8bb401d52 WHIRLPOOL 4f2a13412dc8045fdd2e6138b034a5b712df44b62054fd8881beb071d1bc8a9d0348bead2bdca7a3c5b380571f4f1e7b6d99b68238dede68104d758ece106e0c
+EBUILD rdoc-5.1.0.ebuild 2575 SHA256 e2c456244fb1eb01fd65cb40541fefa969b9d080e2042cba265fe456b121a5c1 SHA512 3e2ad90adcd556d8c834878c2ae82de6b7a52c8849f74712fed888e2663c1285e32c25c025477e3cbd833e311c4705ac3c064371ebb8c2d51ed6e2bcf2f79881 WHIRLPOOL f015ebad85cb6b451baa338529d7179626275ec2478cf0e2866cffd581994a1ca3ba8d6e53f75f0eba80523c33fd20fbce562afb7bb02f2d9961f659f7bfa399
+MISC ChangeLog 7375 SHA256 11b8af1ae6136408f49085a04bd69da9d94cdc174ec3327c4ed08f501da89d06 SHA512 4d50340ba1c608edc89232038ecaef85287bccf4bc23634a4949245ff2b4c921c2de42fd16d38706b466718de20702a027c8f75634a932dbef673ea3673b8419 WHIRLPOOL 46f2bc8b24b5572e948c147f27e7a3234953f6301d299c712190f53f99a98a71efa0b103e7855274ba5d77bdcb0e2a6efb5288f17adc0e77bac1ed4c2b86a074
+MISC ChangeLog-2015 1169 SHA256 eb79450fb0018c43b243f325a52773abe90a10e7f709bd58e683d05b387ace05 SHA512 1b6af8635b601ef0865cd3e0766451ef5962ac068b280698886959c9f0d4b63da129a12e2f8b880389b5f801b374535f6b7d2e8d43bd9400c7a61587009c4494 WHIRLPOOL 813efe039bf038e3701e74da75d4fbfc1bdb403dcb67c1608984e99f3f27a8d906a34788ebd51b8a2c8420bbd9ed66afb6413584615266d3d4936aa7db542588
+MISC metadata.xml 335 SHA256 3d7aab0feada3fed8251ff4b84acc0ffbd490216eecb1e73ad3d9a2fcacdfc82 SHA512 3421081016cb99570f9ce9f775097669cd40a709efbbb3c76a20947717bc40d886195a5fda889407d1c436a387c126e07def1eeae01edff53c490ea9c630e992 WHIRLPOOL bfc4d6dc6360f545c3be0caa3af67cd8cdffe66e507320b7bb7a5675c1f19abbe0bb01329b974e4e58cc4d79aca394490a376505e2c81fc57c2997cb738bb671
diff --git a/dev-ruby/rdoc/files/rdoc-3.0.1-bin-require.patch b/dev-ruby/rdoc/files/rdoc-3.0.1-bin-require.patch
new file mode 100644
index 000000000000..5159125c85fa
--- /dev/null
+++ b/dev-ruby/rdoc/files/rdoc-3.0.1-bin-require.patch
@@ -0,0 +1,20 @@
+Make sure the right version of the code is loaded. Without this the
+rdoc version bundled with ruby is always loaded instead. Reported
+upstream but won't be fixed because rubygems has slightly different
+behavior.
+
+http://rubyforge.org/tracker/index.php?func=detail&aid=28758&group_id=627&atid=2472
+
+
+Index: trunk/bin/rdoc
+===================================================================
+--- trunk/bin/rdoc (revision 650)
++++ trunk/bin/rdoc (working copy)
+@@ -8,6 +8,7 @@
+ #
+ # $Revision: 1.1 $
+
++$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
+ require 'rdoc/rdoc'
+
+ begin
diff --git a/dev-ruby/rdoc/metadata.xml b/dev-ruby/rdoc/metadata.xml
new file mode 100644
index 000000000000..d98a9045e998
--- /dev/null
+++ b/dev-ruby/rdoc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rdoc/rdoc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ruby/rdoc/rdoc-4.2.0.ebuild b/dev-ruby/rdoc/rdoc-4.2.0.ebuild
new file mode 100644
index 000000000000..5c47bb506d76
--- /dev/null
+++ b/dev-ruby/rdoc/rdoc-4.2.0.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby21 ruby22"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc RI.rdoc TODO.rdoc"
+
+RUBY_FAKEGEM_BINWRAP=""
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="An extended version of the RDoc library from Ruby 1.8"
+HOMEPAGE="https://github.com/rdoc/rdoc/"
+
+LICENSE="Ruby MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+ruby_add_bdepend "
+ dev-ruby/racc
+ test? (
+ >=dev-ruby/minitest-4:0
+ )"
+
+ruby_add_rdepend "=dev-ruby/json-1* >=dev-ruby/json-1.4"
+
+all_ruby_prepare() {
+ # Other packages also have use for a nonexistent directory, bug 321059
+ sed -i -e 's#/nonexistent#/nonexistent_rdoc_tests#g' test/test_rdoc*.rb || die
+
+ # Remove unavailable and unneeded isolate plugin for Hoe
+ sed -i -e '/isolate/d' Rakefile || die
+
+ # Remove licenses line from Hoe definitions so we also use older versions.
+ sed -i -e '/licenses/ s:^:#:' Rakefile || die
+
+ epatch "${FILESDIR}/${PN}-3.0.1-bin-require.patch"
+
+ # Remove test that is depending on the locale, which we can't garantuee.
+ sed -i -e '/def test_encode_with/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove test depending on FEATURES=userpriv, bug 361959
+ sed -i -e '/def test_check_files/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Make sure we get the expected version of minitest.
+ echo 'gem "minitest", "~> 4.0"' > test/test_0000.rb || die
+
+ # Remove tests for code that is not included and not listed in Manifest.txt
+ rm -f test/test_rdoc_i18n_{locale,text}.rb \
+ test/test_rdoc_generator_pot* || die
+}
+
+all_ruby_compile() {
+ all_fakegem_compile
+
+ if use doc ; then
+ ruby -Ilib -S bin/rdoc || die
+ fi
+}
+
+each_ruby_compile() {
+ # Generate the file inline here since the Rakefile confuses jruby
+ # into a circular dependency.
+ for file in lib/rdoc/rd/block_parser lib/rdoc/rd/inline_parser ; do
+ ${RUBY} -S racc -l -o ${file}.rb ${file}.ry || die
+ done
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:. -e 'Dir["test/test_*.rb"].each{|f| require f}' || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ for bin in rdoc ri; do
+ ruby_fakegem_binwrapper $bin /usr/bin/$bin-2
+
+ for version in 22; do
+ if use ruby_targets_ruby${version}; then
+ ruby_fakegem_binwrapper $bin /usr/bin/${bin}${version}
+ sed -i -e "1s/env ruby/ruby${version}/" \
+ "${ED}/usr/bin/${bin}${version}" || die
+ fi
+ done
+ done
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/rdoc) ]] ; then
+ eselect ruby set $(eselect --brief --colour=no ruby show | head -n1)
+ fi
+}
diff --git a/dev-ruby/rdoc/rdoc-4.3.0.ebuild b/dev-ruby/rdoc/rdoc-4.3.0.ebuild
new file mode 100644
index 000000000000..a80d62674363
--- /dev/null
+++ b/dev-ruby/rdoc/rdoc-4.3.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby21 ruby22 ruby23"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc RI.rdoc TODO.rdoc"
+
+RUBY_FAKEGEM_BINWRAP=""
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="An extended version of the RDoc library from Ruby 1.8"
+HOMEPAGE="https://github.com/rdoc/rdoc/"
+
+LICENSE="Ruby MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+ruby_add_bdepend "
+ dev-ruby/racc
+ test? (
+ >=dev-ruby/minitest-5.8:5
+ )"
+
+ruby_add_rdepend ">=dev-ruby/json-1.4:0"
+
+all_ruby_prepare() {
+ # Other packages also have use for a nonexistent directory, bug 321059
+ sed -i -e 's#/nonexistent#/nonexistent_rdoc_tests#g' test/test_rdoc*.rb || die
+
+ # Remove unavailable and unneeded isolate plugin for Hoe
+ sed -i -e '/isolate/d' Rakefile || die
+
+ # Remove licenses line from Hoe definitions so we also use older versions.
+ sed -i -e '/licenses/ s:^:#:' Rakefile || die
+
+ epatch "${FILESDIR}/${PN}-3.0.1-bin-require.patch"
+
+ # Remove test that is depending on the locale, which we can't garantuee.
+ sed -i -e '/def test_encode_with/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove test depending on FEATURES=userpriv, bug 361959
+ sed -i -e '/def test_check_files/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove tests for code that is not included and not listed in Manifest.txt
+ rm -f test/test_rdoc_i18n_{locale,text}.rb \
+ test/test_rdoc_generator_pot* || die
+}
+
+all_ruby_compile() {
+ all_fakegem_compile
+
+ if use doc ; then
+ ruby -Ilib -S bin/rdoc || die
+ fi
+}
+
+each_ruby_compile() {
+ # Generate the file inline here since the Rakefile confuses jruby
+ # into a circular dependency.
+ for file in lib/rdoc/rd/block_parser lib/rdoc/rd/inline_parser ; do
+ ${RUBY} -S racc -l -o ${file}.rb ${file}.ry || die
+ done
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:. -e 'gem "json", "~>1.4"; Dir["test/test_*.rb"].each{|f| require f}' || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ for bin in rdoc ri; do
+ ruby_fakegem_binwrapper $bin /usr/bin/$bin-2
+
+ for version in 22 23; do
+ if use ruby_targets_ruby${version}; then
+ ruby_fakegem_binwrapper $bin /usr/bin/${bin}${version}
+ sed -i -e "1s/env ruby/ruby${version}/" \
+ "${ED}/usr/bin/${bin}${version}" || die
+ fi
+ done
+ done
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/rdoc) ]] ; then
+ eselect ruby set $(eselect --brief --colour=no ruby show | head -n1)
+ fi
+}
diff --git a/dev-ruby/rdoc/rdoc-5.0.0-r3.ebuild b/dev-ruby/rdoc/rdoc-5.0.0-r3.ebuild
new file mode 100644
index 000000000000..c4bc18e4b19e
--- /dev/null
+++ b/dev-ruby/rdoc/rdoc-5.0.0-r3.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby22 ruby23 ruby24"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc RI.rdoc TODO.rdoc"
+
+RUBY_FAKEGEM_BINWRAP=""
+RUBY_FAKEGEM_BINDIR="exe"
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="An extended version of the RDoc library from Ruby 1.8"
+HOMEPAGE="https://github.com/rdoc/rdoc/"
+SRC_URI="https://github.com/rdoc/rdoc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Ruby MIT"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+SLOT="0"
+IUSE=""
+
+RDEPEND+=">=app-eselect/eselect-ruby-20161226"
+
+ruby_add_bdepend "
+ dev-ruby/kpeg
+ dev-ruby/racc
+ test? (
+ >=dev-ruby/minitest-5.8:5
+ )"
+
+ruby_add_rdepend "dev-ruby/json:2"
+
+all_ruby_prepare() {
+ # Other packages also have use for a nonexistent directory, bug 321059
+ sed -i -e 's#/nonexistent#/nonexistent_rdoc_tests#g' test/test_rdoc*.rb || die
+
+ # Avoid unneeded dependency on bundler, bug 603696
+ sed -i -e '/bundler/ s:^:#:' \
+ -e 's/Bundler::GemHelper.gemspec.full_name/"rdoc"/' Rakefile || die
+
+ # Remove test that is depending on the locale, which we can't garantuee.
+ sed -i -e '/def test_encode_with/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove test depending on FEATURES=userpriv, bug 361959
+ sed -i -e '/def test_check_files/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove tests for code that is not included and not listed in Manifest.txt
+ rm -f test/test_rdoc_i18n_{locale,text}.rb \
+ test/test_rdoc_generator_pot* || die
+}
+
+all_ruby_compile() {
+ all_fakegem_compile
+
+ if use doc ; then
+ ruby -Ilib -S exe/rdoc || die
+ fi
+}
+
+each_ruby_compile() {
+ ${RUBY} -S rake generate || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:. -e 'gem "json", "~>2.0"; Dir["test/test_*.rb"].each{|f| require f}' || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ for bin in rdoc ri; do
+ ruby_fakegem_binwrapper $bin /usr/bin/$bin-2
+
+ for version in ${USE_RUBY}; do
+ version=`echo ${version} | cut -c 5-`
+ if use ruby_targets_ruby${version}; then
+ ruby_fakegem_binwrapper $bin /usr/bin/${bin}${version}
+ sed -i -e "1s/env ruby/ruby${version}/" \
+ "${ED}/usr/bin/${bin}${version}" || die
+ fi
+ done
+ done
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/rdoc) ]] ; then
+ eselect ruby set $(eselect --brief --colour=no ruby show | head -n1)
+ fi
+}
diff --git a/dev-ruby/rdoc/rdoc-5.1.0.ebuild b/dev-ruby/rdoc/rdoc-5.1.0.ebuild
new file mode 100644
index 000000000000..f72e6914d377
--- /dev/null
+++ b/dev-ruby/rdoc/rdoc-5.1.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby22 ruby23 ruby24"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="History.rdoc README.rdoc RI.rdoc TODO.rdoc"
+
+RUBY_FAKEGEM_BINWRAP=""
+RUBY_FAKEGEM_BINDIR="exe"
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="An extended version of the RDoc library from Ruby 1.8"
+HOMEPAGE="https://github.com/rdoc/rdoc/"
+SRC_URI="https://github.com/rdoc/rdoc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Ruby MIT"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+SLOT="0"
+IUSE=""
+
+RDEPEND+=">=app-eselect/eselect-ruby-20161226"
+
+ruby_add_bdepend "
+ dev-ruby/kpeg
+ dev-ruby/racc
+ test? (
+ >=dev-ruby/minitest-5.8:5
+ )"
+
+ruby_add_rdepend "dev-ruby/json:2"
+
+all_ruby_prepare() {
+ # Other packages also have use for a nonexistent directory, bug 321059
+ sed -i -e 's#/nonexistent#/nonexistent_rdoc_tests#g' test/test_rdoc*.rb || die
+
+ # Avoid unneeded dependency on bundler, bug 603696
+ sed -i -e '/bundler/ s:^:#:' \
+ -e 's/Bundler::GemHelper.gemspec.full_name/"rdoc"/' Rakefile || die
+
+ # Remove test that is depending on the locale, which we can't garantuee.
+ sed -i -e '/def test_encode_with/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove test depending on FEATURES=userpriv, bug 361959
+ sed -i -e '/def test_check_files/,/^ end/ s:^:#:' test/test_rdoc_options.rb || die
+
+ # Remove tests for code that is not included and not listed in Manifest.txt
+ rm -f test/test_rdoc_i18n_{locale,text}.rb \
+ test/test_rdoc_generator_pot* || die
+}
+
+all_ruby_compile() {
+ all_fakegem_compile
+
+ if use doc ; then
+ ruby -Ilib -S exe/rdoc || die
+ fi
+}
+
+each_ruby_compile() {
+ ${RUBY} -S rake generate || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:. -e 'gem "json", "~>2.0"; Dir["test/test_*.rb"].each{|f| require f}' || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ for bin in rdoc ri; do
+ ruby_fakegem_binwrapper $bin /usr/bin/$bin-2
+
+ for version in ${USE_RUBY}; do
+ version=`echo ${version} | cut -c 5-`
+ if use ruby_targets_ruby${version}; then
+ ruby_fakegem_binwrapper $bin /usr/bin/${bin}${version}
+ sed -i -e "1s/env ruby/ruby${version}/" \
+ "${ED}/usr/bin/${bin}${version}" || die
+ fi
+ done
+ done
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/rdoc) ]] ; then
+ eselect ruby set $(eselect --brief --colour=no ruby show | head -n1)
+ fi
+}