From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 683B315ACB3 for ; Fri, 7 Apr 2023 14:26:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58663E0876; Fri, 7 Apr 2023 14:26:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EB653E0876 for ; Fri, 7 Apr 2023 14:26:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CEC55341081 for ; Fri, 7 Apr 2023 14:26:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 80659A21 for ; Fri, 7 Apr 2023 14:26:15 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1680877525.aa780303ae90c6268e4b42026b2acb1ff7db9c99.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/ronn-ng/files/, app-text/ronn-ng/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch app-text/ronn-ng/ronn-ng-0.9.1-r3.ebuild X-VCS-Directories: app-text/ronn-ng/files/ app-text/ronn-ng/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: aa780303ae90c6268e4b42026b2acb1ff7db9c99 X-VCS-Branch: master Date: Fri, 7 Apr 2023 14:26:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7669edd9-2252-4d89-ab32-a022c985cd4b X-Archives-Hash: d41aa5fbabc2410118a384e1ca6e8dd4 commit: aa780303ae90c6268e4b42026b2acb1ff7db9c99 Author: Sam James gentoo org> AuthorDate: Fri Apr 7 14:19:57 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Apr 7 14:25:25 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa780303 app-text/ronn-ng: enable ruby31, enable ruby32; drop unnecessary man page build - Enable ruby31, enable ruby32 This only takes one patch and it's just for tests to work with newer psych. Fedora is just using that same patch too, no others. - Drop unnecessary man page build. They're included in the gem, so we don't need to build it again (which causes a problem when invoking rake directly/calling unwrapped ronn, as e.g. nokogiri isn't necessarily installed for it anymore.) Closes: https://bugs.gentoo.org/835156 Closes: https://bugs.gentoo.org/898414 Signed-off-by: Sam James gentoo.org> .../files/ronn-ng-0.9.1-psych-4-tests.patch | 40 ++++++++++++++ app-text/ronn-ng/ronn-ng-0.9.1-r3.ebuild | 62 ++++++++++++++++++++++ 2 files changed, 102 insertions(+) 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 +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 +--- + 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..b7217b3bf77f --- /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="ruby26 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 +}