1 |
commit: 8ff6c764808cdfd0d93d72b8a401efddb3a78974 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 7 10:53:23 2021 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 7 16:17:42 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ff6c764 |
7 |
|
8 |
dev-ruby/json: fix extension install |
9 |
|
10 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
11 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
12 |
|
13 |
dev-ruby/json/json-2.5.1-r1.ebuild | 63 ++++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 63 insertions(+) |
15 |
|
16 |
diff --git a/dev-ruby/json/json-2.5.1-r1.ebuild b/dev-ruby/json/json-2.5.1-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..ee4ed3bbb0f |
19 |
--- /dev/null |
20 |
+++ b/dev-ruby/json/json-2.5.1-r1.ebuild |
21 |
@@ -0,0 +1,63 @@ |
22 |
+# Copyright 1999-2021 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+USE_RUBY="ruby25 ruby26 ruby27 ruby30" |
27 |
+ |
28 |
+RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md" |
29 |
+RUBY_FAKEGEM_DOCDIR="doc" |
30 |
+ |
31 |
+RUBY_FAKEGEM_GEMSPEC="json.gemspec" |
32 |
+ |
33 |
+RUBY_FAKEGEM_EXTENSIONS=(ext/json/ext/parser/extconf.rb ext/json/ext/generator/extconf.rb) |
34 |
+ |
35 |
+inherit multilib ruby-fakegem |
36 |
+ |
37 |
+DESCRIPTION="A JSON implementation as a Ruby extension" |
38 |
+HOMEPAGE="https://github.com/flori/json" |
39 |
+SRC_URI="https://github.com/flori/json/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
40 |
+LICENSE="Ruby" |
41 |
+ |
42 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
43 |
+SLOT="2" |
44 |
+IUSE="" |
45 |
+ |
46 |
+RDEPEND="${RDEPEND}" |
47 |
+DEPEND="${DEPEND} |
48 |
+ dev-util/ragel" |
49 |
+ |
50 |
+ruby_add_bdepend "dev-ruby/rake |
51 |
+ doc? ( dev-ruby/rdoc ) |
52 |
+ test? ( dev-ruby/test-unit:2 )" |
53 |
+ |
54 |
+all_ruby_prepare() { |
55 |
+ # Avoid building the extension twice! |
56 |
+ # And use rdoc instead of sdoc which we don't have packaged |
57 |
+ # And don't call git to list files. We're using the pregenerated spec anyway. |
58 |
+ sed -i \ |
59 |
+ -e '/task :test/ s|:compile,||' \ |
60 |
+ -e 's| => :clean||' \ |
61 |
+ -e 's|sdoc|rdoc|' \ |
62 |
+ -e 's|`git ls-files`|""|' \ |
63 |
+ Rakefile || die "rakefile fix failed" |
64 |
+ |
65 |
+ # Remove hardcoded and broken -O setting. |
66 |
+ sed -i -e '/^ \(if\|unless\)/,/^ end/ s:^:#:' \ |
67 |
+ -e '/^unless/,/^end/ s:^:#:' ext/json/ext/*/extconf.rb || die |
68 |
+ |
69 |
+ # Avoid setting gem since it will not be available yet when installing |
70 |
+ sed -i -e '/gem/ s:^:#:' tests/test_helper.rb || die |
71 |
+} |
72 |
+ |
73 |
+#each_ruby_compile() { |
74 |
+# for ext in parser generator ; do |
75 |
+# cp ext/json/ext/${ext}/${ext}$(get_modname) ext/json/ext/ || die |
76 |
+# done |
77 |
+#} |
78 |
+ |
79 |
+each_ruby_install() { |
80 |
+ each_fakegem_install |
81 |
+ |
82 |
+ #ruby_fakegem_newins ext/json/ext/generator$(get_modname) lib/json/ext/generator$(get_modname) |
83 |
+ #ruby_fakegem_newins ext/json/ext/parser$(get_modname) lib/json/ext/parser$(get_modname) |
84 |
+} |