summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2019-02-22 07:19:11 +0100
committerHans de Graaff <graaff@gentoo.org>2019-02-22 07:19:11 +0100
commite413bd52badd53eecccb613e1fc4a5a370a42d22 (patch)
tree61bfa8c67cb52f4a5ac44efda5fabf4cdfa81cb2 /dev-ruby/json
parentdev-ruby/fakefs: add 0.19.2 (diff)
downloadgentoo-e413bd52badd53eecccb613e1fc4a5a370a42d22.tar.gz
gentoo-e413bd52badd53eecccb613e1fc4a5a370a42d22.tar.bz2
gentoo-e413bd52badd53eecccb613e1fc4a5a370a42d22.zip
dev-ruby/json: add 2.2.0
Signed-off-by: Hans de Graaff <graaff@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-ruby/json')
-rw-r--r--dev-ruby/json/Manifest1
-rw-r--r--dev-ruby/json/json-2.2.0.ebuild73
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-ruby/json/Manifest b/dev-ruby/json/Manifest
index bb9477f70477..e112a4db9200 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.1.0.gem 140800 BLAKE2B 28bb5334358369351ec9f13f5fb609ce34eb429cfeffb8dfde70864541516a0c2abd00a640b4647f76dcef198f967456bae0a858a2f213e5a30272c1be1878c7 SHA512 bffbe462e952bca321d4325ecb9c5e9f61e51cad13758581ecfaa6a038bac4e30dc7db50bd897086a5592f6fc437d0e0909f91e279aaf4dd71cf127100c3550b
+DIST json-2.2.0.gem 112640 BLAKE2B 973fe22979f4e2fa64a1090e44e5e149029881f20ec2749ce040b79a94610003941f6f3471bbc71e581491df74201bc4201419081c04a03790caaed888dfed1c SHA512 855d5cbeb6e62a7deb009ad454944430c0370cc98c53a1126d8ca3cac4b11a191bfb2ded84a957d4caa0f59cc9b6308e320a58569bddba8d6984078ea34703f2
diff --git a/dev-ruby/json/json-2.2.0.ebuild b/dev-ruby/json/json-2.2.0.ebuild
new file mode 100644
index 000000000000..a1a7b347ee36
--- /dev/null
+++ b/dev-ruby/json/json-2.2.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby23 ruby24 ruby25 ruby26"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+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-fbsd ~x86-fbsd ~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 )"
+
+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)
+}