summaryrefslogtreecommitdiff
path: root/app-text/ronn-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-07 17:30:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-07 17:30:28 +0100
commitdebb2c431b40a6b4750a39956cc5fcfa5a4a6476 (patch)
tree5c5fceb399f1dddaf02d4d8da8f674106cede374 /app-text/ronn-ng
parenta17b25a10359070f9527893d861369d378021aa9 (diff)
gentoo auto-resync : 07:04:2023 - 17:30:27
Diffstat (limited to 'app-text/ronn-ng')
-rw-r--r--app-text/ronn-ng/Manifest2
-rw-r--r--app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch40
-rw-r--r--app-text/ronn-ng/ronn-ng-0.9.1-r3.ebuild62
3 files changed, 104 insertions, 0 deletions
diff --git a/app-text/ronn-ng/Manifest b/app-text/ronn-ng/Manifest
index 8866eb0b8a0d..d12d435cb8dc 100644
--- a/app-text/ronn-ng/Manifest
+++ b/app-text/ronn-ng/Manifest
@@ -1,3 +1,5 @@
+AUX ronn-ng-0.9.1-psych-4-tests.patch 1640 BLAKE2B 52ec0e314d9253c06874ce95ab5be8bb9fa9e5ff8b04b6df385a7e14c3edb919b0f2b9a7e2048552cf235c91d77877485e4fb3239eb222c99f53c412a46983d8 SHA512 803f7f4368599e8b55ed78d8444d585bc9f7568af4f9ab3d4b53c12d31fdc412776c259bff91a9b905b3482c68ce29ed2827682d2d7541669b9e5a4bdf1ebe3b
DIST ronn-ng-0.9.1.gem 69120 BLAKE2B 9da30156104ef448c458199ee33fb5369f7d97c7bbeac8072567127b964456a34226bcc15f72d6f2875f524175d31ec9652a282b369e818748790cd07f290786 SHA512 5ad7dc426d9bc77bca86fbb06775a3b19f1b8d79f5a4331d117e9fa394e7a9c3b0440b70b993672d77a24f56f5da3ebd0e41a5183f4330707b7ddb83c9108bdf
EBUILD ronn-ng-0.9.1-r2.ebuild 1102 BLAKE2B f930055b9b8692e62a180c99995b4b5287897d310cbec3fbbcaafa48e99a70e09e3b0882e46f4ac42ee8b7530a64c0c1fc4426e9fa41a56118cf19154ea0f455 SHA512 3b2c1a1227160f4ad52957df4a100ffa067c0d50f8b12c592e3b8e64a4a221e3381172260e4e61a44dbaf76bd649d4649e1284aa1d8b0336f6a590b9e9119252
+EBUILD ronn-ng-0.9.1-r3.ebuild 1318 BLAKE2B b5622d9adf992b57b44eeba767b466f30b6fbb1f7e6f4e0fc043fb21d603803d6fe606221a3102b53dad00d7fb6d617d6d042fbb895cf10e2753d1436d469669 SHA512 ed74f11247f678750e9748b263f2c37a9bbd8eeb07dce8d888210615cd9954c8f0e6732e2eecea94b6a6bbbbb11326532e8a52674190d8502829523493e694fc
MISC metadata.xml 342 BLAKE2B 71ab5a2d2a9e2d20165f54c1cf79f483768c3637cc87a32acf80708d79b3be9d24408a330ed23ad837848933b0a40f1165f60d7b7e08146a28088a4d9d558630 SHA512 92e6778f8a2f44a81dfdbbd6699ce2186cc48b801f5c462c99b4bc35f79806ff154d72bec2916d79dc7435c1a9b75f2bf3842b7dba2b132335afc38d00d22780
diff --git a/app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch b/app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch
new file mode 100644
index 000000000000..b9e05cfff455
--- /dev/null
+++ b/app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch
@@ -0,0 +1,40 @@
+https://github.com/apjanke/ronn-ng/commit/e194bf62b1d0c0828cc83405e60dc5ece829e62f
+
+From e194bf62b1d0c0828cc83405e60dc5ece829e62f Mon Sep 17 00:00:00 2001
+From: Andrew Janke <andrew@apjanke.net>
+Date: Fri, 6 Jan 2023 07:25:48 -0500
+Subject: [PATCH] Workaround for Psych 4.0+ in tests
+
+Psych 4.0, shipped with Ruby 3.1, switched to a "safe load" by default, and requires you to explicitly set allowed classes. But previous Psych versions didn't support this kwarg, so the call needs to be made differently depending on which version of Psych/Ruby this is running under.
+
+Co-authored-by: Takuya Noguchi <takninnovationresearch@gmail.com>
+---
+ test/test_ronn_document.rb | 7 ++++++-
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/test/test_ronn_document.rb b/test/test_ronn_document.rb
+index 75788dc..cd573fe 100644
+--- a/test/test_ronn_document.rb
++++ b/test/test_ronn_document.rb
+@@ -137,6 +137,11 @@ def canonicalize(text)
+
+ test 'converting to yaml' do
+ require 'yaml'
++ actual = begin
++ YAML.load(@doc.to_yaml, permitted_classes: [Time])
++ rescue ArgumentError # Remove this line when Ruby 3.0.x support is dropped
++ YAML.load(@doc.to_yaml)
++ end
+ assert_equal({
+ 'section' => '1',
+ 'name' => 'hello',
+@@ -146,7 +151,7 @@ def canonicalize(text)
+ 'toc' => [['NAME', 'NAME']],
+ 'organization' => nil,
+ 'manual' => nil
+- }, YAML.load(@doc.to_yaml))
++ }, actual)
+ end
+
+ test 'converting to json' do
+
diff --git a/app-text/ronn-ng/ronn-ng-0.9.1-r3.ebuild b/app-text/ronn-ng/ronn-ng-0.9.1-r3.ebuild
new file mode 100644
index 000000000000..6aa2714d5808
--- /dev/null
+++ b/app-text/ronn-ng/ronn-ng-0.9.1-r3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+
+RUBY_FAKEGEM_EXTRADOC="AUTHORS CHANGES README.md"
+RUBY_FAKEGEM_GEMSPEC="ronn-ng.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Builds manuals in HTML and Unix man page format from Markdown"
+HOMEPAGE="https://github.com/apjanke/ronn-ng"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+IUSE=""
+
+RDEPEND+="!app-text/ronn"
+
+DEPS="
+ >=dev-ruby/kramdown-2.1:2
+ >=dev-ruby/nokogiri-1.9.0:0
+"
+
+ruby_add_rdepend "
+ =dev-ruby/mustache-1*
+ ${DEPS}
+"
+
+ruby_add_bdepend "${DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-psych-4-tests.patch
+)
+
+all_ruby_prepare() {
+ sed -i -e '/mustache/ s/0.7/1.0/' ${RUBY_FAKEGEM_GEMSPEC} || die
+}
+
+each_ruby_prepare() {
+ # Make sure that we always use the right interpreter during tests
+ sed -i -e "/output/ s:ronn:${RUBY} bin/ronn:" test/test_ronn.rb || die
+ # ... and during the man page build.
+ sed -i -e "/sh 'ronn/s:ronn:${RUBY} bin/ronn:" Rakefile || die
+}
+
+each_ruby_compile() {
+ #if ! [[ -f man/ronn.1 ]] ; then
+ # einfo "Building man pages using ${RUBY}"
+ # PATH="${S}/bin:${PATH}" ${RUBY} -S rake man || die
+ #fi
+ :;
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ doman man/ronn.1 man/ronn-format.7
+}