commit:     48a6d599a4406835d85b7d13cab3936c870706b9
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  3 06:29:33 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 06:30:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=48a6d599

dev-lang/ruby: sync

Package-Manager: Portage-2.3.68-prefix, Repoman-2.3.15
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-lang/ruby/Manifest                             |  43 ++-
 dev-lang/ruby/files/2.4/002_windows_crossdev.patch |  64 ++++
 dev-lang/ruby/files/2.4/005_no-undefined-ext.patch |  11 +
 dev-lang/ruby/files/2.4/009_no-gems.patch          | 112 +++++++
 dev-lang/ruby/files/2.4/010-libressl_2.7.patch     |  15 +
 dev-lang/ruby/files/2.4/011-gcc8.patch             |  64 ++++
 dev-lang/ruby/files/2.4/012-openssl_1.1.patch      | 339 +++++++++++++++++++++
 ...-ia64-specific-code-to-use-execution-cont.patch |  67 ++++
 dev-lang/ruby/files/2.5/005_no-undefined-ext.patch |  11 +
 dev-lang/ruby/files/2.5/009_no-gems.patch          |  95 ++++++
 dev-lang/ruby/files/2.5/010-libressl_2.7.patch     |  15 +
 dev-lang/ruby/files/2.5/011-no-gems.patch          |  85 ++++++
 dev-lang/ruby/files/2.6/005_no-undefined-ext.patch |  11 +
 dev-lang/ruby/files/2.6/009_no-gems.patch          |  39 +++
 .../ruby/files/2.6/010-default-gem-location.patch  |  20 ++
 dev-lang/ruby/files/ruby-1.9.1-prefix.patch        |   8 +-
 dev-lang/ruby/metadata.xml                         |  32 +-
 .../ruby/{ruby-2.4.2.ebuild => ruby-2.4.6.ebuild}  |  44 ++-
 .../ruby/{ruby-2.2.9.ebuild => ruby-2.5.5.ebuild}  | 102 +++----
 .../ruby/{ruby-2.2.8.ebuild => ruby-2.6.3.ebuild}  | 128 ++++----
 20 files changed, 1117 insertions(+), 188 deletions(-)

diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
index 0b347ffcad..5ddf617921 100644
--- a/dev-lang/ruby/Manifest
+++ b/dev-lang/ruby/Manifest
@@ -1,8 +1,39 @@
-DIST ruby-2.2.8.tar.xz 10520648 BLAKE2B 
96c483786b1a7e0b1483c337a13fe7e07e740bb21b507b518e142dc9ac8cf19ba00c094b4357db4305c645d370d776269145b699ad11429aa56a0de78abfbf83
 SHA512 
e21004bee537f0c706f4ac9526507b414ddb6a8d721e8fad8d7fe88992a4f048eb5eb79f8d8b8af2a8b331dcfa74b560490218a1acb3532c2cdb4fb4909da3c9
-DIST ruby-2.2.9.tar.xz 10511456 BLAKE2B 
aeb631c47def96e8dd19e4f7281ef95833d9d0cde0912ffccd341032d2be22d6eebf259b0926f248298a5a290fd4d99b7ec38e29b805c9d77d4f3f4481fc0edb
 SHA512 
c4ef84cd00f72f60d6c168f0726d9d7e9573549c2bbae83893e1a9d5e64fc7938f4c9d50a47147b28b37cbf36263f95e10a810c0797bad941775a48d75a8c933
-DIST ruby-2.4.2.tar.xz 10046412 BLAKE2B 
33af07ee102367fe811dd3248edc72238bddfc3332f64280b6b36497c7de70bce939127c1efcc965072451ddd60ede98c855fc1fd24be9b12eedc58a21faad5a
 SHA512 
c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595
+AUX 2.4/002_windows_crossdev.patch 2175 BLAKE2B 
988871c957bd1b54c0ce46d98f47b67dc9a708a641ed27b8159021384dec8fe72ecfab0c8c081dfab8025c1de7b356771bb45ed6b6911d200e81edc75c095dfd
 SHA512 
5e88b30680f1d1d34e218972180271f57dce4db0299e423ce96901e8eadb9e461e38649adfc10d0361e8715ec94bfc7fe3198a95eca2d817cfccc3a677b60523
+AUX 2.4/005_no-undefined-ext.patch 479 BLAKE2B 
b11ae86049ed792e5f98e6e56d93468b0a3346aa33b8df076f1c50569bebeaa73f8d59452749654c4771fb7677ff4be19d7f566f6b7e548613caba6310f54dcd
 SHA512 
347cbc588ac2551bd0f66cdcfa79d63ed51e0a743aa981420ed5205bda35efae752795b6a527985948b978e755b5c25a29c663cb5651fe58f37c3d9e711be42e
+AUX 2.4/009_no-gems.patch 4153 BLAKE2B 
c7d056d46cd769a00c3ae8b3866ad7ca7126fe008362461561693b6da7fb867c5418cc9f5fb11af242842af5edab050b68fafd349b8c6e75af208f6a36850900
 SHA512 
ec63fa29a6be3b86b4bde397292a2de73accbdab479ae881af9d364d7c8cb1f2a3e85c809735d47375b52923754d4abbd26a63c01616926189fda5e4a5a8a454
+AUX 2.4/010-libressl_2.7.patch 638 BLAKE2B 
ffd6091c3d1d657d44370d4bfd84e8c40fe387483972c09dbcb7819957be78ee320c6f46d2f78493d25357072950db13e08dff6d622d2374a9c330fe97ce200f
 SHA512 
d42f61eda8292ee5d3485ba4576fd6dbd8a3e40918f2096de3b376b92f633b476f6ad4913fb3be3f7ef356e722d8a192317b233d174563cd342a429595b0cdae
+AUX 2.4/011-gcc8.patch 2470 BLAKE2B 
d6fe2e34e7c33ca7bccf3b934092ef43b4ba8766d8c160a0548fa4946fc61a763634037c3180479896802e6e75828af043e75839fd03cc9e4b6e126c833d2cb8
 SHA512 
1636dc821a822ab6ec919e576ebba9e9cba64540801df6a2b4411e650930ec5cdc3ab28aeb3c5d45d3304f73af52372c2dee91833bcd9952692f3167d21007d2
+AUX 2.4/012-openssl_1.1.patch 12158 BLAKE2B 
b7a77180159d6e2620a148b1c8dc2b137dbad0263d4f588c2d533a0ab9775ea0e685770fc708c3d4ae7ac53c16f657b990af39032219807925e46bcf11478d6b
 SHA512 
050eeb45f7bc8a11bcd7fea0dfabb6137a009cc8f8337aa1c62ca4cd476ff0d66723148a20764a72843a5809f3dd66fe7a607a6098e5da990c90a3d2e15a6f54
+AUX 2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch 2501 
BLAKE2B 
7c166f47ce8264354272c7f74ebee5fbe038b1cf06230c6507f62d823be266959b622a0a61920845dfc38fbe7846c4ccd1cabf8e133f456e94b1da5197c49526
 SHA512 
72319113329c7c3c74e5bab21b67256327a65fbe01827cd32ea289de769a91b493c5d1eb35a087ed026105a9e5daf8b0bc17374c01ef1a83cb408440d6316706
+AUX 2.5/005_no-undefined-ext.patch 486 BLAKE2B 
715f952cab863847f420afb020cac6819e4ab4e8f5527bdf550dd51eef37e272e7e89cbda5b6f9f137fdac89dfc5e99d42be8ae5712c255f11a0628cf07dc84d
 SHA512 
6bbded9fce0c091b7cfb170c9dc2b0882b0e8bbf8fe31eaf596f3620853c8c75aa64c2648d5a72a0208a6ab6d711eb080a2d6aa98352933eda3b874bdd39cee8
+AUX 2.5/009_no-gems.patch 3454 BLAKE2B 
f2439a799776c39ba16f1503d573c90ea6d74fc2bad3b3874a961add6b605bb064c683080a4258ed1a0e83bca5cb67c02ba68bceb6acea7613ab7166e16a2f4c
 SHA512 
bef8b2763993755b5b6ccba0b5cbe002fd721405d7c274f421ae3d95fa4d0d99cdf946f5fa9a907cac2c3696b2cc23f2f2e030b3a70eca93081e49b02f25a072
+AUX 2.5/010-libressl_2.7.patch 638 BLAKE2B 
53f5f5d275e2c5482a608a947a1b3c41e9dcdd1763cc57a075e3abd536567852387506ec0ce2f5f49f5eed2246ca9f860d56637a9f18cd17cd49fff6fc92d340
 SHA512 
986aff99fd35814c94581cdc169cfc5a5f75c87889db5556941809ecaf878b6af838afe2ee108dd7147ea70be6fe9e47f98cce3c1804af0a34f7c1aab8c13d89
+AUX 2.5/011-no-gems.patch 3139 BLAKE2B 
ce05d6ef90001b3011167ba0827ef7852173fa508d6b4cd584f853e90a9d18325e7f2823e306fe7dd139cbdcce2a3c31cc7d2546909798489dec082dcc00d937
 SHA512 
758cf5ba94ab38753e8489284587254d172c308509d7542ecaca0a368cfd0834561e9d51e814c388f1b607740627ddd9cfc239c02333c24bcf7b7fb890e6909e
+AUX 2.6/005_no-undefined-ext.patch 486 BLAKE2B 
715f952cab863847f420afb020cac6819e4ab4e8f5527bdf550dd51eef37e272e7e89cbda5b6f9f137fdac89dfc5e99d42be8ae5712c255f11a0628cf07dc84d
 SHA512 
6bbded9fce0c091b7cfb170c9dc2b0882b0e8bbf8fe31eaf596f3620853c8c75aa64c2648d5a72a0208a6ab6d711eb080a2d6aa98352933eda3b874bdd39cee8
+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 auto_gem.rb 509 BLAKE2B 
3aeb669d0dc6c6016091375adf8df8f8a2b810d40e11b3142669098d119369c4294c5d4758d1369fb2479ae3766d8e1421daa0076e2da4f66d00f9e0ed6584c1
 SHA512 
2b8f4ae00fae383357dd1eb1159ecf1689cb5b79e996688ae091a157b9f27e980761ed8a771d9d3b954d325f817972c4d02f4b5d3c8f4307d2cebce7651af666
+AUX ruby-1.8.6-memory-leak.diff 1351 BLAKE2B 
f727af95129e086aee3d04ff048335fc3abf5d2b0476fff76c6c3507de1551b16e8d11f35809aba1b56143f73346cdf7179df050e0938ac923240fe3072805a2
 SHA512 
6d489a52166839808eedbe9b78d99930056586793e9adda2a16cc1638a9891632f689735be8dadebdabb7c7d72ffcc655dadb22a603cb16f1f7df16fd0039446
+AUX ruby-1.8.6-uclibc-udp.patch 572 BLAKE2B 
837f64cee4c4d1e6166052c3df3830b2a4e1b64067449d63cd6169dd791d31a8caaa763d7439b081f3fa26355dc93f1f52c8a68c93fad695422d65792c3928e6
 SHA512 
