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: Sun, 05 Dec 2021 07:33:40
Message-Id: 1638689587.9b252d596c5d8f4c4551bcf3f3a9d2821536e93e.graaff@gentoo
1 commit: 9b252d596c5d8f4c4551bcf3f3a9d2821536e93e
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 5 07:33:07 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 5 07:33:07 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b252d59
7
8 dev-lang/ruby: cleanup
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-lang/ruby/Manifest | 3 -
14 dev-lang/ruby/ruby-2.6.8.ebuild | 258 -----------------------------------
15 dev-lang/ruby/ruby-2.7.4-r1.ebuild | 267 ------------------------------------
16 dev-lang/ruby/ruby-2.7.4.ebuild | 268 -------------------------------------
17 dev-lang/ruby/ruby-3.0.2-r1.ebuild | 267 ------------------------------------
18 dev-lang/ruby/ruby-3.0.2.ebuild | 268 -------------------------------------
19 6 files changed, 1331 deletions(-)
20
21 diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
22 index d0ba5efb8996..2aa532d28be2 100644
23 --- a/dev-lang/ruby/Manifest
24 +++ b/dev-lang/ruby/Manifest
25 @@ -1,6 +1,3 @@
26 -DIST ruby-2.6.8.tar.xz 11599488 BLAKE2B e5b2949233d8540f72d4d8b9c246f9bd0d1342426d2a1c19cb240b7c86f37299e9dc1dfc98ef2a86d1d91055865b4542d690de5567c71189bf2973a4989fa0fd SHA512 d040ad2238523587d8f356fcb796b8b6ad7f8caff7dd6df09e3f7efcbfa0369e33600e78c7f2bc713ae77c040757cce5c4fec223cb9070209f2bf741899c556d
27 DIST ruby-2.6.9.tar.xz 11590064 BLAKE2B 8d14baf479053b7fab517f1e41191b009413d557431c558d92489a36d539f9a667571e4493abba171b047f8ba6d1f676fb6d2f2152fcae737924e773a324ddf6 SHA512 f60aa89e685cea324185eb0d13e6b44caef4e4f761cbf9ea1386ae70e39faf3866ac01e4bb5354574f2583e74290b8c80eaf63d126040d52368be6c771476451
28 -DIST ruby-2.7.4.tar.xz 12067588 BLAKE2B 2680a7ccd1daf3d156d9519d9132853e68f5f1aad592abce3e73fdd03314a6c28e7d94590153aead86af8952ff51f804ee029f8100b0137919cc27373cb8b9cd SHA512 2cbb70ecfdd69120e789023ddb2b25cab0d03bc33fdc367a8f74ca8a3ee785c18c8ded9de3ecee627c7e275ffb85147e6abf921b6a61e31851b37c7fedf45bf9
29 DIST ruby-2.7.5.tar.xz 12072980 BLAKE2B 50bb822cb2c5e76fee8755c710b593ce3bcb0f4f14b96a4e9eef5e58b4614bcf5f91491586b1dd6411fce57c258a7ad80136cd3cfbddf28e4fd4b37f486d2bea SHA512 21c8a713e3ce115fc4c405113ac691ddcefc3419f528b93ca1ac59e7052c1b6e9e241da0e570e291e567f28f3d840824dbcc5967b216cbe7d6ca7a05580fa311
30 -DIST ruby-3.0.2.tar.xz 14746080 BLAKE2B 47c5591261fb63b1ec3ca719ea6b0c348937456c3711351c1f5317d1e6a748de197e90c8bd4ff822f7b2d4580ad7ed0b54b9eb7aaa5166ea1a15ab2deae96439 SHA512 0f702e2d8ca1342a9d4284dbdd234a3588e057b92566353aa7c21835cf09a3932864b2acf459a976960a1704e9befa562155d36b98b7cda8bd99526e10a374c4
31 DIST ruby-3.0.3.tar.xz 14991880 BLAKE2B d57b7f6e0d0121326b1a191e93a49c045d26dfd1ab8b0d283b99d09968e07277edde0baaeec072602d6d06e20dcd3893d6cb0b03f59dbc59ebf0e3ebd5646446 SHA512 bb9ea426278d5a7ac46595296f03b82d43df8b7db41045cdf85611e05e26c703c53f700494cd7cf5d4c27fa953bdc5c144317d7720812db0a6e3b6f4bc4d2e00
32
33 diff --git a/dev-lang/ruby/ruby-2.6.8.ebuild b/dev-lang/ruby/ruby-2.6.8.ebuild
34 deleted file mode 100644
35 index 4046ef396c97..000000000000
36 --- a/dev-lang/ruby/ruby-2.6.8.ebuild
37 +++ /dev/null
38 @@ -1,258 +0,0 @@
39 -# Copyright 1999-2021 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=7
43 -
44 -inherit autotools flag-o-matic multilib
45 -
46 -MY_P="${PN}-$(ver_cut 1-3)"
47 -S=${WORKDIR}/${MY_P}
48 -
49 -SLOT=$(ver_cut 1-2)
50 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
51 -RUBYVERSION=${SLOT}.0
52 -
53 -DESCRIPTION="An object-oriented scripting language"
54 -HOMEPAGE="https://www.ruby-lang.org/"
55 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
56 -
57 -LICENSE="|| ( Ruby-BSD BSD-2 )"
58 -KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
59 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
60 -
61 -RDEPEND="
62 - berkdb? ( sys-libs/db:= )
63 - gdbm? ( sys-libs/gdbm:= )
64 - jemalloc? ( dev-libs/jemalloc:= )
65 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
66 - ssl? (
67 - dev-libs/openssl:0=
68 - )
69 - socks5? ( >=net-proxy/dante-1.1.13 )
70 - systemtap? ( dev-util/systemtap )
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 - virtual/libcrypt:=
80 - >=app-eselect/eselect-ruby-20181225
81 -"
82 -
83 -DEPEND="${RDEPEND}"
84 -
85 -BUNDLED_GEMS="
86 - >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
87 - >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
88 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
89 - >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
90 - >=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
91 - >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
92 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
93 -"
94 -
95 -PDEPEND="
96 - ${BUNDLED_GEMS}
97 - virtual/rubygems[ruby_targets_ruby26]
98 - >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
99 - >=dev-ruby/json-2.0.2[ruby_targets_ruby26]
100 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
101 - xemacs? ( app-xemacs/ruby-modes )"
102 -
103 -src_prepare() {
104 - # 005 does not compile bigdecimal and is questionable because it
105 - # compiles ruby in a non-standard way, may be dropped
106 - eapply "${FILESDIR}"/2.6/{002,010}*.patch
107 -
108 - einfo "Unbundling gems..."
109 - cd "$S"
110 - # Remove bundled gems that we will install via PDEPEND, bug
111 - # 539700.
112 - rm -fr gems/* || die
113 -
114 - einfo "Removing bundled libraries..."
115 - rm -fr ext/fiddle/libffi-3.2.1 || die
116 -
117 - if use prefix ; then
118 - # Fix hardcoded SHELL var in mkmf library
119 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
120 -
121 - if [[ ${CHOST} == *darwin* ]] ; then
122 - # avoid symlink loop on Darwin (?!)
123 - sed -i \
124 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
125 - configure.ac || die
126 -
127 - # make ar/libtool hack for Darwin work
128 - sed -i \
129 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
130 - configure.ac || die
131 - fi
132 - fi
133 -
134 - eapply_user
135 -
136 - eautoreconf
137 -}
138 -
139 -src_configure() {
140 - local modules= myconf=
141 -
142 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
143 - filter-flags -fomit-frame-pointer
144 - # In many places aliasing rules are broken; play it safe
145 - # as it's risky with newer compilers to leave it as it is.
146 - append-flags -fno-strict-aliasing
147 -
148 - # Socks support via dante
149 - if use socks5 ; then
150 - # Socks support can't be disabled as long as SOCKS_SERVER is
151 - # set and socks library is present, so need to unset
152 - # SOCKS_SERVER in that case.
153 - unset SOCKS_SERVER
154 - fi
155 -
156 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
157 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
158 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
159 - fi
160 -
161 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
162 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
163 -
164 - # Determine which modules *not* to build depending in the USE flags.
165 - if ! use berkdb ; then
166 - modules="${modules},dbm"
167 - fi
168 - if ! use gdbm ; then
169 - modules="${modules},gdbm"
170 - fi
171 - if ! use ssl ; then
172 - modules="${modules},openssl"
173 - fi
174 - if ! use tk ; then
175 - modules="${modules},tk"
176 - fi
177 -
178 - # Provide an empty LIBPATHENV because we disable rpath but we do not
179 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
180 - # #564272
181 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
182 - --program-suffix=${MY_SUFFIX} \
183 - --with-soname=ruby${MY_SUFFIX} \
184 - --with-readline-dir="${EPREFIX}"/usr \
185 - --enable-shared \
186 - --enable-pthread \
187 - --disable-rpath \
188 - --with-out-ext="${modules}" \
189 - $(use_with jemalloc jemalloc) \
190 - $(use_enable jit jit-support ) \
191 - $(use_enable socks5 socks) \
192 - $(use_enable systemtap dtrace) \
193 - $(use_enable doc install-doc) \
194 - --enable-ipv6 \
195 - $(use_enable static-libs static) \
196 - $(use_enable static-libs install-static-library) \
197 - $(use_with static-libs static-linked-ext) \
198 - $(use_enable debug) \
199 - ${myconf} \
200 - --enable-option-checking=no
201 -
202 - # Makefile is broken because it lacks -ldl
203 - rm -rf ext/-test-/popen_deadlock || die
204 -}
205 -
206 -src_compile() {
207 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
208 -}
209 -
210 -src_test() {
211 - emake -j1 V=1 test
212 -
213 - elog "Ruby's make test has been run. Ruby also ships with a make check"
214 - elog "that cannot be run until after ruby has been installed."
215 - elog
216 - if use rubytests; then
217 - elog "You have enabled rubytests, so they will be installed to"
218 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
219 - elog "than root, and you must place them into a writeable directory."
220 - elog "Then call: "
221 - elog
222 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
223 - else
224 - elog "Enable the rubytests USE flag to install the make check tests"
225 - fi
226 -}
227 -
228 -src_install() {
229 - # Remove the remaining bundled gems. We do this late in the process
230 - # since they are used during the build to e.g. create the
231 - # documentation.
232 - einfo "Removing default gems before installation"
233 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
234 -
235 - # Ruby is involved in the install process, we don't want interference here.
236 - unset RUBYOPT
237 -
238 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
239 -
240 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
241 -
242 - if [[ ${CHOST} == *darwin* ]] ; then
243 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
244 - export DYLD_LIBRARY_PATH
245 - fi
246 -
247 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
248 - for d in $(find "${S}/ext" -type d) ; do
249 - RUBYLIB="${RUBYLIB}:$d"
250 - done
251 - export LD_LIBRARY_PATH RUBYLIB
252 -
253 - # Create directory for the default gems
254 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
255 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
256 -
257 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
258 -
259 - # Remove installed rubygems and rdoc copy
260 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
261 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
262 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
263 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
264 -
265 - if use doc; then
266 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
267 - fi
268 -
269 - if use examples; then
270 - dodoc -r sample
271 - fi
272 -
273 - dodoc ChangeLog NEWS doc/NEWS* README*
274 -
275 - if use rubytests; then
276 - pushd test
277 - insinto /usr/share/${PN}-${SLOT}/test
278 - doins -r .
279 - popd
280 - fi
281 -}
282 -
283 -pkg_postinst() {
284 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
285 - eselect ruby set ruby${MY_SUFFIX}
286 - fi
287 -
288 - elog
289 - elog "To switch between available Ruby profiles, execute as root:"
290 - elog "\teselect ruby set ruby(23|24|...)"
291 - elog
292 -}
293 -
294 -pkg_postrm() {
295 - eselect ruby cleanup
296 -}
297
298 diff --git a/dev-lang/ruby/ruby-2.7.4-r1.ebuild b/dev-lang/ruby/ruby-2.7.4-r1.ebuild
299 deleted file mode 100644
300 index 1941ac0252cc..000000000000
301 --- a/dev-lang/ruby/ruby-2.7.4-r1.ebuild
302 +++ /dev/null
303 @@ -1,267 +0,0 @@
304 -# Copyright 1999-2021 Gentoo Authors
305 -# Distributed under the terms of the GNU General Public License v2
306 -
307 -EAPI=7
308 -
309 -inherit autotools flag-o-matic multilib
310 -
311 -MY_P="${PN}-$(ver_cut 1-3)"
312 -S=${WORKDIR}/${MY_P}
313 -
314 -SLOT=$(ver_cut 1-2)
315 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
316 -RUBYVERSION=${SLOT}.0
317 -
318 -DESCRIPTION="An object-oriented scripting language"
319 -HOMEPAGE="https://www.ruby-lang.org/"
320 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
321 -
322 -LICENSE="|| ( Ruby-BSD BSD-2 )"
323 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
324 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
325 -
326 -RDEPEND="
327 - berkdb? ( sys-libs/db:= )
328 - gdbm? ( sys-libs/gdbm:= )
329 - jemalloc? ( dev-libs/jemalloc:= )
330 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
331 - ssl? (
332 - dev-libs/openssl:0=
333 - )
334 - socks5? ( >=net-proxy/dante-1.1.13 )
335 - systemtap? ( dev-util/systemtap )
336 - tk? (
337 - dev-lang/tcl:0=[threads]
338 - dev-lang/tk:0=[threads]
339 - )
340 - dev-libs/libyaml
341 - dev-libs/libffi:=
342 - sys-libs/readline:0=
343 - sys-libs/zlib
344 - virtual/libcrypt:=
345 - >=app-eselect/eselect-ruby-20191222
346 -"
347 -
348 -DEPEND="${RDEPEND}"
349 -
350 -BUNDLED_GEMS="
351 - >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27]
352 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27]
353 - >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27]
354 - >=dev-ruby/rake-13.0.1[ruby_targets_ruby27]
355 - >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27]
356 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27]
357 -"
358 -
359 -PDEPEND="
360 - ${BUNDLED_GEMS}
361 - virtual/rubygems[ruby_targets_ruby27]
362 - >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27]
363 - >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27]
364 - >=dev-ruby/json-2.0.2[ruby_targets_ruby27]
365 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] )
366 - xemacs? ( app-xemacs/ruby-modes )"
367 -
368 -src_prepare() {
369 - eapply "${FILESDIR}"/2.7/{003,010}*.patch
370 -
371 - if use elibc_musl ; then
372 - eapply "${FILESDIR}"/2.7/{900,901}-musl-*.patch
373 - fi
374 -
375 - # Reset time on patched gem_prelude.rb to avoid the need for a base
376 - # ruby during bootstrapping, bug 787137
377 - touch -t 202001010000 gem_prelude.rb || die
378 -
379 - einfo "Unbundling gems..."
380 - cd "$S"
381 - # Remove bundled gems that we will install via PDEPEND, bug
382 - # 539700.
383 - rm -fr gems/* || die
384 - # Don't install CLI tools since they will clash with the gem
385 - rm -f bin/{racc,racc2y,y2racc} || die
386 - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
387 -
388 - einfo "Removing bundled libraries..."
389 - rm -fr ext/fiddle/libffi-3.2.1 || die
390 -
391 - if use prefix ; then
392 - # Fix hardcoded SHELL var in mkmf library
393 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
394 -
395 - if [[ ${CHOST} == *darwin* ]] ; then
396 - # avoid symlink loop on Darwin (?!)
397 - sed -i \
398 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
399 - configure.ac || die
400 -
401 - # make ar/libtool hack for Darwin work
402 - sed -i \
403 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
404 - configure.ac || die
405 - fi
406 - fi
407 -
408 - eapply_user
409 -
410 - eautoreconf
411 -}
412 -
413 -src_configure() {
414 - local modules= myconf=
415 -
416 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
417 - filter-flags -fomit-frame-pointer
418 - # In many places aliasing rules are broken; play it safe
419 - # as it's risky with newer compilers to leave it as it is.
420 - append-flags -fno-strict-aliasing
421 -
422 - # Socks support via dante
423 - if use socks5 ; then
424 - # Socks support can't be disabled as long as SOCKS_SERVER is
425 - # set and socks library is present, so need to unset
426 - # SOCKS_SERVER in that case.
427 - unset SOCKS_SERVER
428 - fi
429 -
430 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
431 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
432 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
433 - fi
434 -
435 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
436 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
437 -
438 - # Determine which modules *not* to build depending in the USE flags.
439 - if ! use berkdb ; then
440 - modules="${modules},dbm"
441 - fi
442 - if ! use gdbm ; then
443 - modules="${modules},gdbm"
444 - fi
445 - if ! use ssl ; then
446 - modules="${modules},openssl"
447 - fi
448 - if ! use tk ; then
449 - modules="${modules},tk"
450 - fi
451 -
452 - # Provide an empty LIBPATHENV because we disable rpath but we do not
453 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
454 - # #564272
455 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
456 - --program-suffix=${MY_SUFFIX} \
457 - --with-soname=ruby${MY_SUFFIX} \
458 - --with-readline-dir="${EPREFIX}"/usr \
459 - --enable-shared \
460 - --enable-pthread \
461 - --disable-rpath \
462 - --with-out-ext="${modules}" \
463 - $(use_with jemalloc jemalloc) \
464 - $(use_enable jit jit-support ) \
465 - $(use_enable socks5 socks) \
466 - $(use_enable systemtap dtrace) \
467 - $(use_enable doc install-doc) \
468 - --enable-ipv6 \
469 - $(use_enable static-libs static) \
470 - $(use_enable static-libs install-static-library) \
471 - $(use_with static-libs static-linked-ext) \
472 - $(use_enable debug) \
473 - ${myconf} \
474 - --enable-option-checking=no
475 -
476 - # Makefile is broken because it lacks -ldl
477 - rm -rf ext/-test-/popen_deadlock || die
478 -}
479 -
480 -src_compile() {
481 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
482 -}
483 -
484 -src_test() {
485 - emake -j1 V=1 test
486 -
487 - elog "Ruby's make test has been run. Ruby also ships with a make check"
488 - elog "that cannot be run until after ruby has been installed."
489 - elog
490 - if use rubytests; then
491 - elog "You have enabled rubytests, so they will be installed to"
492 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
493 - elog "than root, and you must place them into a writeable directory."
494 - elog "Then call: "
495 - elog
496 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
497 - else
498 - elog "Enable the rubytests USE flag to install the make check tests"
499 - fi
500 -}
501 -
502 -src_install() {
503 - # Remove the remaining bundled gems. We do this late in the process
504 - # since they are used during the build to e.g. create the
505 - # documentation.
506 - einfo "Removing default gems before installation"
507 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
508 -
509 - # Ruby is involved in the install process, we don't want interference here.
510 - unset RUBYOPT
511 -
512 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
513 -
514 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
515 -
516 - if [[ ${CHOST} == *darwin* ]] ; then
517 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
518 - export DYLD_LIBRARY_PATH
519 - fi
520 -
521 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
522 - for d in $(find "${S}/ext" -type d) ; do
523 - RUBYLIB="${RUBYLIB}:$d"
524 - done
525 - export LD_LIBRARY_PATH RUBYLIB
526 -
527 - # Create directory for the default gems
528 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
529 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
530 -
531 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
532 -
533 - # Remove installed rubygems and rdoc copy
534 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
535 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
536 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
537 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
538 -
539 - if use doc; then
540 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
541 - fi
542 -
543 - if use examples; then
544 - dodoc -r sample
545 - fi
546 -
547 - dodoc ChangeLog NEWS doc/NEWS* README*
548 -
549 - if use rubytests; then
550 - pushd test
551 - insinto /usr/share/${PN}-${SLOT}/test
552 - doins -r .
553 - popd
554 - fi
555 -}
556 -
557 -pkg_postinst() {
558 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
559 - eselect ruby set ruby${MY_SUFFIX}
560 - fi
561 -
562 - elog
563 - elog "To switch between available Ruby profiles, execute as root:"
564 - elog "\teselect ruby set ruby(23|24|...)"
565 - elog
566 -}
567 -
568 -pkg_postrm() {
569 - eselect ruby cleanup
570 -}
571
572 diff --git a/dev-lang/ruby/ruby-2.7.4.ebuild b/dev-lang/ruby/ruby-2.7.4.ebuild
573 deleted file mode 100644
574 index cc1d338751b5..000000000000
575 --- a/dev-lang/ruby/ruby-2.7.4.ebuild
576 +++ /dev/null
577 @@ -1,268 +0,0 @@
578 -# Copyright 1999-2021 Gentoo Authors
579 -# Distributed under the terms of the GNU General Public License v2
580 -
581 -EAPI=7
582 -
583 -inherit autotools flag-o-matic multilib
584 -
585 -MY_P="${PN}-$(ver_cut 1-3)"
586 -S=${WORKDIR}/${MY_P}
587 -
588 -SLOT=$(ver_cut 1-2)
589 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
590 -RUBYVERSION=${SLOT}.0
591 -
592 -DESCRIPTION="An object-oriented scripting language"
593 -HOMEPAGE="https://www.ruby-lang.org/"
594 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
595 -
596 -LICENSE="|| ( Ruby-BSD BSD-2 )"
597 -KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
598 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
599 -
600 -RDEPEND="
601 - berkdb? ( sys-libs/db:= )
602 - gdbm? ( sys-libs/gdbm:= )
603 - jemalloc? ( dev-libs/jemalloc:= )
604 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
605 - ssl? (
606 - dev-libs/openssl:0=
607 - )
608 - socks5? ( >=net-proxy/dante-1.1.13 )
609 - systemtap? ( dev-util/systemtap )
610 - tk? (
611 - dev-lang/tcl:0=[threads]
612 - dev-lang/tk:0=[threads]
613 - )
614 - dev-libs/libyaml
615 - dev-libs/libffi:=
616 - sys-libs/readline:0=
617 - sys-libs/zlib
618 - virtual/libcrypt:=
619 - >=app-eselect/eselect-ruby-20191222
620 -"
621 -
622 -DEPEND="${RDEPEND}"
623 -
624 -BUNDLED_GEMS="
625 - >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27]
626 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27]
627 - >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27]
628 - >=dev-ruby/rake-13.0.1[ruby_targets_ruby27]
629 - >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27]
630 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27]
631 -"
632 -
633 -PDEPEND="
634 - ${BUNDLED_GEMS}
635 - virtual/rubygems[ruby_targets_ruby27]
636 - >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27]
637 - >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27]
638 - >=dev-ruby/json-2.0.2[ruby_targets_ruby27]
639 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] )
640 - xemacs? ( app-xemacs/ruby-modes )"
641 -
642 -src_prepare() {
643 - eapply "${FILESDIR}"/2.7/{003,010}*.patch
644 -
645 - if use elibc_musl ; then
646 - eapply "${FILESDIR}"/2.7/{900,901}-musl-*.patch
647 - fi
648 -
649 - # Reset time on patched gem_prelude.rb to avoid the need for a base
650 - # ruby during bootstrapping, bug 787137
651 - touch -t 202001010000 gem_prelude.rb || die
652 -
653 - einfo "Unbundling gems..."
654 - cd "$S"
655 - # Remove bundled gems that we will install via PDEPEND, bug
656 - # 539700.
657 - rm -fr gems/* || die
658 - # Don't install CLI tools since they will clash with the gem
659 - rm -f bin/{racc,racc2y,y2racc} || die
660 - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
661 -
662 - einfo "Removing bundled libraries..."
663 - rm -fr ext/fiddle/libffi-3.2.1 || die
664 -
665 - if use prefix ; then
666 - # Fix hardcoded SHELL var in mkmf library
667 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
668 -
669 - if [[ ${CHOST} == *darwin* ]] ; then
670 - # avoid symlink loop on Darwin (?!)
671 - sed -i \
672 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
673 - configure.ac || die
674 -
675 - # make ar/libtool hack for Darwin work
676 - sed -i \
677 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
678 - configure.ac || die
679 - fi
680 - fi
681 -
682 - eapply_user
683 -
684 - eautoreconf
685 -}
686 -
687 -src_configure() {
688 - local modules= myconf=
689 -
690 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
691 - filter-flags -fomit-frame-pointer
692 - # In many places aliasing rules are broken; play it safe
693 - # as it's risky with newer compilers to leave it as it is.
694 - append-flags -fno-strict-aliasing
695 -
696 - # Socks support via dante
697 - if use socks5 ; then
698 - # Socks support can't be disabled as long as SOCKS_SERVER is
699 - # set and socks library is present, so need to unset
700 - # SOCKS_SERVER in that case.
701 - unset SOCKS_SERVER
702 - fi
703 -
704 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
705 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
706 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
707 - fi
708 -
709 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
710 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
711 -
712 - # Determine which modules *not* to build depending in the USE flags.
713 - if ! use berkdb ; then
714 - modules="${modules},dbm"
715 - fi
716 - if ! use gdbm ; then
717 - modules="${modules},gdbm"
718 - fi
719 - if ! use ssl ; then
720 - modules="${modules},openssl"
721 - fi
722 - if ! use tk ; then
723 - modules="${modules},tk"
724 - fi
725 -
726 - # Provide an empty LIBPATHENV because we disable rpath but we do not
727 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
728 - # #564272
729 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
730 - --program-suffix=${MY_SUFFIX} \
731 - --with-soname=ruby${MY_SUFFIX} \
732 - --with-readline-dir="${EPREFIX}"/usr \
733 - --enable-shared \
734 - --enable-pthread \
735 - --disable-rpath \
736 - --with-out-ext="${modules}" \
737 - $(use_with jemalloc jemalloc) \
738 - $(use_enable jit jit-support ) \
739 - $(use_enable socks5 socks) \
740 - $(use_enable systemtap dtrace) \
741 - $(use_enable doc install-doc) \
742 - --enable-ipv6 \
743 - $(use_enable static-libs static) \
744 - $(use_enable static-libs install-static-library) \
745 - $(use_with static-libs static-linked-ext) \
746 - $(use_enable debug) \
747 - ${myconf} \
748 - --enable-option-checking=no
749 -
750 - # Makefile is broken because it lacks -ldl
751 - rm -rf ext/-test-/popen_deadlock || die
752 -}
753 -
754 -src_compile() {
755 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
756 -}
757 -
758 -src_test() {
759 - emake -j1 V=1 test
760 -
761 - elog "Ruby's make test has been run. Ruby also ships with a make check"
762 - elog "that cannot be run until after ruby has been installed."
763 - elog
764 - if use rubytests; then
765 - elog "You have enabled rubytests, so they will be installed to"
766 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
767 - elog "than root, and you must place them into a writeable directory."
768 - elog "Then call: "
769 - elog
770 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
771 - else
772 - elog "Enable the rubytests USE flag to install the make check tests"
773 - fi
774 -}
775 -
776 -src_install() {
777 - # Remove the remaining bundled gems. We do this late in the process
778 - # since they are used during the build to e.g. create the
779 - # documentation.
780 - einfo "Removing default gems before installation"
781 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
782 - rm -rf lib/did_you_mean* || die
783 -
784 - # Ruby is involved in the install process, we don't want interference here.
785 - unset RUBYOPT
786 -
787 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
788 -
789 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
790 -
791 - if [[ ${CHOST} == *darwin* ]] ; then
792 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
793 - export DYLD_LIBRARY_PATH
794 - fi
795 -
796 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
797 - for d in $(find "${S}/ext" -type d) ; do
798 - RUBYLIB="${RUBYLIB}:$d"
799 - done
800 - export LD_LIBRARY_PATH RUBYLIB
801 -
802 - # Create directory for the default gems
803 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
804 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
805 -
806 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
807 -
808 - # Remove installed rubygems and rdoc copy
809 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
810 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
811 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
812 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
813 -
814 - if use doc; then
815 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
816 - fi
817 -
818 - if use examples; then
819 - dodoc -r sample
820 - fi
821 -
822 - dodoc ChangeLog NEWS doc/NEWS* README*
823 -
824 - if use rubytests; then
825 - pushd test
826 - insinto /usr/share/${PN}-${SLOT}/test
827 - doins -r .
828 - popd
829 - fi
830 -}
831 -
832 -pkg_postinst() {
833 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
834 - eselect ruby set ruby${MY_SUFFIX}
835 - fi
836 -
837 - elog
838 - elog "To switch between available Ruby profiles, execute as root:"
839 - elog "\teselect ruby set ruby(23|24|...)"
840 - elog
841 -}
842 -
843 -pkg_postrm() {
844 - eselect ruby cleanup
845 -}
846
847 diff --git a/dev-lang/ruby/ruby-3.0.2-r1.ebuild b/dev-lang/ruby/ruby-3.0.2-r1.ebuild
848 deleted file mode 100644
849 index 16eea1190ab4..000000000000
850 --- a/dev-lang/ruby/ruby-3.0.2-r1.ebuild
851 +++ /dev/null
852 @@ -1,267 +0,0 @@
853 -# Copyright 1999-2021 Gentoo Authors
854 -# Distributed under the terms of the GNU General Public License v2
855 -
856 -EAPI=7
857 -
858 -inherit autotools flag-o-matic multilib
859 -
860 -MY_P="${PN}-$(ver_cut 1-3)"
861 -S=${WORKDIR}/${MY_P}
862 -
863 -SLOT=$(ver_cut 1-2)
864 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
865 -RUBYVERSION=${SLOT}.0
866 -
867 -DESCRIPTION="An object-oriented scripting language"
868 -HOMEPAGE="https://www.ruby-lang.org/"
869 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
870 -
871 -LICENSE="|| ( Ruby-BSD BSD-2 )"
872 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
873 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
874 -
875 -RDEPEND="
876 - berkdb? ( sys-libs/db:= )
877 - gdbm? ( sys-libs/gdbm:= )
878 - jemalloc? ( dev-libs/jemalloc:= )
879 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
880 - ssl? (
881 - dev-libs/openssl:0=
882 - )
883 - socks5? ( >=net-proxy/dante-1.1.13 )
884 - systemtap? ( dev-util/systemtap )
885 - tk? (
886 - dev-lang/tcl:0=[threads]
887 - dev-lang/tk:0=[threads]
888 - )
889 - dev-libs/libyaml
890 - dev-libs/libffi:=
891 - sys-libs/readline:0=
892 - sys-libs/zlib
893 - virtual/libcrypt:=
894 - >=app-eselect/eselect-ruby-20201225
895 -"
896 -
897 -DEPEND="${RDEPEND}"
898 -
899 -BUNDLED_GEMS="
900 - >=dev-ruby/minitest-5.14.2[ruby_targets_ruby30]
901 - >=dev-ruby/power_assert-1.2.0[ruby_targets_ruby30]
902 - >=dev-ruby/rake-13.0.3[ruby_targets_ruby30]
903 - >=dev-ruby/rbs-1.0.0[ruby_targets_ruby30]
904 - >=dev-ruby/rexml-3.2.4[ruby_targets_ruby30]
905 - >=dev-ruby/rss-0.2.9[ruby_targets_ruby30]
906 - >=dev-ruby/test-unit-3.3.7[ruby_targets_ruby30]
907 - >=dev-ruby/typeprof-0.11.0[ruby_targets_ruby30]
908 -"
909 -
910 -PDEPEND="
911 - ${BUNDLED_GEMS}
912 - virtual/rubygems[ruby_targets_ruby30]
913 - >=dev-ruby/bundler-2.2.15[ruby_targets_ruby30]
914 - >=dev-ruby/did_you_mean-1.5.0[ruby_targets_ruby30]
915 - >=dev-ruby/json-2.5.1[ruby_targets_ruby30]
916 - rdoc? ( >=dev-ruby/rdoc-6.3.0[ruby_targets_ruby30] )
917 - xemacs? ( app-xemacs/ruby-modes )"
918 -
919 -src_prepare() {
920 - eapply "${FILESDIR}"/"${SLOT}"/010*.patch
921 -
922 - if use elibc_musl ; then
923 - eapply "${FILESDIR}"/3.0/900-musl-*.patch
924 - eapply "${FILESDIR}"/2.7/901-musl-*.patch
925 - fi
926 -
927 - einfo "Unbundling gems..."
928 - cd "$S"
929 - # Remove bundled gems that we will install via PDEPEND, bug
930 - # 539700.
931 - rm -fr gems/* || die
932 - touch gems/bundled_gems || die
933 - # Don't install CLI tools since they will clash with the gem
934 - rm -f bin/{racc,racc2y,y2racc} || die
935 - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
936 -
937 - einfo "Removing bundled libraries..."
938 - rm -fr ext/fiddle/libffi-3.2.1 || die
939 -
940 - if use prefix ; then
941 - # Fix hardcoded SHELL var in mkmf library
942 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
943 -
944 - if [[ ${CHOST} == *darwin* ]] ; then
945 - # avoid symlink loop on Darwin (?!)
946 - sed -i \
947 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
948 - configure.ac || die
949 -
950 - # make ar/libtool hack for Darwin work
951 - sed -i \
952 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
953 - configure.ac || die
954 - fi
955 - fi
956 -
957 - eapply_user
958 -
959 - eautoreconf
960 -}
961 -
962 -src_configure() {
963 - local modules= myconf=
964 -
965 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
966 - filter-flags -fomit-frame-pointer
967 - # In many places aliasing rules are broken; play it safe
968 - # as it's risky with newer compilers to leave it as it is.
969 - append-flags -fno-strict-aliasing
970 -
971 - # Socks support via dante
972 - if use socks5 ; then
973 - # Socks support can't be disabled as long as SOCKS_SERVER is
974 - # set and socks library is present, so need to unset
975 - # SOCKS_SERVER in that case.
976 - unset SOCKS_SERVER
977 - fi
978 -
979 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
980 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
981 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
982 - fi
983 -
984 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
985 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
986 -
987 - # Determine which modules *not* to build depending in the USE flags.
988 - if ! use berkdb ; then
989 - modules="${modules},dbm"
990 - fi
991 - if ! use gdbm ; then
992 - modules="${modules},gdbm"
993 - fi
994 - if ! use ssl ; then
995 - modules="${modules},openssl"
996 - fi
997 - if ! use tk ; then
998 - modules="${modules},tk"
999 - fi
1000 -
1001 - # Provide an empty LIBPATHENV because we disable rpath but we do not
1002 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
1003 - # #564272
1004 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
1005 - --program-suffix=${MY_SUFFIX} \
1006 - --with-soname=ruby${MY_SUFFIX} \
1007 - --with-readline-dir="${EPREFIX}"/usr \
1008 - --enable-shared \
1009 - --enable-pthread \
1010 - --disable-rpath \
1011 - --with-out-ext="${modules}" \
1012 - $(use_with jemalloc jemalloc) \
1013 - $(use_enable jit jit-support ) \
1014 - $(use_enable socks5 socks) \
1015 - $(use_enable systemtap dtrace) \
1016 - $(use_enable doc install-doc) \
1017 - --enable-ipv6 \
1018 - $(use_enable static-libs static) \
1019 - $(use_enable static-libs install-static-library) \
1020 - $(use_with static-libs static-linked-ext) \
1021 - $(use_enable debug) \
1022 - ${myconf} \
1023 - --enable-option-checking=no
1024 -
1025 - # Makefile is broken because it lacks -ldl
1026 - rm -rf ext/-test-/popen_deadlock || die
1027 -}
1028 -
1029 -src_compile() {
1030 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
1031 -}
1032 -
1033 -src_test() {
1034 - emake -j1 V=1 test
1035 -
1036 - elog "Ruby's make test has been run. Ruby also ships with a make check"
1037 - elog "that cannot be run until after ruby has been installed."
1038 - elog
1039 - if use rubytests; then
1040 - elog "You have enabled rubytests, so they will be installed to"
1041 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
1042 - elog "than root, and you must place them into a writeable directory."
1043 - elog "Then call: "
1044 - elog
1045 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
1046 - else
1047 - elog "Enable the rubytests USE flag to install the make check tests"
1048 - fi
1049 -}
1050 -
1051 -src_install() {
1052 - # Remove the remaining bundled gems. We do this late in the process
1053 - # since they are used during the build to e.g. create the
1054 - # documentation.
1055 - einfo "Removing default gems before installation"
1056 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
1057 -
1058 - # Ruby is involved in the install process, we don't want interference here.
1059 - unset RUBYOPT
1060 -
1061 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
1062 -
1063 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
1064 -
1065 - if [[ ${CHOST} == *darwin* ]] ; then
1066 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
1067 - export DYLD_LIBRARY_PATH
1068 - fi
1069 -
1070 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
1071 - for d in $(find "${S}/ext" -type d) ; do
1072 - RUBYLIB="${RUBYLIB}:$d"
1073 - done
1074 - export LD_LIBRARY_PATH RUBYLIB
1075 -
1076 - # Create directory for the default gems
1077 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
1078 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
1079 -
1080 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
1081 -
1082 - # Remove installed rubygems and rdoc copy
1083 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
1084 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
1085 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
1086 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
1087 -
1088 - if use doc; then
1089 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
1090 - fi
1091 -
1092 - if use examples; then
1093 - dodoc -r sample
1094 - fi
1095 -
1096 - dodoc ChangeLog NEWS.md doc/NEWS* README*
1097 -
1098 - if use rubytests; then
1099 - pushd test
1100 - insinto /usr/share/${PN}-${SLOT}/test
1101 - doins -r .
1102 - popd
1103 - fi
1104 -}
1105 -
1106 -pkg_postinst() {
1107 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
1108 - eselect ruby set ruby${MY_SUFFIX}
1109 - fi
1110 -
1111 - elog
1112 - elog "To switch between available Ruby profiles, execute as root:"
1113 - elog "\teselect ruby set ruby(23|24|...)"
1114 - elog
1115 -}
1116 -
1117 -pkg_postrm() {
1118 - eselect ruby cleanup
1119 -}
1120
1121 diff --git a/dev-lang/ruby/ruby-3.0.2.ebuild b/dev-lang/ruby/ruby-3.0.2.ebuild
1122 deleted file mode 100644
1123 index ae8a7216c6d8..000000000000
1124 --- a/dev-lang/ruby/ruby-3.0.2.ebuild
1125 +++ /dev/null
1126 @@ -1,268 +0,0 @@
1127 -# Copyright 1999-2021 Gentoo Authors
1128 -# Distributed under the terms of the GNU General Public License v2
1129 -
1130 -EAPI=7
1131 -
1132 -inherit autotools flag-o-matic multilib
1133 -
1134 -MY_P="${PN}-$(ver_cut 1-3)"
1135 -S=${WORKDIR}/${MY_P}
1136 -
1137 -SLOT=$(ver_cut 1-2)
1138 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
1139 -RUBYVERSION=${SLOT}.0
1140 -
1141 -DESCRIPTION="An object-oriented scripting language"
1142 -HOMEPAGE="https://www.ruby-lang.org/"
1143 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
1144 -
1145 -LICENSE="|| ( Ruby-BSD BSD-2 )"
1146 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
1147 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
1148 -
1149 -RDEPEND="
1150 - berkdb? ( sys-libs/db:= )
1151 - gdbm? ( sys-libs/gdbm:= )
1152 - jemalloc? ( dev-libs/jemalloc:= )
1153 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
1154 - ssl? (
1155 - dev-libs/openssl:0=
1156 - )
1157 - socks5? ( >=net-proxy/dante-1.1.13 )
1158 - systemtap? ( dev-util/systemtap )
1159 - tk? (
1160 - dev-lang/tcl:0=[threads]
1161 - dev-lang/tk:0=[threads]
1162 - )
1163 - dev-libs/libyaml
1164 - dev-libs/libffi:=
1165 - sys-libs/readline:0=
1166 - sys-libs/zlib
1167 - virtual/libcrypt:=
1168 - >=app-eselect/eselect-ruby-20201225
1169 -"
1170 -
1171 -DEPEND="${RDEPEND}"
1172 -
1173 -BUNDLED_GEMS="
1174 - >=dev-ruby/minitest-5.14.2[ruby_targets_ruby30]
1175 - >=dev-ruby/power_assert-1.2.0[ruby_targets_ruby30]
1176 - >=dev-ruby/rake-13.0.3[ruby_targets_ruby30]
1177 - >=dev-ruby/rbs-1.0.0[ruby_targets_ruby30]
1178 - >=dev-ruby/rexml-3.2.4[ruby_targets_ruby30]
1179 - >=dev-ruby/rss-0.2.9[ruby_targets_ruby30]
1180 - >=dev-ruby/test-unit-3.3.7[ruby_targets_ruby30]
1181 - >=dev-ruby/typeprof-0.11.0[ruby_targets_ruby30]
1182 -"
1183 -
1184 -PDEPEND="
1185 - ${BUNDLED_GEMS}
1186 - virtual/rubygems[ruby_targets_ruby30]
1187 - >=dev-ruby/bundler-2.2.15[ruby_targets_ruby30]
1188 - >=dev-ruby/did_you_mean-1.5.0[ruby_targets_ruby30]
1189 - >=dev-ruby/json-2.5.1[ruby_targets_ruby30]
1190 - rdoc? ( >=dev-ruby/rdoc-6.3.0[ruby_targets_ruby30] )
1191 - xemacs? ( app-xemacs/ruby-modes )"
1192 -
1193 -src_prepare() {
1194 - eapply "${FILESDIR}"/"${SLOT}"/010*.patch
1195 -
1196 - if use elibc_musl ; then
1197 - eapply "${FILESDIR}"/3.0/900-musl-*.patch
1198 - eapply "${FILESDIR}"/2.7/901-musl-*.patch
1199 - fi
1200 -
1201 - einfo "Unbundling gems..."
1202 - cd "$S"
1203 - # Remove bundled gems that we will install via PDEPEND, bug
1204 - # 539700.
1205 - rm -fr gems/* || die
1206 - touch gems/bundled_gems || die
1207 - # Don't install CLI tools since they will clash with the gem
1208 - rm -f bin/{racc,racc2y,y2racc} || die
1209 - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
1210 -
1211 - einfo "Removing bundled libraries..."
1212 - rm -fr ext/fiddle/libffi-3.2.1 || die
1213 -
1214 - if use prefix ; then
1215 - # Fix hardcoded SHELL var in mkmf library
1216 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
1217 -
1218 - if [[ ${CHOST} == *darwin* ]] ; then
1219 - # avoid symlink loop on Darwin (?!)
1220 - sed -i \
1221 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
1222 - configure.ac || die
1223 -
1224 - # make ar/libtool hack for Darwin work
1225 - sed -i \
1226 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
1227 - configure.ac || die
1228 - fi
1229 - fi
1230 -
1231 - eapply_user
1232 -
1233 - eautoreconf
1234 -}
1235 -
1236 -src_configure() {
1237 - local modules= myconf=
1238 -
1239 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
1240 - filter-flags -fomit-frame-pointer
1241 - # In many places aliasing rules are broken; play it safe
1242 - # as it's risky with newer compilers to leave it as it is.
1243 - append-flags -fno-strict-aliasing
1244 -
1245 - # Socks support via dante
1246 - if use socks5 ; then
1247 - # Socks support can't be disabled as long as SOCKS_SERVER is
1248 - # set and socks library is present, so need to unset
1249 - # SOCKS_SERVER in that case.
1250 - unset SOCKS_SERVER
1251 - fi
1252 -
1253 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
1254 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
1255 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
1256 - fi
1257 -
1258 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
1259 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
1260 -
1261 - # Determine which modules *not* to build depending in the USE flags.
1262 - if ! use berkdb ; then
1263 - modules="${modules},dbm"
1264 - fi
1265 - if ! use gdbm ; then
1266 - modules="${modules},gdbm"
1267 - fi
1268 - if ! use ssl ; then
1269 - modules="${modules},openssl"
1270 - fi
1271 - if ! use tk ; then
1272 - modules="${modules},tk"
1273 - fi
1274 -
1275 - # Provide an empty LIBPATHENV because we disable rpath but we do not
1276 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
1277 - # #564272
1278 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
1279 - --program-suffix=${MY_SUFFIX} \
1280 - --with-soname=ruby${MY_SUFFIX} \
1281 - --with-readline-dir="${EPREFIX}"/usr \
1282 - --enable-shared \
1283 - --enable-pthread \
1284 - --disable-rpath \
1285 - --with-out-ext="${modules}" \
1286 - $(use_with jemalloc jemalloc) \
1287 - $(use_enable jit jit-support ) \
1288 - $(use_enable socks5 socks) \
1289 - $(use_enable systemtap dtrace) \
1290 - $(use_enable doc install-doc) \
1291 - --enable-ipv6 \
1292 - $(use_enable static-libs static) \
1293 - $(use_enable static-libs install-static-library) \
1294 - $(use_with static-libs static-linked-ext) \
1295 - $(use_enable debug) \
1296 - ${myconf} \
1297 - --enable-option-checking=no
1298 -
1299 - # Makefile is broken because it lacks -ldl
1300 - rm -rf ext/-test-/popen_deadlock || die
1301 -}
1302 -
1303 -src_compile() {
1304 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
1305 -}
1306 -
1307 -src_test() {
1308 - emake -j1 V=1 test
1309 -
1310 - elog "Ruby's make test has been run. Ruby also ships with a make check"
1311 - elog "that cannot be run until after ruby has been installed."
1312 - elog
1313 - if use rubytests; then
1314 - elog "You have enabled rubytests, so they will be installed to"
1315 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
1316 - elog "than root, and you must place them into a writeable directory."
1317 - elog "Then call: "
1318 - elog
1319 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
1320 - else
1321 - elog "Enable the rubytests USE flag to install the make check tests"
1322 - fi
1323 -}
1324 -
1325 -src_install() {
1326 - # Remove the remaining bundled gems. We do this late in the process
1327 - # since they are used during the build to e.g. create the
1328 - # documentation.
1329 - einfo "Removing default gems before installation"
1330 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
1331 - rm -rf lib/did_you_mean* || die
1332 -
1333 - # Ruby is involved in the install process, we don't want interference here.
1334 - unset RUBYOPT
1335 -
1336 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
1337 -
1338 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
1339 -
1340 - if [[ ${CHOST} == *darwin* ]] ; then
1341 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
1342 - export DYLD_LIBRARY_PATH
1343 - fi
1344 -
1345 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
1346 - for d in $(find "${S}/ext" -type d) ; do
1347 - RUBYLIB="${RUBYLIB}:$d"
1348 - done
1349 - export LD_LIBRARY_PATH RUBYLIB
1350 -
1351 - # Create directory for the default gems
1352 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
1353 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
1354 -
1355 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
1356 -
1357 - # Remove installed rubygems and rdoc copy
1358 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
1359 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
1360 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
1361 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
1362 -
1363 - if use doc; then
1364 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
1365 - fi
1366 -
1367 - if use examples; then
1368 - dodoc -r sample
1369 - fi
1370 -
1371 - dodoc ChangeLog NEWS.md doc/NEWS* README*
1372 -
1373 - if use rubytests; then
1374 - pushd test
1375 - insinto /usr/share/${PN}-${SLOT}/test
1376 - doins -r .
1377 - popd
1378 - fi
1379 -}
1380 -
1381 -pkg_postinst() {
1382 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
1383 - eselect ruby set ruby${MY_SUFFIX}
1384 - fi
1385 -
1386 - elog
1387 - elog "To switch between available Ruby profiles, execute as root:"
1388 - elog "\teselect ruby set ruby(23|24|...)"
1389 - elog
1390 -}
1391 -
1392 -pkg_postrm() {
1393 - eselect ruby cleanup
1394 -}