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-lang/ruby/
Date: Tue, 31 Mar 2020 15:42:02
Message-Id: 1585669312.2f436c51a1434781c58f5a470ce33d29e99b7756.graaff@gentoo
1 commit: 2f436c51a1434781c58f5a470ce33d29e99b7756
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 31 15:41:39 2020 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 31 15:41:52 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f436c51
7
8 dev-lang/ruby: add new versions for bug 715620
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-lang/ruby/Manifest | 4 +
14 dev-lang/ruby/ruby-2.4.10.ebuild | 228 +++++++++++++++++++++++++++++++++++++
15 dev-lang/ruby/ruby-2.5.8.ebuild | 223 ++++++++++++++++++++++++++++++++++++
16 dev-lang/ruby/ruby-2.6.6.ebuild | 235 ++++++++++++++++++++++++++++++++++++++
17 dev-lang/ruby/ruby-2.7.1.ebuild | 237 +++++++++++++++++++++++++++++++++++++++
18 5 files changed, 927 insertions(+)
19
20 diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
21 index b61365d960f..770d52e8c54 100644
22 --- a/dev-lang/ruby/Manifest
23 +++ b/dev-lang/ruby/Manifest
24 @@ -1,4 +1,8 @@
25 +DIST ruby-2.4.10.tar.xz 10100664 BLAKE2B 7301f34b94bb6d88c0d049eed4220ddb290c877b130e90c822226bc454b3e72c90ae151db0e828068c8fe02b21cd41c8f3cd43d4e95ab688d2cd6f3f3840ea9d SHA512 11c7a9ea1353f752763b189815ac34674cc8ebf7141517838b7f040823e892780d94ec3091c1f5d1415f9bc1b838b7f6f9de13a706df7bef80ce3b146a7d6660
26 DIST ruby-2.4.9.tar.xz 10078316 BLAKE2B ad83adf6b884a9a36e83cc754077f706afa221a9e8b81d92f6b6a1b829dc0350bdacd67b0b4e1e196a17e3f7d1c65f1e9b38e245aeddf089576eaca7d051701b SHA512 9046575315c29c789427c2d00c832f0c0970e47fd158bbe8e4f2df5cff2ea9c06c65c3493adb4656e5b32ebfdc546092911f98a8ad7f698bc001c290db5888c7
27 DIST ruby-2.5.7.tar.xz 11296440 BLAKE2B 6f3590f30c7b196145a83490abed24b0059521374a03086646186b20670bfed548ea744c910c8eda0d11607d8673644d7fb23ff9091dd2f6dfcbc43080fe0f97 SHA512 63b7c75fab44cd1bd22f22ddec00c740cf379ac7240da0dfafcec54347766695faef47428ce1c433fd77fa96992e976c984697067fa526236d383b12adc9ce75
28 +DIST ruby-2.5.8.tar.xz 11298404 BLAKE2B 3256c0448e72b63c0bd89f89a27fa9c09c8feed54d42cd79899b7d5cfe9dbc29ca708d12c630b3f52ff85b0c6a4011ae7ff0483d64b2fd445700a72a91028035 SHA512 2886be764a454425c5beef2777c64a70ee0d048b07896b327633d904f5077fea4299526689f9e2ac4dcd2fc4811cf9a6c8ce75367ed35d29dfe1a54222872e0d
29 DIST ruby-2.6.5.tar.xz 11553580 BLAKE2B 07739a92ff17467fe6d31bb4dce56ae35fd9c67bb697ebc00b4845474c75d8377c77916e6e129512cfffcf76bd60e6327e818e899b6160f3222912654d5eb118 SHA512 e8ae3b5d4d23a93d0ef6057235ad0e573665a8b4b6544e1c70b4cce9c4d2fb9094e5c8fe8a9ab7b9996efe3ada603f9b4ef1fd08fb5a83253c1ae2b5e3f202db
30 +DIST ruby-2.6.6.tar.xz 11567284 BLAKE2B 45e910dd9b128c46bff3003834c4fdcbbc2e2e4d3e44f298ff4356a285de2c375d6b6021a3aa28d89336b32a1655fa4a7c086d07f4a0f6bcd578a11dd4a894da SHA512 86caf93dbf61d03781767ab5375a7edf4761f13ba08ccfefe16c0a7550499237e7390c2f72a95d42670d4fe76b2401b4218936187c62ec1572799e9e04c50d62
31 DIST ruby-2.7.0.tar.xz 11990900 BLAKE2B 0f4969780618979190a92ca317963f825d854ecb437e7031cb7848b04bc9cb9532145968e33f5b8022449bccd1b0828b87a0ed0c0a09b182e2484d0811975a0d SHA512 dd5690c631bf3a2b76cdc06902bcd76a89713a045e136debab9b8a81ff8c433bbb254aa09e4014ca1cf85a69ff4bcb13de11da5e40c224e7268be43ef2194af7
32 +DIST ruby-2.7.1.tar.xz 12003684 BLAKE2B 90a35c3e246cfe982a146be29a3d121d6e2c251ed96703dbc46b98c21e0e43e5445132e6119e584ae35f7193f063ff1b14822f947a4e07037c37fbba5e4038da SHA512 79f98b1ea98e0b10ec79da1883e8fc84d48ffe5c09ae945cbebde94365e35a589d919aac965f74d70ca7e21370ecee631ac5a8f9c4eac61d62f5aa629f27bf31
33
34 diff --git a/dev-lang/ruby/ruby-2.4.10.ebuild b/dev-lang/ruby/ruby-2.4.10.ebuild
35 new file mode 100644
36 index 00000000000..93fbdf22a17
37 --- /dev/null
38 +++ b/dev-lang/ruby/ruby-2.4.10.ebuild
39 @@ -0,0 +1,228 @@
40 +# Copyright 1999-2020 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=7
44 +
45 +inherit autotools flag-o-matic multilib
46 +
47 +MY_P="${PN}-$(ver_cut 1-3)"
48 +S=${WORKDIR}/${MY_P}
49 +
50 +SLOT=$(ver_cut 1-2)
51 +MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
52 +RUBYVERSION=${SLOT}.0
53 +
54 +DESCRIPTION="An object-oriented scripting language"
55 +HOMEPAGE="https://www.ruby-lang.org/"
56 +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
57 +
58 +LICENSE="|| ( Ruby-BSD BSD-2 )"
59 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
60 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
61 +
62 +RDEPEND="
63 + berkdb? ( sys-libs/db:= )
64 + gdbm? ( sys-libs/gdbm:= )
65 + jemalloc? ( dev-libs/jemalloc )
66 + ssl? (
67 + !libressl? ( dev-libs/openssl:0= )
68 + libressl? ( dev-libs/libressl )
69 + )
70 + socks5? ( >=net-proxy/dante-1.1.13 )
71 + tk? (
72 + dev-lang/tcl:0=[threads]
73 + dev-lang/tk:0=[threads]
74 + )
75 + dev-libs/libyaml
76 + dev-libs/libffi:=
77 + sys-libs/readline:0=
78 + sys-libs/zlib
79 + >=app-eselect/eselect-ruby-20161226
80 + !<dev-ruby/rdoc-3.9.4
81 + !<dev-ruby/rubygems-1.8.10-r1"
82 +
83 +DEPEND="${RDEPEND}"
84 +
85 +BUNDLED_GEMS="
86 + >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24]
87 + >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24]
88 + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24]
89 + >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24]
90 + >=dev-ruby/rake-12.0.0[ruby_targets_ruby24]
91 + >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24]
92 + >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24]
93 +"
94 +
95 +PDEPEND="
96 + ${BUNDLED_GEMS}
97 + virtual/rubygems[ruby_targets_ruby24]
98 + >=dev-ruby/json-2.0.2[ruby_targets_ruby24]
99 + rdoc? ( >=dev-ruby/rdoc-5.1.0-r1[ruby_targets_ruby24] )
100 + xemacs? ( app-xemacs/ruby-modes )"
101 +
102 +src_prepare() {
103 + eapply "${FILESDIR}"/${SLOT}/{002,005,009,012}*.patch
104 +
105 + einfo "Unbundling gems..."
106 + cd "$S"
107 + # Remove bundled gems that we will install via PDEPEND, bug
108 + # 539700. Use explicit version numbers to ensure rm fails when they
109 + # change so we can update dependencies accordingly.
110 + rm -f gems/{did_you_mean-1.1.0,minitest-5.10.1,net-telnet-0.1.1,power_assert-0.4.1,rake-12.0.0,test-unit-3.2.3,xmlrpc-0.2.1}.gem || die
111 +
112 + einfo "Removing bundled libraries..."
113 + rm -fr ext/fiddle/libffi-3.2.1 || die
114 +
115 + # Fix a hardcoded lib path in configure script
116 + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
117 + configure.in || die "sed failed"
118 +
119 + eapply_user
120 +
121 + eautoreconf
122 +}
123 +
124 +src_configure() {
125 + local modules= myconf=
126 +
127 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
128 + filter-flags -fomit-frame-pointer
129 + # In many places aliasing rules are broken; play it safe
130 + # as it's risky with newer compilers to leave it as it is.
131 + append-flags -fno-strict-aliasing
132 + # SuperH needs this
133 + use sh && append-flags -mieee
134 +
135 + # Socks support via dante
136 + if use socks5 ; then
137 + # Socks support can't be disabled as long as SOCKS_SERVER is
138 + # set and socks library is present, so need to unset
139 + # SOCKS_SERVER in that case.
140 + unset SOCKS_SERVER
141 + fi
142 +
143 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
144 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
145 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
146 + fi
147 +
148 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
149 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
150 +
151 + # Determine which modules *not* to build depending in the USE flags.
152 + if ! use berkdb ; then
153 + modules="${modules},dbm"
154 + fi
155 + if ! use gdbm ; then
156 + modules="${modules},gdbm"
157 + fi
158 + if ! use ssl ; then
159 + modules="${modules},openssl"
160 + fi
161 + if ! use tk ; then
162 + modules="${modules},tk"
163 + fi
164 +
165 + # Provide an empty LIBPATHENV because we disable rpath but we do not
166 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
167 + # #564272
168 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
169 + --program-suffix=${MY_SUFFIX} \
170 + --with-soname=ruby${MY_SUFFIX} \
171 + --enable-shared \
172 + --enable-pthread \
173 + --disable-rpath \
174 + --with-out-ext="${modules}" \
175 + $(use_with jemalloc jemalloc) \
176 + $(use_enable socks5 socks) \
177 + $(use_enable doc install-doc) \
178 + --enable-ipv6 \
179 + $(use_enable static-libs static) \
180 + $(use_enable static-libs install-static-library) \
181 + $(use_with static-libs static-linked-ext) \
182 + $(use_enable debug) \
183 + ${myconf} \
184 + --enable-option-checking=no
185 +}
186 +
187 +src_compile() {
188 + emake V=1 EXTLDFLAGS="${LDFLAGS}"
189 +}
190 +
191 +src_test() {
192 + emake -j1 V=1 test
193 +
194 + elog "Ruby's make test has been run. Ruby also ships with a make check"
195 + elog "that cannot be run until after ruby has been installed."
196 + elog
197 + if use rubytests; then
198 + elog "You have enabled rubytests, so they will be installed to"
199 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
200 + elog "than root, and you must place them into a writeable directory."
201 + elog "Then call: "
202 + elog
203 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
204 + else
205 + elog "Enable the rubytests USE flag to install the make check tests"
206 + fi
207 +}
208 +
209 +src_install() {
210 + # Remove the remaining bundled gems. We do this late in the process
211 + # since they are used during the build to e.g. create the
212 + # documentation.
213 + rm -rf ext/json || die
214 +
215 + # Ruby is involved in the install process, we don't want interference here.
216 + unset RUBYOPT
217 +
218 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
219 +
220 + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
221 + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
222 + for d in $(find "${S}/ext" -type d) ; do
223 + RUBYLIB="${RUBYLIB}:$d"
224 + done
225 + export LD_LIBRARY_PATH RUBYLIB
226 +
227 + emake V=1 DESTDIR="${D}" install
228 +
229 + # Remove installed rubygems and rdoc copy
230 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
231 + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
232 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
233 + rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
234 +
235 + if use doc; then
236 + make DESTDIR="${D}" install-doc || die "make install-doc failed"
237 + fi
238 +
239 + if use examples; then
240 + insinto /usr/share/doc/${PF}
241 + doins -r sample
242 + fi
243 +
244 + dodoc ChangeLog NEWS doc/NEWS* README*
245 +
246 + if use rubytests; then
247 + pushd test
248 + insinto /usr/share/${PN}-${SLOT}/test
249 + doins -r .
250 + popd
251 + fi
252 +}
253 +
254 +pkg_postinst() {
255 + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
256 + eselect ruby set ruby${MY_SUFFIX}
257 + fi
258 +
259 + elog
260 + elog "To switch between available Ruby profiles, execute as root:"
261 + elog "\teselect ruby set ruby(23|24|...)"
262 + elog
263 +}
264 +
265 +pkg_postrm() {
266 + eselect ruby cleanup
267 +}
268
269 diff --git a/dev-lang/ruby/ruby-2.5.8.ebuild b/dev-lang/ruby/ruby-2.5.8.ebuild
270 new file mode 100644
271 index 00000000000..c9e0bdc78e6
272 --- /dev/null
273 +++ b/dev-lang/ruby/ruby-2.5.8.ebuild
274 @@ -0,0 +1,223 @@
275 +# Copyright 1999-2020 Gentoo Authors
276 +# Distributed under the terms of the GNU General Public License v2
277 +
278 +EAPI=7
279 +
280 +inherit autotools flag-o-matic multilib
281 +
282 +MY_P="${PN}-$(ver_cut 1-3)"
283 +S=${WORKDIR}/${MY_P}
284 +
285 +SLOT=$(ver_cut 1-2)
286 +MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
287 +RUBYVERSION=${SLOT}.0
288 +
289 +DESCRIPTION="An object-oriented scripting language"
290 +HOMEPAGE="https://www.ruby-lang.org/"
291 +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
292 +
293 +LICENSE="|| ( Ruby-BSD BSD-2 )"
294 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
295 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
296 +
297 +RDEPEND="
298 + berkdb? ( sys-libs/db:= )
299 + gdbm? ( sys-libs/gdbm:= )
300 + jemalloc? ( dev-libs/jemalloc )
301 + ssl? (
302 + !libressl? ( dev-libs/openssl:0= )
303 + libressl? ( dev-libs/libressl )
304 + )
305 + socks5? ( >=net-proxy/dante-1.1.13 )
306 + tk? (
307 + dev-lang/tcl:0=[threads]
308 + dev-lang/tk:0=[threads]
309 + )
310 + dev-libs/libyaml
311 + dev-libs/libffi:=
312 + sys-libs/readline:0=
313 + sys-libs/zlib
314 + >=app-eselect/eselect-ruby-20171225
315 +"
316 +
317 +DEPEND="${RDEPEND}"
318 +
319 +BUNDLED_GEMS="
320 + >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25]
321 + >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25]
322 + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25]
323 + >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25]
324 + >=dev-ruby/rake-12.3.0[ruby_targets_ruby25]
325 + >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25]
326 + >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25]
327 +"
328 +
329 +PDEPEND="
330 + ${BUNDLED_GEMS}
331 + virtual/rubygems[ruby_targets_ruby25]
332 + >=dev-ruby/json-2.0.2[ruby_targets_ruby25]
333 + rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] )
334 + xemacs? ( app-xemacs/ruby-modes )"
335 +
336 +src_prepare() {
337 + eapply "${FILESDIR}"/${SLOT}/{001,005,011}*.patch
338 +
339 + einfo "Unbundling gems..."
340 + cd "$S"
341 + # Remove bundled gems that we will install via PDEPEND, bug
342 + # 539700. Use explicit version numbers to ensure rm fails when they
343 + # change so we can update dependencies accordingly.
344 + rm -f gems/{did_you_mean-1.2.0,minitest-5.10.3,net-telnet-0.1.1,power_assert-1.1.1,rake-12.3.0,test-unit-3.2.7,xmlrpc-0.3.0}.gem || die
345 +
346 + einfo "Removing bundled libraries..."
347 + rm -fr ext/fiddle/libffi-3.2.1 || die
348 +
349 + eapply_user
350 +
351 + eautoreconf
352 +}
353 +
354 +src_configure() {
355 + local modules= myconf=
356 +
357 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
358 + filter-flags -fomit-frame-pointer
359 + # In many places aliasing rules are broken; play it safe
360 + # as it's risky with newer compilers to leave it as it is.
361 + append-flags -fno-strict-aliasing
362 + # SuperH needs this
363 + use sh && append-flags -mieee
364 +
365 + # Socks support via dante
366 + if use socks5 ; then
367 + # Socks support can't be disabled as long as SOCKS_SERVER is
368 + # set and socks library is present, so need to unset
369 + # SOCKS_SERVER in that case.
370 + unset SOCKS_SERVER
371 + fi
372 +
373 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
374 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
375 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
376 + fi
377 +
378 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
379 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
380 +
381 + # Determine which modules *not* to build depending in the USE flags.
382 + if ! use berkdb ; then
383 + modules="${modules},dbm"
384 + fi
385 + if ! use gdbm ; then
386 + modules="${modules},gdbm"
387 + fi
388 + if ! use ssl ; then
389 + modules="${modules},openssl"
390 + fi
391 + if ! use tk ; then
392 + modules="${modules},tk"
393 + fi
394 +
395 + # Provide an empty LIBPATHENV because we disable rpath but we do not
396 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
397 + # #564272
398 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
399 + --program-suffix=${MY_SUFFIX} \
400 + --with-soname=ruby${MY_SUFFIX} \
401 + --enable-shared \
402 + --enable-pthread \
403 + --disable-rpath \
404 + --with-out-ext="${modules}" \
405 + $(use_with jemalloc jemalloc) \
406 + $(use_enable socks5 socks) \
407 + $(use_enable doc install-doc) \
408 + --enable-ipv6 \
409 + $(use_enable static-libs static) \
410 + $(use_enable static-libs install-static-library) \
411 + $(use_with static-libs static-linked-ext) \
412 + $(use_enable debug) \
413 + ${myconf} \
414 + --enable-option-checking=no
415 +}
416 +
417 +src_compile() {
418 + emake V=1 EXTLDFLAGS="${LDFLAGS}"
419 +}
420 +
421 +src_test() {
422 + emake -j1 V=1 test
423 +
424 + elog "Ruby's make test has been run. Ruby also ships with a make check"
425 + elog "that cannot be run until after ruby has been installed."
426 + elog
427 + if use rubytests; then
428 + elog "You have enabled rubytests, so they will be installed to"
429 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
430 + elog "than root, and you must place them into a writeable directory."
431 + elog "Then call: "
432 + elog
433 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
434 + else
435 + elog "Enable the rubytests USE flag to install the make check tests"
436 + fi
437 +}
438 +
439 +src_install() {
440 + # Remove the remaining bundled gems. We do this late in the process
441 + # since they are used during the build to e.g. create the
442 + # documentation.
443 + rm -rf ext/json || die
444 +
445 + # Ruby is involved in the install process, we don't want interference here.
446 + unset RUBYOPT
447 +
448 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
449 +
450 + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
451 + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
452 + for d in $(find "${S}/ext" -type d) ; do
453 + RUBYLIB="${RUBYLIB}:$d"
454 + done
455 + export LD_LIBRARY_PATH RUBYLIB
456 +
457 + emake V=1 DESTDIR="${D}" install
458 +
459 + # Remove installed rubygems and rdoc copy
460 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
461 + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
462 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
463 + rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
464 +
465 + if use doc; then
466 + make DESTDIR="${D}" install-doc || die "make install-doc failed"
467 + fi
468 +
469 + if use examples; then
470 + insinto /usr/share/doc/${PF}
471 + doins -r sample
472 + fi
473 +
474 + dodoc ChangeLog NEWS doc/NEWS* README*
475 +
476 + if use rubytests; then
477 + pushd test
478 + insinto /usr/share/${PN}-${SLOT}/test
479 + doins -r .
480 + popd
481 + fi
482 +}
483 +
484 +pkg_postinst() {
485 + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
486 + eselect ruby set ruby${MY_SUFFIX}
487 + fi
488 +
489 + elog
490 + elog "To switch between available Ruby profiles, execute as root:"
491 + elog "\teselect ruby set ruby(23|24|...)"
492 + elog
493 +}
494 +
495 +pkg_postrm() {
496 + eselect ruby cleanup
497 +}
498
499 diff --git a/dev-lang/ruby/ruby-2.6.6.ebuild b/dev-lang/ruby/ruby-2.6.6.ebuild
500 new file mode 100644
501 index 00000000000..d8c52f1d99a
502 --- /dev/null
503 +++ b/dev-lang/ruby/ruby-2.6.6.ebuild
504 @@ -0,0 +1,235 @@
505 +# Copyright 1999-2020 Gentoo Authors
506 +# Distributed under the terms of the GNU General Public License v2
507 +
508 +EAPI=7
509 +
510 +inherit autotools flag-o-matic multilib
511 +
512 +MY_P="${PN}-$(ver_cut 1-3)"
513 +S=${WORKDIR}/${MY_P}
514 +
515 +SLOT=$(ver_cut 1-2)
516 +MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
517 +RUBYVERSION=${SLOT}.0
518 +
519 +DESCRIPTION="An object-oriented scripting language"
520 +HOMEPAGE="https://www.ruby-lang.org/"
521 +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
522 +
523 +LICENSE="|| ( Ruby-BSD BSD-2 )"
524 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
525 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
526 +
527 +RDEPEND="
528 + berkdb? ( sys-libs/db:= )
529 + gdbm? ( sys-libs/gdbm:= )
530 + jemalloc? ( dev-libs/jemalloc )
531 + jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
532 + ssl? (
533 + !libressl? ( dev-libs/openssl:0= )
534 + libressl? ( dev-libs/libressl )
535 + )
536 + socks5? ( >=net-proxy/dante-1.1.13 )
537 + tk? (
538 + dev-lang/tcl:0=[threads]
539 + dev-lang/tk:0=[threads]
540 + )
541 + dev-libs/libyaml
542 + dev-libs/libffi:=
543 + sys-libs/readline:0=
544 + sys-libs/zlib
545 + >=app-eselect/eselect-ruby-20171225
546 +"
547 +
548 +DEPEND="${RDEPEND}"
549 +
550 +BUNDLED_GEMS="
551 + >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
552 + >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
553 + >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
554 + >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
555 + >=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
556 + >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
557 + >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
558 +"
559 +
560 +PDEPEND="
561 + ${BUNDLED_GEMS}
562 + virtual/rubygems[ruby_targets_ruby26]
563 + >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
564 + >=dev-ruby/json-2.0.2[ruby_targets_ruby26]
565 + rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
566 + xemacs? ( app-xemacs/ruby-modes )"
567 +
568 +src_prepare() {
569 + # 005 does not compile bigdecimal and is questionable because it
570 + # compiles ruby in a non-standard way, may be dropped
571 + eapply "${FILESDIR}"/2.6/010*.patch
572 +
573 + einfo "Unbundling gems..."
574 + cd "$S"
575 + # Remove bundled gems that we will install via PDEPEND, bug
576 + # 539700.
577 + rm -fr gems/* || die
578 +
579 + einfo "Removing bundled libraries..."
580 + rm -fr ext/fiddle/libffi-3.2.1 || die
581 +
582 + eapply_user
583 +
584 + eautoreconf
585 +}
586 +
587 +src_configure() {
588 + local modules= myconf=
589 +
590 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
591 + filter-flags -fomit-frame-pointer
592 + # In many places aliasing rules are broken; play it safe
593 + # as it's risky with newer compilers to leave it as it is.
594 + append-flags -fno-strict-aliasing
595 + # SuperH needs this
596 + use sh && append-flags -mieee
597 +
598 + # Socks support via dante
599 + if use socks5 ; then
600 + # Socks support can't be disabled as long as SOCKS_SERVER is
601 + # set and socks library is present, so need to unset
602 + # SOCKS_SERVER in that case.
603 + unset SOCKS_SERVER
604 + fi
605 +
606 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
607 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
608 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
609 + fi
610 +
611 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
612 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
613 +
614 + # Determine which modules *not* to build depending in the USE flags.
615 + if ! use berkdb ; then
616 + modules="${modules},dbm"
617 + fi
618 + if ! use gdbm ; then
619 + modules="${modules},gdbm"
620 + fi
621 + if ! use ssl ; then
622 + modules="${modules},openssl"
623 + fi
624 + if ! use tk ; then
625 + modules="${modules},tk"
626 + fi
627 +
628 + # Provide an empty LIBPATHENV because we disable rpath but we do not
629 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
630 + # #564272
631 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
632 + --program-suffix=${MY_SUFFIX} \
633 + --with-soname=ruby${MY_SUFFIX} \
634 + --enable-shared \
635 + --enable-pthread \
636 + --disable-rpath \
637 + --with-out-ext="${modules}" \
638 + $(use_with jemalloc jemalloc) \
639 + $(use_enable jit jit-support ) \
640 + $(use_enable socks5 socks) \
641 + $(use_enable doc install-doc) \
642 + --enable-ipv6 \
643 + $(use_enable static-libs static) \
644 + $(use_enable static-libs install-static-library) \
645 + $(use_with static-libs static-linked-ext) \
646 + $(use_enable debug) \
647 + ${myconf} \
648 + --enable-option-checking=no
649 +
650 + # Makefile is broken because it lacks -ldl
651 + rm -rf ext/-test-/popen_deadlock || die
652 +}
653 +
654 +src_compile() {
655 + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
656 +}
657 +
658 +src_test() {
659 + emake -j1 V=1 test
660 +
661 + elog "Ruby's make test has been run. Ruby also ships with a make check"
662 + elog "that cannot be run until after ruby has been installed."
663 + elog
664 + if use rubytests; then
665 + elog "You have enabled rubytests, so they will be installed to"
666 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
667 + elog "than root, and you must place them into a writeable directory."
668 + elog "Then call: "
669 + elog
670 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
671 + else
672 + elog "Enable the rubytests USE flag to install the make check tests"
673 + fi
674 +}
675 +
676 +src_install() {
677 + # Remove the remaining bundled gems. We do this late in the process
678 + # since they are used during the build to e.g. create the
679 + # documentation.
680 + rm -rf ext/json || die
681 + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
682 +
683 + # Ruby is involved in the install process, we don't want interference here.
684 + unset RUBYOPT
685 +
686 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
687 +
688 + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
689 + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
690 + for d in $(find "${S}/ext" -type d) ; do
691 + RUBYLIB="${RUBYLIB}:$d"
692 + done
693 + export LD_LIBRARY_PATH RUBYLIB
694 +
695 + # Create directory for the default gems
696 + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
697 + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
698 +
699 + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
700 +
701 + # Remove installed rubygems and rdoc copy
702 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
703 + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
704 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
705 + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
706 +
707 + if use doc; then
708 + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
709 + fi
710 +
711 + if use examples; then
712 + insinto /usr/share/doc/${PF}
713 + doins -r sample
714 + fi
715 +
716 + dodoc ChangeLog NEWS doc/NEWS* README*
717 +
718 + if use rubytests; then
719 + pushd test
720 + insinto /usr/share/${PN}-${SLOT}/test
721 + doins -r .
722 + popd
723 + fi
724 +}
725 +
726 +pkg_postinst() {
727 + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
728 + eselect ruby set ruby${MY_SUFFIX}
729 + fi
730 +
731 + elog
732 + elog "To switch between available Ruby profiles, execute as root:"
733 + elog "\teselect ruby set ruby(23|24|...)"
734 + elog
735 +}
736 +
737 +pkg_postrm() {
738 + eselect ruby cleanup
739 +}
740
741 diff --git a/dev-lang/ruby/ruby-2.7.1.ebuild b/dev-lang/ruby/ruby-2.7.1.ebuild
742 new file mode 100644
743 index 00000000000..bd2dd1fd6f2
744 --- /dev/null
745 +++ b/dev-lang/ruby/ruby-2.7.1.ebuild
746 @@ -0,0 +1,237 @@
747 +# Copyright 1999-2020 Gentoo Authors
748 +# Distributed under the terms of the GNU General Public License v2
749 +
750 +EAPI=7
751 +
752 +inherit autotools flag-o-matic multilib
753 +
754 +MY_P="${PN}-$(ver_cut 1-3)"
755 +S=${WORKDIR}/${MY_P}
756 +
757 +SLOT=$(ver_cut 1-2)
758 +MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
759 +RUBYVERSION=${SLOT}.0
760 +
761 +DESCRIPTION="An object-oriented scripting language"
762 +HOMEPAGE="https://www.ruby-lang.org/"
763 +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
764 +
765 +LICENSE="|| ( Ruby-BSD BSD-2 )"
766 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
767 +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs tk xemacs"
768 +
769 +RDEPEND="
770 + berkdb? ( sys-libs/db:= )
771 + gdbm? ( sys-libs/gdbm:= )
772 + jemalloc? ( dev-libs/jemalloc )
773 + jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
774 + ssl? (
775 + !libressl? ( dev-libs/openssl:0= )
776 + libressl? ( dev-libs/libressl )
777 + )
778 + socks5? ( >=net-proxy/dante-1.1.13 )
779 + tk? (
780 + dev-lang/tcl:0=[threads]
781 + dev-lang/tk:0=[threads]
782 + )
783 + dev-libs/libyaml
784 + dev-libs/libffi:=
785 + sys-libs/readline:0=
786 + sys-libs/zlib
787 + >=app-eselect/eselect-ruby-20171225
788 +"
789 +
790 +DEPEND="${RDEPEND}"
791 +
792 +BUNDLED_GEMS="
793 + >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27]
794 + >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27]
795 + >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27]
796 + >=dev-ruby/rake-13.0.1[ruby_targets_ruby27]
797 + >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27]
798 + >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27]
799 +"
800 +
801 +PDEPEND="
802 + ${BUNDLED_GEMS}
803 + virtual/rubygems[ruby_targets_ruby27]
804 + >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27]
805 + >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27]
806 + >=dev-ruby/json-2.0.2[ruby_targets_ruby27]
807 + rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] )
808 + xemacs? ( app-xemacs/ruby-modes )"
809 +
810 +src_prepare() {
811 + # 005 does not compile bigdecimal and is questionable because it
812 + # compiles ruby in a non-standard way, may be dropped
813 + eapply "${FILESDIR}"/2.7/010*.patch
814 +
815 + einfo "Unbundling gems..."
816 + cd "$S"
817 + # Remove bundled gems that we will install via PDEPEND, bug
818 + # 539700.
819 + rm -fr gems/* || die
820 + # Don't install CLI tools since they will clash with the gem
821 + rm -f bin/{racc,racc2y,y2racc} || die
822 + sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
823 +
824 + einfo "Removing bundled libraries..."
825 + rm -fr ext/fiddle/libffi-3.2.1 || die
826 +
827 + eapply_user
828 +
829 + eautoreconf
830 +}
831 +
832 +src_configure() {
833 + local modules= myconf=
834 +
835 + # -fomit-frame-pointer makes ruby segfault, see bug #150413.
836 + filter-flags -fomit-frame-pointer
837 + # In many places aliasing rules are broken; play it safe
838 + # as it's risky with newer compilers to leave it as it is.
839 + append-flags -fno-strict-aliasing
840 + # SuperH needs this
841 + use sh && append-flags -mieee
842 +
843 + # Socks support via dante
844 + if use socks5 ; then
845 + # Socks support can't be disabled as long as SOCKS_SERVER is
846 + # set and socks library is present, so need to unset
847 + # SOCKS_SERVER in that case.
848 + unset SOCKS_SERVER
849 + fi
850 +
851 + # Increase GC_MALLOC_LIMIT if set (default is 8000000)
852 + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
853 + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
854 + fi
855 +
856 + # ipv6 hack, bug 168939. Needs --enable-ipv6.
857 + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
858 +
859 + # Determine which modules *not* to build depending in the USE flags.
860 + if ! use berkdb ; then
861 + modules="${modules},dbm"
862 + fi
863 + if ! use gdbm ; then
864 + modules="${modules},gdbm"
865 + fi
866 + if ! use ssl ; then
867 + modules="${modules},openssl"
868 + fi
869 + if ! use tk ; then
870 + modules="${modules},tk"
871 + fi
872 +
873 + # Provide an empty LIBPATHENV because we disable rpath but we do not
874 + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
875 + # #564272
876 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
877 + --program-suffix=${MY_SUFFIX} \
878 + --with-soname=ruby${MY_SUFFIX} \
879 + --enable-shared \
880 + --enable-pthread \
881 + --disable-rpath \
882 + --with-out-ext="${modules}" \
883 + $(use_with jemalloc jemalloc) \
884 + $(use_enable jit jit-support ) \
885 + $(use_enable socks5 socks) \
886 + $(use_enable doc install-doc) \
887 + --enable-ipv6 \
888 + $(use_enable static-libs static) \
889 + $(use_enable static-libs install-static-library) \
890 + $(use_with static-libs static-linked-ext) \
891 + $(use_enable debug) \
892 + ${myconf} \
893 + --enable-option-checking=no
894 +
895 + # Makefile is broken because it lacks -ldl
896 + rm -rf ext/-test-/popen_deadlock || die
897 +}
898 +
899 +src_compile() {
900 + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
901 +}
902 +
903 +src_test() {
904 + emake -j1 V=1 test
905 +
906 + elog "Ruby's make test has been run. Ruby also ships with a make check"
907 + elog "that cannot be run until after ruby has been installed."
908 + elog
909 + if use rubytests; then
910 + elog "You have enabled rubytests, so they will be installed to"
911 + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
912 + elog "than root, and you must place them into a writeable directory."
913 + elog "Then call: "
914 + elog
915 + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
916 + else
917 + elog "Enable the rubytests USE flag to install the make check tests"
918 + fi
919 +}
920 +
921 +src_install() {
922 + # Remove the remaining bundled gems. We do this late in the process
923 + # since they are used during the build to e.g. create the
924 + # documentation.
925 + rm -rf ext/json || die
926 + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
927 +
928 + # Ruby is involved in the install process, we don't want interference here.
929 + unset RUBYOPT
930 +
931 + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
932 +
933 + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
934 + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
935 + for d in $(find "${S}/ext" -type d) ; do
936 + RUBYLIB="${RUBYLIB}:$d"
937 + done
938 + export LD_LIBRARY_PATH RUBYLIB
939 +
940 + # Create directory for the default gems
941 + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
942 + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
943 +
944 + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
945 +
946 + # Remove installed rubygems and rdoc copy
947 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
948 + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
949 + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
950 + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
951 +
952 + if use doc; then
953 + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
954 + fi
955 +
956 + if use examples; then
957 + dodoc -r sample
958 + fi
959 +
960 + dodoc ChangeLog NEWS doc/NEWS* README*
961 +
962 + if use rubytests; then
963 + pushd test
964 + insinto /usr/share/${PN}-${SLOT}/test
965 + doins -r .
966 + popd
967 + fi
968 +}
969 +
970 +pkg_postinst() {
971 + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
972 + eselect ruby set ruby${MY_SUFFIX}
973 + fi
974 +
975 + elog
976 + elog "To switch between available Ruby profiles, execute as root:"
977 + elog "\teselect ruby set ruby(23|24|...)"
978 + elog
979 +}
980 +
981 +pkg_postrm() {
982 + eselect ruby cleanup
983 +}