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: Fri, 16 Jul 2021 08:52:32
Message-Id: 1626425543.b9fe3a9f564754e89bb2b59ff0454d34383e61fa.graaff@gentoo
1 commit: b9fe3a9f564754e89bb2b59ff0454d34383e61fa
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 16 06:46:27 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 16 08:52:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9fe3a9f
7
8 dev-lang/ruby: cleanup
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-lang/ruby/ruby-2.5.8-r3.ebuild | 246 -----------------------------------
14 dev-lang/ruby/ruby-2.6.6-r5.ebuild | 259 -------------------------------------
15 dev-lang/ruby/ruby-2.6.7-r1.ebuild | 259 -------------------------------------
16 3 files changed, 764 deletions(-)
17
18 diff --git a/dev-lang/ruby/ruby-2.5.8-r3.ebuild b/dev-lang/ruby/ruby-2.5.8-r3.ebuild
19 deleted file mode 100644
20 index 750b9e0ddb3..00000000000
21 --- a/dev-lang/ruby/ruby-2.5.8-r3.ebuild
22 +++ /dev/null
23 @@ -1,246 +0,0 @@
24 -# Copyright 1999-2021 Gentoo Authors
25 -# Distributed under the terms of the GNU General Public License v2
26 -
27 -EAPI=7
28 -
29 -inherit autotools flag-o-matic multilib
30 -
31 -MY_P="${PN}-$(ver_cut 1-3)"
32 -S=${WORKDIR}/${MY_P}
33 -
34 -SLOT=$(ver_cut 1-2)
35 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
36 -RUBYVERSION=${SLOT}.0
37 -
38 -DESCRIPTION="An object-oriented scripting language"
39 -HOMEPAGE="https://www.ruby-lang.org/"
40 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
41 -
42 -LICENSE="|| ( Ruby-BSD BSD-2 )"
43 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
44 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
45 -
46 -RDEPEND="
47 - berkdb? ( sys-libs/db:= )
48 - gdbm? ( sys-libs/gdbm:= )
49 - jemalloc? ( dev-libs/jemalloc:= )
50 - ssl? (
51 - dev-libs/openssl:0=
52 - )
53 - socks5? ( >=net-proxy/dante-1.1.13 )
54 - systemtap? ( dev-util/systemtap )
55 - tk? (
56 - dev-lang/tcl:0=[threads]
57 - dev-lang/tk:0=[threads]
58 - )
59 - dev-libs/libyaml
60 - dev-libs/libffi:=
61 - sys-libs/readline:0=
62 - sys-libs/zlib
63 - virtual/libcrypt:=
64 - >=app-eselect/eselect-ruby-20171225
65 -"
66 -
67 -DEPEND="${RDEPEND}"
68 -
69 -BUNDLED_GEMS="
70 - >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25]
71 - >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25]
72 - >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25]
73 - >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25]
74 - >=dev-ruby/rake-12.3.0[ruby_targets_ruby25]
75 - >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25]
76 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25]
77 -"
78 -
79 -PDEPEND="
80 - ${BUNDLED_GEMS}
81 - virtual/rubygems[ruby_targets_ruby25]
82 - >=dev-ruby/json-2.0.2[ruby_targets_ruby25]
83 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] )
84 - xemacs? ( app-xemacs/ruby-modes )"
85 -
86 -src_prepare() {
87 - eapply "${FILESDIR}"/${SLOT}/{001,002,005,011}*.patch
88 -
89 - einfo "Unbundling gems..."
90 - cd "$S"
91 - # Remove bundled gems that we will install via PDEPEND, bug
92 - # 539700. Use explicit version numbers to ensure rm fails when they
93 - # change so we can update dependencies accordingly.
94 - 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
95 -
96 - einfo "Removing bundled libraries..."
97 - rm -fr ext/fiddle/libffi-3.2.1 || die
98 -
99 - if use prefix ; then
100 - # Fix hardcoded SHELL var in mkmf library
101 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
102 -
103 - if [[ ${CHOST} == *darwin* ]] ; then
104 - # avoid symlink loop on Darwin (?!)
105 - sed -i \
106 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
107 - configure.ac || die
108 -
109 - # make ar/libtool hack for Darwin work
110 - sed -i \
111 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
112 - configure.ac || die
113 - fi
114 - fi
115 -
116 - eapply_user
117 -
118 - eautoreconf
119 -}
120 -
121 -src_configure() {
122 - local modules= myconf=
123 -
124 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
125 - filter-flags -fomit-frame-pointer
126 - # In many places aliasing rules are broken; play it safe
127 - # as it's risky with newer compilers to leave it as it is.
128 - append-flags -fno-strict-aliasing
129 -
130 - # Socks support via dante
131 - if use socks5 ; then
132 - # Socks support can't be disabled as long as SOCKS_SERVER is
133 - # set and socks library is present, so need to unset
134 - # SOCKS_SERVER in that case.
135 - unset SOCKS_SERVER
136 - fi
137 -
138 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
139 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
140 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
141 - fi
142 -
143 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
144 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
145 -
146 - # Determine which modules *not* to build depending in the USE flags.
147 - if ! use berkdb ; then
148 - modules="${modules},dbm"
149 - fi
150 - if ! use gdbm ; then
151 - modules="${modules},gdbm"
152 - fi
153 - if ! use ssl ; then
154 - modules="${modules},openssl"
155 - fi
156 - if ! use tk ; then
157 - modules="${modules},tk"
158 - fi
159 -
160 - # Provide an empty LIBPATHENV because we disable rpath but we do not
161 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
162 - # #564272
163 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
164 - --program-suffix=${MY_SUFFIX} \
165 - --with-soname=ruby${MY_SUFFIX} \
166 - --with-readline-dir="${EPREFIX}"/usr \
167 - --enable-shared \
168 - --enable-pthread \
169 - --disable-rpath \
170 - --with-out-ext="${modules}" \
171 - $(use_with jemalloc jemalloc) \
172 - $(use_enable socks5 socks) \
173 - $(use_enable systemtap dtrace) \
174 - $(use_enable doc install-doc) \
175 - --enable-ipv6 \
176 - $(use_enable static-libs static) \
177 - $(use_enable static-libs install-static-library) \
178 - $(use_with static-libs static-linked-ext) \
179 - $(use_enable debug) \
180 - ${myconf} \
181 - --enable-option-checking=no
182 -}
183 -
184 -src_compile() {
185 - emake V=1 EXTLDFLAGS="${LDFLAGS}"
186 -}
187 -
188 -src_test() {
189 - emake -j1 V=1 test
190 -
191 - elog "Ruby's make test has been run. Ruby also ships with a make check"
192 - elog "that cannot be run until after ruby has been installed."
193 - elog
194 - if use rubytests; then
195 - elog "You have enabled rubytests, so they will be installed to"
196 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
197 - elog "than root, and you must place them into a writeable directory."
198 - elog "Then call: "
199 - elog
200 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
201 - else
202 - elog "Enable the rubytests USE flag to install the make check tests"
203 - fi
204 -}
205 -
206 -src_install() {
207 - # Remove the remaining bundled gems. We do this late in the process
208 - # since they are used during the build to e.g. create the
209 - # documentation.
210 - rm -rf ext/json || die
211 -
212 - # Ruby is involved in the install process, we don't want interference here.
213 - unset RUBYOPT
214 -
215 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
216 -
217 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
218 -
219 - if [[ ${CHOST} == *darwin* ]] ; then
220 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
221 - export DYLD_LIBRARY_PATH
222 - fi
223 -
224 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
225 - for d in $(find "${S}/ext" -type d) ; do
226 - RUBYLIB="${RUBYLIB}:$d"
227 - done
228 - export LD_LIBRARY_PATH RUBYLIB
229 -
230 - emake V=1 DESTDIR="${D}" install
231 -
232 - # Remove installed rubygems and rdoc copy
233 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
234 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
235 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
236 - rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
237 -
238 - if use doc; then
239 - make DESTDIR="${D}" install-doc || die "make install-doc failed"
240 - fi
241 -
242 - if use examples; then
243 - dodoc -r sample
244 - fi
245 -
246 - dodoc ChangeLog NEWS doc/NEWS* README*
247 -
248 - if use rubytests; then
249 - pushd test
250 - insinto /usr/share/${PN}-${SLOT}/test
251 - doins -r .
252 - popd
253 - fi
254 -}
255 -
256 -pkg_postinst() {
257 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
258 - eselect ruby set ruby${MY_SUFFIX}
259 - fi
260 -
261 - elog
262 - elog "To switch between available Ruby profiles, execute as root:"
263 - elog "\teselect ruby set ruby(23|24|...)"
264 - elog
265 -}
266 -
267 -pkg_postrm() {
268 - eselect ruby cleanup
269 -}
270
271 diff --git a/dev-lang/ruby/ruby-2.6.6-r5.ebuild b/dev-lang/ruby/ruby-2.6.6-r5.ebuild
272 deleted file mode 100644
273 index 14fd240b2dd..00000000000
274 --- a/dev-lang/ruby/ruby-2.6.6-r5.ebuild
275 +++ /dev/null
276 @@ -1,259 +0,0 @@
277 -# Copyright 1999-2021 Gentoo Authors
278 -# Distributed under the terms of the GNU General Public License v2
279 -
280 -EAPI=7
281 -
282 -inherit autotools flag-o-matic multilib
283 -
284 -MY_P="${PN}-$(ver_cut 1-3)"
285 -S=${WORKDIR}/${MY_P}
286 -
287 -SLOT=$(ver_cut 1-2)
288 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
289 -RUBYVERSION=${SLOT}.0
290 -
291 -DESCRIPTION="An object-oriented scripting language"
292 -HOMEPAGE="https://www.ruby-lang.org/"
293 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
294 -
295 -LICENSE="|| ( Ruby-BSD BSD-2 )"
296 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
297 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
298 -
299 -RDEPEND="
300 - berkdb? ( sys-libs/db:= )
301 - gdbm? ( sys-libs/gdbm:= )
302 - jemalloc? ( dev-libs/jemalloc:= )
303 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
304 - ssl? (
305 - dev-libs/openssl:0=
306 - )
307 - socks5? ( >=net-proxy/dante-1.1.13 )
308 - systemtap? ( dev-util/systemtap )
309 - tk? (
310 - dev-lang/tcl:0=[threads]
311 - dev-lang/tk:0=[threads]
312 - )
313 - dev-libs/libyaml
314 - dev-libs/libffi:=
315 - sys-libs/readline:0=
316 - sys-libs/zlib
317 - virtual/libcrypt:=
318 - >=app-eselect/eselect-ruby-20181225
319 -"
320 -
321 -DEPEND="${RDEPEND}"
322 -
323 -BUNDLED_GEMS="
324 - >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
325 - >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
326 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
327 - >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
328 - >=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
329 - >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
330 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
331 -"
332 -
333 -PDEPEND="
334 - ${BUNDLED_GEMS}
335 - virtual/rubygems[ruby_targets_ruby26]
336 - >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
337 - >=dev-ruby/json-2.0.2[ruby_targets_ruby26]
338 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
339 - xemacs? ( app-xemacs/ruby-modes )"
340 -
341 -src_prepare() {
342 - # 005 does not compile bigdecimal and is questionable because it
343 - # compiles ruby in a non-standard way, may be dropped
344 - eapply "${FILESDIR}"/2.6/{002,010}*.patch
345 -
346 - einfo "Unbundling gems..."
347 - cd "$S"
348 - # Remove bundled gems that we will install via PDEPEND, bug
349 - # 539700.
350 - rm -fr gems/* || die
351 -
352 - einfo "Removing bundled libraries..."
353 - rm -fr ext/fiddle/libffi-3.2.1 || die
354 -
355 - if use prefix ; then
356 - # Fix hardcoded SHELL var in mkmf library
357 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
358 -
359 - if [[ ${CHOST} == *darwin* ]] ; then
360 - # avoid symlink loop on Darwin (?!)
361 - sed -i \
362 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
363 - configure.ac || die
364 -
365 - # make ar/libtool hack for Darwin work
366 - sed -i \
367 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
368 - configure.ac || die
369 - fi
370 - fi
371 -
372 - eapply_user
373 -
374 - eautoreconf
375 -}
376 -
377 -src_configure() {
378 - local modules= myconf=
379 -
380 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
381 - filter-flags -fomit-frame-pointer
382 - # In many places aliasing rules are broken; play it safe
383 - # as it's risky with newer compilers to leave it as it is.
384 - append-flags -fno-strict-aliasing
385 -
386 - # Socks support via dante
387 - if use socks5 ; then
388 - # Socks support can't be disabled as long as SOCKS_SERVER is
389 - # set and socks library is present, so need to unset
390 - # SOCKS_SERVER in that case.
391 - unset SOCKS_SERVER
392 - fi
393 -
394 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
395 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
396 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
397 - fi
398 -
399 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
400 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
401 -
402 - # Determine which modules *not* to build depending in the USE flags.
403 - if ! use berkdb ; then
404 - modules="${modules},dbm"
405 - fi
406 - if ! use gdbm ; then
407 - modules="${modules},gdbm"
408 - fi
409 - if ! use ssl ; then
410 - modules="${modules},openssl"
411 - fi
412 - if ! use tk ; then
413 - modules="${modules},tk"
414 - fi
415 -
416 - # Provide an empty LIBPATHENV because we disable rpath but we do not
417 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
418 - # #564272
419 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
420 - --program-suffix=${MY_SUFFIX} \
421 - --with-soname=ruby${MY_SUFFIX} \
422 - --with-readline-dir="${EPREFIX}"/usr \
423 - --enable-shared \
424 - --enable-pthread \
425 - --disable-rpath \
426 - --with-out-ext="${modules}" \
427 - $(use_with jemalloc jemalloc) \
428 - $(use_enable jit jit-support ) \
429 - $(use_enable socks5 socks) \
430 - $(use_enable systemtap dtrace) \
431 - $(use_enable doc install-doc) \
432 - --enable-ipv6 \
433 - $(use_enable static-libs static) \
434 - $(use_enable static-libs install-static-library) \
435 - $(use_with static-libs static-linked-ext) \
436 - $(use_enable debug) \
437 - ${myconf} \
438 - --enable-option-checking=no
439 -
440 - # Makefile is broken because it lacks -ldl
441 - rm -rf ext/-test-/popen_deadlock || die
442 -}
443 -
444 -src_compile() {
445 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
446 -}
447 -
448 -src_test() {
449 - emake -j1 V=1 test
450 -
451 - elog "Ruby's make test has been run. Ruby also ships with a make check"
452 - elog "that cannot be run until after ruby has been installed."
453 - elog
454 - if use rubytests; then
455 - elog "You have enabled rubytests, so they will be installed to"
456 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
457 - elog "than root, and you must place them into a writeable directory."
458 - elog "Then call: "
459 - elog
460 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
461 - else
462 - elog "Enable the rubytests USE flag to install the make check tests"
463 - fi
464 -}
465 -
466 -src_install() {
467 - # Remove the remaining bundled gems. We do this late in the process
468 - # since they are used during the build to e.g. create the
469 - # documentation.
470 - einfo "Removing default gems before installation"
471 - rm -rf .ext/common/json.rb .ext/common/json ext/json || die
472 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
473 -
474 - # Ruby is involved in the install process, we don't want interference here.
475 - unset RUBYOPT
476 -
477 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
478 -
479 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
480 -
481 - if [[ ${CHOST} == *darwin* ]] ; then
482 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
483 - export DYLD_LIBRARY_PATH
484 - fi
485 -
486 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
487 - for d in $(find "${S}/ext" -type d) ; do
488 - RUBYLIB="${RUBYLIB}:$d"
489 - done
490 - export LD_LIBRARY_PATH RUBYLIB
491 -
492 - # Create directory for the default gems
493 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
494 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
495 -
496 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
497 -
498 - # Remove installed rubygems and rdoc copy
499 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
500 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
501 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
502 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
503 -
504 - if use doc; then
505 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
506 - fi
507 -
508 - if use examples; then
509 - dodoc -r sample
510 - fi
511 -
512 - dodoc ChangeLog NEWS doc/NEWS* README*
513 -
514 - if use rubytests; then
515 - pushd test
516 - insinto /usr/share/${PN}-${SLOT}/test
517 - doins -r .
518 - popd
519 - fi
520 -}
521 -
522 -pkg_postinst() {
523 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
524 - eselect ruby set ruby${MY_SUFFIX}
525 - fi
526 -
527 - elog
528 - elog "To switch between available Ruby profiles, execute as root:"
529 - elog "\teselect ruby set ruby(23|24|...)"
530 - elog
531 -}
532 -
533 -pkg_postrm() {
534 - eselect ruby cleanup
535 -}
536
537 diff --git a/dev-lang/ruby/ruby-2.6.7-r1.ebuild b/dev-lang/ruby/ruby-2.6.7-r1.ebuild
538 deleted file mode 100644
539 index 14fd240b2dd..00000000000
540 --- a/dev-lang/ruby/ruby-2.6.7-r1.ebuild
541 +++ /dev/null
542 @@ -1,259 +0,0 @@
543 -# Copyright 1999-2021 Gentoo Authors
544 -# Distributed under the terms of the GNU General Public License v2
545 -
546 -EAPI=7
547 -
548 -inherit autotools flag-o-matic multilib
549 -
550 -MY_P="${PN}-$(ver_cut 1-3)"
551 -S=${WORKDIR}/${MY_P}
552 -
553 -SLOT=$(ver_cut 1-2)
554 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
555 -RUBYVERSION=${SLOT}.0
556 -
557 -DESCRIPTION="An object-oriented scripting language"
558 -HOMEPAGE="https://www.ruby-lang.org/"
559 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
560 -
561 -LICENSE="|| ( Ruby-BSD BSD-2 )"
562 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
563 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
564 -
565 -RDEPEND="
566 - berkdb? ( sys-libs/db:= )
567 - gdbm? ( sys-libs/gdbm:= )
568 - jemalloc? ( dev-libs/jemalloc:= )
569 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
570 - ssl? (
571 - dev-libs/openssl:0=
572 - )
573 - socks5? ( >=net-proxy/dante-1.1.13 )
574 - systemtap? ( dev-util/systemtap )
575 - tk? (
576 - dev-lang/tcl:0=[threads]
577 - dev-lang/tk:0=[threads]
578 - )
579 - dev-libs/libyaml
580 - dev-libs/libffi:=
581 - sys-libs/readline:0=
582 - sys-libs/zlib
583 - virtual/libcrypt:=
584 - >=app-eselect/eselect-ruby-20181225
585 -"
586 -
587 -DEPEND="${RDEPEND}"
588 -
589 -BUNDLED_GEMS="
590 - >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
591 - >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
592 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
593 - >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
594 - >=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
595 - >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
596 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
597 -"
598 -
599 -PDEPEND="
600 - ${BUNDLED_GEMS}
601 - virtual/rubygems[ruby_targets_ruby26]
602 - >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
603 - >=dev-ruby/json-2.0.2[ruby_targets_ruby26]
604 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
605 - xemacs? ( app-xemacs/ruby-modes )"
606 -
607 -src_prepare() {
608 - # 005 does not compile bigdecimal and is questionable because it
609 - # compiles ruby in a non-standard way, may be dropped
610 - eapply "${FILESDIR}"/2.6/{002,010}*.patch
611 -
612 - einfo "Unbundling gems..."
613 - cd "$S"
614 - # Remove bundled gems that we will install via PDEPEND, bug
615 - # 539700.
616 - rm -fr gems/* || die
617 -
618 - einfo "Removing bundled libraries..."
619 - rm -fr ext/fiddle/libffi-3.2.1 || die
620 -
621 - if use prefix ; then
622 - # Fix hardcoded SHELL var in mkmf library
623 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
624 -
625 - if [[ ${CHOST} == *darwin* ]] ; then
626 - # avoid symlink loop on Darwin (?!)
627 - sed -i \
628 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
629 - configure.ac || die
630 -
631 - # make ar/libtool hack for Darwin work
632 - sed -i \
633 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
634 - configure.ac || die
635 - fi
636 - fi
637 -
638 - eapply_user
639 -
640 - eautoreconf
641 -}
642 -
643 -src_configure() {
644 - local modules= myconf=
645 -
646 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
647 - filter-flags -fomit-frame-pointer
648 - # In many places aliasing rules are broken; play it safe
649 - # as it's risky with newer compilers to leave it as it is.
650 - append-flags -fno-strict-aliasing
651 -
652 - # Socks support via dante
653 - if use socks5 ; then
654 - # Socks support can't be disabled as long as SOCKS_SERVER is
655 - # set and socks library is present, so need to unset
656 - # SOCKS_SERVER in that case.
657 - unset SOCKS_SERVER
658 - fi
659 -
660 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
661 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
662 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
663 - fi
664 -
665 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
666 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
667 -
668 - # Determine which modules *not* to build depending in the USE flags.
669 - if ! use berkdb ; then
670 - modules="${modules},dbm"
671 - fi
672 - if ! use gdbm ; then
673 - modules="${modules},gdbm"
674 - fi
675 - if ! use ssl ; then
676 - modules="${modules},openssl"
677 - fi
678 - if ! use tk ; then
679 - modules="${modules},tk"
680 - fi
681 -
682 - # Provide an empty LIBPATHENV because we disable rpath but we do not
683 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
684 - # #564272
685 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
686 - --program-suffix=${MY_SUFFIX} \
687 - --with-soname=ruby${MY_SUFFIX} \
688 - --with-readline-dir="${EPREFIX}"/usr \
689 - --enable-shared \
690 - --enable-pthread \
691 - --disable-rpath \
692 - --with-out-ext="${modules}" \
693 - $(use_with jemalloc jemalloc) \
694 - $(use_enable jit jit-support ) \
695 - $(use_enable socks5 socks) \
696 - $(use_enable systemtap dtrace) \
697 - $(use_enable doc install-doc) \
698 - --enable-ipv6 \
699 - $(use_enable static-libs static) \
700 - $(use_enable static-libs install-static-library) \
701 - $(use_with static-libs static-linked-ext) \
702 - $(use_enable debug) \
703 - ${myconf} \
704 - --enable-option-checking=no
705 -
706 - # Makefile is broken because it lacks -ldl
707 - rm -rf ext/-test-/popen_deadlock || die
708 -}
709 -
710 -src_compile() {
711 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
712 -}
713 -
714 -src_test() {
715 - emake -j1 V=1 test
716 -
717 - elog "Ruby's make test has been run. Ruby also ships with a make check"
718 - elog "that cannot be run until after ruby has been installed."
719 - elog
720 - if use rubytests; then
721 - elog "You have enabled rubytests, so they will be installed to"
722 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
723 - elog "than root, and you must place them into a writeable directory."
724 - elog "Then call: "
725 - elog
726 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
727 - else
728 - elog "Enable the rubytests USE flag to install the make check tests"
729 - fi
730 -}
731 -
732 -src_install() {
733 - # Remove the remaining bundled gems. We do this late in the process
734 - # since they are used during the build to e.g. create the
735 - # documentation.
736 - einfo "Removing default gems before installation"
737 - rm -rf .ext/common/json.rb .ext/common/json ext/json || die
738 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
739 -
740 - # Ruby is involved in the install process, we don't want interference here.
741 - unset RUBYOPT
742 -
743 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
744 -
745 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
746 -
747 - if [[ ${CHOST} == *darwin* ]] ; then
748 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
749 - export DYLD_LIBRARY_PATH
750 - fi
751 -
752 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
753 - for d in $(find "${S}/ext" -type d) ; do
754 - RUBYLIB="${RUBYLIB}:$d"
755 - done
756 - export LD_LIBRARY_PATH RUBYLIB
757 -
758 - # Create directory for the default gems
759 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
760 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
761 -
762 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
763 -
764 - # Remove installed rubygems and rdoc copy
765 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
766 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
767 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
768 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
769 -
770 - if use doc; then
771 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
772 - fi
773 -
774 - if use examples; then
775 - dodoc -r sample
776 - fi
777 -
778 - dodoc ChangeLog NEWS doc/NEWS* README*
779 -
780 - if use rubytests; then
781 - pushd test
782 - insinto /usr/share/${PN}-${SLOT}/test
783 - doins -r .
784 - popd
785 - fi
786 -}
787 -
788 -pkg_postinst() {
789 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
790 - eselect ruby set ruby${MY_SUFFIX}
791 - fi
792 -
793 - elog
794 - elog "To switch between available Ruby profiles, execute as root:"
795 - elog "\teselect ruby set ruby(23|24|...)"
796 - elog
797 -}
798 -
799 -pkg_postrm() {
800 - eselect ruby cleanup
801 -}