commit:     faca3b5305dafdb08464c5b5bf5c0b8938538703
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 16 07:42:25 2024 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sat Nov 16 08:12:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faca3b53

dev-ruby/json: add 2.8.2

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 dev-ruby/json/Manifest          |  1 +
 dev-ruby/json/json-2.8.2.ebuild | 51 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/dev-ruby/json/Manifest b/dev-ruby/json/Manifest
index 050e5d154130..aec6252eb88f 100644
--- a/dev-ruby/json/Manifest
+++ b/dev-ruby/json/Manifest
@@ -2,3 +2,4 @@ DIST json-2.7.2.tar.gz 125814 BLAKE2B 
450c9495053c762446e77997bdc7e0291f8baf160a
 DIST json-2.7.5.tar.gz 826340 BLAKE2B 
6078a6496d6b8503e40cdb176516b4a1ad487c1a351d1bc77f98149a7b8380118b8d9d65e125905a5ba53a28bcbf48504b7b27c15893fe551c9ed124405d9096
 SHA512 
73d542e59669addf5bc514c9945dfbaf800b2b4384f8c673d7844d2712c55a6b22a952fb70541d34dbc9d9ac5e9dd3d7b892002cc1d129947a2b6fdad031879c
 DIST json-2.7.6.tar.gz 827356 BLAKE2B 
f2768102750dbd3e05410bf406a259efbc539feb18afc1684ad13f2c8fc2ac58e20ba0b722c0a411de7b04dc14be4fc0a9441901f28d442450e5c5f25aa42141
 SHA512 
d1f9c6c36a3c7ae8adb7f3900c0d8b5ca43a398837bc7eb6c8e915c1039f65fd575a863343e2af1887101439c88b074545f588bfb19cd11c629493b1a50689fc
 DIST json-2.8.1.tar.gz 841139 BLAKE2B 
6a8ba6fb714cb3de6183262101f507cdac4fb8f69c98b4af7a3a5c182dcf0ef1c26d3d7b5c628279345d1a691757f08c967883904695728c6c2aed93c3d60555
 SHA512 
2b51bf38e6322295d575a992b008b97cdfaa87de95929167cc472cb2a48b71752dc5a83114b7ee5aaf8cb4c9079d44d072f16149badfa07c4c1baa495cc72c53
+DIST json-2.8.2.tar.gz 841421 BLAKE2B 
286416fd14642a3044df0d382a10ae7dcff211b30e15303c4461decc961f80169b26f9ad6a2b8524d76f65058e773afe7c39654a166d263a4208d8649fe3a134
 SHA512 
d33f9abbe548c18f572c038261526c61bc5c5c70b5bc4f864f479dff41435aabdc0d30e190cf934ad71680b21aca1cbdd1cf379ad807a97459722c7d67f1de69

diff --git a/dev-ruby/json/json-2.8.2.ebuild b/dev-ruby/json/json-2.8.2.ebuild
new file mode 100644
index 000000000000..fcb2a51b4bd1
--- /dev/null
+++ b/dev-ruby/json/json-2.8.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby31 ruby32 ruby33"
+
+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`|""|' \
+               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
+}

Reply via email to