165886819eb498c3297f85c81481555bca663635b5b08e5e10098c25cec6168c0d7ce764309d703652e664c79e38c1e53ce09e06e3ac9ceaa2ef8af133fbb5f0
+AUX ruby-1.8.6_p36-only-ncurses.patch 427 BLAKE2B 
410fc71daf451c5321a71d9ec6bfd19691ec981988d3da66f552acaf82b72c30eabc9ad8cbe39f1cb8a60eee0c2febf13e5653cf8d2e21ae2b969e0f97ca11ee
 SHA512 
e6433764401ba6af82bf5c1085ecc364957d9ef0cb1a9d0fcb5a9599b55b3edc6907248fda9f6ca9fc5c083f04e840edb6f2afd6afc1fc051329c70a629bab2b
+AUX ruby-1.8.6_p36-prefix.patch 294 BLAKE2B 
ef4e3605f67df308ab3eadcde75c7aa59b7e18408ac65be86e75a6b82e08f03066c7a00a994dcca18bd76cf4ce9564ce4f0e922a3e101d02160e929d7ba897e6
 SHA512 
5b8bd5cf40c64aa5823b1842e0940fe17e5f53dfe0b8098119acd0b9604843b456e741146352b8f3c58c4b3d7763da8ef2f589fc44c7a3e217c744f48b3f8676
+AUX ruby-1.8.7-darwin9-getsetcontext.patch 1001 BLAKE2B 
4394902f7c0a958f2c60cdd2d9f8bd6ad44e3c6f4817cdca66386548c16da5ed55d53ea0a77c224ddb6d8efe5e6b1a2de7a351cb722c1a2cff676b7315f89a74
 SHA512 
1e419eaf08b0d00a776cde808b993bd74bf35c9469388d7183f138e43365e0bb8f9dd3bf6873608e17fafdf1fd8a8c5adfb149583ef5649db20075a60d90d069
+AUX ruby-1.8.7-glibc-2.14-fclose-behaviour.patch 780 BLAKE2B 
166d700bb02f900805fc5023850f9476aa5d258fdf2862b9680bc42b357cc8b3d74584747a22bb5ca0a2cdc36214178386511db27d6849a8297aabf3b31c91e4
 SHA512 
9033e300504cbf6589b6675aadcc82718d45db36451ea1b8a82bc8d6a8d38aec8c34c9155ee6d7084c603dad8b13ed65d450e3b320cfc8fef49050b89fca0615
+AUX ruby-1.8.7_p160-solaris.patch 288 BLAKE2B 
709c47e538616d4e9a45594d313b111db4b27bd0fa8644678c7667680802b975d13a74523b3b4f497be5a547754bb69c04f7780033e5f73415e48b447314d2fb
 SHA512 
98d6c4320413f1ab834f57fbcb3bdff1d5378c33308ec4f4dfef53ba760068355d2f1bafe605d13b2262e344b5aa1102fbdbbf02c54e94cfd8e037e2a834c765
+AUX ruby-1.8.7_p249-pthread-linking.patch 656 BLAKE2B 
c03a038503f234f2499b61e24a7d4a21697f5ea244a388514dca3b7b4971cbda98da1c47e26efa5b3d74f73f0994aae4af81e3b6091215d8b974286c8df8b592
 SHA512 
5f5699e7f237bc589e31073afa7308accea043bdf850572a0b0c96220e7c7dc2b4e507de713dd41f0f8c29f9586a81be67be24875456e0cbf29f6df2000b723c
+AUX ruby-1.8.7_p370-mint-sha2.patch 4505 BLAKE2B 
9c4f1aa08f2e4af67b8a75f37fc47128359bb94f7d90dfcfd7fd748750fd39067b3219f473203e84ad4c289f7644d9ccfe9791f700f1819f647e86930838389c
 SHA512 
06aaffadfc84d3b61bd6f778f278d863253168e8087e4e3da30ad54348b36102e57fe0ae5ff3bf1eff01984855e8e994d4eb30b53f9713504558d5bbda29d7a5
+AUX ruby-1.8.7_p370-mint.patch 476 BLAKE2B 
c5ea6c2af8698bc7ecfb23422e906fdebc5652ea08105751ad4ff0f2c61d598da48243343173b1d4fb52044e03befc203b8c9eb50eb40c822fa16b176ae71049
 SHA512 
057e4481eb5db11420b726d825f56e089c1e8c578f96afb6fce5c0ca10326f7619c582f035cfdfde5dbe81b7ea7a6c6bc99ce5cdea5fbb99bccfcc3c57e6227d
+AUX ruby-1.9.1-only-ncurses.patch 482 BLAKE2B 
79978b43e13df7cd4d663cd502343899ffdb0ecfa9909fe2e350df5103ddc3fe2a946b68e36d66fe5ecb4e43aca1535c7e0d9025fbe15b3bd5702afef4b3afa2
 SHA512 
d2e84dcf360855b655750138399ebb119953ce12d17b6cbab5029054c8eadc2f16488e7d845b7cb95f211b09b02021f6f6e6bc032bbb120d45aa3006b66d477f
+AUX ruby-1.9.1-prefix.patch 503 BLAKE2B 
329120f3584641d41bc8ab422cb2aafa2515223d3d6fd98398a52db865293c950b39e5804e7f20c5b2fc218a84697de1cbedc7e4ff5ae7e76a1bd7d8dc0e218f
 SHA512 
c61252dae651410a3b627ff3b24633bc6c9926b573fa8afa9f933709ac90366c1bba5b1720d51ba28a1b9e4767a6dca36e9b3d546930714fb6d17d56999cdb91
+AUX ruby-mkconfig.patch 407 BLAKE2B 
b5b3690bbbab5fd32e9e35fb24c73d8d24d64e2cfb6cefaddf6cb496b7cc9a090145f9531060bcf0b6d748f36b4a240522e5fb5de15fdc2ee7a5f858291168fa
 SHA512 
2bd7cc77ca866f1f86221b7e5addb363d0dd7b0ec03d6e7da6286f5ef4311f1b882239cdd6ba7ef0fa82adb0047f1f8aeb0e16e1b6776b49597a0f7b4d2d8cf1
+AUX ruby18-mkmf-parallel-install.patch 527 BLAKE2B 
2031ead92d5e75954db886af9cc0374f90628a38d5a844f7f456b97a46a97d0b251ea00fbcbd581e1b3ca6c43acf377654f20a79008ea592d40f4bff06060676
 SHA512 
bd2348b4cf4c4b1d296e5fd72201d6059fce2685428b068d54cef4055ab07f6f4cfc1677fe74eb1f503bd2ed6a4229cee41faa1a2246061fdabd806b3c662ce2
 DIST ruby-2.4.3.tar.xz 10040072 BLAKE2B 
87ad9700312a104a60b079f4ef95804d2a9e01109e9fef6e83e593464f1d2c5077af54cbbaff6e0d25a925d05f513cade6c76f05960d9bcc1817bdee51ad4a0f
 SHA512 
8bcf60c994a96787da5d743c66f5609a5a6d834d6d61243cdea7fd059197c3b10da43c99e5649be85e2f2329eedcbb1dd76e89ce3ac586be9056348f7449ed09
-DIST ruby-patches-2.2.8.tar.bz2 5764 BLAKE2B 
f50729480a4231db51de7981acb04dafa09d5fde592cf4a824a6fefe8ae3189ab9e82857e7ca41f1bb32dff1c4057ac37badf971c1b8f2981189e13d42dd38d2
 SHA512 
296387ec7f2ff82ad55f147d8f9568de544403d286ad24bb60aca916215d7ff6e1d6aca5a31c00a1999504989cda2bbd3260cae96c18ba73f9ffdcfd6b2695bd
-DIST ruby-patches-2.2.9.tar.bz2 5764 BLAKE2B 
f50729480a4231db51de7981acb04dafa09d5fde592cf4a824a6fefe8ae3189ab9e82857e7ca41f1bb32dff1c4057ac37badf971c1b8f2981189e13d42dd38d2
 SHA512 
296387ec7f2ff82ad55f147d8f9568de544403d286ad24bb60aca916215d7ff6e1d6aca5a31c00a1999504989cda2bbd3260cae96c18ba73f9ffdcfd6b2695bd
-DIST ruby-patches-2.4.2.tar.bz2 3443 BLAKE2B 
d90cfb496ad8701fccb061fd314a7f2394b251c921f270f17c8335f617e71dacc8e4a2df4e76842b67eb34627e5f5291d8a2723f6dfed53a36ace3abad95a179
 SHA512 
fb8349c67c72caf10ec12c4b5410194b4df24345446c2e3b6c6176d00727bfe803f4a905ef094a2d52315b6f4c3ce74fb8fbaa2fdf5efe46e6ccb24bf8418b17
+DIST ruby-2.4.6.tar.xz 10005544 BLAKE2B 
2af984d96dad4d7ef4d467b317bd4bb54b0614d96619377bc46f7588cd1c72bee47202b61d6ec54f00113fd25672d2831221dbf0a4491aa271541a34c634ee84
 SHA512 
eafb2257747f99e2ed262af142e71175b70f7cceaa4d1253b92c8337f075a9a58a2d93b029d75e11a9b124f112a8f0983273b2b30afc147b5cf71a8dbb5fa0ba
+DIST ruby-2.5.5.tar.xz 11459832 BLAKE2B 
ced1105a87e7df8f82a65ca8d1d329d5a9d110d2f3f88b27a79262c4ac1484dda16d8646c0c03f18c1bb25f8b154075eb03a0614355ec62f677c2fa56ab3c956
 SHA512 
06b1d58536ebfacb7b56c1e6ed4b8ab816fadc4f48c845a452554cd262e7908199a30e5793f3cbaec2db56a8803aa5c6089abf7bf06c8fc47867e97870b7dfec
+DIST ruby-2.6.3.tar.xz 11904360 BLAKE2B 
8113e5a19b967cdf995a3c8d3c83aeab3bf89e975d3b039c64259e97f20dbe9ebd96ada093f9d330516d16ef78bb0ecbbac8f3facd467aa13f1f70b23b992f82
 SHA512 
959a613f5cf5b3185a1d7a7ba0e1921166b3930f30461b391b1c9fcfe396f56dc3c736123dfc7b4e72c32a97dc5a1eb1fd7f09bcc3793a3c5526f6644ba421c8
 DIST ruby-patches-2.4.3.tar.bz2 2898 BLAKE2B 
e46502dbb0aa25c3d71693a6c04b433bd4de60f194cdd283517c4b08da190356885d9bca4a6765402088185fa8ec681156e8e8eecf0703a2c1ea7bb81adc0bf9
 SHA512 
d767d43c7df737469247e42e1c4205b8c6850c8f335a2869c884f145c037e9bab10492cc7cd2903f5c33e232cdc5bbdabb3e8da837c7bf420b9d58d1d33149ed
+EBUILD ruby-2.4.3.ebuild 7479 BLAKE2B 
f8b71cd35704a1aa16f3ad77b339701c1c652cc319915730abcef549e2198729002d3b860dc985f5078218db47960035ab5c9513acef968315652360cb5d293a
 SHA512 
