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: Fri, 08 Apr 2022 09:15:49
Message-Id: 1649409338.393e6d2846fff859e5ac9ac31027597202510f25.graaff@gentoo
1 commit: 393e6d2846fff859e5ac9ac31027597202510f25
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 8 05:34:58 2022 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 8 09:15:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=393e6d28
7
8 dev-ruby/rjb: add 1.6.5
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.5.ebuild | 73 +++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 74 insertions(+)
15
16 diff --git a/dev-ruby/rjb/Manifest b/dev-ruby/rjb/Manifest
17 index 5e48fa0fa565..72aaaa7afa0c 100644
18 --- a/dev-ruby/rjb/Manifest
19 +++ b/dev-ruby/rjb/Manifest
20 @@ -1 +1,2 @@
21 DIST rjb-1.6.4.gem 75264 BLAKE2B a678eb0b57e930bfcc7ea059da8ee6a9319b7e0e5bc632a5b97ec617e77d844491469ebc2366ba4290ee7648b4201f1d34be560e325c6099237d413c9ed8aa46 SHA512 49a0aaeb1a0e945ce373af74e01f33f531e27b205c33a382975125357ee1ceae0bea12d6fc32acb2dd66ce56c6034691520f355688cdaca5d01abff295d1a6c8
22 +DIST rjb-1.6.5.gem 75264 BLAKE2B 0608e3d2a70fbf909c2be454e71960ae900fadeda936677c290de1b1bfebacd43e9582dea847b3b6ca6c7294c11ff6fce409c1f59c72aea22c3fbc337ca0c590 SHA512 328a2b58eaf4673d5218ae7c87708c115b817f082844893c548a1fab5b544f729d6874cdba4f4fff6443e2fde2370daa8937f729b949c842461a4988033685ac
23
24 diff --git a/dev-ruby/rjb/rjb-1.6.5.ebuild b/dev-ruby/rjb/rjb-1.6.5.ebuild
25 new file mode 100644
26 index 000000000000..a4c722657a3e
27 --- /dev/null
28 +++ b/dev-ruby/rjb/rjb-1.6.5.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="ruby26 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 +}