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