Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/json/
Date: Fri, 22 Feb 2019 06:19:24
Message-Id: 1550816351.e413bd52badd53eecccb613e1fc4a5a370a42d22.graaff@gentoo
1 commit: e413bd52badd53eecccb613e1fc4a5a370a42d22
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 22 06:19:11 2019 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 22 06:19:11 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e413bd52
7
8 dev-ruby/json: add 2.2.0
9
10 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 dev-ruby/json/Manifest | 1 +
14 dev-ruby/json/json-2.2.0.ebuild | 73 +++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 74 insertions(+)
16
17 diff --git a/dev-ruby/json/Manifest b/dev-ruby/json/Manifest
18 index bb9477f7047..e112a4db920 100644
19 --- a/dev-ruby/json/Manifest
20 +++ b/dev-ruby/json/Manifest
21 @@ -1,2 +1,3 @@
22 DIST json-1.8.6.gem 144384 BLAKE2B db9e407be4ac7e0cb2e09369637b88f70cdac7a659c600dc83a5390746dfd21b0a5243af62afaeeff013b5a4116a3b22c65a481cad89f1ca9be8904af87d0345 SHA512 8f393da080293965389df4a606e0604c500b4b267897b3c1b9007b7700dde8156f6598c25790e84fa20a7e03c7ae359a0b267c7b84e52dfe2a1ac83cf652ad9b
23 DIST json-2.1.0.gem 140800 BLAKE2B 28bb5334358369351ec9f13f5fb609ce34eb429cfeffb8dfde70864541516a0c2abd00a640b4647f76dcef198f967456bae0a858a2f213e5a30272c1be1878c7 SHA512 bffbe462e952bca321d4325ecb9c5e9f61e51cad13758581ecfaa6a038bac4e30dc7db50bd897086a5592f6fc437d0e0909f91e279aaf4dd71cf127100c3550b
24 +DIST json-2.2.0.gem 112640 BLAKE2B 973fe22979f4e2fa64a1090e44e5e149029881f20ec2749ce040b79a94610003941f6f3471bbc71e581491df74201bc4201419081c04a03790caaed888dfed1c SHA512 855d5cbeb6e62a7deb009ad454944430c0370cc98c53a1126d8ca3cac4b11a191bfb2ded84a957d4caa0f59cc9b6308e320a58569bddba8d6984078ea34703f2
25
26 diff --git a/dev-ruby/json/json-2.2.0.ebuild b/dev-ruby/json/json-2.2.0.ebuild
27 new file mode 100644
28 index 00000000000..a1a7b347ee3
29 --- /dev/null
30 +++ b/dev-ruby/json/json-2.2.0.ebuild
31 @@ -0,0 +1,73 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +USE_RUBY="ruby23 ruby24 ruby25 ruby26"
37 +
38 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
39 +RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
40 +RUBY_FAKEGEM_DOCDIR="doc"
41 +
42 +RUBY_FAKEGEM_GEMSPEC="json.gemspec"
43 +
44 +inherit multilib ruby-fakegem
45 +
46 +DESCRIPTION="A JSON implementation as a Ruby extension"
47 +HOMEPAGE="https://github.com/flori/json"
48 +LICENSE="Ruby"
49 +
50 +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"
51 +SLOT="2"
52 +IUSE=""
53 +
54 +RDEPEND="${RDEPEND}"
55 +DEPEND="${DEPEND}
56 + dev-util/ragel"
57 +
58 +ruby_add_bdepend "dev-ruby/rake
59 + doc? ( dev-ruby/rdoc )"
60 +
61 +all_ruby_prepare() {
62 + # Avoid building the extension twice!
63 + # And use rdoc instead of sdoc which we don't have packaged
64 + # And don't call git to list files. We're using the pregenerated spec anyway.
65 + sed -i \
66 + -e '/task :test/ s|:compile,||' \
67 + -e 's| => :clean||' \
68 + -e 's|sdoc|rdoc|' \
69 + -e 's|`git ls-files`|""|' \
70 + Rakefile || die "rakefile fix failed"
71 +
72 + # Remove hardcoded and broken -O setting.
73 + sed -i -e '/^ \(if\|unless\)/,/^ end/ s:^:#:' \
74 + -e '/^unless/,/^end/ s:^:#:' ext/json/ext/*/extconf.rb || die
75 +
76 + # Avoid setting gem since it will not be available yet when installing
77 + sed -i -e '/gem/ s:^:#:' tests/test_helper.rb || die
78 +}
79 +
80 +each_ruby_configure() {
81 + for ext in parser generator ; do
82 + ${RUBY} -Cext/json/ext/${ext} extconf.rb || die
83 + done
84 +}
85 +
86 +each_ruby_compile() {
87 + for ext in parser generator ; do
88 + emake V=1 -Cext/json/ext/${ext}
89 + cp ext/json/ext/${ext}/${ext}$(get_modname) ext/json/ext/ || die
90 + done
91 +}
92 +
93 +each_ruby_test() {
94 + for t in pure ext ; do
95 + JSON=${T} ${RUBY} -S rake do_test_${t} || die
96 + done
97 +}
98 +
99 +each_ruby_install() {
100 + each_fakegem_install
101 +
102 + ruby_fakegem_newins ext/json/ext/generator$(get_modname) lib/json/ext/generator$(get_modname)
103 + ruby_fakegem_newins ext/json/ext/parser$(get_modname) lib/json/ext/parser$(get_modname)
104 +}