e136f3bf5523e6d38661e4de1cccb7049ade1f39af31e1b81aa98cc8fcf43658e6562f3884df7d42e68a067aa479f8e3e090971739a9eb681023c6eae1de2b92
+EBUILD ruby-2.4.6.ebuild 7269 BLAKE2B 
adf02c33d187b0e177280f9a8b4646e63a062e376301b3ebb8b76c0bae3732e27769e72e95cf8a36c1c10a0cfee76ad0dca2c414f6532c2c06d30134058084fc
 SHA512 
ca8393b1ea82b5d0e3073874d7262587aa1160b8047d66d4ee096523ed56dd828d8373311ea49d314c6b014e3632f06290848522f0fb17a80dad016c8893668e
+EBUILD ruby-2.5.5.ebuild 6894 BLAKE2B 
87cebbf6aac94ccaf0312acc68c38ec8720aaea9945a89a828ec87c710653a4ec05a3a9da264a8aa3b7caad1a7fbe2ae06fb56b6750c0a2e7a3143f820a91d36
 SHA512 
5e1ff27f26e855118a25a5e97204c44c00a0e9cda2842037582ff300681fca89d5f93f9b31cf1e5e5f66bd5e3634841184531cf1c777fb66ff78cc67dab97461
+EBUILD ruby-2.6.3.ebuild 7343 BLAKE2B 
fa225eb6863f2d4afd7f63f7a7a3501ef56c6ea7518c33bc7b41020f6f67cb7b27516b07602fbb137816d348c66cd28c3941b624db647191e650938c8152b98b
 SHA512 
0bfa1887e6073f0d47dc94e24b42b6b08cebb0b83ea70729d0582997159bed5bd46b1e256b792ab7201311bca2f51ea31c081dd63fb89563dfc06c0dd4fd16e3
+MISC metadata.xml 445 BLAKE2B 
c3b5fae44894da3c78d024a376522aa2ef486cd9435351ddd7fa8b7c9afdc36969251a3b043d5890a368616f0736ae80e2a65a7342b327f30eb3497c5c02d28a
 SHA512 
3818ac938dd6f8a05e18662f83af542fb29af00a476362592afa86bc537a74ddd0abe275784340539b2cd38f97ad1fce8b8c427c65d61c05a90b2118f2d16a91

diff --git a/dev-lang/ruby/files/2.4/002_windows_crossdev.patch 
b/dev-lang/ruby/files/2.4/002_windows_crossdev.patch
new file mode 100644
index 0000000000..7e290d434f
--- /dev/null
+++ b/dev-lang/ruby/files/2.4/002_windows_crossdev.patch
@@ -0,0 +1,64 @@
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=618878
+
+A few patches to make crossdev for mingw-w64 play nice with ruby's ebuilds.
+Basic gist is that without the following patch to configure.in ruby-2.4.1
+hardcodes 240 into the shared, static, and import library names, which when
+built with the current ruby ebuilds results in names like 
libx64-msvcrt-ruby24240.dll and so on. The patch is in ruby-trunk[1], but may 
take a while
+to hit the tarballs that gentoo uses.
+
+Index: configure.in
+===================================================================
+--- a/configure.in     (revision 57824)
++++ b/configure.in     (revision 57825)
+@@ -3825,7 +3825,23 @@
+ 
+ AC_ARG_WITH(soname,
+       AS_HELP_STRING([--with-soname=SONAME], [base name of shared library]),
+-      [RUBY_SO_NAME=$withval], [RUBY_SO_NAME='$(RUBY_BASE_NAME)'])
++      [RUBY_SO_NAME=$withval],
++      [
++          AS_CASE(["$target_os"],
++          [darwin*], [
++              RUBY_SO_NAME='$(RUBY_BASE_NAME).$(RUBY_PROGRAM_VERSION)'
++          ],
++          [cygwin*], [
++              RUBY_SO_NAME='$(RUBY_BASE_NAME)$(MAJOR)$(MINOR)0'
++          ],
++          [mingw*], [
++              
RUBY_SO_NAME="${rb_cv_msvcrt}"'-$(RUBY_BASE_NAME)$(MAJOR)$(MINOR)0'
++              AS_IF([test x"${target_cpu}" != xi386], [
++                  RUBY_SO_NAME="${target_cpu}-${RUBY_SO_NAME}"
++              ])
++          ],
++          [RUBY_SO_NAME='$(RUBY_BASE_NAME)'])
++      ])
+ 
+ LIBRUBY_LDSHARED=$LDSHARED
+ LIBRUBY_DLDFLAGS=$DLDFLAGS
+@@ -3925,7 +3941,6 @@
+       SOLIBS='-lm -lc'
+       ],
+     [darwin*], [
+-      RUBY_SO_NAME="$RUBY_SO_NAME"'.$(RUBY_PROGRAM_VERSION)'
+       LIBRUBY_LDSHARED='$(CC) -dynamiclib'
+       if test "$load_relative" = yes; then
+           libprefix="@executable_path/../${libdir_basename}"
+@@ -4157,7 +4172,6 @@
+       fi
+       ],
+     [cygwin*|mingw*], [
+-      RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)0'
+       LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
+       AS_CASE(["$target_os"],
+       [cygwin*], [
+@@ -4167,10 +4181,6 @@
+           fi
+           ],
+       [mingw*], [
+-          RUBY_SO_NAME="${rb_cv_msvcrt}-${RUBY_SO_NAME}"
+-          if test x"${target_cpu}" != xi386; then
+-              RUBY_SO_NAME="${target_cpu}-${RUBY_SO_NAME}"
+-          fi
+           if test x"$enable_shared" = xyes; then
+               LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
+               LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'

diff --git a/dev-lang/ruby/files/2.4/005_no-undefined-ext.patch 
b/dev-lang/ruby/files/2.4/005_no-undefined-ext.patch
new file mode 100644
index 0000000000..f279932401
--- /dev/null
+++ b/dev-lang/ruby/files/2.4/005_no-undefined-ext.patch
@@ -0,0 +1,11 @@
+--- ruby-1.9.3-preview1.orig/configure.in
++++ ruby-1.9.3-preview1/configure.in
+@@ -2038,7 +2038,7 @@ if test "$with_dln_a_out" != yes; then
+       [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
+                       : ${LDSHARED='$(CC) -shared'}
+                       if test "$rb_cv_binary_elf" = yes; then
+-                          LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++                          LDFLAGS="$LDFLAGS -Wl,-export-dynamic 
-Wl,--no-undefined"
+                       fi
+                       rb_cv_dlopen=yes],
+       [interix*], [   : ${LDSHARED='$(CC) -shared'}

diff --git a/dev-lang/ruby/files/2.4/009_no-gems.patch 
b/dev-lang/ruby/files/2.4/009_no-gems.patch
new file mode 100644
index 0000000000..6e4e2643d4
--- /dev/null
+++ b/dev-lang/ruby/files/2.4/009_no-gems.patch
@@ -0,0 +1,112 @@
+--- a/tool/rbinstall.rb.~1~    2016-10-17 09:17:07.000000000 +0200
++++ b/tool/rbinstall.rb        2016-12-25 08:20:07.873491045 +0100
+@@ -695,107 +695,11 @@
+ # :startdoc:
+ 
+ install?(:ext, :comm, :gem) do
+-  gem_dir = Gem.default_dir
+-  directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+-  prepare "default gems", gem_dir, directories
+-
+-  spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0])
+-  default_spec_dir = "#{spec_dir}/default"
+-  makedirs(default_spec_dir)
+-
+-  gems = Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").map {|src|
+-    spec = Gem::Specification.load(src) || raise("invalid spec in #{src}")
+-    file_collector = RbInstall::Specs::FileCollector.new(File.dirname(src))
+-    files = file_collector.collect
+-    next if files.empty?
+-    spec.files = files
+-    spec
+-  }
+-  gems.compact.sort_by(&:name).each do |gemspec|
+-    full_name = "#{gemspec.name}-#{gemspec.version}"
+-
+-    puts "#{" "*30}#{gemspec.name} #{gemspec.version}"
+-    gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec")
+-    open_for_install(gemspec_path, $data_mode) do
+-      gemspec.to_ruby
+-    end
+-
+-    unless gemspec.executables.empty? then
+-      bin_dir = File.join(gem_dir, 'gems', full_name, gemspec.bindir)
+-      makedirs(bin_dir)
+-
+-      execs = gemspec.executables.map {|exec| File.join(srcdir, 'bin', exec)}
+-      install(execs, bin_dir, :mode => $script_mode)
+-    end
+-  end
++  # gems are unbundled in Gentoo
+ end
+ 
+ install?(:ext, :comm, :gem) do
+-  gem_dir = Gem.default_dir
+-  directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+-  prepare "bundle gems", gem_dir, directories
+-  install_dir = with_destdir(gem_dir)
+-  installed_gems = {}
+-  options = {
+-    :install_dir => install_dir,
+-    :bin_dir => with_destdir(bindir),
+-    :domain => :local,
+-    :ignore_dependencies => true,
+-    :dir_mode => $dir_mode,
+-    :data_mode => $data_mode,
+-    :prog_mode => $prog_mode,
+-    :wrappers => true,
+-    :format_executable => true,
+-  }
+-  gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}"
+-  extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, 
gem_dir).extensions_dir
+-  Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path|
+-    dir = File.dirname(path)
+-    spec = Dir.chdir(dir) {
+-      Gem::Specification.load(File.basename(path))
+-    }
+-    next unless spec.platform == Gem::Platform::RUBY
+-    next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 
1]
+-    spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
+-    if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
+-      spec.extensions[0] ||= "-"
+-    end
+-    ins = RbInstall::UnpackedInstaller.new(spec, options)
+-    puts "#{" "*30}#{spec.name} #{spec.version}"
+-    ins.install
+-    File.chmod($data_mode, File.join(install_dir, "specifications", 
"#{spec.full_name}.gemspec"))
+-    unless spec.extensions.empty?
+-      install_recursive(ext, spec.extension_dir)
+-    end
+-    installed_gems[spec.full_name] = true
+-  end
+-  installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| 
installed_gems.key?(File.basename(gem, '.gem'))}
+-  unless installed_gems.empty?
+-    install installed_gems, gem_dir+"/cache"
+-  end
+-  next if gems.empty?
+-  if defined?(Zlib)
+-    Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, 
ruby_install_name)))
+-    silent = Gem::SilentUI.new
+-    gems.each do |gem|
+-      inst = Gem::Installer.new(gem, options)
+-      inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
+-      begin
+-        Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
+-      rescue Gem::InstallError => e
+-        next
+-      end
+-      gemname = File.basename(gem)
+-      puts "#{" "*30}#{gemname}"
+-    end
+-    # fix directory permissions
+-    # TODO: Gem.install should accept :dir_mode option or something
+-    File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
+-    # fix .gemspec permissions
+-    File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
+-  else
+-    puts "skip installing bundle gems because of lacking zlib"
+-  end
++  # gems are unbundled in Gentoo
+ end
+ 
+ parse_args()

