diff options
author | Hans de Graaff <graaff@gentoo.org> | 2019-12-12 07:24:20 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2019-12-12 07:24:20 +0100 |
commit | d10c3a322d5a126111d77cd85740ef9e4ea86542 (patch) | |
tree | 00de9b68a7f1d996260ba280a6066ffb36202fc3 /dev-ruby/json | |
parent | app-misc/tmate: drop old (diff) | |
download | gentoo-d10c3a322d5a126111d77cd85740ef9e4ea86542.tar.gz gentoo-d10c3a322d5a126111d77cd85740ef9e4ea86542.tar.bz2 gentoo-d10c3a322d5a126111d77cd85740ef9e4ea86542.zip |
dev-ruby/json: add 2.3.0
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/json')
-rw-r--r-- | dev-ruby/json/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/json/json-2.3.0.ebuild | 73 |
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-ruby/json/Manifest b/dev-ruby/json/Manifest index 1e6c485ed71a..3ee1553c5c1b 100644 --- a/dev-ruby/json/Manifest +++ b/dev-ruby/json/Manifest @@ -1,2 +1,3 @@ DIST json-1.8.6.gem 144384 BLAKE2B db9e407be4ac7e0cb2e09369637b88f70cdac7a659c600dc83a5390746dfd21b0a5243af62afaeeff013b5a4116a3b22c65a481cad89f1ca9be8904af87d0345 SHA512 8f393da080293965389df4a606e0604c500b4b267897b3c1b9007b7700dde8156f6598c25790e84fa20a7e03c7ae359a0b267c7b84e52dfe2a1ac83cf652ad9b DIST json-2.2.0.gem 112640 BLAKE2B 973fe22979f4e2fa64a1090e44e5e149029881f20ec2749ce040b79a94610003941f6f3471bbc71e581491df74201bc4201419081c04a03790caaed888dfed1c SHA512 855d5cbeb6e62a7deb009ad454944430c0370cc98c53a1126d8ca3cac4b11a191bfb2ded84a957d4caa0f59cc9b6308e320a58569bddba8d6984078ea34703f2 +DIST json-2.3.0.gem 114176 BLAKE2B 329f1305a0cae3d44c74cc7475c7340e86b8447d5e4ffdd5854620669ee4ef5bba0ed7dbc617b0beffb7bfd8b3d79d46ce26feef37685413a4a5a9c230d0ce0c SHA512 9086a64b664f2d774439c0c9f10c2c1cd897684050eb60f8e3ad9256e0b9541deec3bd22fab0bdcf66e3d5bc795720c6923d514b6edb824c9962fc22f162b332 diff --git a/dev-ruby/json/json-2.3.0.ebuild b/dev-ruby/json/json-2.3.0.ebuild new file mode 100644 index 000000000000..075feb4751ad --- /dev/null +++ b/dev-ruby/json/json-2.3.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +USE_RUBY="ruby24 ruby25 ruby26" + +RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md" +RUBY_FAKEGEM_DOCDIR="doc" + +RUBY_FAKEGEM_GEMSPEC="json.gemspec" + +inherit multilib ruby-fakegem + +DESCRIPTION="A JSON implementation as a Ruby extension" +HOMEPAGE="https://github.com/flori/json" +LICENSE="Ruby" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +SLOT="2" +IUSE="" + +RDEPEND="${RDEPEND}" +DEPEND="${DEPEND} + dev-util/ragel" + +ruby_add_bdepend "dev-ruby/rake + doc? ( dev-ruby/rdoc ) + test? ( dev-ruby/test-unit:2 )" + +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" + + # Remove hardcoded and broken -O setting. + sed -i -e '/^ \(if\|unless\)/,/^ end/ s:^:#:' \ + -e '/^unless/,/^end/ s:^:#:' ext/json/ext/*/extconf.rb || die + + # Avoid setting gem since it will not be available yet when installing + sed -i -e '/gem/ s:^:#:' tests/test_helper.rb || die +} + +each_ruby_configure() { + for ext in parser generator ; do + ${RUBY} -Cext/json/ext/${ext} extconf.rb || die + done +} + +each_ruby_compile() { + for ext in parser generator ; do + emake V=1 -Cext/json/ext/${ext} + cp ext/json/ext/${ext}/${ext}$(get_modname) ext/json/ext/ || die + done +} + +each_ruby_test() { + for t in pure ext ; do + JSON=${T} ${RUBY} -S rake do_test_${t} || die + done +} + +each_ruby_install() { + each_fakegem_install + + ruby_fakegem_newins ext/json/ext/generator$(get_modname) lib/json/ext/generator$(get_modname) + ruby_fakegem_newins ext/json/ext/parser$(get_modname) lib/json/ext/parser$(get_modname) +} |