commit: 327ff70b751cfcd54a1c8c7a3476744152752d03 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> AuthorDate: Fri Apr 25 18:09:13 2025 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Fri Apr 25 18:25:27 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=327ff70b
dev-ruby/json: add 2.11.3 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> dev-ruby/json/Manifest | 1 + dev-ruby/json/json-2.11.3.ebuild | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/dev-ruby/json/Manifest b/dev-ruby/json/Manifest index 2f3cccdfbef7..4e31ffbf9d80 100644 --- a/dev-ruby/json/Manifest +++ b/dev-ruby/json/Manifest @@ -1,3 +1,4 @@ DIST json-2.10.2.tar.gz 834578 BLAKE2B 2225e515e2df5ec66985ca3e73ff0e9cd68025c295f1313504c61bbf73a5f80054635b19dbee5fab2cd6b7f24ada79a08d7e798dc8faead80ac6863c0be946b2 SHA512 b4193f944d7b24197d138ecbbf4132b1e39fa93c4f5abeca6c24027a54a8a0d278bf214348a96c2fade72408ebd265f79da9ee7a594c589f05089cbf0b38cf31 +DIST json-2.11.3.tar.gz 840952 BLAKE2B 33423f7508371b9052e04041664567d60819682aa53a1c1d13c5f22825fa8a0e6bfa523be92b0281ab4fd0d2dc288ded5d4db8059855c30d09032a99fb9171e1 SHA512 86ac5be9255a4f44e3ce1fc0d5ed2bfd829e573ebd774e46cc33e68c35382e29bfb34f1b75df2439c2daa04bd040357231c7b94e3d08af1f499e2e2cad6c7699 DIST json-2.7.2.tar.gz 125814 BLAKE2B 450c9495053c762446e77997bdc7e0291f8baf160a4da7e56d04ed18aa5629a11f1309e40bab0849692433392cfba8a19dda905fe5044ab363591a49e6e18b60 SHA512 5c432c293eed69b9810b5d0ca782383ba3f206d561641c354515e357c663ed4a4fb5ae35d3336d48605f9e82156d2f14a7ec6fa26642351214f60d91bac84f0e DIST json-2.9.1.tar.gz 842298 BLAKE2B 0d76819a475051b4f5e1cf45244bbaccc108b9a6b0806c26840094835dc65b2ed0c4e388119196de9b775cf185c468bd493ffe1d382e8f4974ab3bd582d9f230 SHA512 47cbd2d65d8aa2e0c41ef2099fc6851a854d8f10b9c6759e9cfb2865f124e034d1b5f4fbcb7bd502efb12ae88cfec36f7e837500d601a4a6e0849a69dedc369b diff --git a/dev-ruby/json/json-2.11.3.ebuild b/dev-ruby/json/json-2.11.3.ebuild new file mode 100644 index 000000000000..a615e0883ca4 --- /dev/null +++ b/dev-ruby/json/json-2.11.3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +USE_RUBY="ruby32 ruby33 ruby34" + +RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md" +RUBY_FAKEGEM_DOCDIR="doc" + +RUBY_FAKEGEM_GEMSPEC="json.gemspec" + +RUBY_FAKEGEM_EXTENSIONS=(ext/json/ext/parser/extconf.rb ext/json/ext/generator/extconf.rb) +RUBY_FAKEGEM_EXTENSION_LIBDIR=lib/json/ext + +inherit ruby-fakegem + +DESCRIPTION="A JSON implementation as a Ruby extension" +HOMEPAGE="https://github.com/ruby/json" +SRC_URI="https://github.com/ruby/json/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="|| ( BSD-2 Ruby )" + +SLOT="$(ver_cut 1)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="doc test" + +DEPEND="dev-util/ragel" + +ruby_add_bdepend "dev-ruby/rake + doc? ( dev-ruby/rdoc ) + test? ( + dev-ruby/test-unit:2 + dev-ruby/test-unit-ruby-core + )" + +all_ruby_prepare() { + # Avoid building the extension twice! + # And use rdoc instead of sdoc which we don't have packaged + # And don't call git to list files. We're using the pregenerated spec anyway. + sed -i \ + -e '/task :test/ s|:compile||' \ + -e 's| => :clean||' \ + -e 's|sdoc|rdoc|' \ + -e 's|`git ls-files`|""|' \ + -e '/extensiontask/I s:^:#:' \ + Rakefile || die "rakefile fix failed" + + sed -e 's/__dir__/"."/' \ + -i ${RUBY_FAKEGEM_GEMSPEC} || die + + # Avoid setting gem since it will not be available yet when installing + sed -i -e '/gem/ s:^:#:' test/json/test_helper.rb || die + + # Fix version number + sed -e 's/2.8.2/2.9.0/' -i lib/json/version.rb || die +}