diff --git a/dev-lang/ruby/files/2.4/010-libressl_2.7.patch 
b/dev-lang/ruby/files/2.4/010-libressl_2.7.patch
new file mode 100644
index 0000000000..2e25ab0958
--- /dev/null
+++ b/dev-lang/ruby/files/2.4/010-libressl_2.7.patch
@@ -0,0 +1,15 @@
+--- a/ext/openssl/extconf.rb.orig      2017-09-08 14:38:12 UTC
++++ b/ext/openssl/extconf.rb
+@@ -157,8 +157,11 @@ OpenSSL.check_func_or_macro("SSL_get_ser
+ have_func("SSL_is_server")
+ 
+ # added in 1.1.0
++if !have_struct_member("SSL", "ctx", "openssl/ssl.h") ||
++    try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", 
"openssl/opensslv.h")
++  $defs.push("-DHAVE_OPAQUE_OPENSSL")
++end
+ have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
+-have_struct_member("SSL", "ctx", "openssl/ssl.h") || 
$defs.push("-DHAVE_OPAQUE_OPENSSL")
+ have_func("BN_GENCB_new")
+ have_func("BN_GENCB_free")
+ have_func("BN_GENCB_get_arg")

diff --git a/dev-lang/ruby/files/2.4/011-gcc8.patch 
b/dev-lang/ruby/files/2.4/011-gcc8.patch
new file mode 100644
index 0000000000..cb2443631d
--- /dev/null
+++ b/dev-lang/ruby/files/2.4/011-gcc8.patch
@@ -0,0 +1,64 @@
+From 027b576b31cd12bad575b3a39476726273f58c41 Mon Sep 17 00:00:00 2001
+From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Mon, 18 Dec 2017 09:03:59 +0000
+Subject: [PATCH] suppress warning: 'const' attribute on function returning
+ 'void'
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61323 
b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+---
+ include/ruby/intern.h | 4 ++--
+ include/ruby/ruby.h   | 2 +-
+ internal.h            | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/ruby/intern.h b/include/ruby/intern.h
+index 5684b3230a67..a711b861159f 100644
+--- a/include/ruby/intern.h
++++ b/include/ruby/intern.h
+@@ -249,9 +249,9 @@ PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const 
char*, ...)), 2, 3);
+ NORETURN(void rb_invalid_str(const char*, const char*));
+ NORETURN(void rb_error_frozen(const char*));
+ NORETURN(void rb_error_frozen_object(VALUE));
+-CONSTFUNC(void rb_error_untrusted(VALUE));
++void rb_error_untrusted(VALUE);
+ void rb_check_frozen(VALUE);
+-CONSTFUNC(void rb_check_trusted(VALUE));
++void rb_check_trusted(VALUE);
+ #define rb_check_frozen_internal(obj) do { \
+       VALUE frozen_obj = (obj); \
+       if (OBJ_FROZEN(frozen_obj)) { \
+diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
+index 9c7d2fb68439..3210103c648a 100644
+--- a/include/ruby/ruby.h
++++ b/include/ruby/ruby.h
+@@ -628,7 +628,7 @@ int ruby_safe_level_2_warning(void) 
__attribute__((const,warning("$SAFE=2 to 4 a
+ # define rb_set_safe_level(level) 
rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error))
+ #endif
+ void rb_set_safe_level_force(int);
+-CONSTFUNC(void rb_secure_update(VALUE));
++void rb_secure_update(VALUE);
+ NORETURN(void rb_insecure_operation(void));
+ 
+ VALUE rb_errinfo(void);
+diff --git a/internal.h b/internal.h
+index d0257a8d8ba0..4ccf3218c6ca 100644
+--- a/internal.h
++++ b/internal.h
+@@ -1110,7 +1110,7 @@ VALUE rb_invcmp(VALUE, VALUE);
+ struct rb_block;
+ int rb_dvar_defined(ID, const struct rb_block *);
+ int rb_local_defined(ID, const struct rb_block *);
+-CONSTFUNC(const char * rb_insns_name(int i));
++const char * rb_insns_name(int i);
+ VALUE rb_insns_name_array(void);
+ 
+ /* complex.c */
+@@ -1136,7 +1136,7 @@ void Init_ext(void);
+ 
+ /* encoding.c */
+ ID rb_id_encoding(void);
+-CONSTFUNC(void rb_gc_mark_encodings(void));
++void rb_gc_mark_encodings(void);
+ rb_encoding *rb_enc_get_from_index(int index);
+ rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
+ int rb_encdb_replicate(const char *alias, const char *orig);

diff --git a/dev-lang/ruby/files/2.4/012-openssl_1.1.patch 
b/dev-lang/ruby/files/2.4/012-openssl_1.1.patch
new file mode 100644
index 0000000000..edf344bedc
--- /dev/null
+++ b/dev-lang/ruby/files/2.4/012-openssl_1.1.patch
@@ -0,0 +1,339 @@
+From 7af808153dd34a980e027a04d4490ae38019b3ed Mon Sep 17 00:00:00 2001
+From: Mark Wright <gie...@gentoo.org>
+Date: Sun, 15 Oct 2017 01:24:12 +1100
+Subject: [PATCH] Fix build failure against OpenSSL 1.1 built with
+ no-deprecated Thanks rhenium for the code review and fixes.
+
+---
+ ext/openssl/openssl_missing.h |  4 +++
+ ext/openssl/ossl.c            | 23 ++++++---------
+ ext/openssl/ossl.h            |  5 ++++
+ ext/openssl/ossl_cipher.c     | 14 ++++-----
+ ext/openssl/ossl_engine.c     | 54 ++++++++++++++++++++++-------------
+ ext/openssl/ossl_ssl.c        |  2 +-
+ ext/openssl/ossl_x509cert.c   |  4 +--
+ ext/openssl/ossl_x509crl.c    |  4 +--
+ 8 files changed, 63 insertions(+), 47 deletions(-)
+
+diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
+index cc31f6ac..debd25ad 100644
+--- a/ext/openssl/openssl_missing.h
++++ b/ext/openssl/openssl_missing.h
+@@ -209,6 +209,10 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
+ #  define X509_get0_notAfter(x) X509_get_notAfter(x)
+ #  define X509_CRL_get0_lastUpdate(x) X509_CRL_get_lastUpdate(x)
+ #  define X509_CRL_get0_nextUpdate(x) X509_CRL_get_nextUpdate(x)
++#  define X509_set1_notBefore(x, t) X509_set_notBefore(x, t)
++#  define X509_set1_notAfter(x, t) X509_set_notAfter(x, t)
++#  define X509_CRL_set1_lastUpdate(x, t) X509_CRL_set_lastUpdate(x, t)
++#  define X509_CRL_set1_nextUpdate(x, t) X509_CRL_set_nextUpdate(x, t)
+ #endif
+ 
+ #if !defined(HAVE_SSL_SESSION_GET_PROTOCOL_VERSION)
+diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
+index 93ecc7d4..245385e7 100644
+--- a/ext/openssl/ossl.c
++++ b/ext/openssl/ossl.c
+@@ -1109,25 +1109,14 @@ Init_openssl(void)
+     /*
+      * Init all digests, ciphers
+      */
+-    /* CRYPTO_malloc_init(); */
+-    /* ENGINE_load_builtin_engines(); */
++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000
++    if (!OPENSSL_init_ssl(0, NULL))
++        rb_raise(rb_eRuntimeError, "OPENSSL_init_ssl");
++#else
+     OpenSSL_add_ssl_algorithms();
+     OpenSSL_add_all_algorithms();
+     ERR_load_crypto_strings();
+     SSL_load_error_strings();
+-
+-    /*
+-     * FIXME:
+-     * On unload do:
+-     */
+-#if 0
+-    CONF_modules_unload(1);
+-    destroy_ui_method();
+-    EVP_cleanup();
+-    ENGINE_cleanup();
+-    CRYPTO_cleanup_all_ex_data();
+-    ERR_remove_state(0);
+-    ERR_free_strings();
+ #endif
+ 
+     /*
+@@ -1149,7 +1138,11 @@ Init_openssl(void)
+     /*
+      * Version of OpenSSL the ruby OpenSSL extension is running with
+      */
++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000
++    rb_define_const(mOSSL, "OPENSSL_LIBRARY_VERSION", 
rb_str_new2(OpenSSL_version(OPENSSL_VERSION)));
++#else
+     rb_define_const(mOSSL, "OPENSSL_LIBRARY_VERSION", 
rb_str_new2(SSLeay_version(SSLEAY_VERSION)));
++#endif
+ 
+     /*
+      * Version number of OpenSSL the ruby OpenSSL extension was built with
+diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
+index f08889b2..5a15839c 100644
+--- a/ext/openssl/ossl.h
++++ b/ext/openssl/ossl.h
+@@ -35,6 +35,11 @@
+ #if !defined(OPENSSL_NO_OCSP)
+ #  include <openssl/ocsp.h>
+ #endif
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
++#include <openssl/dsa.h>
++#include <openssl/evp.h>
++#include <openssl/dh.h>
+ 
+ /*
+  * Common Module
+diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
+index bfa76c1a..e6179733 100644
+--- a/ext/openssl/ossl_cipher.c
++++ b/ext/openssl/ossl_cipher.c
+@@ -508,9 +508,9 @@ ossl_cipher_set_iv(VALUE self, VALUE iv)
+     StringValue(iv);
+     GetCipher(self, ctx);
+ 
+ #if defined(HAVE_AUTHENTICATED_ENCRYPTION)
+-    if (EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER)
++    if (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER)
+       iv_len = (int)(VALUE)EVP_CIPHER_CTX_get_app_data(ctx);
+ #endif
+     if (!iv_len)
+       iv_len = EVP_CIPHER_CTX_iv_length(ctx);
+@@ -535,7 +535,7 @@ ossl_cipher_is_authenticated(VALUE self)
+ 
+     GetCipher(self, ctx);
+ 
+ #if defined(HAVE_AUTHENTICATED_ENCRYPTION)
+-    return (EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER) ? Qtrue : 
Qfalse;
++    return (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER) ? Qtrue : Qfalse;
+ #else
+     return Qfalse;
+ #endif
+@@ -606,7 +606,7 @@ ossl_cipher_get_auth_tag(int argc, VALUE *argv, VALUE self)
+ 
+     GetCipher(self, ctx);
+ 
+-    if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER))
++    if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER))
+       ossl_raise(eCipherError, "authentication tag not supported by this 
cipher");
+ 
+     ret = rb_str_new(NULL, tag_len);
+@@ -641,7 +641,7 @@ ossl_cipher_set_auth_tag(VALUE self, VALUE vtag)
+     tag_len = RSTRING_LENINT(vtag);
+ 
+     GetCipher(self, ctx);
+-    if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER))
++    if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER))
+       ossl_raise(eCipherError, "authentication tag not supported by this 
cipher");
+ 
+     if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, tag))
+@@ -668,7 +668,7 @@ ossl_cipher_set_auth_tag_len(VALUE self, VALUE vlen)
+     EVP_CIPHER_CTX *ctx;
+ 
+     GetCipher(self, ctx);
+-    if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER))
++    if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER))
+       ossl_raise(eCipherError, "AEAD not supported by this cipher");
+ 
+     if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, NULL))
+@@ -695,7 +695,7 @@ ossl_cipher_set_iv_length(VALUE self, VALUE iv_length)
+     EVP_CIPHER_CTX *ctx;
+ 
+     GetCipher(self, ctx);
+-    if (!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER))
++    if (!(EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER))
+       ossl_raise(eCipherError, "cipher does not support AEAD");
+ 
+     if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, len, NULL))
+@@ -786,9 +786,9 @@ ossl_cipher_iv_length(VALUE self)
+     int len = 0;
+ 
+     GetCipher(self, ctx);
+ #if defined(HAVE_AUTHENTICATED_ENCRYPTION)
+-    if (EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_FLAG_AEAD_CIPHER)
++    if (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 
EVP_CIPH_FLAG_AEAD_CIPHER)
+       len = (int)(VALUE)EVP_CIPHER_CTX_get_app_data(ctx);
+ #endif
+     if (!len)
+       len = EVP_CIPHER_CTX_iv_length(ctx);
+diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
+index d69b5dca..5ca0d4ca 100644
+--- a/ext/openssl/ossl_engine.c
++++ b/ext/openssl/ossl_engine.c
+@@ -46,13 +46,25 @@ VALUE eEngineError;
+ /*
+  * Private
+  */
+-#define OSSL_ENGINE_LOAD_IF_MATCH(x) \
++#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000
++#define OSSL_ENGINE_LOAD_IF_MATCH(engine_name, x) \
+ do{\
+-  if(!strcmp(#x, RSTRING_PTR(name))){\
+-    ENGINE_load_##x();\
++  if(!strcmp(#engine_name, RSTRING_PTR(name))){\
++    if (OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_##x, NULL))\
++      return Qtrue;\
++    else\
++      ossl_raise(eEngineError, "OPENSSL_init_crypto"); \
++  }\
++}while(0)
++#else
++#define OSSL_ENGINE_LOAD_IF_MATCH(engine_name, x)  \
++do{\
++  if(!strcmp(#engine_name, RSTRING_PTR(name))){\
++    ENGINE_load_##engine_name();\
+     return Qtrue;\
+   }\
+ }while(0)
++#endif
+ 
+ static void
+ ossl_engine_free(void *engine)
+@@ -94,55 +106,55 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
+     StringValueCStr(name);
+ #ifndef OPENSSL_NO_STATIC_ENGINE
+ #if HAVE_ENGINE_LOAD_DYNAMIC
+-    OSSL_ENGINE_LOAD_IF_MATCH(dynamic);
++    OSSL_ENGINE_LOAD_IF_MATCH(dynamic, DYNAMIC);
+ #endif
+ #if HAVE_ENGINE_LOAD_4758CCA
+-    OSSL_ENGINE_LOAD_IF_MATCH(4758cca);
++    OSSL_ENGINE_LOAD_IF_MATCH(4758cca, 4758CCA);
+ #endif
+ #if HAVE_ENGINE_LOAD_AEP
+-    OSSL_ENGINE_LOAD_IF_MATCH(aep);
++    OSSL_ENGINE_LOAD_IF_MATCH(aep, AEP);
+ #endif
+ #if HAVE_ENGINE_LOAD_ATALLA
+-    OSSL_ENGINE_LOAD_IF_MATCH(atalla);
++    OSSL_ENGINE_LOAD_IF_MATCH(atalla, ATALLA);
+ #endif
+ #if HAVE_ENGINE_LOAD_CHIL
+-    OSSL_ENGINE_LOAD_IF_MATCH(chil);
++    OSSL_ENGINE_LOAD_IF_MATCH(chil, CHIL);
+ #endif
+ #if HAVE_ENGINE_LOAD_CSWIFT
+-    OSSL_ENGINE_LOAD_IF_MATCH(cswift);
++    OSSL_ENGINE_LOAD_IF_MATCH(cswift, CSWIFT);
+ #endif
+ #if HAVE_ENGINE_LOAD_NURON
+-    OSSL_ENGINE_LOAD_IF_MATCH(nuron);
++    OSSL_ENGINE_LOAD_IF_MATCH(nuron, NURON);
+ #endif
+ #if HAVE_ENGINE_LOAD_SUREWARE
+-    OSSL_ENGINE_LOAD_IF_MATCH(sureware);
++    OSSL_ENGINE_LOAD_IF_MATCH(sureware, SUREWARE);
+ #endif
+ #if HAVE_ENGINE_LOAD_UBSEC
+-    OSSL_ENGINE_LOAD_IF_MATCH(ubsec);
++    OSSL_ENGINE_LOAD_IF_MATCH(ubsec, UBSEC);
+ #endif
+ #if HAVE_ENGINE_LOAD_PADLOCK
+-    OSSL_ENGINE_LOAD_IF_MATCH(padlock);
++    OSSL_ENGINE_LOAD_IF_MATCH(padlock, PADLOCK);
+ #endif
+ #if HAVE_ENGINE_LOAD_CAPI
+-    OSSL_ENGINE_LOAD_IF_MATCH(capi);
++    OSSL_ENGINE_LOAD_IF_MATCH(capi, CAPI);
+ #endif
+ #if HAVE_ENGINE_LOAD_GMP
+-    OSSL_ENGINE_LOAD_IF_MATCH(gmp);
++    OSSL_ENGINE_LOAD_IF_MATCH(gmp, GMP);
+ #endif
+ #if HAVE_ENGINE_LOAD_GOST
+-    OSSL_ENGINE_LOAD_IF_MATCH(gost);
++    OSSL_ENGINE_LOAD_IF_MATCH(gost, GOST);
+ #endif
+ #if HAVE_ENGINE_LOAD_CRYPTODEV
+-    OSSL_ENGINE_LOAD_IF_MATCH(cryptodev);
++    OSSL_ENGINE_LOAD_IF_MATCH(cryptodev, CRYPTODEV);
+ #endif
+ #if HAVE_ENGINE_LOAD_AESNI
+-    OSSL_ENGINE_LOAD_IF_MATCH(aesni);
++    OSSL_ENGINE_LOAD_IF_MATCH(aesni, AESNI);
+ #endif
+ #endif
+ #ifdef HAVE_ENGINE_LOAD_OPENBSD_DEV_CRYPTO
+-    OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto);
++    OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto, OPENBSD_DEV_CRYPTO);
+ #endif
+-    OSSL_ENGINE_LOAD_IF_MATCH(openssl);
++    OSSL_ENGINE_LOAD_IF_MATCH(openssl, OPENSSL);
+     rb_warning("no such builtin loader for `%"PRIsVALUE"'", name);
+     return Qnil;
+ #endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
+@@ -160,7 +172,9 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
+ static VALUE
+ ossl_engine_s_cleanup(VALUE self)
+ {
++#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000
+     ENGINE_cleanup();
++#endif
+     return Qnil;
+ }
+ 
+diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
+index 8e3c0c42..d32a299c 100644
+--- a/ext/openssl/ossl_ssl.c
++++ b/ext/openssl/ossl_ssl.c
+@@ -379,7 +379,7 @@ ossl_call_session_get_cb(VALUE ary)
+ 
+ /* this method is currently only called for servers (in OpenSSL <= 0.9.8e) */
+ static SSL_SESSION *
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+ ossl_sslctx_session_get_cb(SSL *ssl, const unsigned char *buf, int len, int 
*copy)
+ #else
+ ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *buf, int len, int *copy)
+diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c
+index cf82a53d..8d16b9b7 100644
+--- a/ext/openssl/ossl_x509cert.c
++++ b/ext/openssl/ossl_x509cert.c
+@@ -440,7 +440,7 @@ ossl_x509_set_not_before(VALUE self, VALUE time)
+ 
+     GetX509(self, x509);
+     asn1time = ossl_x509_time_adjust(NULL, time);
+-    if (!X509_set_notBefore(x509, asn1time)) {
++    if (!X509_set1_notBefore(x509, asn1time)) {
+       ASN1_TIME_free(asn1time);
+       ossl_raise(eX509CertError, "X509_set_notBefore");
+     }
+@@ -479,7 +479,7 @@ ossl_x509_set_not_after(VALUE self, VALUE time)
+ 
+     GetX509(self, x509);
+     asn1time = ossl_x509_time_adjust(NULL, time);
+-    if (!X509_set_notAfter(x509, asn1time)) {
++    if (!X509_set1_notAfter(x509, asn1time)) {
+       ASN1_TIME_free(asn1time);
+       ossl_raise(eX509CertError, "X509_set_notAfter");
+     }
+diff --git a/ext/openssl/ossl_x509crl.c b/ext/openssl/ossl_x509crl.c
+index 5ecd7ea0..45cf7fb4 100644
+--- a/ext/openssl/ossl_x509crl.c
++++ b/ext/openssl/ossl_x509crl.c
+@@ -226,7 +226,7 @@ ossl_x509crl_set_last_update(VALUE self, VALUE time)
+ 
+     GetX509CRL(self, crl);
+     asn1time = ossl_x509_time_adjust(NULL, time);
+-    if (!X509_CRL_set_lastUpdate(crl, asn1time)) {
++    if (!X509_CRL_set1_lastUpdate(crl, asn1time)) {
+       ASN1_TIME_free(asn1time);
+       ossl_raise(eX509CRLError, "X509_CRL_set_lastUpdate");
+     }
+@@ -257,7 +257,7 @@ ossl_x509crl_set_next_update(VALUE self, VALUE time)
+ 
+     GetX509CRL(self, crl);
+     asn1time = ossl_x509_time_adjust(NULL, time);
+-    if (!X509_CRL_set_nextUpdate(crl, asn1time)) {
++    if (!X509_CRL_set1_nextUpdate(crl, asn1time)) {
+       ASN1_TIME_free(asn1time);
+       ossl_raise(eX509CRLError, "X509_CRL_set_nextUpdate");
+     }

diff --git 
a/dev-lang/ruby/files/2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch
 
b/dev-lang/ruby/files/2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch
new file mode 100644
index 0000000000..2ade8b8d42
--- /dev/null
+++ 
b/dev-lang/ruby/files/2.5/001-ia64-update-ia64-specific-code-to-use-execution-cont.patch
@@ -0,0 +1,67 @@
+From 5af43b1ec2674e9f86090790bc61abdb96be14ff Mon Sep 17 00:00:00 2001
+From: hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Tue, 30 Jan 2018 05:43:42 +0000
+Subject: [PATCH] ia64: update ia64-specific code to use execution context
+
+This change follows commit 837fd5e494731d7d44786f29e7d6e8c27029806f
+in '#ifdef __ia64' branches.
+
+Noticed as a build failure by John Paul Adrian Glaubitz:
+
+```
+  cont.c:502:50: error: 'rb_thread_t {aka struct rb_thread_struct}'
+    has no member named 'machine'
+       size = cont->machine.register_stack_size =
+           th->machine.register_stack_end - th->machine.register_stack_start;
+               ^~
+```
+
+The change is trivial: update 'th->machine' usage to 'th->ec->machine'.
+Signed-off-by: Sergei Trofimovich <sly...@gentoo.org>
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62106 
b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+---
+ cont.c   | 6 +++---
+ thread.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/cont.c b/cont.c
+index f48fd2e52b..93a64f8fe6 100644
+--- a/cont.c
++++ b/cont.c
+@@ -475,7 +475,7 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t 
*cont)
+ 
+     SET_MACHINE_STACK_END(&th->ec->machine.stack_end);
+ #ifdef __ia64
+-    th->machine.register_stack_end = rb_ia64_bsp();
++    th->ec->machine.register_stack_end = rb_ia64_bsp();
+ #endif
+ 
+     if (th->ec->machine.stack_start > th->ec->machine.stack_end) {
+@@ -499,8 +499,8 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t 
*cont)
+ 
+ #ifdef __ia64
+     rb_ia64_flushrs();
+-    size = cont->machine.register_stack_size = th->machine.register_stack_end 
- th->machine.register_stack_start;
+-    cont->machine.register_stack_src = th->machine.register_stack_start;
++    size = cont->machine.register_stack_size = 
th->ec->machine.register_stack_end - th->ec->machine.register_stack_start;
++    cont->machine.register_stack_src = th->ec->machine.register_stack_start;
+     if (cont->machine.register_stack) {
+       REALLOC_N(cont->machine.register_stack, VALUE, size);
+     }
+diff --git a/thread.c b/thread.c
+index acb53354fd..23957eba09 100644
+--- a/thread.c
++++ b/thread.c
+@@ -133,7 +133,7 @@ static inline void blocking_region_end(rb_thread_t *th, 
struct rb_blocking_regio
+ 
+ #ifdef __ia64
+ #define RB_GC_SAVE_MACHINE_REGISTER_STACK(th)          \
+-    do{(th)->machine.register_stack_end = rb_ia64_bsp();}while(0)
++    do{(th)->ec->machine.register_stack_end = rb_ia64_bsp();}while(0)
+ #else
+ #define RB_GC_SAVE_MACHINE_REGISTER_STACK(th)
+ #endif
+-- 
+2.16.1
+

diff --git a/dev-lang/ruby/files/2.5/005_no-undefined-ext.patch 
b/dev-lang/ruby/files/2.5/005_no-undefined-ext.patch
new file mode 100644
index 0000000000..1f0fdda08d
--- /dev/null
+++ b/dev-lang/ruby/files/2.5/005_no-undefined-ext.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac.~1~ 2017-12-15 10:43:40.000000000 +0100
++++ b/configure.ac     2017-12-25 11:02:19.099076831 +0100
+@@ -3233,7 +3233,7 @@
+       [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | 
haiku*], [
+                       : ${LDSHARED='$(CC) -shared'}
+                       AS_IF([test "$rb_cv_binary_elf" = yes], [
+-                          LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++                          LDFLAGS="$LDFLAGS -Wl,-export-dynamic 
-Wl,--no-undefined"
+                       ])
+                       rb_cv_dlopen=yes],
+       [interix*], [   : ${LDSHARED='$(CC) -shared'}

diff --git a/dev-lang/ruby/files/2.5/009_no-gems.patch 
b/dev-lang/ruby/files/2.5/009_no-gems.patch
new file mode 100644
index 0000000000..e12429a432
--- /dev/null
+++ b/dev-lang/ruby/files/2.5/009_no-gems.patch
@@ -0,0 +1,95 @@
+--- a/tool/rbinstall.rb.~1~    2017-10-30 06:45:20.000000000 +0100
++++ b/tool/rbinstall.rb        2017-12-25 11:06:53.340432435 +0100
+@@ -700,20 +700,10 @@
+ # :startdoc:
+ 
+ install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do
+-  install_default_gem('lib', srcdir)
++  # Gems are unbundled in Gentoo
+ end
+ install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do
+-  install_default_gem('ext', srcdir) do |path|
+-    # assume that gemspec and extconf.rb are placed in the same directory
+-    success = false
+-    begin
+-      IO.foreach(File.dirname(path[(srcdir.size+1)..-1]) + "/Makefile") do |l|
+-        break success = true if /^TARGET\s*=/ =~ l
+-      end
+-    rescue Errno::ENOENT
+-    end
+-    success
+-  end
++  # Gems are unbundled in Gentoo
+ end
+ 
+ def load_gemspec(file)
+@@ -765,68 +755,7 @@
+ end
+ 
+ install?(:ext, :comm, :gem, :'bundled-gems') do
+-  gem_dir = Gem.default_dir
+-  directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+-  prepare "bundled gems", gem_dir, directories
+-  install_dir = with_destdir(gem_dir)
+-  installed_gems = {}
+-  options = {
+-    :install_dir => install_dir,
+-    :bin_dir => with_destdir(bindir),
+-    :domain => :local,
+-    :ignore_dependencies => true,
+-    :dir_mode => $dir_mode,
+-    :data_mode => $data_mode,
+-    :prog_mode => $prog_mode,
+-    :wrappers => true,
+-    :format_executable => true,
+-  }
+-  gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}"
+-  extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, 
gem_dir).extensions_dir
+-  Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path|
+-    spec = load_gemspec(path)
+-    next unless spec.platform == Gem::Platform::RUBY
+-    next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 
1]
+-    spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
+-    if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
+-      spec.extensions[0] ||= "-"
+-    end
+-    ins = RbInstall::UnpackedInstaller.new(spec, options)
+-    puts "#{INDENT}#{spec.name} #{spec.version}"
+-    ins.install
+-    File.chmod($data_mode, File.join(install_dir, "specifications", 
"#{spec.full_name}.gemspec"))
+-    unless spec.extensions.empty?
+-      install_recursive(ext, spec.extension_dir)
+-    end
+-    installed_gems[spec.full_name] = true
+-  end
+-  installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| 
installed_gems.key?(File.basename(gem, '.gem'))}
+-  unless installed_gems.empty?
+-    install installed_gems, gem_dir+"/cache"
+-  end
+-  next if gems.empty?
+-  if defined?(Zlib)
+-    Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, 
ruby_install_name)))
+-    silent = Gem::SilentUI.new
+-    gems.each do |gem|
+-      inst = Gem::Installer.new(gem, options)
+-      inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
+-      begin
+-        Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
+-      rescue Gem::InstallError => e
+-        next
+-      end
+-      gemname = File.basename(gem)
+-      puts "#{INDENT}#{gemname}"
+-    end
+-    # fix directory permissions
+-    # TODO: Gem.install should accept :dir_mode option or something
+-    File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
+-    # fix .gemspec permissions
+-    File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
+-  else
+-    puts "skip installing bundled gems because of lacking zlib"
+-  end
++  # Gems are unbundled in Gentoo
+ end
+ 
+ parse_args()

diff --git a/dev-lang/ruby/files/2.5/010-libressl_2.7.patch 
b/dev-lang/ruby/files/2.5/010-libressl_2.7.patch
new file mode 100644
index 0000000000..150f43c9e5
--- /dev/null
+++ b/dev-lang/ruby/files/2.5/010-libressl_2.7.patch
@@ -0,0 +1,15 @@
+--- a/ext/openssl/extconf.rb.orig      2018-04-02 09:57:14 UTC
++++ b/ext/openssl/extconf.rb
+@@ -122,8 +122,11 @@ OpenSSL.check_func_or_macro("SSL_get_ser
+ have_func("SSL_is_server")
+ 
+ # added in 1.1.0
++if !have_struct_member("SSL", "ctx", "openssl/ssl.h") ||
++    try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", 
"openssl/opensslv.h")
++  $defs.push("-DHAVE_OPAQUE_OPENSSL")
++end
+ have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
+-have_struct_member("SSL", "ctx", "openssl/ssl.h") || 
$defs.push("-DHAVE_OPAQUE_OPENSSL")
+ have_func("BN_GENCB_new")
+ have_func("BN_GENCB_free")
+ have_func("BN_GENCB_get_arg")

diff --git a/dev-lang/ruby/files/2.5/011-no-gems.patch 
b/dev-lang/ruby/files/2.5/011-no-gems.patch
new file mode 100644
index 0000000000..2ebe064c8a
--- /dev/null
+++ b/dev-lang/ruby/files/2.5/011-no-gems.patch
@@ -0,0 +1,85 @@
+--- a/tool/rbinstall.rb.~1~    2017-10-30 06:45:20.000000000 +0100
++++ b/tool/rbinstall.rb        2017-12-25 11:06:53.340432435 +0100
+@@ -700,10 +700,10 @@
+ # :startdoc:
+ 
+ install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do
+-  install_default_gem('lib', srcdir)
++  # Gems are unbundled in Gentoo
+ end
+ install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do
+-  install_default_gem('ext', srcdir)
++  # Gems are unbundled in Gentoo
+ end
+ 
+ def load_gemspec(file)
+@@ -765,68 +755,7 @@
+ end
+ 
+ install?(:ext, :comm, :gem, :'bundled-gems') do
+-  gem_dir = Gem.default_dir
+-  directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+-  prepare "bundled gems", gem_dir, directories
+-  install_dir = with_destdir(gem_dir)
+-  installed_gems = {}
+-  options = {
+-    :install_dir => install_dir,
+-    :bin_dir => with_destdir(bindir),
+-    :domain => :local,
+-    :ignore_dependencies => true,
+-    :dir_mode => $dir_mode,
+-    :data_mode => $data_mode,
+-    :prog_mode => $prog_mode,
+-    :wrappers => true,
+-    :format_executable => true,
+-  }
+-  gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}"
+-  extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, 
gem_dir).extensions_dir
+-  Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path|
+-    spec = load_gemspec(path)
+-    next unless spec.platform == Gem::Platform::RUBY
+-    next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 
1]
+-    spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
+-    if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
+-      spec.extensions[0] ||= "-"
+-    end
+-    ins = RbInstall::UnpackedInstaller.new(spec, options)
+-    puts "#{INDENT}#{spec.name} #{spec.version}"
+-    ins.install
+-    File.chmod($data_mode, File.join(install_dir, "specifications", 
"#{spec.full_name}.gemspec"))
+-    unless spec.extensions.empty?
+-      install_recursive(ext, spec.extension_dir)
+-    end
+-    installed_gems[spec.full_name] = true
+-  end
+-  installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| 
installed_gems.key?(File.basename(gem, '.gem'))}
+-  unless installed_gems.empty?
+-    install installed_gems, gem_dir+"/cache"
+-  end
+-  next if gems.empty?
+-  if defined?(Zlib)
+-    Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, 
ruby_install_name)))
+-    silent = Gem::SilentUI.new
+-    gems.each do |gem|
+-      inst = Gem::Installer.new(gem, options)
+-      inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
+-      begin
+-        Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
+-      rescue Gem::InstallError => e
+-        next
+-      end
+-      gemname = File.basename(gem)
+-      puts "#{INDENT}#{gemname}"
+-    end
+-    # fix directory permissions
+-    # TODO: Gem.install should accept :dir_mode option or something
+-    File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
+-    # fix .gemspec permissions
+-    File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
+-  else
+-    puts "skip installing bundled gems because of lacking zlib"
+-  end
++  # Gems are unbundled in Gentoo
+ end
+ 
+ parse_args()

