From b4d43e8c611df4a8061b6f88d9e9f6b1e3c83903 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Jun 2021 14:47:38 +0100 Subject: gentoo resync : 24.06.2021 --- dev-lang/ruby/Manifest | 8 +- dev-lang/ruby/ruby-2.5.9-r1.ebuild | 246 ++++++++++++++++++++++++++++++++++ dev-lang/ruby/ruby-2.5.9.ebuild | 245 ---------------------------------- dev-lang/ruby/ruby-2.6.7-r1.ebuild | 259 +++++++++++++++++++++++++++++++++++ dev-lang/ruby/ruby-2.6.7.ebuild | 258 ----------------------------------- dev-lang/ruby/ruby-2.7.3-r1.ebuild | 266 ------------------------------------ dev-lang/ruby/ruby-2.7.3-r2.ebuild | 267 +++++++++++++++++++++++++++++++++++++ dev-lang/ruby/ruby-3.0.1-r1.ebuild | 264 ++++++++++++++++++++++++++++++++++++ dev-lang/ruby/ruby-3.0.1.ebuild | 263 ------------------------------------ 9 files changed, 1040 insertions(+), 1036 deletions(-) create mode 100644 dev-lang/ruby/ruby-2.5.9-r1.ebuild delete mode 100644 dev-lang/ruby/ruby-2.5.9.ebuild create mode 100644 dev-lang/ruby/ruby-2.6.7-r1.ebuild delete mode 100644 dev-lang/ruby/ruby-2.6.7.ebuild delete mode 100644 dev-lang/ruby/ruby-2.7.3-r1.ebuild create mode 100644 dev-lang/ruby/ruby-2.7.3-r2.ebuild create mode 100644 dev-lang/ruby/ruby-3.0.1-r1.ebuild delete mode 100644 dev-lang/ruby/ruby-3.0.1.ebuild (limited to 'dev-lang/ruby') diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index 700bcf02e242..773cd18ed6e8 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -27,16 +27,16 @@ DIST ruby-3.0.0.tar.xz 14374176 BLAKE2B 9e7520e0b1ae6644285449c4ae92983d306772b3 DIST ruby-3.0.1.tar.xz 14486780 BLAKE2B 60872c457f5bcb58e1bb1792ca13ae21c7cc30d22ae9bd072b3f6d6b83f41e535d905d19fd1aaf7a377801a5b610930bd1727219ab3c1461ee3d1ec7d041c2b6 SHA512 97d2e883656060846b304368d9d836e2f3ef39859c36171c9398a0573818e4ed75bfd7460f901a9553f7f53518c505327a66e74f83704a881469f5ac61fe13d7 EBUILD ruby-2.5.8-r1.ebuild 7015 BLAKE2B 1f3bc0c42021c044724881e3c06d25adb0fb70d5986bd0495610335938d4ebca880568489769510d947e8bd9f3cc72b7c6799b8c6793cf6c978d9c878832752e SHA512 9fe46a00f3fed169aae53f6bfd210b2144ae5da1bd3d40c15ae958ac6c8ec6b1c52f18ea62eda955ff0763c80f93c84a9c1dcb1d7f4133452374b1a382f4e92a EBUILD ruby-2.5.8.ebuild 6132 BLAKE2B 84722425d05bf97feb43e1c853b9d2f40deb4210651864a043d122102d6f5580075f84feda66013c3e63bad24730a631ddfec9cc93308cf35a82d6fffe69f02d SHA512 eff8e37b1fc1d85cd31d4bedd4a54621de2916317e0c323b71e07ae30a84684d901e9daae6f0df7a18af8729a955784ac4c06204069a5c6eb4f8754cbb7de450 -EBUILD ruby-2.5.9.ebuild 7015 BLAKE2B 1f3bc0c42021c044724881e3c06d25adb0fb70d5986bd0495610335938d4ebca880568489769510d947e8bd9f3cc72b7c6799b8c6793cf6c978d9c878832752e SHA512 9fe46a00f3fed169aae53f6bfd210b2144ae5da1bd3d40c15ae958ac6c8ec6b1c52f18ea62eda955ff0763c80f93c84a9c1dcb1d7f4133452374b1a382f4e92a +EBUILD ruby-2.5.9-r1.ebuild 7035 BLAKE2B 68cc6e313795e668d528a621fb17bedbb294d30a7c7b1c96dece0b5e76cb205603d2282019df9450cad4afad2f35d0f185254c6ac4bfcee2abce542fda3e1da6 SHA512 7e2ea164f2241eb77da9bd813495208ba7f3f5fbe52cd0c2f9ab61500dbe0c83b7e30e9b5169c48b81326651075057c4ea8e761e564383c977fb90dc0601084e EBUILD ruby-2.6.6-r2.ebuild 7425 BLAKE2B 090de7f9a2f681ee3455b2c2c99b37cbff1795a377062208caf61ab706b9d7b5200db8f94d74ab511441a83f56da684986c50ee1512132da104d33ed8f588950 SHA512 cc5b1f56199bbe12fe459e7c77e9b2212f3b4b986f491cf64d0633f16b5164c4f3b3107e90d95871cc4d4f15fd4e649bc039944646753f62a8c6b9a958d4bae7 EBUILD ruby-2.6.6-r3.ebuild 7521 BLAKE2B f9b840f6e93c668084b92738d964563e6bc9ca24176286e763b876e53b895683feee954b1324a3d9a9e6246acff82fa40b8875e121cb1c213b239cd2f8367134 SHA512 65b650fced8e38ec1d1351d70aa9f5de3833dad4f057f086a12b4286fae0e096b4dc9c74a242bd91d382159034cb7f33614516620b083bacccad841e25448aa5 -EBUILD ruby-2.6.7.ebuild 7521 BLAKE2B f9b840f6e93c668084b92738d964563e6bc9ca24176286e763b876e53b895683feee954b1324a3d9a9e6246acff82fa40b8875e121cb1c213b239cd2f8367134 SHA512 65b650fced8e38ec1d1351d70aa9f5de3833dad4f057f086a12b4286fae0e096b4dc9c74a242bd91d382159034cb7f33614516620b083bacccad841e25448aa5 +EBUILD ruby-2.6.7-r1.ebuild 7541 BLAKE2B 2937674eb743654214206e023b8a7be5ce626ab40833557de64fd3d3ba6bf44bd506a17835ea6a54f2d786eac6dab12ea7dfa6bf1454d3a17b5c7e98a28f07eb SHA512 f5d16a8ad63870e165c4be36af9c13cda5234b66cfba6d9665fd555946179870b5a2e918fda54f80363f8171701e1335923b04d0bd64ea07c67caf06c4c49941 EBUILD ruby-2.7.2-r1.ebuild 7717 BLAKE2B 178fc83dbedabf028eb8d5aa4cefffe6954f3af888c45253d88c3eeb3dbfaa35be562e93d88b3ad5f38612b800074f968be4488d15df70b39215e56ca26537e5 SHA512 d7025dc2290c780d28403ecfc79d2f1894f00ccd700f5562ba87c46b0ef8a8106c5415c8c4adb6334345f76e3459b2a54282b0ecf34cb5076b9969aaf1d9de0c EBUILD ruby-2.7.2.ebuild 7596 BLAKE2B 8874b9814884b31225717fadd976460826077662f896a5e32500498c9ae415ea76d9a7074c463cfe70c3d3bbc7edcdc33137a24cd55290608fcc56e35fc1a8ed SHA512 3ac990e0e749773e08fba9a7e40cc214cbff973f3e9578612be14ade699e09f0944696fe99caa6704e6d838923cad3709342f5b5510936a9276199065a3d8e87 -EBUILD ruby-2.7.3-r1.ebuild 7877 BLAKE2B 0c4e3d5402359395230a7a3afd44a1958cbac59a25adb1feca26d2ba366ed5ca07d9782f098cf2772057c63f291815ae7743be8405f2dc4f07075198d7b861b5 SHA512 ca74597afd1732aad6c8e922b1c4900d9c0b6a228bb45d23ef038da6f42ce4e136481af7bc59cd904a911ec94f7d21034f880e74084b8e92fcd34573dadec2c0 +EBUILD ruby-2.7.3-r2.ebuild 7897 BLAKE2B 7017c7dabc6554639b59285e3b07a6bcbb0dbdd7553fef4479db7947ceb8780053297eac2fcc96e475bb678d3b449d990a93c3a4d7b24ed81383247c6a550ff4 SHA512 c004e5f1743e6291cd82373d11850a85adb1bb80b42e3d216aa392a6ffb5f95362bcf0b691ce05f5be83b9d0e55d5de44d7c900fda76d1a749048b7c2e46c9b4 EBUILD ruby-2.7.3.ebuild 7717 BLAKE2B 178fc83dbedabf028eb8d5aa4cefffe6954f3af888c45253d88c3eeb3dbfaa35be562e93d88b3ad5f38612b800074f968be4488d15df70b39215e56ca26537e5 SHA512 d7025dc2290c780d28403ecfc79d2f1894f00ccd700f5562ba87c46b0ef8a8106c5415c8c4adb6334345f76e3459b2a54282b0ecf34cb5076b9969aaf1d9de0c EBUILD ruby-3.0.0-r1.ebuild 7600 BLAKE2B cb532faf77b93eec30cbd1caf3343a853bb4be65067a42f1ff96e4f0565f28e26ba856d3dc90200229ac18e2f6b046b08fb38a586ee655236b4ca9279d949d9a SHA512 6a2345f3ff2961df0ef706b40be7a702f8118f722787f960722931d5b5f1ed4af9b5586fa61096c518429a8b432b896a8b06e6edae3db3b541924631709fff67 EBUILD ruby-3.0.0-r2.ebuild 7721 BLAKE2B 5b7d4df65f66a80e3b2ba160ea7a4259b4a6c4a38976641daf7c5507ea89c3de9c42054f9ebd8a585f4dd1616bb76cfd4b40f01ad2818c7a2c6bd6d00871ab77 SHA512 c34884110a979535743c0a66227851820d290be435bcfaaac11fa7d69466e3c43775b2c63b3cd4176066ba8152104df4728c61fb594fc48dbfa2bbbac96a1b4e EBUILD ruby-3.0.0.ebuild 7594 BLAKE2B cddaa0cbcf14d48f99c0880dcefaf0fc10e1c3f364e777f75d4f7c5b2384bcc32da76e6f2a5ac2f7ee9ae639c0b2b7a86ed2b31a9bd283885ac1ef16ee244f9a SHA512 3708a18731f9edd0732720cf3eb7b17e5e2f822bcb1f847408f7192d1ee18e331400b48f80897ea6483c55d57523187739a5b4a8e2efecac2bbaf7858550f61d -EBUILD ruby-3.0.1.ebuild 7716 BLAKE2B 995145e1724334429e5887713a3ff8425d1705af8e59623f986e71a11adf7952eb0a97a938d6b3049eccff5c92c4b5d5dd66fa8dfdfcbc068fab542ca275e1f2 SHA512 e2e179c5de7c1541a7186387c1747fd7cc3faa169e4dfd7e299176817063f4a2f16307611a25c5df91af4df8f935a119578555f50399bc9eee7e515060b027fe +EBUILD ruby-3.0.1-r1.ebuild 7736 BLAKE2B 6a59d38cb6a1c7c4a369ea24a879b0ffdd02334e202c5317f0203f70e8f580f7b07cf836d656511dfd7e76832a7a5f0ac546b74b684d013033496cfe69947f3f SHA512 977e699d6ed53b25df303602b615455963d5c1b26ec8e62e13306c146187557f6e9afc582244340a0e20d4d57022b6b038d81d5a4de6a8bf64d47912babd8b70 MISC metadata.xml 523 BLAKE2B 4ed08360a279c8d44fe87f677cdc24a76eda6d37c591186951e16321f464d4451d0d1299c4e1d996bffe15a8cca672d4c5c1bc5fb0aa6cda69b8eff90ec31df8 SHA512 f74c386a3d6314d630aff11c40314db40b7f9fb202910480b37aa65b7bac62d6e87fa7590b2a26aa1713bb65be486ed84138e1273eaf7c8b966d7414e6b55464 diff --git a/dev-lang/ruby/ruby-2.5.9-r1.ebuild b/dev-lang/ruby/ruby-2.5.9-r1.ebuild new file mode 100644 index 000000000000..ad8c1d6bebba --- /dev/null +++ b/dev-lang/ruby/ruby-2.5.9-r1.ebuild @@ -0,0 +1,246 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib + +MY_P="${PN}-$(ver_cut 1-3)" +S=${WORKDIR}/${MY_P} + +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" + +LICENSE="|| ( Ruby-BSD BSD-2 )" +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" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-util/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20171225 +" + +DEPEND="${RDEPEND}" + +BUNDLED_GEMS=" + >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25] + >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25] + >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25] + >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25] + >=dev-ruby/rake-12.3.0[ruby_targets_ruby25] + >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25] + >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby25] + >=dev-ruby/json-2.0.2[ruby_targets_ruby25] + rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] ) + xemacs? ( app-xemacs/ruby-modes )" + +src_prepare() { + eapply "${FILESDIR}"/${SLOT}/{001,002,005,011}*.patch + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. Use explicit version numbers to ensure rm fails when they + # change so we can update dependencies accordingly. + 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 + + einfo "Removing bundled libraries..." + rm -fr ext/fiddle/libffi-3.2.1 || die + + if use prefix ; then + # Fix hardcoded SHELL var in mkmf library + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die + + if [[ ${CHOST} == *darwin* ]] ; then + # avoid symlink loop on Darwin (?!) + sed -i \ + -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ + configure.ac || die + + # make ar/libtool hack for Darwin work + sed -i \ + -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ + configure.ac || die + fi + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules= myconf= + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # ipv6 hack, bug 168939. Needs --enable-ipv6. + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --with-readline-dir="${EPREFIX}"/usr \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + --enable-ipv6 \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + --enable-option-checking=no +} + +src_compile() { + emake V=1 EXTLDFLAGS="${LDFLAGS}" +} + +src_test() { + emake -j1 V=1 test + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + rm -rf ext/json || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + if [[ ${CHOST} == *darwin* ]] ; then + DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" + export DYLD_LIBRARY_PATH + fi + + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + emake V=1 DESTDIR="${D}" install + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + make DESTDIR="${D}" install-doc || die "make install-doc failed" + fi + + if use examples; then + dodoc -r sample + fi + + dodoc ChangeLog NEWS doc/NEWS* README* + + if use rubytests; then + pushd test + insinto /usr/share/${PN}-${SLOT}/test + doins -r . + popd + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(23|24|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-2.5.9.ebuild b/dev-lang/ruby/ruby-2.5.9.ebuild deleted file mode 100644 index 67217e9b50d5..000000000000 --- a/dev-lang/ruby/ruby-2.5.9.ebuild +++ /dev/null @@ -1,245 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib - -MY_P="${PN}-$(ver_cut 1-3)" -S=${WORKDIR}/${MY_P} - -SLOT=$(ver_cut 1-2) -MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) -RUBYVERSION=${SLOT}.0 - -DESCRIPTION="An object-oriented scripting language" -HOMEPAGE="https://www.ruby-lang.org/" -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -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" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - ssl? ( - dev-libs/openssl:0= - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20171225 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25] - >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25] - >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25] - >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25] - >=dev-ruby/rake-12.3.0[ruby_targets_ruby25] - >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby25] - >=dev-ruby/json-2.0.2[ruby_targets_ruby25] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby25] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - eapply "${FILESDIR}"/${SLOT}/{001,002,005,011}*.patch - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. Use explicit version numbers to ensure rm fails when they - # change so we can update dependencies accordingly. - 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 - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - if use prefix ; then - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - - if [[ ${CHOST} == *darwin* ]] ; then - # avoid symlink loop on Darwin (?!) - sed -i \ - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - fi - fi - - eapply_user - - eautoreconf -} - -src_configure() { - local modules= myconf= - - # -fomit-frame-pointer makes ruby segfault, see bug #150413. - filter-flags -fomit-frame-pointer - # In many places aliasing rules are broken; play it safe - # as it's risky with newer compilers to leave it as it is. - append-flags -fno-strict-aliasing - - # Socks support via dante - if use socks5 ; then - # Socks support can't be disabled as long as SOCKS_SERVER is - # set and socks library is present, so need to unset - # SOCKS_SERVER in that case. - unset SOCKS_SERVER - fi - - # Increase GC_MALLOC_LIMIT if set (default is 8000000) - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" - fi - - # ipv6 hack, bug 168939. Needs --enable-ipv6. - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" - - # Determine which modules *not* to build depending in the USE flags. - if ! use berkdb ; then - modules="${modules},dbm" - fi - if ! use gdbm ; then - modules="${modules},gdbm" - fi - if ! use ssl ; then - modules="${modules},openssl" - fi - if ! use tk ; then - modules="${modules},tk" - fi - - # Provide an empty LIBPATHENV because we disable rpath but we do not - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget - # #564272 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ - --program-suffix=${MY_SUFFIX} \ - --with-soname=ruby${MY_SUFFIX} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-shared \ - --enable-pthread \ - --disable-rpath \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(use_enable doc install-doc) \ - --enable-ipv6 \ - $(use_enable static-libs static) \ - $(use_enable static-libs install-static-library) \ - $(use_with static-libs static-linked-ext) \ - $(use_enable debug) \ - ${myconf} \ - --enable-option-checking=no -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" -} - -src_test() { - emake -j1 V=1 test - - elog "Ruby's make test has been run. Ruby also ships with a make check" - elog "that cannot be run until after ruby has been installed." - elog - if use rubytests; then - elog "You have enabled rubytests, so they will be installed to" - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" - elog "than root, and you must place them into a writeable directory." - elog "Then call: " - elog - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" - else - elog "Enable the rubytests USE flag to install the make check tests" - fi -} - -src_install() { - # Remove the remaining bundled gems. We do this late in the process - # since they are used during the build to e.g. create the - # documentation. - rm -rf ext/json || die - - # Ruby is involved in the install process, we don't want interference here. - unset RUBYOPT - - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) - - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" - - if [[ ${CHOST} == *darwin* ]] ; then - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" - export DYLD_LIBRARY_PATH - fi - - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" - for d in $(find "${S}/ext" -type d) ; do - RUBYLIB="${RUBYLIB}:$d" - done - export LD_LIBRARY_PATH RUBYLIB - - emake V=1 DESTDIR="${D}" install - - # Remove installed rubygems and rdoc copy - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" - rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - make DESTDIR="${D}" install-doc || die "make install-doc failed" - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - if use rubytests; then - pushd test - insinto /usr/share/${PN}-${SLOT}/test - doins -r . - popd - fi -} - -pkg_postinst() { - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then - eselect ruby set ruby${MY_SUFFIX} - fi - - elog - elog "To switch between available Ruby profiles, execute as root:" - elog "\teselect ruby set ruby(23|24|...)" - elog -} - -pkg_postrm() { - eselect ruby cleanup -} diff --git a/dev-lang/ruby/ruby-2.6.7-r1.ebuild b/dev-lang/ruby/ruby-2.6.7-r1.ebuild new file mode 100644 index 000000000000..056be37e79c0 --- /dev/null +++ b/dev-lang/ruby/ruby-2.6.7-r1.ebuild @@ -0,0 +1,259 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib + +MY_P="${PN}-$(ver_cut 1-3)" +S=${WORKDIR}/${MY_P} + +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" + +LICENSE="|| ( Ruby-BSD BSD-2 )" +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" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc ) + jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-util/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20181225 +" + +DEPEND="${RDEPEND}" + +BUNDLED_GEMS=" + >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26] + >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26] + >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26] + >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26] + >=dev-ruby/rake-12.3.2[ruby_targets_ruby26] + >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26] + >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby26] + >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26] + >=dev-ruby/json-2.0.2[ruby_targets_ruby26] + rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] ) + xemacs? ( app-xemacs/ruby-modes )" + +src_prepare() { + # 005 does not compile bigdecimal and is questionable because it + # compiles ruby in a non-standard way, may be dropped + eapply "${FILESDIR}"/2.6/{002,010}*.patch + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. + rm -fr gems/* || die + + einfo "Removing bundled libraries..." + rm -fr ext/fiddle/libffi-3.2.1 || die + + if use prefix ; then + # Fix hardcoded SHELL var in mkmf library + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die + + if [[ ${CHOST} == *darwin* ]] ; then + # avoid symlink loop on Darwin (?!) + sed -i \ + -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ + configure.ac || die + + # make ar/libtool hack for Darwin work + sed -i \ + -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ + configure.ac || die + fi + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules= myconf= + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # ipv6 hack, bug 168939. Needs --enable-ipv6. + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --with-readline-dir="${EPREFIX}"/usr \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support ) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + --enable-ipv6 \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + emake -j1 V=1 test + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf .ext/common/json.rb .ext/common/json ext/json || die + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + if [[ ${CHOST} == *darwin* ]] ; then + DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" + export DYLD_LIBRARY_PATH + fi + + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + # Create directory for the default gems + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" + + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc + fi + + if use examples; then + dodoc -r sample + fi + + dodoc ChangeLog NEWS doc/NEWS* README* + + if use rubytests; then + pushd test + insinto /usr/share/${PN}-${SLOT}/test + doins -r . + popd + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(23|24|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-2.6.7.ebuild b/dev-lang/ruby/ruby-2.6.7.ebuild deleted file mode 100644 index e14b3d9f9419..000000000000 --- a/dev-lang/ruby/ruby-2.6.7.ebuild +++ /dev/null @@ -1,258 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib - -MY_P="${PN}-$(ver_cut 1-3)" -S=${WORKDIR}/${MY_P} - -SLOT=$(ver_cut 1-2) -MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) -RUBYVERSION=${SLOT}.0 - -DESCRIPTION="An object-oriented scripting language" -HOMEPAGE="https://www.ruby-lang.org/" -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -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" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) - ssl? ( - dev-libs/openssl:0= - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20181225 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/did_you_mean-1.2.1[ruby_targets_ruby26] - >=dev-ruby/minitest-5.11.3[ruby_targets_ruby26] - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby26] - >=dev-ruby/power_assert-1.1.3[ruby_targets_ruby26] - >=dev-ruby/rake-12.3.2[ruby_targets_ruby26] - >=dev-ruby/test-unit-3.2.9[ruby_targets_ruby26] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby26] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby26] - >=dev-ruby/bundler-1.17.2[ruby_targets_ruby26] - >=dev-ruby/json-2.0.2[ruby_targets_ruby26] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby26] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - # 005 does not compile bigdecimal and is questionable because it - # compiles ruby in a non-standard way, may be dropped - eapply "${FILESDIR}"/2.6/{002,010}*.patch - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. - rm -fr gems/* || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - if use prefix ; then - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - - if [[ ${CHOST} == *darwin* ]] ; then - # avoid symlink loop on Darwin (?!) - sed -i \ - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - fi - fi - - eapply_user - - eautoreconf -} - -src_configure() { - local modules= myconf= - - # -fomit-frame-pointer makes ruby segfault, see bug #150413. - filter-flags -fomit-frame-pointer - # In many places aliasing rules are broken; play it safe - # as it's risky with newer compilers to leave it as it is. - append-flags -fno-strict-aliasing - - # Socks support via dante - if use socks5 ; then - # Socks support can't be disabled as long as SOCKS_SERVER is - # set and socks library is present, so need to unset - # SOCKS_SERVER in that case. - unset SOCKS_SERVER - fi - - # Increase GC_MALLOC_LIMIT if set (default is 8000000) - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" - fi - - # ipv6 hack, bug 168939. Needs --enable-ipv6. - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" - - # Determine which modules *not* to build depending in the USE flags. - if ! use berkdb ; then - modules="${modules},dbm" - fi - if ! use gdbm ; then - modules="${modules},gdbm" - fi - if ! use ssl ; then - modules="${modules},openssl" - fi - if ! use tk ; then - modules="${modules},tk" - fi - - # Provide an empty LIBPATHENV because we disable rpath but we do not - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget - # #564272 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ - --program-suffix=${MY_SUFFIX} \ - --with-soname=ruby${MY_SUFFIX} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-shared \ - --enable-pthread \ - --disable-rpath \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable jit jit-support ) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(use_enable doc install-doc) \ - --enable-ipv6 \ - $(use_enable static-libs static) \ - $(use_enable static-libs install-static-library) \ - $(use_with static-libs static-linked-ext) \ - $(use_enable debug) \ - ${myconf} \ - --enable-option-checking=no - - # Makefile is broken because it lacks -ldl - rm -rf ext/-test-/popen_deadlock || die -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" -} - -src_test() { - emake -j1 V=1 test - - elog "Ruby's make test has been run. Ruby also ships with a make check" - elog "that cannot be run until after ruby has been installed." - elog - if use rubytests; then - elog "You have enabled rubytests, so they will be installed to" - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" - elog "than root, and you must place them into a writeable directory." - elog "Then call: " - elog - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" - else - elog "Enable the rubytests USE flag to install the make check tests" - fi -} - -src_install() { - # Remove the remaining bundled gems. We do this late in the process - # since they are used during the build to e.g. create the - # documentation. - einfo "Removing default gems before installation" - rm -rf .ext/common/json.rb .ext/common/json ext/json || die - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die - - # Ruby is involved in the install process, we don't want interference here. - unset RUBYOPT - - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) - - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" - - if [[ ${CHOST} == *darwin* ]] ; then - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" - export DYLD_LIBRARY_PATH - fi - - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" - for d in $(find "${S}/ext" -type d) ; do - RUBYLIB="${RUBYLIB}:$d" - done - export LD_LIBRARY_PATH RUBYLIB - - # Create directory for the default gems - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" - - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install - - # Remove installed rubygems and rdoc copy - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - if use rubytests; then - pushd test - insinto /usr/share/${PN}-${SLOT}/test - doins -r . - popd - fi -} - -pkg_postinst() { - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then - eselect ruby set ruby${MY_SUFFIX} - fi - - elog - elog "To switch between available Ruby profiles, execute as root:" - elog "\teselect ruby set ruby(23|24|...)" - elog -} - -pkg_postrm() { - eselect ruby cleanup -} diff --git a/dev-lang/ruby/ruby-2.7.3-r1.ebuild b/dev-lang/ruby/ruby-2.7.3-r1.ebuild deleted file mode 100644 index fd9d16014070..000000000000 --- a/dev-lang/ruby/ruby-2.7.3-r1.ebuild +++ /dev/null @@ -1,266 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib - -MY_P="${PN}-$(ver_cut 1-3)" -S=${WORKDIR}/${MY_P} - -SLOT=$(ver_cut 1-2) -MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) -RUBYVERSION=${SLOT}.0 - -DESCRIPTION="An object-oriented scripting language" -HOMEPAGE="https://www.ruby-lang.org/" -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -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" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) - ssl? ( - dev-libs/openssl:0= - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20191222 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27] - >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27] - >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27] - >=dev-ruby/rake-13.0.1[ruby_targets_ruby27] - >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27] - >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby27] - >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27] - >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27] - >=dev-ruby/json-2.0.2[ruby_targets_ruby27] - rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - # 005 does not compile bigdecimal and is questionable because it - # compiles ruby in a non-standard way, may be dropped - eapply "${FILESDIR}"/2.7/{002,003,010}*.patch - - # Reset time on patched gem_prelude.rb to avoid the need for a base - # ruby during bootstrapping, bug 787137 - touch -t 202001010000 gem_prelude.rb || die - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. - rm -fr gems/* || die - # Don't install CLI tools since they will clash with the gem - rm -f bin/{racc,racc2y,y2racc} || die - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - if use prefix ; then - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - - if [[ ${CHOST} == *darwin* ]] ; then - # avoid symlink loop on Darwin (?!) - sed -i \ - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - fi - fi - - eapply_user - - eautoreconf -} - -src_configure() { - local modules= myconf= - - # -fomit-frame-pointer makes ruby segfault, see bug #150413. - filter-flags -fomit-frame-pointer - # In many places aliasing rules are broken; play it safe - # as it's risky with newer compilers to leave it as it is. - append-flags -fno-strict-aliasing - - # Socks support via dante - if use socks5 ; then - # Socks support can't be disabled as long as SOCKS_SERVER is - # set and socks library is present, so need to unset - # SOCKS_SERVER in that case. - unset SOCKS_SERVER - fi - - # Increase GC_MALLOC_LIMIT if set (default is 8000000) - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" - fi - - # ipv6 hack, bug 168939. Needs --enable-ipv6. - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" - - # Determine which modules *not* to build depending in the USE flags. - if ! use berkdb ; then - modules="${modules},dbm" - fi - if ! use gdbm ; then - modules="${modules},gdbm" - fi - if ! use ssl ; then - modules="${modules},openssl" - fi - if ! use tk ; then - modules="${modules},tk" - fi - - # Provide an empty LIBPATHENV because we disable rpath but we do not - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget - # #564272 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ - --program-suffix=${MY_SUFFIX} \ - --with-soname=ruby${MY_SUFFIX} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-shared \ - --enable-pthread \ - --disable-rpath \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable jit jit-support ) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(use_enable doc install-doc) \ - --enable-ipv6 \ - $(use_enable static-libs static) \ - $(use_enable static-libs install-static-library) \ - $(use_with static-libs static-linked-ext) \ - $(use_enable debug) \ - ${myconf} \ - --enable-option-checking=no - - # Makefile is broken because it lacks -ldl - rm -rf ext/-test-/popen_deadlock || die -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" -} - -src_test() { - emake -j1 V=1 test - - elog "Ruby's make test has been run. Ruby also ships with a make check" - elog "that cannot be run until after ruby has been installed." - elog - if use rubytests; then - elog "You have enabled rubytests, so they will be installed to" - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" - elog "than root, and you must place them into a writeable directory." - elog "Then call: " - elog - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" - else - elog "Enable the rubytests USE flag to install the make check tests" - fi -} - -src_install() { - # Remove the remaining bundled gems. We do this late in the process - # since they are used during the build to e.g. create the - # documentation. - einfo "Removing default gems before installation" - rm -rf .ext/common/json.rb .ext/common/json ext/json || die - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die - rm -rf lib/did_you_mean* || die - - # Ruby is involved in the install process, we don't want interference here. - unset RUBYOPT - - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) - - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" - - if [[ ${CHOST} == *darwin* ]] ; then - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" - export DYLD_LIBRARY_PATH - fi - - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" - for d in $(find "${S}/ext" -type d) ; do - RUBYLIB="${RUBYLIB}:$d" - done - export LD_LIBRARY_PATH RUBYLIB - - # Create directory for the default gems - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" - - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install - - # Remove installed rubygems and rdoc copy - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS doc/NEWS* README* - - if use rubytests; then - pushd test - insinto /usr/share/${PN}-${SLOT}/test - doins -r . - popd - fi -} - -pkg_postinst() { - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then - eselect ruby set ruby${MY_SUFFIX} - fi - - elog - elog "To switch between available Ruby profiles, execute as root:" - elog "\teselect ruby set ruby(23|24|...)" - elog -} - -pkg_postrm() { - eselect ruby cleanup -} diff --git a/dev-lang/ruby/ruby-2.7.3-r2.ebuild b/dev-lang/ruby/ruby-2.7.3-r2.ebuild new file mode 100644 index 000000000000..ae0de75300f2 --- /dev/null +++ b/dev-lang/ruby/ruby-2.7.3-r2.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib + +MY_P="${PN}-$(ver_cut 1-3)" +S=${WORKDIR}/${MY_P} + +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" + +LICENSE="|| ( Ruby-BSD BSD-2 )" +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" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc ) + jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-util/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20191222 +" + +DEPEND="${RDEPEND}" + +BUNDLED_GEMS=" + >=dev-ruby/minitest-5.13.0[ruby_targets_ruby27] + >=dev-ruby/net-telnet-0.2.0[ruby_targets_ruby27] + >=dev-ruby/power_assert-1.1.7[ruby_targets_ruby27] + >=dev-ruby/rake-13.0.1[ruby_targets_ruby27] + >=dev-ruby/test-unit-3.3.4[ruby_targets_ruby27] + >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby27] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby27] + >=dev-ruby/bundler-2.1.4[ruby_targets_ruby27] + >=dev-ruby/did_you_mean-1.3.1[ruby_targets_ruby27] + >=dev-ruby/json-2.0.2[ruby_targets_ruby27] + rdoc? ( >=dev-ruby/rdoc-6.1.2[ruby_targets_ruby27] ) + xemacs? ( app-xemacs/ruby-modes )" + +src_prepare() { + # 005 does not compile bigdecimal and is questionable because it + # compiles ruby in a non-standard way, may be dropped + eapply "${FILESDIR}"/2.7/{002,003,010}*.patch + + # Reset time on patched gem_prelude.rb to avoid the need for a base + # ruby during bootstrapping, bug 787137 + touch -t 202001010000 gem_prelude.rb || die + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. + rm -fr gems/* || die + # Don't install CLI tools since they will clash with the gem + rm -f bin/{racc,racc2y,y2racc} || die + sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die + + einfo "Removing bundled libraries..." + rm -fr ext/fiddle/libffi-3.2.1 || die + + if use prefix ; then + # Fix hardcoded SHELL var in mkmf library + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die + + if [[ ${CHOST} == *darwin* ]] ; then + # avoid symlink loop on Darwin (?!) + sed -i \ + -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ + configure.ac || die + + # make ar/libtool hack for Darwin work + sed -i \ + -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ + configure.ac || die + fi + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules= myconf= + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # ipv6 hack, bug 168939. Needs --enable-ipv6. + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --with-readline-dir="${EPREFIX}"/usr \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support ) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + --enable-ipv6 \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + emake -j1 V=1 test + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf .ext/common/json.rb .ext/common/json ext/json || die + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die + rm -rf lib/did_you_mean* || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + if [[ ${CHOST} == *darwin* ]] ; then + DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" + export DYLD_LIBRARY_PATH + fi + + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + # Create directory for the default gems + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" + + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc + fi + + if use examples; then + dodoc -r sample + fi + + dodoc ChangeLog NEWS doc/NEWS* README* + + if use rubytests; then + pushd test + insinto /usr/share/${PN}-${SLOT}/test + doins -r . + popd + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(23|24|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-3.0.1-r1.ebuild b/dev-lang/ruby/ruby-3.0.1-r1.ebuild new file mode 100644 index 000000000000..26f16571a638 --- /dev/null +++ b/dev-lang/ruby/ruby-3.0.1-r1.ebuild @@ -0,0 +1,264 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib + +MY_P="${PN}-$(ver_cut 1-3)" +S=${WORKDIR}/${MY_P} + +SLOT=$(ver_cut 1-2) +MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) +RUBYVERSION=${SLOT}.0 + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" +SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" + +LICENSE="|| ( Ruby-BSD BSD-2 )" +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" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc ) + jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-util/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20201225 +" + +DEPEND="${RDEPEND}" + +BUNDLED_GEMS=" + >=dev-ruby/minitest-5.14.2[ruby_targets_ruby30] + >=dev-ruby/power_assert-1.2.0[ruby_targets_ruby30] + >=dev-ruby/rake-13.0.3[ruby_targets_ruby30] + >=dev-ruby/rbs-1.0.0[ruby_targets_ruby30] + >=dev-ruby/rexml-3.2.4[ruby_targets_ruby30] + >=dev-ruby/rss-0.2.9[ruby_targets_ruby30] + >=dev-ruby/test-unit-3.3.7[ruby_targets_ruby30] + >=dev-ruby/typeprof-0.11.0[ruby_targets_ruby30] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby30] + >=dev-ruby/bundler-2.2.15[ruby_targets_ruby30] + >=dev-ruby/did_you_mean-1.5.0[ruby_targets_ruby30] + >=dev-ruby/json-2.5.1[ruby_targets_ruby30] + rdoc? ( >=dev-ruby/rdoc-6.3.0[ruby_targets_ruby30] ) + xemacs? ( app-xemacs/ruby-modes )" + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + + einfo "Unbundling gems..." + cd "$S" + # Remove bundled gems that we will install via PDEPEND, bug + # 539700. + rm -fr gems/* || die + touch gems/bundled_gems || die + # Don't install CLI tools since they will clash with the gem + rm -f bin/{racc,racc2y,y2racc} || die + sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die + + einfo "Removing bundled libraries..." + rm -fr ext/fiddle/libffi-3.2.1 || die + + if use prefix ; then + # Fix hardcoded SHELL var in mkmf library + sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die + + if [[ ${CHOST} == *darwin* ]] ; then + # avoid symlink loop on Darwin (?!) + sed -i \ + -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ + configure.ac || die + + # make ar/libtool hack for Darwin work + sed -i \ + -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ + configure.ac || die + fi + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules= myconf= + + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + # ipv6 hack, bug 168939. Needs --enable-ipv6. + use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" + + # Determine which modules *not* to build depending in the USE flags. + if ! use berkdb ; then + modules="${modules},dbm" + fi + if ! use gdbm ; then + modules="${modules},gdbm" + fi + if ! use ssl ; then + modules="${modules},openssl" + fi + if ! use tk ; then + modules="${modules},tk" + fi + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --with-readline-dir="${EPREFIX}"/usr \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support ) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + --enable-ipv6 \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + emake -j1 V=1 test + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf .ext/common/json.rb .ext/common/json ext/json || die + rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die + rm -rf lib/did_you_mean* || die + + # Ruby is involved in the install process, we don't want interference here. + unset RUBYOPT + + local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + + LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + if [[ ${CHOST} == *darwin* ]] ; then + DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" + export DYLD_LIBRARY_PATH + fi + + RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + # Create directory for the default gems + local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" + mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" + + emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install + + # Remove installed rubygems and rdoc copy + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" + rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" + rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" + rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" + + if use doc; then + emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc + fi + + if use examples; then + dodoc -r sample + fi + + dodoc ChangeLog NEWS.md doc/NEWS* README* + + if use rubytests; then + pushd test + insinto /usr/share/${PN}-${SLOT}/test + doins -r . + popd + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then + eselect ruby set ruby${MY_SUFFIX} + fi + + elog + elog "To switch between available Ruby profiles, execute as root:" + elog "\teselect ruby set ruby(23|24|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-3.0.1.ebuild b/dev-lang/ruby/ruby-3.0.1.ebuild deleted file mode 100644 index 4b08bc079a99..000000000000 --- a/dev-lang/ruby/ruby-3.0.1.ebuild +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib - -MY_P="${PN}-$(ver_cut 1-3)" -S=${WORKDIR}/${MY_P} - -SLOT=$(ver_cut 1-2) -MY_SUFFIX=$(ver_rs 1 '' ${SLOT}) -RUBYVERSION=${SLOT}.0 - -DESCRIPTION="An object-oriented scripting language" -HOMEPAGE="https://www.ruby-lang.org/" -SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz" - -LICENSE="|| ( Ruby-BSD BSD-2 )" -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" -IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs" - -RDEPEND=" - berkdb? ( sys-libs/db:= ) - gdbm? ( sys-libs/gdbm:= ) - jemalloc? ( dev-libs/jemalloc ) - jit? ( || ( sys-devel/gcc:* sys-devel/clang:* ) ) - ssl? ( - dev-libs/openssl:0= - ) - socks5? ( >=net-proxy/dante-1.1.13 ) - systemtap? ( dev-util/systemtap ) - tk? ( - dev-lang/tcl:0=[threads] - dev-lang/tk:0=[threads] - ) - dev-libs/libyaml - dev-libs/libffi:= - sys-libs/readline:0= - sys-libs/zlib - >=app-eselect/eselect-ruby-20201225 -" - -DEPEND="${RDEPEND}" - -BUNDLED_GEMS=" - >=dev-ruby/minitest-5.14.2[ruby_targets_ruby30] - >=dev-ruby/power_assert-1.2.0[ruby_targets_ruby30] - >=dev-ruby/rake-13.0.3[ruby_targets_ruby30] - >=dev-ruby/rbs-1.0.0[ruby_targets_ruby30] - >=dev-ruby/rexml-3.2.4[ruby_targets_ruby30] - >=dev-ruby/rss-0.2.9[ruby_targets_ruby30] - >=dev-ruby/test-unit-3.3.7[ruby_targets_ruby30] - >=dev-ruby/typeprof-0.11.0[ruby_targets_ruby30] -" - -PDEPEND=" - ${BUNDLED_GEMS} - virtual/rubygems[ruby_targets_ruby30] - >=dev-ruby/bundler-2.2.15[ruby_targets_ruby30] - >=dev-ruby/did_you_mean-1.5.0[ruby_targets_ruby30] - >=dev-ruby/json-2.5.1[ruby_targets_ruby30] - rdoc? ( >=dev-ruby/rdoc-6.3.0[ruby_targets_ruby30] ) - xemacs? ( app-xemacs/ruby-modes )" - -src_prepare() { - eapply "${FILESDIR}"/"${SLOT}"/010*.patch - - einfo "Unbundling gems..." - cd "$S" - # Remove bundled gems that we will install via PDEPEND, bug - # 539700. - rm -fr gems/* || die - touch gems/bundled_gems || die - # Don't install CLI tools since they will clash with the gem - rm -f bin/{racc,racc2y,y2racc} || die - sed -i -e '/executables/ s:^:#:' lib/racc/racc.gemspec || die - - einfo "Removing bundled libraries..." - rm -fr ext/fiddle/libffi-3.2.1 || die - - if use prefix ; then - # Fix hardcoded SHELL var in mkmf library - sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb || die - - if [[ ${CHOST} == *darwin* ]] ; then - # avoid symlink loop on Darwin (?!) - sed -i \ - -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).$(SOEXT)//' \ - configure.ac || die - - # make ar/libtool hack for Darwin work - sed -i \ - -e "s/ac_cv_prog_ac_ct_AR='libtool/ac_cv_prog_AR='${CHOST}-libtool/" \ - configure.ac || die - fi - fi - - eapply_user - - eautoreconf -} - -src_configure() { - local modules= myconf= - - # -fomit-frame-pointer makes ruby segfault, see bug #150413. - filter-flags -fomit-frame-pointer - # In many places aliasing rules are broken; play it safe - # as it's risky with newer compilers to leave it as it is. - append-flags -fno-strict-aliasing - - # Socks support via dante - if use socks5 ; then - # Socks support can't be disabled as long as SOCKS_SERVER is - # set and socks library is present, so need to unset - # SOCKS_SERVER in that case. - unset SOCKS_SERVER - fi - - # Increase GC_MALLOC_LIMIT if set (default is 8000000) - if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then - append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" - fi - - # ipv6 hack, bug 168939. Needs --enable-ipv6. - use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET" - - # Determine which modules *not* to build depending in the USE flags. - if ! use berkdb ; then - modules="${modules},dbm" - fi - if ! use gdbm ; then - modules="${modules},gdbm" - fi - if ! use ssl ; then - modules="${modules},openssl" - fi - if ! use tk ; then - modules="${modules},tk" - fi - - # Provide an empty LIBPATHENV because we disable rpath but we do not - # need LD_LIBRARY_PATH by default since that breaks USE=multitarget - # #564272 - INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \ - --program-suffix=${MY_SUFFIX} \ - --with-soname=ruby${MY_SUFFIX} \ - --with-readline-dir="${EPREFIX}"/usr \ - --enable-shared \ - --enable-pthread \ - --disable-rpath \ - --with-out-ext="${modules}" \ - $(use_with jemalloc jemalloc) \ - $(use_enable jit jit-support ) \ - $(use_enable socks5 socks) \ - $(use_enable systemtap dtrace) \ - $(use_enable doc install-doc) \ - --enable-ipv6 \ - $(use_enable static-libs static) \ - $(use_enable static-libs install-static-library) \ - $(use_with static-libs static-linked-ext) \ - $(use_enable debug) \ - ${myconf} \ - --enable-option-checking=no - - # Makefile is broken because it lacks -ldl - rm -rf ext/-test-/popen_deadlock || die -} - -src_compile() { - emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" -} - -src_test() { - emake -j1 V=1 test - - elog "Ruby's make test has been run. Ruby also ships with a make check" - elog "that cannot be run until after ruby has been installed." - elog - if use rubytests; then - elog "You have enabled rubytests, so they will be installed to" - elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" - elog "than root, and you must place them into a writeable directory." - elog "Then call: " - elog - elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb" - else - elog "Enable the rubytests USE flag to install the make check tests" - fi -} - -src_install() { - # Remove the remaining bundled gems. We do this late in the process - # since they are used during the build to e.g. create the - # documentation. - einfo "Removing default gems before installation" - rm -rf .ext/common/json.rb .ext/common/json ext/json || die - rm -rf lib/bundler* lib/rdoc/rdoc.gemspec || die - rm -rf lib/did_you_mean* || die - - # Ruby is involved in the install process, we don't want interference here. - unset RUBYOPT - - local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) - - LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" - - if [[ ${CHOST} == *darwin* ]] ; then - DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" - export DYLD_LIBRARY_PATH - fi - - RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" - for d in $(find "${S}/ext" -type d) ; do - RUBYLIB="${RUBYLIB}:$d" - done - export LD_LIBRARY_PATH RUBYLIB - - # Create directory for the default gems - local gem_home="${EPREFIX}/usr/$(get_libdir)/ruby/gems/${RUBYVERSION}" - mkdir -p "${D}/${gem_home}" || die "mkdir gem home failed" - - emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install - - # Remove installed rubygems and rdoc copy - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed" - rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed" - rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed" - rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed" - - if use doc; then - emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc - fi - - if use examples; then - dodoc -r sample - fi - - dodoc ChangeLog NEWS.md doc/NEWS* README* - - if use rubytests; then - pushd test - insinto /usr/share/${PN}-${SLOT}/test - doins -r . - popd - fi -} - -pkg_postinst() { - if [[ ! -n $(readlink "${EROOT}"/usr/bin/ruby) ]] ; then - eselect ruby set ruby${MY_SUFFIX} - fi - - elog - elog "To switch between available Ruby profiles, execute as root:" - elog "\teselect ruby set ruby(23|24|...)" - elog -} - -pkg_postrm() { - eselect ruby cleanup -} -- cgit v1.2.3