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/rjb/
Date: Wed, 28 Dec 2022 07:18:42
Message-Id: 1672211187.1056ea436ad0a6df0600e193f113ec36d96396b2.graaff@gentoo
1 commit: 1056ea436ad0a6df0600e193f113ec36d96396b2
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 28 07:06:27 2022 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 07:06:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1056ea43
7
8 dev-ruby/rjb: add 1.6.6
9
10 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
11
12 dev-ruby/rjb/Manifest | 1 +
13 dev-ruby/rjb/rjb-1.6.6.ebuild | 73 +++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 74 insertions(+)
15
16 diff --git a/dev-ruby/rjb/Manifest b/dev-ruby/rjb/Manifest
17 index 9c8220310357..5b0afe13abb3 100644
18 --- a/dev-ruby/rjb/Manifest
19 +++ b/dev-ruby/rjb/Manifest
20 @@ -1 +1,2 @@
21 DIST rjb-1.6.5.gem 75264 BLAKE2B 0608e3d2a70fbf909c2be454e71960ae900fadeda936677c290de1b1bfebacd43e9582dea847b3b6ca6c7294c11ff6fce409c1f59c72aea22c3fbc337ca0c590 SHA512 328a2b58eaf4673d5218ae7c87708c115b817f082844893c548a1fab5b544f729d6874cdba4f4fff6443e2fde2370daa8937f729b949c842461a4988033685ac
22 +DIST rjb-1.6.6.gem 74752 BLAKE2B a5dc335d9d5380b9ae6a94dabbe6c2c2db3daeffbe5a4900928ebc64eaeca07b4bb6bd1957a10639153808adb0910768b76fc733175e102824508e889690d30c SHA512 6b6af001905e4b342ec54149ac5dd475c2ab240be5622e1cd8e31765ea5c273542110a75fa92e7d0e220a07689ada9d2b899b37c6840353733e59a19c8e13b1a
23
24 diff --git a/dev-ruby/rjb/rjb-1.6.6.ebuild b/dev-ruby/rjb/rjb-1.6.6.ebuild
25 new file mode 100644
26 index 000000000000..85ee9b533786
27 --- /dev/null
28 +++ b/dev-ruby/rjb/rjb-1.6.6.ebuild
29 @@ -0,0 +1,73 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +USE_RUBY="ruby27 ruby30 ruby31"
36 +
37 +RUBY_FAKEGEM_EXTRADOC="readme.txt ChangeLog"
38 +RUBY_FAKEGEM_TASK_TEST=""
39 +
40 +RUBY_FAKEGEM_EXTRAINSTALL="data"
41 +
42 +RUBY_FAKEGEM_EXTENSIONS=(ext/extconf.rb)
43 +
44 +inherit java-pkg-2 ruby-fakegem
45 +
46 +DESCRIPTION="Rjb is a Ruby-Java software bridge"
47 +HOMEPAGE="https://github.com/arton/rjb"
48 +
49 +LICENSE="LGPL-2.1"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="examples hardened"
53 +
54 +DEPEND=">=virtual/jdk-1.8
55 + hardened? ( sys-apps/paxctl )"
56 +RDEPEND=">=virtual/jre-1.8:*"
57 +
58 +pkg_setup() {
59 + ruby-ng_pkg_setup
60 + java-pkg-2_pkg_setup
61 +}
62 +
63 +all_ruby_prepare() {
64 + # The console is not available for testing.
65 + sed -i -e '/test_noarg_sinvoke/,/end/ s:^:#:' test/test.rb || die
66 +
67 + # Avoid encoding tests since not all locales may be available.
68 + sed -i -e '/test_kjconv/,/^ end/ s:^:#:' test/test.rb || die
69 +
70 + # Fix build on openjdk-11
71 + sed -i -e 's#javah -classpath ../data/rjb jp.co.infoseek.hp.arton.rjb.RBridge#javac -h . -classpath ../data/rjb RBridge.java#g' ext/extconf.rb || die
72 +}
73 +
74 +each_ruby_prepare() {
75 + #dev-lang/ruby might need the "hardened" flag to enforce the following:
76 + if use hardened; then
77 + paxctl -v /usr/bin/ruby 2>/dev/null | grep MPROTECT | grep disabled || ewarn '!!! rjb will only work if ruby is MPROTECT disabled\n please disable it if required using paxctl -m /usr/bin/ruby'
78 + fi
79 + # force compilation of class file for our JVM
80 + rm -rf data
81 +}
82 +
83 +each_ruby_install() {
84 + each_fakegem_install
85 +
86 + if use examples; then
87 + dodoc -r samples
88 + fi
89 +}
90 +
91 +each_ruby_test() {
92 + if use hardened; then
93 + paxctl -v ${RUBY} 2>/dev/null | grep MPROTECT | grep -q disabled
94 + if [ $? = 0 ]; then
95 + ${RUBY} -C test -I../lib:.:../ext test.rb || die
96 + else
97 + ewarn "${RUBY} has MPROTECT enabled, rjb will not work until it is disabled, skipping tests."
98 + fi
99 + else
100 + ${RUBY} -C test -I../lib:.:../ext test.rb || die
101 + fi
102 +}