diff --git a/dev-lang/ruby/files/2.6/005_no-undefined-ext.patch 
b/dev-lang/ruby/files/2.6/005_no-undefined-ext.patch
new file mode 100644
index 0000000000..1f0fdda08d
--- /dev/null
+++ b/dev-lang/ruby/files/2.6/005_no-undefined-ext.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac.~1~ 2017-12-15 10:43:40.000000000 +0100
++++ b/configure.ac     2017-12-25 11:02:19.099076831 +0100
+@@ -3233,7 +3233,7 @@
+       [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | 
haiku*], [
+                       : ${LDSHARED='$(CC) -shared'}
+                       AS_IF([test "$rb_cv_binary_elf" = yes], [
+-                          LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++                          LDFLAGS="$LDFLAGS -Wl,-export-dynamic 
-Wl,--no-undefined"
+                       ])
+                       rb_cv_dlopen=yes],
+       [interix*], [   : ${LDSHARED='$(CC) -shared'}

diff --git a/dev-lang/ruby/files/2.6/009_no-gems.patch 
b/dev-lang/ruby/files/2.6/009_no-gems.patch
new file mode 100644
index 0000000000..f98801d503
--- /dev/null
+++ b/dev-lang/ruby/files/2.6/009_no-gems.patch
@@ -0,0 +1,39 @@
+--- a/tool/rbinstall.rb.~1~    2018-12-27 07:43:59.938638174 +0100
++++ b/tool/rbinstall.rb        2018-12-27 07:51:09.096382161 +0100
+@@ -723,17 +723,7 @@
+ # :startdoc:
+ 
+ install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do
+-  install_default_gem('ext', srcdir) do |path|
+-    # assume that gemspec and extconf.rb are placed in the same directory
+-    success = false
+-    begin
+-      IO.foreach(File.dirname(path[(srcdir.size+1)..-1]) + "/Makefile") do |l|
+-        break success = true if /^TARGET\s*=/ =~ l
+-      end
+-    rescue Errno::ENOENT
+-    end
+-    success
+-  end
++  # Gems are unbundled in Gentoo
+ end
+ 
+ def load_gemspec(file)
+@@ -743,7 +743,7 @@
+ end
+ 
+ def install_default_gem(dir, srcdir)
+-  gem_dir = Gem.default_dir
++  gem_dir = ENV['GEM_DESTDIR'] ; puts "gem_dir for default gems = #{gem_dir}"
+   directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+   prepare "default gems from #{dir}", gem_dir, directories
+ 
+@@ -777,7 +777,7 @@
+ end
+ 
+ install?(:ext, :comm, :gem, :'bundled-gems') do
+-  gem_dir = Gem.default_dir
++  gem_dir = ENV['GEM_DESTDIR']
+   directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+   prepare "bundled gems", gem_dir, directories
+   install_dir = with_destdir(gem_dir)

diff --git a/dev-lang/ruby/files/2.6/010-default-gem-location.patch 
b/dev-lang/ruby/files/2.6/010-default-gem-location.patch
new file mode 100644
index 0000000000..7a50c35ff6
--- /dev/null
+++ b/dev-lang/ruby/files/2.6/010-default-gem-location.patch
@@ -0,0 +1,20 @@
+--- a/tool/rbinstall.rb.~1~    2019-01-24 02:00:07.000000000 +0100
++++ b/tool/rbinstall.rb        2019-02-03 08:39:49.778007118 +0100
+@@ -806,7 +806,7 @@
+ end
+ 
+ def install_default_gem(dir, srcdir)
+-  gem_dir = Gem.default_dir
++  gem_dir = ENV['GEM_DESTDIR']
+   directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+   prepare "default gems from #{dir}", gem_dir, directories
+ 
+@@ -844,7 +844,7 @@
+ end
+ 
+ install?(:ext, :comm, :gem, :'bundled-gems') do
+-  gem_dir = Gem.default_dir
++  gem_dir = ENV['GEM_DESTDIR']
+   directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+   prepare "bundled gems", gem_dir, directories
+   install_dir = with_destdir(gem_dir)

diff --git a/dev-lang/ruby/files/ruby-1.9.1-prefix.patch 
b/dev-lang/ruby/files/ruby-1.9.1-prefix.patch
index 250ad90dee..322dd56e0f 100644
--- a/dev-lang/ruby/files/ruby-1.9.1-prefix.patch
+++ b/dev-lang/ruby/files/ruby-1.9.1-prefix.patch
@@ -1,5 +1,5 @@
---- configure.in
-+++ configure.in
+--- a/configure.in
++++ b/configure.in
 @@ -2111,7 +2111,7 @@
                        esac
                ])
