summaryrefslogtreecommitdiff
path: root/dev-lang/ruby
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-01 21:06:00 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-01 21:06:00 +0000
commit129160ec854dca4c3fedb5bcfbcb56930371da0f (patch)
tree53bf797418ac5e9b99c41ca0382c87b82421e5de /dev-lang/ruby
parent441d1370330332b7d78f238d2f5e13f7aed5e4e0 (diff)
gentoo new year resync : 01.01.2021
Diffstat (limited to 'dev-lang/ruby')
-rw-r--r--dev-lang/ruby/Manifest11
-rw-r--r--dev-lang/ruby/files/3.0/001-socksocket-fix.patch15
-rw-r--r--dev-lang/ruby/files/3.0/010-default-gem-location.patch20
-rw-r--r--dev-lang/ruby/ruby-2.5.8-r1.ebuild2
-rw-r--r--dev-lang/ruby/ruby-2.6.6-r2.ebuild2
-rw-r--r--dev-lang/ruby/ruby-2.7.2.ebuild2
-rw-r--r--dev-lang/ruby/ruby-3.0.0-r1.ebuild262
-rw-r--r--dev-lang/ruby/ruby-3.0.0.ebuild262
8 files changed, 570 insertions, 6 deletions
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
index 1be5c16339e3..4cda8fdc98a1 100644
--- a/dev-lang/ruby/Manifest
+++ b/dev-lang/ruby/Manifest
@@ -13,11 +13,16 @@ AUX 2.6/005_no-undefined-ext.patch 486 BLAKE2B 715f952cab863847f420afb020cac6819
AUX 2.6/009_no-gems.patch 1261 BLAKE2B 359d0a73c374e5c464eb0343d33272244bb88ba200977007a93f3c3c776779a013174fc2c97717e4ae4a1495011d3baae80e68b07433eab1320955a49aed8b59 SHA512 1607b9c2021e5b5f08cf28c64d3f3ddd077bc47df02a353182a9bc70dc6831ea18e8681d9808bb6841939d64082ae4966081014ee110d2090ec67ffe8faa9b8b
AUX 2.6/010-default-gem-location.patch 688 BLAKE2B 4c2074d69b9fe5258a2fe0e38bb501a39f34ad1fa08ef338224edba1f06073138cbe3d831ecdf9910c989a7f0a1c6c6b73ced0d8ff212207a3a3df5f4d90b5de SHA512 65206a6ca42ade0413ae1467f41082f4a93b3166644d2504cff3d280d23da02fd41aea5aca69dd43f6081b436db90a5b1e98725d8fa51519ca302c02ec526ad7
AUX 2.7/010-default-gem-location.patch 688 BLAKE2B 4c2074d69b9fe5258a2fe0e38bb501a39f34ad1fa08ef338224edba1f06073138cbe3d831ecdf9910c989a7f0a1c6c6b73ced0d8ff212207a3a3df5f4d90b5de SHA512 65206a6ca42ade0413ae1467f41082f4a93b3166644d2504cff3d280d23da02fd41aea5aca69dd43f6081b436db90a5b1e98725d8fa51519ca302c02ec526ad7
+AUX 3.0/001-socksocket-fix.patch 457 BLAKE2B cf3e15858481cdaa48be2cb3685bed663d9de792c743f6ef07ea5d2be214d630ee9bd70c1b6958110516d69a1889fdc4cf26676e52c55d4d530588b8274f962e SHA512 77381cb3c8d4a87a5ae06966d5dd00a38ea07148ed2feacb883e1d041d85ae0a6d64b30fd213f2ac0b1a07e3722f0e724cd0ec8414e74dc4de8844d849584b00
+AUX 3.0/010-default-gem-location.patch 753 BLAKE2B 2e9c209521e113c9b5b66ef305a2f29e042bc9330cc95ca847e04aec7a9450de48904bf583265aceec5984e8384e78a37b16a65435962ffc3ef458019b5ebedf SHA512 af63cd6c2c998533fd518abc6f48d1acb0f185e3bc9c4747301f7c7f3b3780e456f32db0252a0a03306dbc19a63d24c031fcfb7c35d732190fa68763e5817dcd
DIST ruby-2.5.8.tar.xz 11298404 BLAKE2B 3256c0448e72b63c0bd89f89a27fa9c09c8feed54d42cd79899b7d5cfe9dbc29ca708d12c630b3f52ff85b0c6a4011ae7ff0483d64b2fd445700a72a91028035 SHA512 2886be764a454425c5beef2777c64a70ee0d048b07896b327633d904f5077fea4299526689f9e2ac4dcd2fc4811cf9a6c8ce75367ed35d29dfe1a54222872e0d
DIST ruby-2.6.6.tar.xz 11567284 BLAKE2B 45e910dd9b128c46bff3003834c4fdcbbc2e2e4d3e44f298ff4356a285de2c375d6b6021a3aa28d89336b32a1655fa4a7c086d07f4a0f6bcd578a11dd4a894da SHA512 86caf93dbf61d03781767ab5375a7edf4761f13ba08ccfefe16c0a7550499237e7390c2f72a95d42670d4fe76b2401b4218936187c62ec1572799e9e04c50d62
DIST ruby-2.7.2.tar.xz 12037052 BLAKE2B a4ad22295b3fed4e8064fc6e77adb8642d1fa7ae1f4ef912d7bde19c735cb25b1a3e3aefba53dad944046d844d608bcefba61c314cf1e52747f50d7d91f4c436 SHA512 7972278b096aa768c7adf2befd26003e18781a29ca317640317d30d93d6e963ded197724c8e2f1dfe1e838c5647176d414a74732a62e931fb50d6f2e0f777349
-EBUILD ruby-2.5.8-r1.ebuild 7100 BLAKE2B 912195706cc476e52dd0e20005d4a04a11b286312de1129a91e281e291fa3caeb7de083e296db8384de3816198f3c1c02168bfc09120628cef95cece93345ad8 SHA512 1f20bab421047c622053d7e07a873e1e8c35bac6b5d938ed1d72e33cf7f99be7ec1f300eac9da38651fcc7b3761a81140f630cf1039cde78c3858e2942e01728
+DIST ruby-3.0.0.tar.xz 14374176 BLAKE2B 9e7520e0b1ae6644285449c4ae92983d306772b3dd5366a17da709a55797c798d099424a5628c78c842b825fb336c6a769ac9c371ef276f42bf3550fd0761ebe SHA512 2a23c2894e62e24bb20cec6b2a016b66d7df05083668726b6f70af8338211cfec417aa3624290d1f5ccd130f65ee7b52b5db7d428abc4a9460459c9a5dd1a450
+EBUILD ruby-2.5.8-r1.ebuild 7080 BLAKE2B 6745b85345bbc7223890e1062cdf330712f5373361cced82c85644ae51317f8109c7e54d4d7ceddeb9da3549295f6580ac390a53edda2e13ee696a78d9e0d5f4 SHA512 ef90164ac9c3afaea57ada4fd2aaa5140c5f8b3e7af5a5400d86c12c6cd40b10f26a4b05b11f13bfa525d16b45ed6328fcb71ed380b13aa05f4d17bcec59ee98
EBUILD ruby-2.5.8.ebuild 6189 BLAKE2B aa04b9f393085468d3452bfcc55a45c721bcbe51c9602d6f44510d1f936369f1c741ade879d24c619b1722270a460ba20bc679f0714a98d310d8293bc84c3678 SHA512 156ac0da5b5e6d1240bcb42ad9a7ce455a17077a3bfd66610d5425216ff7436462e8e1362764c8614900376eef146b168e1dd4691cddd9f13ded5a4a30204c9e
-EBUILD ruby-2.6.6-r2.ebuild 7508 BLAKE2B 57e533cae47720895e1c5b09489df0895540cafe9b6601c2434f73de8fba58fefc24ccc3d9c60c0b729eafb0200e4e28657ad10f20c578c6fc6f2a67950fd99a SHA512 a4c5caf911449ca64d801de6e44c9431d7934f885905040a830b90fe7c87ee50c8cf1e8fc838ab50af6856ac96c9b85f4e251408ea7aeeb8ebd335708e7d17eb
-EBUILD ruby-2.7.2.ebuild 7679 BLAKE2B b4b0172836ea666a7e74d2cce467b7a19f449c702c49254a9a58f90925110207d9a9b183e285c63d8034eba931a30738fb935db129eece6ccafe1ff2615b4b73 SHA512 7dcac5ddecc5bd150a3b1c6a9ea29d34565fd242689c94d4101a5ff1e923f9917dc3ba0e8f32985092b21d067263f2cc08ca25d15808260c8100a9bffc76b29a
+EBUILD ruby-2.6.6-r2.ebuild 7488 BLAKE2B a193ab7f277a6f563ae8b1487f6d18162b3ee4ebadea77a7b84022852503bfdde73a9453f9c27464107949cdc04cc3853be06807031badf0f0d31e6d9930b38a SHA512 bf8215838e5c5e6623ccb3b6bfaf1342f394574624d73b02c1164ec05997979da8d41d59756a74319ffcf06677158d2e6ff58914b783d70011c735b89b78aeb8
+EBUILD ruby-2.7.2.ebuild 7659 BLAKE2B 4458dff235dcf5f779f54066213bc0160bedbc8428923075223ace92f77f6ddd8bac9e15121817625f6930ffc332e6f0acce1914d37ad0fbe199f288ae235b9e SHA512 21e41f9194ae0951733a8e6b440da23435348bb6d45637fb3e1b390b5450153d1123bcb5e0b9465d7de619837d113a22efe5c347f71e0298d5fd7ee1ab2fb9f1
+EBUILD ruby-3.0.0-r1.ebuild 7669 BLAKE2B fe414077b4789409c8b8e3175836804ab3a9ee817cadd5426fd9ba5b91ade187a9891275f36915db861d22f15a506571ebffab43d995fe282085667159744d8a SHA512 5447a9d010183029849789b4bd69d6e71f33f8989bc83bf6363d17b92c52fa4675ccdc86445324583bdd38e04086101e0158e3ad5b7a2e71bc0765d681f74dc3
+EBUILD ruby-3.0.0.ebuild 7663 BLAKE2B 6b01e3625ef1a76998c78fbc8ca29cd262805b2309d87c299c9e12cb1d7fc94611d728f2d2626270e859a7707170bb27663af8dd8525ab90b2bb90b7e283f28f SHA512 a520ec88ea2fdb24545db7eac512fa57e9b675268000cf7ef458d59300cf3282155b7865c3b946733f505a559f6c4a6f9d6ef7b675b972b14f37681eeec023e0
MISC metadata.xml 523 BLAKE2B 4ed08360a279c8d44fe87f677cdc24a76eda6d37c591186951e16321f464d4451d0d1299c4e1d996bffe15a8cca672d4c5c1bc5fb0aa6cda69b8eff90ec31df8 SHA512 f74c386a3d6314d630aff11c40314db40b7f9fb202910480b37aa65b7bac62d6e87fa7590b2a26aa1713bb65be486ed84138e1273eaf7c8b966d7414e6b55464
diff --git a/dev-lang/ruby/files/3.0/001-socksocket-fix.patch b/dev-lang/ruby/files/3.0/001-socksocket-fix.patch
new file mode 100644
index 000000000000..1a79e25491cc
--- /dev/null
+++ b/dev-lang/ruby/files/3.0/001-socksocket-fix.patch
@@ -0,0 +1,15 @@
+Fix compilation with socks5 USE flag.
+
+Patch by Phobos Kappa in https://bugs.gentoo.org/762253
+
+--- a/ext/socket/sockssocket.c 2020-12-25 05:33:01.000000000 +0200
++++ b/ext/socket/sockssocket.c 2020-12-28 15:42:50.310029778 +0200
+@@ -34,7 +34,7 @@
+ init = 1;
+ }
+
+- return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS, Qnil);
++ return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS, Qnil, Qnil);
+ }
+
+ #ifdef SOCKS5
diff --git a/dev-lang/ruby/files/3.0/010-default-gem-location.patch b/dev-lang/ruby/files/3.0/010-default-gem-location.patch
new file mode 100644
index 000000000000..060579b4f339
--- /dev/null
+++ b/dev-lang/ruby/files/3.0/010-default-gem-location.patch
@@ -0,0 +1,20 @@
+--- a/tool/rbinstall.rb.~1~ 2020-12-25 04:33:01.000000000 +0100
++++ b/tool/rbinstall.rb 2020-12-25 10:05:34.629096405 +0100
+@@ -897,7 +897,7 @@
+ end
+
+ def install_default_gem(dir, srcdir)
+- gem_dir = Gem.default_dir
++ gem_dir = ENV['GEM_DESTDIR']
+ install_dir = with_destdir(gem_dir)
+ prepare "default gems from #{dir}", gem_dir
+ makedirs(Gem.ensure_default_gem_subdirectories(install_dir, $dir_mode).map {|d| File.join(gem_dir, d)})
+@@ -943,7 +943,7 @@
+ end
+
+ install?(:ext, :comm, :gem, :'bundled-gems') do
+- gem_dir = Gem.default_dir
++ gem_dir = ENV['GEM_DESTDIR']
+ install_dir = with_destdir(gem_dir)
+ prepare "bundled gems", gem_dir
+ makedirs(Gem.ensure_gem_subdirectories(install_dir, $dir_mode).map {|d| File.join(gem_dir, d)})
diff --git a/dev-lang/ruby/ruby-2.5.8-r1.ebuild b/dev-lang/ruby/ruby-2.5.8-r1.ebuild
index 6c1a64eaf332..7c067c811d1f 100644
--- a/dev-lang/ruby/ruby-2.5.8-r1.ebuild
+++ b/dev-lang/ruby/ruby-2.5.8-r1.ebuild
@@ -17,7 +17,7 @@ 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 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
RDEPEND="
diff --git a/dev-lang/ruby/ruby-2.6.6-r2.ebuild b/dev-lang/ruby/ruby-2.6.6-r2.ebuild
index e8e8f2b88b64..bb80d67cf7d7 100644
--- a/dev-lang/ruby/ruby-2.6.6-r2.ebuild
+++ b/dev-lang/ruby/ruby-2.6.6-r2.ebuild
@@ -17,7 +17,7 @@ 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 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
RDEPEND="
diff --git a/dev-lang/ruby/ruby-2.7.2.ebuild b/dev-lang/ruby/ruby-2.7.2.ebuild
index 1afe088cc0ea..c57ee3e53e02 100644
--- a/dev-lang/ruby/ruby-2.7.2.ebuild
+++ b/dev-lang/ruby/ruby-2.7.2.ebuild
@@ -17,7 +17,7 @@ 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 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc rubytests socks5 +ssl static-libs systemtap tk xemacs"
RDEPEND="
diff --git a/dev-lang/ruby/ruby-3.0.0-r1.ebuild b/dev-lang/ruby/ruby-3.0.0-r1.ebuild
new file mode 100644
index 000000000000..2ac7bec3231d
--- /dev/null
+++ b/dev-lang/ruby/ruby-3.0.0-r1.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2020 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 ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +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? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ 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.1.4[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}"/{001,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.
+ rm -rf 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.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.0.ebuild b/dev-lang/ruby/ruby-3.0.0.ebuild
new file mode 100644
index 000000000000..5c05821f92fb
--- /dev/null
+++ b/dev-lang/ruby/ruby-3.0.0.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2020 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 ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +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? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ 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.1.4[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.
+ rm -rf 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.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
+}