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, 01 May 2022 07:40:28
Message-Id: 1651390818.e3ad0417fd33dcb01b43cdcfc1cdaa049e9b65cb.graaff@gentoo
1 commit: e3ad0417fd33dcb01b43cdcfc1cdaa049e9b65cb
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 1 07:39:47 2022 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun May 1 07:40:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3ad0417
7
8 dev-lang/ruby: drop 2.6.9, 2.7.5
9
10 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
11
12 dev-lang/ruby/Manifest | 2 -
13 dev-lang/ruby/ruby-2.6.9.ebuild | 258 -------------------------------------
14 dev-lang/ruby/ruby-2.7.5.ebuild | 272 ----------------------------------------
15 3 files changed, 532 deletions(-)
16
17 diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
18 index d01ef691c45f..5aab4011dd7d 100644
19 --- a/dev-lang/ruby/Manifest
20 +++ b/dev-lang/ruby/Manifest
21 @@ -1,6 +1,4 @@
22 DIST ruby-2.6.10.tar.xz 11582056 BLAKE2B faa0fd6e4b462ed6473191b39bb19dda78f64c555b6eae0c9d53a81cffca55c31d1fa04345dc2f8a951029e41bb973b2194b1f15964d8a3db973bf2872fff126 SHA512 06ebf1442c4bf4be62eb710348cfb714cbc4c4acc5125319a425fe76ef2be7cccfd41e50bf3751bfef3ceb8ac47ad41a027d2c2ad560e25ec694e34fd9f62a8a
23 -DIST ruby-2.6.9.tar.xz 11590064 BLAKE2B 8d14baf479053b7fab517f1e41191b009413d557431c558d92489a36d539f9a667571e4493abba171b047f8ba6d1f676fb6d2f2152fcae737924e773a324ddf6 SHA512 f60aa89e685cea324185eb0d13e6b44caef4e4f761cbf9ea1386ae70e39faf3866ac01e4bb5354574f2583e74290b8c80eaf63d126040d52368be6c771476451
24 -DIST ruby-2.7.5.tar.xz 12072980 BLAKE2B 50bb822cb2c5e76fee8755c710b593ce3bcb0f4f14b96a4e9eef5e58b4614bcf5f91491586b1dd6411fce57c258a7ad80136cd3cfbddf28e4fd4b37f486d2bea SHA512 21c8a713e3ce115fc4c405113ac691ddcefc3419f528b93ca1ac59e7052c1b6e9e241da0e570e291e567f28f3d840824dbcc5967b216cbe7d6ca7a05580fa311
25 DIST ruby-2.7.6.tar.xz 12084408 BLAKE2B 4b40e66aeeca3884983fffcf31c4713eb4fcdd62232e795dc5a0c03236c3c05200068902c0cb987455297bec2bcfc2a9a24f2841d18a480c7d09b86318daab3f SHA512 e86410b59d5917786fe43b00fd75dedd0e7f84611286b9274c542d2e562088fcee6bcc6c2596c30ccf793280d2bac6bfbb2619ef0513b3ca31f10f88684c7b1f
26 DIST ruby-3.0.4.tar.xz 15830368 BLAKE2B 3d1f2e6329269febbd02ac8a68aafd57d5ca858c816a81e754adfc9aa2990274d190672447244520fe9fbf9a1d337d17c845a97800f964e2046b2ef9eef733ee SHA512 53bf7dd403b0c68af9691882ad8ed7422c8d1f496627428fb4c3caf0b0313715524b744c5f453aced2d49e16e55f3f45b46b9a77aa3097dbfcae7caa0208194b
27 DIST ruby-3.1.2.tar.xz 15101588 BLAKE2B 3f06d432f023d65c4808379140c18a922ad6c6443cf7f4b5ed3d44d2e0b7e19cbf0064b5214b46f3c5335f4e61ff473943fd565082ef0b645558b83e89dd0533 SHA512 4a74e9efc6ea4b3eff4fec7534eb1fff4794d021531defc2e9937e53c6668db8ecdc0fff2bc23d5e6602d0df344a2caa85b31c5414309541e3d5313ec82b6e21
28
29 diff --git a/dev-lang/ruby/ruby-2.6.9.ebuild b/dev-lang/ruby/ruby-2.6.9.ebuild
30 deleted file mode 100644
31 index 4046ef396c97..000000000000
32 --- a/dev-lang/ruby/ruby-2.6.9.ebuild
33 +++ /dev/null
34 @@ -1,258 +0,0 @@
35 -# Copyright 1999-2021 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=7
39 -
40 -inherit autotools flag-o-matic multilib
41 -
42 -MY_P="${PN}-$(ver_cut 1-3)"
43 -S=${WORKDIR}/${MY_P}
44 -
45 -SLOT=$(ver_cut 1-2)
46 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
47 -RUBYVERSION=${SLOT}.0
48 -
49 -DESCRIPTION="An object-oriented scripting language"
50 -HOMEPAGE="https://www.ruby-lang.org/"
51 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
52 -
53 -LICENSE="|| ( Ruby-BSD BSD-2 )"
54 -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"
55 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
56 -
57 -RDEPEND="
58 - berkdb? ( sys-libs/db:= )
59 - gdbm? ( sys-libs/gdbm:= )
60 - jemalloc? ( dev-libs/jemalloc:= )
61 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
62 - ssl? (
63 - dev-libs/openssl:0=
64 - )
65 - socks5? ( >=net-proxy/dante-1.1.13 )
66 - systemtap? ( dev-util/systemtap )
67 - tk? (
68 - dev-lang/tcl:0=[threads]
69 - dev-lang/tk:0=[threads]
70 - )
71 - dev-libs/libyaml
72 - dev-libs/libffi:=
73 - sys-libs/readline:0=
74 - sys-libs/zlib
75 - virtual/libcrypt:=
76 - >=app-eselect/eselect-ruby-20181225
77 -"
78 -
79 -DEPEND="${RDEPEND}"
80 -
81 -BUNDLED_GEMS="
82 - >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26]
83 - >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26]
84 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26]
85 - >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26]
86 - >=dev-ruby/rake-12.3.2[ruby_targets_ruby26]
87 - >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26]
88 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26]
89 -"
90 -
91 -PDEPEND="
92 - ${BUNDLED_GEMS}
93 - virtual/rubygems[ruby_targets_ruby26]
94 - >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26]
95 - >=dev-ruby/json-2.0.2[ruby_targets_ruby26]
96 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] )
97 - xemacs? ( app-xemacs/ruby-modes )"
98 -
99 -src_prepare() {
100 - # 005 does not compile bigdecimal and is questionable because it
101 - # compiles ruby in a non-standard way, may be dropped
102 - eapply "${FILESDIR}"/2.6/{002,010}*.patch
103 -
104 - einfo "Unbundling gems..."
105 - cd "$S"
106 - # Remove bundled gems that we will install via PDEPEND, bug
107 - # 539700.
108 - rm -fr gems/* || die
109 -
110 - einfo "Removing bundled libraries..."
111 - rm -fr ext/fiddle/libffi-3.2.1 || die
112 -
113 - if use prefix ; then
114 - # Fix hardcoded SHELL var in mkmf library
115 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
116 -
117 - if [[ ${CHOST} == *darwin* ]] ; then
118 - # avoid symlink loop on Darwin (?!)
119 - sed -i \
120 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
121 - configure.ac || die
122 -
123 - # make ar/libtool hack for Darwin work
124 - sed -i \
125 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
126 - configure.ac || die
127 - fi
128 - fi
129 -
130 - eapply_user
131 -
132 - eautoreconf
133 -}
134 -
135 -src_configure() {
136 - local modules= myconf=
137 -
138 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
139 - filter-flags -fomit-frame-pointer
140 - # In many places aliasing rules are broken; play it safe
141 - # as it's risky with newer compilers to leave it as it is.
142 - append-flags -fno-strict-aliasing
143 -
144 - # Socks support via dante
145 - if use socks5 ; then
146 - # Socks support can't be disabled as long as SOCKS_SERVER is
147 - # set and socks library is present, so need to unset
148 - # SOCKS_SERVER in that case.
149 - unset SOCKS_SERVER
150 - fi
151 -
152 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
153 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
154 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
155 - fi
156 -
157 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
158 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
159 -
160 - # Determine which modules *not* to build depending in the USE flags.
161 - if ! use berkdb ; then
162 - modules="${modules},dbm"
163 - fi
164 - if ! use gdbm ; then
165 - modules="${modules},gdbm"
166 - fi
167 - if ! use ssl ; then
168 - modules="${modules},openssl"
169 - fi
170 - if ! use tk ; then
171 - modules="${modules},tk"
172 - fi
173 -
174 - # Provide an empty LIBPATHENV because we disable rpath but we do not
175 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
176 - # #564272
177 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
178 - --program-suffix=${MY_SUFFIX} \
179 - --with-soname=ruby${MY_SUFFIX} \
180 - --with-readline-dir="${EPREFIX}"/usr \
181 - --enable-shared \
182 - --enable-pthread \
183 - --disable-rpath \
184 - --with-out-ext="${modules}" \
185 - $(use_with jemalloc jemalloc) \
186 - $(use_enable jit jit-support ) \
187 - $(use_enable socks5 socks) \
188 - $(use_enable systemtap dtrace) \
189 - $(use_enable doc install-doc) \
190 - --enable-ipv6 \
191 - $(use_enable static-libs static) \
192 - $(use_enable static-libs install-static-library) \
193 - $(use_with static-libs static-linked-ext) \
194 - $(use_enable debug) \
195 - ${myconf} \
196 - --enable-option-checking=no
197 -
198 - # Makefile is broken because it lacks -ldl
199 - rm -rf ext/-test-/popen_deadlock || die
200 -}
201 -
202 -src_compile() {
203 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
204 -}
205 -
206 -src_test() {
207 - emake -j1 V=1 test
208 -
209 - elog "Ruby's make test has been run. Ruby also ships with a make check"
210 - elog "that cannot be run until after ruby has been installed."
211 - elog
212 - if use rubytests; then
213 - elog "You have enabled rubytests, so they will be installed to"
214 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
215 - elog "than root, and you must place them into a writeable directory."
216 - elog "Then call: "
217 - elog
218 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
219 - else
220 - elog "Enable the rubytests USE flag to install the make check tests"
221 - fi
222 -}
223 -
224 -src_install() {
225 - # Remove the remaining bundled gems. We do this late in the process
226 - # since they are used during the build to e.g. create the
227 - # documentation.
228 - einfo "Removing default gems before installation"
229 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
230 -
231 - # Ruby is involved in the install process, we don't want interference here.
232 - unset RUBYOPT
233 -
234 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
235 -
236 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
237 -
238 - if [[ ${CHOST} == *darwin* ]] ; then
239 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
240 - export DYLD_LIBRARY_PATH
241 - fi
242 -
243 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
244 - for d in $(find "${S}/ext" -type d) ; do
245 - RUBYLIB="${RUBYLIB}:$d"
246 - done
247 - export LD_LIBRARY_PATH RUBYLIB
248 -
249 - # Create directory for the default gems
250 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
251 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
252 -
253 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
254 -
255 - # Remove installed rubygems and rdoc copy
256 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
257 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
258 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
259 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
260 -
261 - if use doc; then
262 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
263 - fi
264 -
265 - if use examples; then
266 - dodoc -r sample
267 - fi
268 -
269 - dodoc ChangeLog NEWS doc/NEWS* README*
270 -
271 - if use rubytests; then
272 - pushd test
273 - insinto /usr/share/${PN}-${SLOT}/test
274 - doins -r .
275 - popd
276 - fi
277 -}
278 -
279 -pkg_postinst() {
280 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
281 - eselect ruby set ruby${MY_SUFFIX}
282 - fi
283 -
284 - elog
285 - elog "To switch between available Ruby profiles, execute as root:"
286 - elog "\teselect ruby set ruby(23|24|...)"
287 - elog
288 -}
289 -
290 -pkg_postrm() {
291 - eselect ruby cleanup
292 -}
293
294 diff --git a/dev-lang/ruby/ruby-2.7.5.ebuild b/dev-lang/ruby/ruby-2.7.5.ebuild
295 deleted file mode 100644
296 index 7c21b8f77838..000000000000
297 --- a/dev-lang/ruby/ruby-2.7.5.ebuild
298 +++ /dev/null
299 @@ -1,272 +0,0 @@
300 -# Copyright 1999-2022 Gentoo Authors
301 -# Distributed under the terms of the GNU General Public License v2
302 -
303 -EAPI=7
304 -
305 -inherit autotools flag-o-matic multilib
306 -
307 -MY_P="${PN}-$(ver_cut 1-3)"
308 -S=${WORKDIR}/${MY_P}
309 -
310 -SLOT=$(ver_cut 1-2)
311 -MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
312 -RUBYVERSION=${SLOT}.0
313 -
314 -DESCRIPTION="An object-oriented scripting language"
315 -HOMEPAGE="https://www.ruby-lang.org/"
316 -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz"
317 -
318 -LICENSE="|| ( Ruby-BSD BSD-2 )"
319 -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"
320 -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
321 -
322 -RDEPEND="
323 - berkdb? ( sys-libs/db:= )
324 - gdbm? ( sys-libs/gdbm:= )
325 - jemalloc? ( dev-libs/jemalloc:= )
326 - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) )
327 - ssl? (
328 - dev-libs/openssl:0=
329 - )
330 - socks5? ( >=net-proxy/dante-1.1.13 )
331 - systemtap? ( dev-util/systemtap )
332 - tk? (
333 - dev-lang/tcl:0=[threads]
334 - dev-lang/tk:0=[threads]
335 - )
336 - dev-libs/libyaml
337 - dev-libs/libffi:=
338 - sys-libs/readline:0=
339 - sys-libs/zlib
340 - virtual/libcrypt:=
341 - >=app-eselect/eselect-ruby-20191222
342 -"
343 -
344 -DEPEND="${RDEPEND}"
345 -
346 -BUNDLED_GEMS="
347 - >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27]
348 - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27]
349 - >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27]
350 - >=dev-ruby/rake-13.0.1[ruby_targets_ruby27]
351 - >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27]
352 - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27]
353 -"
354 -
355 -PDEPEND="
356 - ${BUNDLED_GEMS}
357 - virtual/rubygems[ruby_targets_ruby27]
358 - >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27]
359 - >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27]
360 - >=dev-ruby/json-2.0.2[ruby_targets_ruby27]
361 - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] )
362 - xemacs? ( app-xemacs/ruby-modes )"
363 -
364 -src_prepare() {
365 - eapply "${FILESDIR}"/2.7/{003,010}*.patch
366 -
367 - if use elibc_musl ; then
368 - eapply "${FILESDIR}"/2.7/{900,901}-musl-*.patch
369 - fi
370 -
371 - # Reset time on patched gem_prelude.rb to avoid the need for a base
372 - # ruby during bootstrapping, bug 787137
373 - touch -t 202001010000 gem_prelude.rb || die
374 -
375 - einfo "Unbundling gems..."
376 - cd "$S"
377 - # Remove bundled gems that we will install via PDEPEND, bug
378 - # 539700.
379 - rm -fr gems/* || die
380 - # Don't install CLI tools since they will clash with the gem
381 - rm -f bin/{racc,racc2y,y2racc} || die
382 - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die
383 -
384 - einfo "Removing bundled libraries..."
385 - rm -fr ext/fiddle/libffi-3.2.1 || die
386 -
387 - if use prefix ; then
388 - # Fix hardcoded SHELL var in mkmf library
389 - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die
390 -
391 - if [[ ${CHOST} == *darwin* ]] ; then
392 - # avoid symlink loop on Darwin (?!)
393 - sed -i \
394 - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \
395 - configure.ac || die
396 -
397 - # make ar/libtool hack for Darwin work
398 - sed -i \
399 - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \
400 - configure.ac || die
401 -
402 - # disable using security framework (GCC barfs on those headers)
403 - sed -i \
404 - -e 's/MAC_OS_X_VERSION_MIN_REQUIRED/_DISABLED_/' \
405 - random.c || die
406 - fi
407 - fi
408 -
409 - eapply_user
410 -
411 - eautoreconf
412 -}
413 -
414 -src_configure() {
415 - local modules= myconf=
416 -
417 - # -fomit-frame-pointer makes ruby segfault, see bug #150413.
418 - filter-flags -fomit-frame-pointer
419 - # In many places aliasing rules are broken; play it safe
420 - # as it's risky with newer compilers to leave it as it is.
421 - append-flags -fno-strict-aliasing
422 -
423 - # Socks support via dante
424 - if use socks5 ; then
425 - # Socks support can't be disabled as long as SOCKS_SERVER is
426 - # set and socks library is present, so need to unset
427 - # SOCKS_SERVER in that case.
428 - unset SOCKS_SERVER
429 - fi
430 -
431 - # Increase GC_MALLOC_LIMIT if set (default is 8000000)
432 - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
433 - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
434 - fi
435 -
436 - # ipv6 hack, bug 168939. Needs --enable-ipv6.
437 - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
438 -
439 - # Determine which modules *not* to build depending in the USE flags.
440 - if ! use berkdb ; then
441 - modules="${modules},dbm"
442 - fi
443 - if ! use gdbm ; then
444 - modules="${modules},gdbm"
445 - fi
446 - if ! use ssl ; then
447 - modules="${modules},openssl"
448 - fi
449 - if ! use tk ; then
450 - modules="${modules},tk"
451 - fi
452 -
453 - # Provide an empty LIBPATHENV because we disable rpath but we do not
454 - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
455 - # #564272
456 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
457 - --program-suffix=${MY_SUFFIX} \
458 - --with-soname=ruby${MY_SUFFIX} \
459 - --with-readline-dir="${EPREFIX}"/usr \
460 - --enable-shared \
461 - --enable-pthread \
462 - --disable-rpath \
463 - --with-out-ext="${modules}" \
464 - $(use_with jemalloc jemalloc) \
465 - $(use_enable jit jit-support ) \
466 - $(use_enable socks5 socks) \
467 - $(use_enable systemtap dtrace) \
468 - $(use_enable doc install-doc) \
469 - --enable-ipv6 \
470 - $(use_enable static-libs static) \
471 - $(use_enable static-libs install-static-library) \
472 - $(use_with static-libs static-linked-ext) \
473 - $(use_enable debug) \
474 - ${myconf} \
475 - --enable-option-checking=no
476 -
477 - # Makefile is broken because it lacks -ldl
478 - rm -rf ext/-test-/popen_deadlock || die
479 -}
480 -
481 -src_compile() {
482 - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
483 -}
484 -
485 -src_test() {
486 - emake -j1 V=1 test
487 -
488 - elog "Ruby's make test has been run. Ruby also ships with a make check"
489 - elog "that cannot be run until after ruby has been installed."
490 - elog
491 - if use rubytests; then
492 - elog "You have enabled rubytests, so they will be installed to"
493 - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
494 - elog "than root, and you must place them into a writeable directory."
495 - elog "Then call: "
496 - elog
497 - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
498 - else
499 - elog "Enable the rubytests USE flag to install the make check tests"
500 - fi
501 -}
502 -
503 -src_install() {
504 - # Remove the remaining bundled gems. We do this late in the process
505 - # since they are used during the build to e.g. create the
506 - # documentation.
507 - einfo "Removing default gems before installation"
508 - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die
509 -
510 - # Ruby is involved in the install process, we don't want interference here.
511 - unset RUBYOPT
512 -
513 - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
514 -
515 - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
516 -
517 - if [[ ${CHOST} == *darwin* ]] ; then
518 - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
519 - export DYLD_LIBRARY_PATH
520 - fi
521 -
522 - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
523 - for d in $(find "${S}/ext" -type d) ; do
524 - RUBYLIB="${RUBYLIB}:$d"
525 - done
526 - export LD_LIBRARY_PATH RUBYLIB
527 -
528 - # Create directory for the default gems
529 - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}"
530 - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed"
531 -
532 - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install
533 -
534 - # Remove installed rubygems and rdoc copy
535 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
536 - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
537 - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
538 - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
539 -
540 - if use doc; then
541 - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc
542 - fi
543 -
544 - if use examples; then
545 - dodoc -r sample
546 - fi
547 -
548 - dodoc ChangeLog NEWS doc/NEWS* README*
549 -
550 - if use rubytests; then
551 - pushd test
552 - insinto /usr/share/${PN}-${SLOT}/test
553 - doins -r .
554 - popd
555 - fi
556 -}
557 -
558 -pkg_postinst() {
559 - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then
560 - eselect ruby set ruby${MY_SUFFIX}
561 - fi
562 -
563 - elog
564 - elog "To switch between available Ruby profiles, execute as root:"
565 - elog "\teselect ruby set ruby(23|24|...)"
566 - elog
567 -}
568 -
569 -pkg_postrm() {
570 - eselect ruby cleanup
571 -}