@@ -9,8 +9,8 @@
        if ${NROFF} -mdoc ${srcdir}/man/ruby.1 >/dev/null 2>&1; then
                MANTYPE=doc
        else
---- configure
-+++ configure
+--- a/configure
++++ b/configure
 @@ -22605,7 +22605,7 @@
    ;;
    *)

diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml
index 249178be81..ad18c95606 100644
--- a/dev-lang/ruby/metadata.xml
+++ b/dev-lang/ruby/metadata.xml
@@ -1,28 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
-  <maintainer type="project">
-    <email>r...@gentoo.org</email>
-    <name>Gentoo Ruby Project</name>
-  </maintainer>
-  <use>
-    <flag name="rubytests">
-      Install ruby tests that can only be run after ruby is installed
-    </flag>
-    <flag name="readline">
-      Use the <pkg>sys-libs/readline</pkg> library to provide the
-      readline extension, used for instance by the irb tool. This flag
-      is meaningful only if the libedit USE flag is disabled.
-
-      If neither libedit nor readline USE flags are enabled, the
-      readline extension will not be built (and irb will lose line
-      editing functionality).
-    </flag>
-    <flag name="rdoc">
-      Install <pkg>dev-ruby/rdoc</pkg> after installing Ruby.
-    </flag>
-    <flag name="jemalloc">
-         Use <pkg>dev-libs/jemalloc</pkg> for memory allocation.
-       </flag>
-  </use>
+       <maintainer type="project">
+               <email>r...@gentoo.org</email>
+               <name>Gentoo Ruby Project</name>
+       </maintainer>
+       <use>
+               <flag name="rubytests">Install ruby tests that can only be run 
after ruby is installed</flag>
+               <flag name="rdoc">Install <pkg>dev-ruby/rdoc</pkg> after 
installing Ruby.</flag>
+       </use>
 </pkgmetadata>

diff --git a/dev-lang/ruby/ruby-2.4.2.ebuild b/dev-lang/ruby/ruby-2.4.6.ebuild
similarity index 89%
rename from dev-lang/ruby/ruby-2.4.2.ebuild
rename to dev-lang/ruby/ruby-2.4.6.ebuild
index 240aab02eb..003af89c3a 100644
--- a/dev-lang/ruby/ruby-2.4.2.ebuild
+++ b/dev-lang/ruby/ruby-2.4.6.ebuild
@@ -1,41 +1,28 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-#PATCHSET=1
+inherit autotools flag-o-matic multilib
 
-inherit autotools eutils flag-o-matic multilib versionator
-
-MY_P="${PN}-$(get_version_component_range 1-3)"
+MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
 
-SLOT=$(get_version_component_range 1-2)
-MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
 RUBYVERSION=${SLOT}.0
 
-if [[ -n ${PATCHSET} ]]; then
-       if [[ ${PVR} == ${PV} ]]; then
-               PATCHSET="${PV}-r0.${PATCHSET}"
-       else
-               PATCHSET="${PVR}.${PATCHSET}"
-       fi
-else
-       PATCHSET="${PVR}"
-fi
-
 DESCRIPTION="An object-oriented scripting language"
-HOMEPAGE="http://www.ruby-lang.org/";
-SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
-                
https://dev.gentoo.org/~graaff/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2";
+HOMEPAGE="https://www.ruby-lang.org/";
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz"
 
 LICENSE="|| ( Ruby-BSD BSD-2 )"
 KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests 
socks5 ssl static-libs tk xemacs"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests 
socks5 +ssl static-libs tk xemacs"
 
 RDEPEND="
        berkdb? ( sys-libs/db:= )
-       gdbm? ( sys-libs/gdbm )
+       gdbm? ( sys-libs/gdbm:= )
        jemalloc? ( dev-libs/jemalloc )
        ssl? (
                !libressl? ( dev-libs/openssl:0= )
@@ -47,7 +34,8 @@ RDEPEND="
                dev-lang/tk:0=[threads]
        )
        dev-libs/libyaml
-       virtual/libffi
+       virtual/libffi:=
+       sys-libs/readline:0=
        sys-libs/zlib
        >=app-eselect/eselect-ruby-20161226
        !<dev-ruby/rdoc-3.9.4
@@ -73,9 +61,8 @@ PDEPEND="
        xemacs? ( app-xemacs/ruby-modes )"
 
 src_prepare() {
-       epatch "${FILESDIR}/${PN}-1.9.1-prefix.patch"
-       EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
-               epatch "${WORKDIR}/patches"
+       eapply "${FILESDIR}/${PN}-1.9.1-prefix.patch"
+       eapply "${FILESDIR}"/${SLOT}/{002,005,009,012}*.patch
 
        einfo "Unbundling gems..."
        cd "$S"
@@ -95,6 +82,9 @@ src_prepare() {
        # avoid symlink loop on Darwin (?!)
        sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).dylib//' \
                configure.in || die "sed failed"
+       # Fix using installed ruby
+       sed -i -e '/^libs << File.expand_path("lib", srcdir)/s/^/#/' \
+               tool/runruby.rb || die
 
        eapply_user
 

diff --git a/dev-lang/ruby/ruby-2.2.9.ebuild b/dev-lang/ruby/ruby-2.5.5.ebuild
similarity index 70%
rename from dev-lang/ruby/ruby-2.2.9.ebuild
rename to dev-lang/ruby/ruby-2.5.5.ebuild
index 58e78aed98..c02ac06e74 100644
--- a/dev-lang/ruby/ruby-2.2.9.ebuild
+++ b/dev-lang/ruby/ruby-2.5.5.ebuild
@@ -1,37 +1,24 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-#PATCHSET=1
+inherit autotools flag-o-matic multilib
 
-inherit autotools eutils flag-o-matic multilib versionator
-
-MY_P="${PN}-$(get_version_component_range 1-3)"
+MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
 
-SLOT=$(get_version_component_range 1-2)
-MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
-RUBYVERSION=2.2.0
-
-if [[ -n ${PATCHSET} ]]; then
-       if [[ ${PVR} == ${PV} ]]; then
-               PATCHSET="${PV}-r0.${PATCHSET}"
-       else
-               PATCHSET="${PVR}.${PATCHSET}"
-       fi
-else
-       PATCHSET="${PVR}"
-fi
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
+RUBYVERSION=${SLOT}.0
 
 DESCRIPTION="An object-oriented scripting language"
-HOMEPAGE="http://www.ruby-lang.org/";
-SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
-                
https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2";
+HOMEPAGE="https://www.ruby-lang.org/";
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz"
 
 LICENSE="|| ( Ruby-BSD BSD-2 )"
 KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests 
socks5 ssl tk xemacs ncurses +readline"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests 
socks5 +ssl static-libs tk xemacs"
 
 RDEPEND="
        berkdb? ( sys-libs/db:= )
@@ -46,56 +33,52 @@ RDEPEND="
                dev-lang/tcl:0=[threads]
                dev-lang/tk:0=[threads]
        )
-       ncurses? ( sys-libs/ncurses:0= )
-       readline?  ( sys-libs/readline:0= )
        dev-libs/libyaml
-       virtual/libffi
+       virtual/libffi:=
+       sys-libs/readline:0=
        sys-libs/zlib
-       >=app-eselect/eselect-ruby-20141227
-       !<dev-ruby/rdoc-3.9.4
-       !<dev-ruby/rubygems-1.8.10-r1"
+       >=app-eselect/eselect-ruby-20171225
+"
 
 DEPEND="${RDEPEND}"
 
 BUNDLED_GEMS="
-       >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
-       >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
-       >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
+       >=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_ruby22]
-       >=dev-ruby/json-1.8.1[ruby_targets_ruby22]
-       >=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
-       rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
+       virtual/rubygems[ruby_targets_ruby25]
+       >=dev-ruby/json-2.0.2[ruby_targets_ruby25]
+       rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby25] )
        xemacs? ( app-xemacs/ruby-modes )"
 
 src_prepare() {
-       epatch "${FILESDIR}/${PN}-1.9.1-prefix.patch"
+       eapply "${FILESDIR}"/${SLOT}/{001,005,011}*.patch
 
-       EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
-               epatch "${WORKDIR}/patches"
-
-       # We can no longer unbundle all of rake because rubygems now depends
-       # on this. We leave the actual rake code around to bootstrap
-       # rubygems, but remove the bits that would cause a file collision.
        einfo "Unbundling gems..."
        cd "$S"
-       rm -rf \
-               {bin,lib}/rake lib/rake.rb man/rake.1 \
-               bin/gem || die "removal failed"
        # 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 gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
+       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
 
-       # Fix a hardcoded lib path in configure script
-       sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
-               configure.in || die "sed failed"
+       einfo "Removing bundled libraries..."
+       rm -fr ext/fiddle/libffi-3.2.1 || die
 
        # Fix hardcoded SHELL var in mkmf library
-       sed -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" -i lib/mkmf.rb
+       sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb
+       # avoid symlink loop on Darwin (?!)
+       sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).dylib//' \
+               configure.ac || die "sed failed"
+
+       eapply_user
 
        eautoreconf
 }
@@ -128,9 +111,6 @@ src_configure() {
        use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
 
        # Determine which modules *not* to build depending in the USE flags.
-       if ! use readline ; then
-               modules="${modules},readline"
-       fi
        if ! use berkdb ; then
                modules="${modules},dbm"
        fi
@@ -140,9 +120,6 @@ src_configure() {
        if ! use ssl ; then
                modules="${modules},openssl"
        fi
-       if ! use ncurses ; then
-               modules="${modules},curses"
-       fi
        if ! use tk ; then
                modules="${modules},tk"
        fi
@@ -163,6 +140,9 @@ src_configure() {
                $(use_enable socks5 socks) \
                $(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} \
                --with-readline-dir="${EPREFIX}"/usr \
@@ -204,16 +184,18 @@ src_install() {
        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}"
+       
DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
        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
+       export LD_LIBRARY_PATH DYLD_LIBRARY_PATH RUBYLIB
 
        emake V=1 DESTDIR="${D}" install || die "make install failed"
 
-       # Remove installed rubygems copy
+       # 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"
 
@@ -243,7 +225,7 @@ pkg_postinst() {
 
        elog
        elog "To switch between available Ruby profiles, execute as root:"
-       elog "\teselect ruby set ruby(21|22|...)"
+       elog "\teselect ruby set ruby(23|24|...)"
        elog
 }
 

diff --git a/dev-lang/ruby/ruby-2.2.8.ebuild b/dev-lang/ruby/ruby-2.6.3.ebuild
similarity index 62%
rename from dev-lang/ruby/ruby-2.2.8.ebuild
rename to dev-lang/ruby/ruby-2.6.3.ebuild
index dd78f968da..02ade18d11 100644
--- a/dev-lang/ruby/ruby-2.2.8.ebuild
+++ b/dev-lang/ruby/ruby-2.6.3.ebuild
@@ -1,42 +1,30 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-#PATCHSET=1
+inherit autotools flag-o-matic multilib
 
-inherit autotools eutils flag-o-matic multilib versionator
-
-MY_P="${PN}-$(get_version_component_range 1-3)"
+MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
 
-SLOT=$(get_version_component_range 1-2)
-MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
-RUBYVERSION=2.2.0
-
-if [[ -n ${PATCHSET} ]]; then
-       if [[ ${PVR} == ${PV} ]]; then
-               PATCHSET="${PV}-r0.${PATCHSET}"
-       else
-               PATCHSET="${PVR}.${PATCHSET}"
-       fi
-else
-       PATCHSET="${PVR}"
-fi
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
+RUBYVERSION=${SLOT}.0
 
 DESCRIPTION="An object-oriented scripting language"
-HOMEPAGE="http://www.ruby-lang.org/";
-SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
-                
https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2";
+HOMEPAGE="https://www.ruby-lang.org/";
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz"
 
 LICENSE="|| ( Ruby-BSD BSD-2 )"
 KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests 
socks5 ssl tk xemacs ncurses +readline"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit libressl +rdoc 
rubytests socks5 +ssl static-libs tk xemacs"
 
 RDEPEND="
        berkdb? ( sys-libs/db:= )
-       gdbm? ( sys-libs/gdbm )
+       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 )
@@ -46,56 +34,54 @@ RDEPEND="
                dev-lang/tcl:0=[threads]
                dev-lang/tk:0=[threads]
        )
-       ncurses? ( sys-libs/ncurses:0= )
-       readline?  ( sys-libs/readline:0= )
        dev-libs/libyaml
-       virtual/libffi
+       virtual/libffi:=
+       sys-libs/readline:0=
        sys-libs/zlib
-       >=app-eselect/eselect-ruby-20141227
-       !<dev-ruby/rdoc-3.9.4
-       !<dev-ruby/rubygems-1.8.10-r1"
+       >=app-eselect/eselect-ruby-20171225
+"
 
 DEPEND="${RDEPEND}"
 
 BUNDLED_GEMS="
-       >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
-       >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
-       >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
+       >=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_ruby22]
-       >=dev-ruby/json-1.8.1[ruby_targets_ruby22]
-       >=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
-       rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
+       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-5.1.0[ruby_targets_ruby26] )
        xemacs? ( app-xemacs/ruby-modes )"
 
 src_prepare() {
-       epatch "${FILESDIR}/${PN}-1.9.1-prefix.patch"
-
-       EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
-               epatch "${WORKDIR}/patches"
+       # 005 does not compile bigdecimal and is questionable because it
+       # compiles ruby in a non-standard way, may be dropped
+       eapply "${FILESDIR}"/2.6/010*.patch
 
-       # We can no longer unbundle all of rake because rubygems now depends
-       # on this. We leave the actual rake code around to bootstrap
-       # rubygems, but remove the bits that would cause a file collision.
        einfo "Unbundling gems..."
        cd "$S"
-       rm -rf \
-               {bin,lib}/rake lib/rake.rb man/rake.1 \
-               bin/gem || die "removal failed"
        # 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 gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
+       # 539700.
+       rm -fr gems/* || die
 
-       # Fix a hardcoded lib path in configure script
-       sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
-               configure.in || die "sed failed"
+       einfo "Removing bundled libraries..."
+       rm -fr ext/fiddle/libffi-3.2.1 || die
 
        # Fix hardcoded SHELL var in mkmf library
-       sed -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" -i lib/mkmf.rb
+       sed -i -e "s#\(SHELL = \).*#\1${EPREFIX}/bin/sh#" lib/mkmf.rb
+       # avoid symlink loop on Darwin (?!)
+       sed -i -e '/LIBRUBY_ALIASES=/s/lib$(RUBY_INSTALL_NAME).dylib//' \
+               configure.ac || die "sed failed"
+
+       eapply_user
 
        eautoreconf
 }
@@ -128,9 +114,6 @@ src_configure() {
        use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
 
        # Determine which modules *not* to build depending in the USE flags.
-       if ! use readline ; then
-               modules="${modules},readline"
-       fi
        if ! use berkdb ; then
                modules="${modules},dbm"
        fi
@@ -140,9 +123,6 @@ src_configure() {
        if ! use ssl ; then
                modules="${modules},openssl"
        fi
-       if ! use ncurses ; then
-               modules="${modules},curses"
-       fi
        if ! use tk ; then
                modules="${modules},tk"
        fi
@@ -160,18 +140,25 @@ src_configure() {
                --disable-dtrace \
                --with-out-ext="${modules}" \
                $(use_with jemalloc jemalloc) \
+               $(use_enable jit jit-support ) \
                $(use_enable socks5 socks) \
                $(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} \
                --with-readline-dir="${EPREFIX}"/usr \
                --enable-option-checking=no \
                || die "econf failed"
+
+       # Makefile is broken because it lacks -ldl
+       rm -rf ext/-test-/popen_deadlock || die
 }
 
 src_compile() {
-       emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
+       emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" 
MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" || die "emake failed"
 }
 
 src_test() {
@@ -197,6 +184,7 @@ src_install() {
        # 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
@@ -204,21 +192,27 @@ src_install() {
        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}"
+       
DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}"
        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
+       export LD_LIBRARY_PATH DYLD_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}" install || die "make install failed"
+       emake V=1 DESTDIR="${D}" GEM_DESTDIR=${gem_home} install || die "make 
install failed"
 
-       # Remove installed rubygems copy
+       # 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"
+       rm -rf "${ED}/usr/bin/"{bundle,bundler,ri,rdoc}"${MY_SUFFIX}" || die 
"rm rdoc bins failed"
 
        if use doc; then
-               make DESTDIR="${D}" install-doc || die "make install-doc failed"
+               emake DESTDIR="${D}" GEM_DESTDIR=${gem_home} install-doc || die 
"make install-doc failed"
        fi
 
        if use examples; then
@@ -243,7 +237,7 @@ pkg_postinst() {
 
        elog
        elog "To switch between available Ruby profiles, execute as root:"
-       elog "\teselect ruby set ruby(21|22|...)"
+       elog "\teselect ruby set ruby(23|24|...)"
        elog
 }
 

Reply via email to