diff options
Diffstat (limited to 'dev-lang/ruby')
25 files changed, 1831 insertions, 190 deletions
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index eedb6bf421f3..fd8d1ce70fd4 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -1,32 +1,41 @@ -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 -AUX 3.0/900-musl-coroutine.patch 842 BLAKE2B 21b58911e2c020ed956a837f006b20f30a123f96a52b19c62093f9d9fabb2f812fc3de8539c67a1b9aa4d106d5b7b2e91729e7aba030ebbdc67b1b3f590bf560 SHA512 ba292e5465c09df675fef34a77bbf4e16ebd807d2e5174d0e3f94be26e0694ea84dc46ee25de2d3b882b906779f0d08a173ee4c708f20b4f7f1032a238d8896c -AUX 3.0/901-musl-stacksize.patch 945 BLAKE2B 7187ee4c73fb4a9ec00b32a02a176863d88437abae60c20955f28baf939aa76daee7d8accfa5b35c8ae857c25b243d57d719e7542a20439b1eb5952b319fa383 SHA512 5db3e96891498aee8f97f0c5ffe0633c6554b8d8a4975fd73f838ebac1ceea248d18aa4262c2b865b7ca15e9d293d482f7323565ed6ae47ed632cb8a044976e6 -AUX 3.0/902-hppa-pthread-stack-size.patch 1690 BLAKE2B 679a69e08e7dcf9888a99cfbfef23139c5895be30e293f4df8cf20c16923498f2cc1f0355afbdd2ec3191131925bac48dbb4812c1e83f45fd85349970dea5bcc SHA512 d55e21b5d2fd914dc014db4a82aace55b114826825681f7c01f72813d6043a1c987dd2b7749bce46eb1a9f88dfe170a2cedb710b155f2c4fdb386499067d69c0 AUX 3.1/001-socksocket-fix.patch 457 BLAKE2B cf3e15858481cdaa48be2cb3685bed663d9de792c743f6ef07ea5d2be214d630ee9bd70c1b6958110516d69a1889fdc4cf26676e52c55d4d530588b8274f962e SHA512 77381cb3c8d4a87a5ae06966d5dd00a38ea07148ed2feacb883e1d041d85ae0a6d64b30fd213f2ac0b1a07e3722f0e724cd0ec8414e74dc4de8844d849584b00 AUX 3.1/010-default-gem-location.patch 715 BLAKE2B 1a3b0a3479210f6bafe89bfea4580ebcf44bb5c42b72a244dee9fa53371c095d6c8ff39feb58296518779b5841647ed89732bed33c542ad24d5b93ba97097cd6 SHA512 e0d0ebfc6de8dfb81cee309f0d1b7a9ccf64617ea16ad6d8d3ea715b29fb7b3bb6d962072503eee7125ffc1e5ba53035453e887935e681de3d35df279d7c0dc8 AUX 3.1/011-default-gem-location.patch 689 BLAKE2B 754bb18d8d028e763cc4e91e5a0a543beee807d0dd9d68e3bef52beafd2a28896372e20e5b9ee9fd6556323f7369f30a0c65d676e5de869bb81f978b6f7e655b SHA512 71e9ec7e0e6353cc4b973ed6dbe3c12c7784173705dc17a2e772f653aa592f2252749955f7957aa7526071eceb927711ef9055430ed3671025e35f57898ca754 +AUX 3.1/012-test-readline-without-tty.patch 1307 BLAKE2B 6aeea4229e36aef75d9e56aa4d0eb65f3b95df1fb861953d63d4e00bc0f9c57aead2cfc5a68d3f0d3f8400dfe8508161a8b5b8320221d160a871aa804d52f2b5 SHA512 813bf292fe132dd52f2c11a530e09e5c58547fd146bca2509b212c175b4359d98e6464709b5693656db935bf0ea27c8846d7510c4327bd79a419c1ff6fbd7007 +AUX 3.1/013-test-rlimit-constants.patch 4870 BLAKE2B 419fdd0df27467f651c5cbcdd4fd26a150d36bd9901efbd541e16e6fc4cd3bd036155b96e5addf55ff02b5a28e3a68d4fe24e64d6dc886e2912fff341a7dfde6 SHA512 0f00414bfba7d4e18ba86afee40dd955d65459b41d969cad6a49e91ae8a4d8995fdfce567dea68d2cd15134a470a00bf9de7b006de9c49e78bcfc8af6bdb7665 +AUX 3.1/020-arm-readline-test.patch 1289 BLAKE2B d441f04a6a11230df89340560f23897926d1982d46dffd5378c92956f07b9c5a062413484a62b2ba6b799e73d2008f5d19c549a864d61c2fb77b5de2c7a0db07 SHA512 7023b78255229ae124415274bb57077913a6a1f4667494491c00dd8933492f763dfb803eedf3a72251d2362d54eaa6723af6c68b84583fbdee21320cb6b7c66d AUX 3.1/901-musl-stacksize.patch 945 BLAKE2B 7187ee4c73fb4a9ec00b32a02a176863d88437abae60c20955f28baf939aa76daee7d8accfa5b35c8ae857c25b243d57d719e7542a20439b1eb5952b319fa383 SHA512 5db3e96891498aee8f97f0c5ffe0633c6554b8d8a4975fd73f838ebac1ceea248d18aa4262c2b865b7ca15e9d293d482f7323565ed6ae47ed632cb8a044976e6 AUX 3.1/902-hppa-pthread-stack-size.patch 1690 BLAKE2B 3d402e1f2e0dddc1557ed78d802516ec3f8e122b046fc153a702090aa3c5cac1ec4005fee4cf2e5c28c4be6e3183c5a12d4fb3a3c9fc07ea3f068cefd12b8b2b SHA512 87caf7fc61cd94ec45f68a799ab87caa740a2d0fa8eef60b1fa9f33f95586ecfaed7ed1466f7feeeed725d9b92d40a730e0835bf08f9eba9505790ed84b42125 AUX 3.2/010-default-gem-location.patch 356 BLAKE2B f44459799fff80c7f14e5e7d674ee9ed22863cdb84838e0fad55a66f615fa91e3e4de30377c04a385927feea67c6046c837eb7a647fbe162685309ea3f9ea420 SHA512 894075663d409a117ad94abd63d6562c90b87a725ef56d02ad7c187532b99a56128be2f5f64d0e72763d1c14213707de84c920415107df875218489796bc4a5a AUX 3.2/011-arm64-branch-protection.patch 1223 BLAKE2B 57ec142850e430f51aeca7c4f70ad9bac22a2a3fdd99616d8718520588b0f23e07f4c0ddfacc02edb9349fb0af38fcfc5b1b288dddedd4f6918511a5398980f3 SHA512 6fff70749a8b3eb6cd1b05a4b667613ead00097ecf4674fad710f3c785c97d55989a703569f0a041f1d75b82dbeb8f80bb9eef9b581e4ef3dd1c9907f6cc2634 +AUX 3.2/013-test-rlimit-constants.patch 4870 BLAKE2B 419fdd0df27467f651c5cbcdd4fd26a150d36bd9901efbd541e16e6fc4cd3bd036155b96e5addf55ff02b5a28e3a68d4fe24e64d6dc886e2912fff341a7dfde6 SHA512 0f00414bfba7d4e18ba86afee40dd955d65459b41d969cad6a49e91ae8a4d8995fdfce567dea68d2cd15134a470a00bf9de7b006de9c49e78bcfc8af6bdb7665 +AUX 3.2/020-arm-readline-test.patch 1418 BLAKE2B d5d8b5cad404b068b065757fe8c9cb9c5521fe2ef52dc90b8e3d9781e717309d4082d8beb3360cc46fd2e4cb7a41209ace3fd0bb0c49da6775aff53fc4f452b8 SHA512 402ae9c27f4a3d9e153c1a01e6cd7bb6be79833eed90206a1fbef76198122cff70e8e52a3e6e4b1794e57151113017fcba5f6f1fc5fc77c91a2d96a6dcd27c0d AUX 3.2/901-musl-stacksize.patch 749 BLAKE2B 422d53ef7fc1e76bd7466ff67da7cefd3665282ce0e29d16e2455e8f2bcbe081c0b9d31119eed6d6b53f6200fa72d623e9c04e0ebd6594397cf1dad344e8049a SHA512 f9ad0a50a0672a88b89cba9c452c090e0fe47fe41c640951b1b14970e1219a27c9ef3a1b53650b135d607830ae7a09b6a8916e45263415b58122c07262e90b1b AUX 3.2/902-hppa-pthread-stack-size.patch 1690 BLAKE2B 84c8478a69e108c68f96eeb0f36b1f94e069193ce124c0ca5c6143c0c9a2f0c62c7927a1a61a85270f449d03b4c6f5bd735e02ce1da1df0749602e655f177778 SHA512 d871b1c0a5d58bb197def0e00310e38fc145520dbbd1245079b2ebab0f89878f21a22f27c388fe2a7557244db28f0acb97edddf9bdf4adbeb00327e01c5215a6 AUX 3.3/010-default-gem-location.patch 356 BLAKE2B f44459799fff80c7f14e5e7d674ee9ed22863cdb84838e0fad55a66f615fa91e3e4de30377c04a385927feea67c6046c837eb7a647fbe162685309ea3f9ea420 SHA512 894075663d409a117ad94abd63d6562c90b87a725ef56d02ad7c187532b99a56128be2f5f64d0e72763d1c14213707de84c920415107df875218489796bc4a5a AUX 3.3/011-arm64-branch-protection.patch 1223 BLAKE2B 57ec142850e430f51aeca7c4f70ad9bac22a2a3fdd99616d8718520588b0f23e07f4c0ddfacc02edb9349fb0af38fcfc5b1b288dddedd4f6918511a5398980f3 SHA512 6fff70749a8b3eb6cd1b05a4b667613ead00097ecf4674fad710f3c785c97d55989a703569f0a041f1d75b82dbeb8f80bb9eef9b581e4ef3dd1c9907f6cc2634 +AUX 3.3/012-mkdir-path.patch 334 BLAKE2B 13410c0946849ac2bd983c86854846cd50112093c0a196337933c4fd3859d975e3e24a21936682e4a579e8c4fd7b9a8ac8e21dda814b6d204e6a9e14405f6e1c SHA512 6a2276a4749bef46dcdfe4326f8995a746fd5547d62584f77533fa2117a3a830ea816b52c823eb63bd101fca507c179aa469f2b0529a24b4379bfafaf83823f7 +AUX 3.3/013-test-rlimit-constants.patch 5271 BLAKE2B 600482bc229bae2cc5cda7e9ceb74554d3c2bf4abf69ef79df12e0bead26a929a5806effbd111f44e9ec05bd25166e8d7e9fa879ab090add9ce0e4e40980f4fa SHA512 98173a270849ea1648f8fb1cff42c62f38d39851de0872cf225264ea6917d829ccf957743fe51c125a545dbc3372ed8bb1472139f0f230fb1ad5cde2c3562318 AUX 3.3/901-musl-stacksize.patch 749 BLAKE2B 422d53ef7fc1e76bd7466ff67da7cefd3665282ce0e29d16e2455e8f2bcbe081c0b9d31119eed6d6b53f6200fa72d623e9c04e0ebd6594397cf1dad344e8049a SHA512 f9ad0a50a0672a88b89cba9c452c090e0fe47fe41c640951b1b14970e1219a27c9ef3a1b53650b135d607830ae7a09b6a8916e45263415b58122c07262e90b1b AUX 3.3/902-hppa-pthread-stack-size.patch 1690 BLAKE2B 84c8478a69e108c68f96eeb0f36b1f94e069193ce124c0ca5c6143c0c9a2f0c62c7927a1a61a85270f449d03b4c6f5bd735e02ce1da1df0749602e655f177778 SHA512 d871b1c0a5d58bb197def0e00310e38fc145520dbbd1245079b2ebab0f89878f21a22f27c388fe2a7557244db28f0acb97edddf9bdf4adbeb00327e01c5215a6 DIST ruby-3.1.4.tar.xz 15316604 BLAKE2B 5d771c267451c05ae192991976957d43d1131e652ac5a90a8dfff9deba97cf6b139d0113f5d2ed44225a545aa79a1c732555de1efc83d1010d097ec35f7e92dd SHA512 a627bb629a10750b8b2081ad451a41faea0fc85d95aa1e267e3d2a0f56a35bb58195d4a8d13bbdbd82f4197a96dae22b1cee1dfc83861ec33a67ece07aef5633 DIST ruby-3.1.5.tar.xz 15293020 BLAKE2B 5d886f45f2a27dbe7682f5afc234d4992ffc5006cfaa98f23c29e1fff0323c277ffec827c71ee75885b4f2cf0bf7baed4ea239ae32283578213821e597bf51da SHA512 a9883f4d074825bb1f54ef3429a9a71341274bd2de1aa8ea32bce19b6b9c1bac5e5dc4c34a92b8e7caa73ba71d7ed7c546a6fec6f1fd3d8986974dce214f6d49 +DIST ruby-3.1.6.tar.xz 15273916 BLAKE2B feb697b8d01ebde0042e679b814c4c95481c6afa607db46ad1511fb0d1a555d7800725e847e90dd9944ef42575c5205cf711025a165a65b6070743701631929c SHA512 a3159648706d6d11ce9613201141e884b3accc69bf928c756de8a8f2b71d219886e91435d30cf2c30e85af31f87801138e10106344766100f1b80662c7244652 DIST ruby-3.2.3.tar.xz 15163960 BLAKE2B e2cfa215b2cb910bac5f3b58edcdece91b21ffcfb6b4c183eec0c8502c320b78e7a8732c393b6e6a38dc9cfd81e129c00562d9be45f0deb36306ac81f96dcdc1 SHA512 d2a1897c2f4e801a28acb869322abfee76775115016252cecad90639485ed51deda1446cb16edb387f10a2e188602d646ef9b008b57f27bd745071277c535f3b DIST ruby-3.2.4.tar.xz 15175656 BLAKE2B 9c2300a958b03528d51f0d74a069c8c538ca4009835d55377509a000bcfb43893a8a80d8fda57011e77c72e6283cb259281d5ba7b37444546e49f2a9ad515cf3 SHA512 fb0af37be4b6ad7b98ab9f8a508952238ee68b5828e3926331e4db52e2ebc1e6046f31114069322db0cd3bea7c9b82ace91c8564573ddcfa1f960877b237dbff -DIST ruby-3.3.0.tar.xz 16345456 BLAKE2B 09ef6fb4b2768118207e7a9ece17c5c62c9f596b1c13ac6199245889fcc5d25f03336831ec3bf1367a460a8a26c4426c32bcd576b0da8bdafc90301032b4d2f0 SHA512 7959c5753bfa0bfc4d6d74060869aabbe9815c1c97930659da11b917ee0803ddbbd80e869e00c48b8694b4ba48709c3b6493fd045568e36e902616c35ababf01 -DIST ruby-3.3.1.tar.xz 16350792 BLAKE2B f3591d2420edd8c1d5b365d1442fcc07c014e402478dce01a80b81c16c3c7083bcd3e9e9aa0f8d586cd482f0f18eb64ad813ea31755f5d12b137ce03b1a0fa4c SHA512 c58e9be9b5ab48191fbf7d67e13f0ec42ee71ed338170e0f7b246708e9cfc617ce65098f5ce7ab32d4305e785642d3e44253462104d5b9c4abcb1a4113f48347 -EBUILD ruby-3.1.4-r3.ebuild 8352 BLAKE2B f3a592bd500c5319ca351544666a87446ad794158e3271076b8bcbec1e827ab8d9f7e70e1a0c4548e203d3a758a29e0d790285ff48d99b69816c6107d0d03bdf SHA512 e191ef30979b3fb967379345474609382629e555040b388c92fe54e45b3afd097b1e7c9f4bbbf611b740d799cd1c26973a6aec60dcc35c54c9182f3911a47485 -EBUILD ruby-3.1.4-r5.ebuild 8504 BLAKE2B 2ee7c9aef7c65d9601cd31918addaa7a42bf806d08237f75e894db1e564e6fc282892c2c517badf366cd0584debcb51d0c754353af656d26bdc94389d5ea7e01 SHA512 1fb62ce8b8fc7288a954abe23af104ce7bc9124c157f4dcf68fd499d7f103bc8b396fdb5089431b4cf7c76c9c7adabe11f3a4f9b172c1d12c14165ec2de8d306 -EBUILD ruby-3.1.5.ebuild 8595 BLAKE2B 3956931b74ea380a9e5b9b8215b03d1a4337e6cdddac8386d112742bb6657599a6395995ea91b30d7b785e42b00abb553062371034e18010773a6def687b2569 SHA512 c66eb7a8a0ef8fba548605430b99d796cf83dad26810c53e2cdd557c09387c386c4ecb5e7e436e54fc91bd9969b8ed37fc9135b133cee634b74960035daf1f4f -EBUILD ruby-3.2.3.ebuild 9534 BLAKE2B 8383353bf02c2abba8dcf67cbdffcc197d085fce1c961c56d0d493ccc840f0970efb105b916a28d590c6f6caff42e654651361f685bce545c969082981cbd25f SHA512 78f8270db8c06b960a84b03b20b31f3aacc455905637e8cf3e040724d1c39b43aac19e296205902cf6c958e5c64ed0843e6854ae9997e612598aea6b3965c6d0 -EBUILD ruby-3.2.4.ebuild 9539 BLAKE2B 220d080210da68223c34bb36cf27f4ba67abce2aeb0124d9630e87db495f0083cec8149caf6103a62ad4bc5d5ce79aa2f484057dc5a450d9c222ac238caefa0c SHA512 e4ac1ff43795e34937d245bc7eab76cd02f2760d0e36d5032929e58fbdfa98dd260c39a02740ed5fd6e70c10fcca9289114110f1e3da00182e6be5adcb8b9baf -EBUILD ruby-3.3.0-r2.ebuild 9312 BLAKE2B 547e2853e5a53f762d8ac6abb7c721ea3221d645d3717354d8c92059dd3417f71611e104b2c1c0fadbd14b86174312483e83768ebbd70fa787b423ce59deba9c SHA512 7e250ef083f3f5f5bcd12db3080eedbd99dc6d7033da8846306d0f4a4ce6763baaabbf25171d2b69830f69a52bbdbd3a11b31f3849af860e6b6d8001502ea97e -EBUILD ruby-3.3.1.ebuild 9269 BLAKE2B 3f9971414512fb66be404c5a7ed5553e8b581b5f19874d7ab733d5d6aad3cca489163764d3bc2aa81a6f5d2981026290e4a197cf4b3712218741b4aede3268ee SHA512 44419e0bac61f0e9215e4c131ede309b08ef3d021c476899c0adadf35d54d661e86beb75a5e80a95dc7915131b748823e9ea5b53af3f8bce6fb7ac11c178690c -MISC metadata.xml 504 BLAKE2B ca7743b107a6825dd029e0798cf1b0d048e3ce730382245565692e9242d09553db2c09edd1d09195602d9d96167c8606f3e7ddd5a27e1473eb9e4fbbc9074d1d SHA512 c2cf0a52fe03067cc09edc660d981af2465e4a733e53ad601d0e6377fa61072a60be4ec916cae94023328600e52a29f18621b47e839bddc897fa00db44feb9b1 +DIST ruby-3.2.5.tar.xz 15189072 BLAKE2B a37c92a0f751e81dcae328b8944c4ecf10f6aee4f4468d6d08bb924c9808c8556c5febb71a825dd62dbcccf56385138e6e306bf3efae3589bdf0512d16d99d1a SHA512 092348b84b513aec62e63ec10b326370d0e3d1fa3126c59c03c84f28e2d7741a4772c461b077ec6a7dac3964a20f434655729e1acd50a3438755d7ad64073305 +DIST ruby-3.3.2.tar.xz 16349500 BLAKE2B 2a474df10363555e8f0b9ad73bb854ad34f3d1485b8bdde833c999b20bc2c17282d2097d887d10f454bbd4dfdf08f04bb644a7e41d0b4a0ff0e9eb144339b5e8 SHA512 70dd8eb933956f894c52a8ede42e8ee74ff0e062bd8134a0bfb6bffc83a2848a658b62c8df5530b4dd64087b2d5373909c48917528facb1e6f4e99e79b6ad449 +DIST ruby-3.3.4.tar.xz 16366580 BLAKE2B e10b81ad7838e3d443ce0b12b8372faebb001f00a32dc0fa1f5e37c46baae99ea714e7f2a8741f0294255312030e844f32fc5d1c3695545cf8303e85b3255f21 SHA512 b26461a13ff82a08a282f10108028bb2a2e4a28da6182a291062fc54089c6655d79c22cc69d59156f9b11cb10a17fe8c69d489343fbae123a45f03361b95c9eb +DIST ruby-3.3.5.tar.xz 16403660 BLAKE2B 4fa242ceeaf0dbf0d048b3f116f149f299c1a0ccca500a47929344da523cd3c49365381777e56546fe94003ee90ccc1f2cc957697eb82cd8beb7311b0b00287c SHA512 dd5c6a7f74854e143e0ca46b9d7c0d1983fc4886f5f733cd108345dbf4b21f61ad978ad6806e05a57b7af28fd9216dd38d7145808188bbb3695a7f3a4eda3883 +EBUILD ruby-3.1.4-r3.ebuild 8517 BLAKE2B 8a89694e604a5c61c51154246598a4f57465c6f4443ae0c103e8ee6825a6f7ad2709a6bfd3e12fc141321a5fbc7fd549ffeca7d75d4db79d564483494285f9b3 SHA512 0a422dfee5abcce9fd9c27009370c92c9ca58eeb129a2e2384eb6747f83a6e7418e0de58d562c175fea52ab7519bc2105ae64925e845fda169482b3be26cf211 +EBUILD ruby-3.1.5.ebuild 8842 BLAKE2B 322f5da3ded0e48fbb70d222d0df8a64c6c91e1445e710ddddfbb24afcbd2f4ba6ce563da93c89477efd4f940d82a182ec5e9617132c446155fda021a71ac70c SHA512 1e182e9b425f2c92fb915c89e10e745c2c06ee010dd5f4477a21a42909ac4672e8fb2600323e5c781f564f4d7377ecd997d83860a0b59294d3bc6c184291bcc1 +EBUILD ruby-3.1.6-r1.ebuild 8913 BLAKE2B e3efb05d75ac99b2f4b7b15a987e799ea949bf372eb9893d285868e3e616807479faeaf236fa7c874bbc93d2dda002ef061d97ff46ff7652158dfb3f90ee82dd SHA512 ab9f147269222231d65c92469573a1261a4ebe68a994b38c4eced06e5cb204d991a345986c31440198a96adef24e05ca905839bd218e66053c93e94bbe36fe95 +EBUILD ruby-3.2.3.ebuild 9698 BLAKE2B 63efabd9597ac2faecbe392483a2ec3d68bc3407c8d16955cd0f12fd8db0674e6f04b52fbd564a9175bd921efdf9b91e59a881777aea2d51a74dd17cdd610585 SHA512 d282987e2f1c562c23af68930adb47ea82386948838a83629149c3739f0a0401a1910ac654def3b28d7d91d7801605a8f69d785e8364cdae9f21ac32b9c63196 +EBUILD ruby-3.2.4-r1.ebuild 9892 BLAKE2B 696d341ade6acdd7bd06976cab37c3d1d80baf529ef8f2391ae1bb9ba1425177d3aed10378dbb1a450a391b6682a3b5756ddfc51d852947253d1475995f24388 SHA512 0563553a5d2a15e2d3eebbe466f50e59840cfa60431840208340bdc0f03c9b239ba4e20e2bb690b176d1ff7475834ceb7c913a7e010ebe6105b5d5630aaa2039 +EBUILD ruby-3.2.4.ebuild 9742 BLAKE2B 174541eaf3f3d584a0ab60788bdff59b2aac6d20d26ee5cc4079a6e4c5dd5860ff05bc4d94d86fc9a669aaa88cc4e0fea70e3b0fd4a25881e2e5039f355224cc SHA512 00210ee3cd7b54cfd8122b77bccc7c6dde0c42fe07246e26918f5c343a8ebf893c375f08ca90042774c63121c20d1b3cb1de795f6956a29aa0e6691cd0326cef +EBUILD ruby-3.2.5.ebuild 9427 BLAKE2B 68424faef3d2945d557bf74d17e54d2bc10d6e854b613e25d53dc5e1ab7699a120942e8fe65806e8952886d71df20a3b2c3c2cc3d1b0b5051236619a2f11ca5e SHA512 6cb04c9fc32b4fe44a300f51d854d51805a41cc49eb0294b287cc0e50be156a12939352a3d5ce77fb00843f456870545c791c064c6dea0d3c7721ca65008482a +EBUILD ruby-3.3.2.ebuild 9433 BLAKE2B 4e3f6bf6c7be98a7f5f8b65ec74378001ddc3802a0ab700539a85ac7d687b755728b66623513aa1a0a0a51daf4d4072bb1f6e0122cdb10c4898e15194340a25f SHA512 f621f16dab0d1982ff20f6a312c1113ea73179b3f3e1d0cc2c1da76a62bbd28caa5a5b7622705ccf1fe45551b84749878a6839309a7be2d94a522ec6a57fac73 +EBUILD ruby-3.3.4-r1.ebuild 9280 BLAKE2B d97425d417d9a5b6b3af2a1da9fc55b80d8830eb7dc28365cc1c815d6bb2339ab92b9b427f993b2934758081f743d2754defd03284c36e4e1003edfe22f6bbd2 SHA512 6e8d50eaa87948d36f08f34bf65c92b8f7ff31fe8458aa17181725785a7eed2c98cb52346e6256a060124c99b8f39cd889298b94875b8feacefa0e2931914388 +EBUILD ruby-3.3.4.ebuild 9704 BLAKE2B 73d65295cfde3283d34957db55fc2792c98e3504ec67c9e67ca85f1baf95070a0e46c498c273cfbca82bb7dea4e0c842ffb4a878edc56dcadb4a1bbacd8f7fb9 SHA512 b6006b606f77c7d524ae66b15fe46d186d79e1c15175359ed0e672ce725589e39bd3c24687d282249200cfe4a1d1677c931a02bd346a742ddca475eb393599d9 +EBUILD ruby-3.3.5.ebuild 9280 BLAKE2B d97425d417d9a5b6b3af2a1da9fc55b80d8830eb7dc28365cc1c815d6bb2339ab92b9b427f993b2934758081f743d2754defd03284c36e4e1003edfe22f6bbd2 SHA512 6e8d50eaa87948d36f08f34bf65c92b8f7ff31fe8458aa17181725785a7eed2c98cb52346e6256a060124c99b8f39cd889298b94875b8feacefa0e2931914388 +MISC metadata.xml 504 BLAKE2B 49be2bb1dba034b23a8294cca0e5419099b487973a43db31c0edc4b9a2a08eb1b54437b0c7e6a9e6d8a5c0145cd73464f830ec04ca62540416c32b2d094cdd63 SHA512 e9991c588874e36f6a0abb12125bcd3f2b1e787df62d9f7089053959286b56676a9f35c7e82116274f169bfa22359be8df59fca6454be559e7669d2e78dc4c22 diff --git a/dev-lang/ruby/files/3.0/001-socksocket-fix.patch b/dev-lang/ruby/files/3.0/001-socksocket-fix.patch deleted file mode 100644 index 1a79e25491cc..000000000000 --- a/dev-lang/ruby/files/3.0/001-socksocket-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 060579b4f339..000000000000 --- a/dev-lang/ruby/files/3.0/010-default-gem-location.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- 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/files/3.0/900-musl-coroutine.patch b/dev-lang/ruby/files/3.0/900-musl-coroutine.patch deleted file mode 100644 index a323cdd6e770..000000000000 --- a/dev-lang/ruby/files/3.0/900-musl-coroutine.patch +++ /dev/null @@ -1,28 +0,0 @@ -Adapted for Gentoo version 3.0.2 - -From b570e7de87aaad8c903176d835e8124127f627b3 Mon Sep 17 00:00:00 2001 -From: Andrew Aladjev <aladjev.andrew@gmail.com> -Date: Sat, 26 Sep 2020 12:58:06 +0300 -Subject: [PATCH] fixed default coroutine selection for musl - ---- - configure.ac | 5 ++++- - coroutine/copy/Context.c | 2 ++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index ab5d532c103b..084f0936c006 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2364,7 +2364,10 @@ - rb_cv_coroutine=copy - ], - [ -- rb_cv_coroutine=ucontext -+ AC_CHECK_FUNCS([getcontext swapcontext makecontext], -+ [rb_cv_coroutine=ucontext], -+ [rb_cv_coroutine=copy; break] -+ ) - ] - ) - AC_MSG_RESULT(${rb_cv_coroutine}) diff --git a/dev-lang/ruby/files/3.0/901-musl-stacksize.patch b/dev-lang/ruby/files/3.0/901-musl-stacksize.patch deleted file mode 100644 index e5fcfce2195e..000000000000 --- a/dev-lang/ruby/files/3.0/901-musl-stacksize.patch +++ /dev/null @@ -1,26 +0,0 @@ -musl has a conservative stacksize, as compared to glibc, so treat it -like other systems with such stacksize - -diff --git a/thread_pthread.c b/thread_pthread.c -index 951885ffa0..e2d662143b 100644 ---- a/thread_pthread.c -+++ b/thread_pthread.c -@@ -721,7 +721,7 @@ ruby_init_stack(volatile VALUE *addr - { - native_main_thread.id = pthread_self(); - --#if MAINSTACKADDR_AVAILABLE -+#if MAINSTACKADDR_AVAILABLE && !(defined(__linux__) && !defined(__GLIBC__)) - if (native_main_thread.stack_maxsize) return; - { - void* stackaddr; -@@ -1680,7 +1680,7 @@ ruby_stack_overflowed_p(const rb_thread_t *th, const void *addr) - - #ifdef STACKADDR_AVAILABLE - if (get_stack(&base, &size) == 0) { --# ifdef __APPLE__ -+# if defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__)) - if (pthread_equal(th->thread_id, native_main_thread.id)) { - struct rlimit rlim; - if (getrlimit(RLIMIT_STACK, &rlim) == 0 && rlim.rlim_cur > size) { - diff --git a/dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch b/dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch deleted file mode 100644 index 7978566afc7e..000000000000 --- a/dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch +++ /dev/null @@ -1,54 +0,0 @@ -https://bugs.gentoo.org/701494 - -From 794b6fce94343c4f9dceca5d08224b0fb364fde8 Mon Sep 17 00:00:00 2001 -From: Sam James <sam@gentoo.org> -Date: Fri, 7 Apr 2023 11:46:12 +0100 -Subject: [PATCH] thread_pthread: Grow main_stack if required (fixes tests on - HPPA) - -On HPPA, test_insns.rb fails (along with various Ruby gems) with -'stack level too deep (SystemStackError)'. This turns out to be because HPPA -defaults to a small(er) stack. - -With this change, most of Ruby's test suite now passes on HPPA. - -Thanks to both Dave and Helge for the investigation and coming up with the -patch. - -Bug: https://bugs.gentoo.org/701494 -Bug: https://bugs.debian.org/881773 -Bug: https://bugs.debian.org/881772 (for PPC64) -Bug: https://github.com/rack/rack/issues/1640 -Thanks-to: John David Anglin <dave.anglin@bell.net> -Thanks-to: Helge Deller <deller@gmx.de> -Signed-off-by: Sam James <sam@gentoo.org> ---- a/thread_pthread.c -+++ b/thread_pthread.c -@@ -681,8 +681,22 @@ size_t pthread_get_stacksize_np(pthread_t); - # define MAINSTACKADDR_AVAILABLE 0 - # endif - #endif --#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) --# define get_main_stack(addr, size) get_stack(addr, size) -+#if MAINSTACKADDR_AVAILABLE -+static int get_stack(void **, size_t *); -+static int -+get_main_stack(void **addr, size_t *size) -+{ -+ int ret = get_stack(addr, size); -+ -+#ifdef __hppa__ -+ /* On some architectures, the initial stack size may be too small, but fortunately, -+ it's growable. Bump it up to the minimum needed if it is too small. */ -+ if (*size < RUBY_VM_THREAD_VM_STACK_SIZE) -+ *size = RUBY_VM_THREAD_VM_STACK_SIZE; -+#endif -+ -+ return ret; -+} - #endif - - #ifdef STACKADDR_AVAILABLE --- -2.40.0 - diff --git a/dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch b/dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch new file mode 100644 index 000000000000..99319377ae45 --- /dev/null +++ b/dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch @@ -0,0 +1,33 @@ +From 47988e63d65098ce1e6484f03ae5e2ca42bd7963 Mon Sep 17 00:00:00 2001 +From: Sorah Fukumori <her@sorah.jp> +Date: Sat, 8 Jan 2022 14:03:02 +0900 +Subject: [PATCH] test_readline#test_without_tty: Use EnvUtil.rubybin + +`ruby` is not always available in certain build environments and +configure options. Choose appropriate command line using EnvUtil. +--- + test/readline/test_readline.rb | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb +index be338c6c0d484e..be6e65f32ef22d 100644 +--- a/test/readline/test_readline.rb ++++ b/test/readline/test_readline.rb +@@ -6,6 +6,8 @@ + require "open3" + + module BasetestReadline ++ RUBY = EnvUtil.rubybin ++ + INPUTRC = "INPUTRC" + TERM = "TERM" + SAVED_ENV = %w[COLUMNS LINES] +@@ -839,7 +841,7 @@ def test_without_tty + loader = "use_lib_reline" + end + if loader +- res, exit_status = Open3.capture2e("ruby -I#{__dir__} -Ilib -rhelper -e '#{loader}; Readline.readline(%{y or n?})'", stdin_data: "y\n") ++ res, exit_status = Open3.capture2e("#{RUBY} -I#{__dir__} -Ilib -rhelper -e '#{loader}; Readline.readline(%{y or n?})'", stdin_data: "y\n") + assert exit_status.success?, "It should work fine without tty, but it failed.\nError output:\n#{res}" + end + end diff --git a/dev-lang/ruby/files/3.1/013-test-rlimit-constants.patch b/dev-lang/ruby/files/3.1/013-test-rlimit-constants.patch new file mode 100644 index 000000000000..998c839808aa --- /dev/null +++ b/dev-lang/ruby/files/3.1/013-test-rlimit-constants.patch @@ -0,0 +1,147 @@ +From bea20365f43ee115ea6219c7113647eed3d9e342 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Wed, 7 Aug 2024 13:15:00 -0400 +Subject: [PATCH] Replace specific constant tests with just type checks + +As detailed in the attached issue, these constants can and do vary e.g. +between architectures on Linux. Hardcoding and asserting that they are +equal to specific values pretty much defeats the purpose of building +these in at compile time. Instead, simply assert that they exist and +are integers. + +Fixes: https://github.com/ruby/spec/issues/1150 +--- + core/process/constants_spec.rb | 116 ++++++++++++++++++++------------- + 1 file changed, 69 insertions(+), 47 deletions(-) + +diff --git a/core/process/constants_spec.rb b/core/process/constants_spec.rb +index 616c54b8e..57cacadef 100644 +--- a/spec/ruby/core/process/constants_spec.rb ++++ b/spec/ruby/core/process/constants_spec.rb +@@ -2,64 +2,81 @@ + + describe "Process::Constants" do + platform_is :darwin, :netbsd, :freebsd do +- it "has the correct constant values on BSD-like systems" do +- Process::WNOHANG.should == 1 +- Process::WUNTRACED.should == 2 +- Process::PRIO_PROCESS.should == 0 +- Process::PRIO_PGRP.should == 1 +- Process::PRIO_USER.should == 2 +- Process::RLIM_INFINITY.should == 9223372036854775807 +- Process::RLIMIT_CPU.should == 0 +- Process::RLIMIT_FSIZE.should == 1 +- Process::RLIMIT_DATA.should == 2 +- Process::RLIMIT_STACK.should == 3 +- Process::RLIMIT_CORE.should == 4 +- Process::RLIMIT_RSS.should == 5 +- Process::RLIMIT_MEMLOCK.should == 6 +- Process::RLIMIT_NPROC.should == 7 +- Process::RLIMIT_NOFILE.should == 8 ++ it "are all present on BSD-like systems" do ++ %i[ ++ WNOHANG ++ WUNTRACED ++ PRIO_PROCESS ++ PRIO_PGRP ++ PRIO_USER ++ RLIM_INFINITY ++ RLIMIT_CPU ++ RLIMIT_FSIZE ++ RLIMIT_DATA ++ RLIMIT_STACK ++ RLIMIT_CORE ++ RLIMIT_RSS ++ RLIMIT_MEMLOCK ++ RLIMIT_NPROC ++ RLIMIT_NOFILE ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :darwin do +- it "has the correct constant values on Darwin" do +- Process::RLIM_SAVED_MAX.should == 9223372036854775807 +- Process::RLIM_SAVED_CUR.should == 9223372036854775807 +- Process::RLIMIT_AS.should == 5 ++ it "are all present on Darwin" do ++ %i[ ++ RLIM_SAVED_MAX ++ RLIM_SAVED_CUR ++ RLIMIT_AS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :linux do +- it "has the correct constant values on Linux" do +- Process::WNOHANG.should == 1 +- Process::WUNTRACED.should == 2 +- Process::PRIO_PROCESS.should == 0 +- Process::PRIO_PGRP.should == 1 +- Process::PRIO_USER.should == 2 +- Process::RLIMIT_CPU.should == 0 +- Process::RLIMIT_FSIZE.should == 1 +- Process::RLIMIT_DATA.should == 2 +- Process::RLIMIT_STACK.should == 3 +- Process::RLIMIT_CORE.should == 4 +- Process::RLIMIT_RSS.should == 5 +- Process::RLIMIT_NPROC.should == 6 +- Process::RLIMIT_NOFILE.should == 7 +- Process::RLIMIT_MEMLOCK.should == 8 +- Process::RLIMIT_AS.should == 9 +- +- # These values appear to change according to the platform. +- values = [4294967295, 9223372036854775807, 18446744073709551615] +- values.include?(Process::RLIM_INFINITY).should be_true +- values.include?(Process::RLIM_SAVED_MAX).should be_true +- values.include?(Process::RLIM_SAVED_CUR).should be_true ++ it "are all present on Linux" do ++ %i[ ++ WNOHANG ++ WUNTRACED ++ PRIO_PROCESS ++ PRIO_PGRP ++ PRIO_USER ++ RLIMIT_CPU ++ RLIMIT_FSIZE ++ RLIMIT_DATA ++ RLIMIT_STACK ++ RLIMIT_CORE ++ RLIMIT_RSS ++ RLIMIT_NPROC ++ RLIMIT_NOFILE ++ RLIMIT_MEMLOCK ++ RLIMIT_AS ++ RLIM_INFINITY ++ RLIM_SAVED_MAX ++ RLIM_SAVED_CUR ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :netbsd, :freebsd do +- it "Process::RLIMIT_SBSIZE" do +- Process::RLIMIT_SBSIZE.should == 9 # FIXME: what's it equal? +- Process::RLIMIT_AS.should == 10 ++ it "are all present on NetBSD and FreeBSD" do ++ %i[ ++ RLIMIT_SBSIZE ++ RLIMIT_AS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + diff --git a/dev-lang/ruby/files/3.1/020-arm-readline-test.patch b/dev-lang/ruby/files/3.1/020-arm-readline-test.patch new file mode 100644 index 000000000000..3bc40baf00db --- /dev/null +++ b/dev-lang/ruby/files/3.1/020-arm-readline-test.patch @@ -0,0 +1,28 @@ +From 868f873a78034016fc05d79061245695e3c372fc Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Thu, 23 May 2024 16:10:32 -0400 +Subject: [PATCH] Skip test_interrupt_in_other_thread on arm32-linux + +This is a combination of main Ruby commit +https://github.com/ruby/ruby/commit/aefc98891c42024039f19ef45bdfe93fbc590b7c +and my PR correcting the regex https://github.com/ruby/ruby/pull/10819. +Upstream Ruby requests that changes to this test go to readline-ext repo +before being backported to 3.2 branch. +--- + test/readline/test_readline.rb | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb +index 746a3a5ba1..86d3862739 100644 +--- a/test/readline/test_readline.rb ++++ b/test/readline/test_readline.rb +@@ -481,6 +481,9 @@ def test_interrupt_in_other_thread + # likewise with 32-bit userspace on 64-bit kernel + omit if /\Ax86_64-linux-(?:x32|i[3-6]686)\z/ =~ RUBY_PLATFORM + ++ # Skip arm32-linux (Travis CI). See aefc988 in main ruby repo. ++ omit "Skip arm32-linux" if /armv[0-9+][a-z]-linux/ =~ RUBY_PLATFORM ++ + if defined?(TestReadline) && self.class == TestReadline + use = "use_ext_readline" + elsif defined?(TestRelineAsReadline) && self.class == TestRelineAsReadline diff --git a/dev-lang/ruby/files/3.2/013-test-rlimit-constants.patch b/dev-lang/ruby/files/3.2/013-test-rlimit-constants.patch new file mode 100644 index 000000000000..998c839808aa --- /dev/null +++ b/dev-lang/ruby/files/3.2/013-test-rlimit-constants.patch @@ -0,0 +1,147 @@ +From bea20365f43ee115ea6219c7113647eed3d9e342 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Wed, 7 Aug 2024 13:15:00 -0400 +Subject: [PATCH] Replace specific constant tests with just type checks + +As detailed in the attached issue, these constants can and do vary e.g. +between architectures on Linux. Hardcoding and asserting that they are +equal to specific values pretty much defeats the purpose of building +these in at compile time. Instead, simply assert that they exist and +are integers. + +Fixes: https://github.com/ruby/spec/issues/1150 +--- + core/process/constants_spec.rb | 116 ++++++++++++++++++++------------- + 1 file changed, 69 insertions(+), 47 deletions(-) + +diff --git a/core/process/constants_spec.rb b/core/process/constants_spec.rb +index 616c54b8e..57cacadef 100644 +--- a/spec/ruby/core/process/constants_spec.rb ++++ b/spec/ruby/core/process/constants_spec.rb +@@ -2,64 +2,81 @@ + + describe "Process::Constants" do + platform_is :darwin, :netbsd, :freebsd do +- it "has the correct constant values on BSD-like systems" do +- Process::WNOHANG.should == 1 +- Process::WUNTRACED.should == 2 +- Process::PRIO_PROCESS.should == 0 +- Process::PRIO_PGRP.should == 1 +- Process::PRIO_USER.should == 2 +- Process::RLIM_INFINITY.should == 9223372036854775807 +- Process::RLIMIT_CPU.should == 0 +- Process::RLIMIT_FSIZE.should == 1 +- Process::RLIMIT_DATA.should == 2 +- Process::RLIMIT_STACK.should == 3 +- Process::RLIMIT_CORE.should == 4 +- Process::RLIMIT_RSS.should == 5 +- Process::RLIMIT_MEMLOCK.should == 6 +- Process::RLIMIT_NPROC.should == 7 +- Process::RLIMIT_NOFILE.should == 8 ++ it "are all present on BSD-like systems" do ++ %i[ ++ WNOHANG ++ WUNTRACED ++ PRIO_PROCESS ++ PRIO_PGRP ++ PRIO_USER ++ RLIM_INFINITY ++ RLIMIT_CPU ++ RLIMIT_FSIZE ++ RLIMIT_DATA ++ RLIMIT_STACK ++ RLIMIT_CORE ++ RLIMIT_RSS ++ RLIMIT_MEMLOCK ++ RLIMIT_NPROC ++ RLIMIT_NOFILE ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :darwin do +- it "has the correct constant values on Darwin" do +- Process::RLIM_SAVED_MAX.should == 9223372036854775807 +- Process::RLIM_SAVED_CUR.should == 9223372036854775807 +- Process::RLIMIT_AS.should == 5 ++ it "are all present on Darwin" do ++ %i[ ++ RLIM_SAVED_MAX ++ RLIM_SAVED_CUR ++ RLIMIT_AS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :linux do +- it "has the correct constant values on Linux" do +- Process::WNOHANG.should == 1 +- Process::WUNTRACED.should == 2 +- Process::PRIO_PROCESS.should == 0 +- Process::PRIO_PGRP.should == 1 +- Process::PRIO_USER.should == 2 +- Process::RLIMIT_CPU.should == 0 +- Process::RLIMIT_FSIZE.should == 1 +- Process::RLIMIT_DATA.should == 2 +- Process::RLIMIT_STACK.should == 3 +- Process::RLIMIT_CORE.should == 4 +- Process::RLIMIT_RSS.should == 5 +- Process::RLIMIT_NPROC.should == 6 +- Process::RLIMIT_NOFILE.should == 7 +- Process::RLIMIT_MEMLOCK.should == 8 +- Process::RLIMIT_AS.should == 9 +- +- # These values appear to change according to the platform. +- values = [4294967295, 9223372036854775807, 18446744073709551615] +- values.include?(Process::RLIM_INFINITY).should be_true +- values.include?(Process::RLIM_SAVED_MAX).should be_true +- values.include?(Process::RLIM_SAVED_CUR).should be_true ++ it "are all present on Linux" do ++ %i[ ++ WNOHANG ++ WUNTRACED ++ PRIO_PROCESS ++ PRIO_PGRP ++ PRIO_USER ++ RLIMIT_CPU ++ RLIMIT_FSIZE ++ RLIMIT_DATA ++ RLIMIT_STACK ++ RLIMIT_CORE ++ RLIMIT_RSS ++ RLIMIT_NPROC ++ RLIMIT_NOFILE ++ RLIMIT_MEMLOCK ++ RLIMIT_AS ++ RLIM_INFINITY ++ RLIM_SAVED_MAX ++ RLIM_SAVED_CUR ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :netbsd, :freebsd do +- it "Process::RLIMIT_SBSIZE" do +- Process::RLIMIT_SBSIZE.should == 9 # FIXME: what's it equal? +- Process::RLIMIT_AS.should == 10 ++ it "are all present on NetBSD and FreeBSD" do ++ %i[ ++ RLIMIT_SBSIZE ++ RLIMIT_AS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + diff --git a/dev-lang/ruby/files/3.2/020-arm-readline-test.patch b/dev-lang/ruby/files/3.2/020-arm-readline-test.patch new file mode 100644 index 000000000000..4edbc7b2b0c5 --- /dev/null +++ b/dev-lang/ruby/files/3.2/020-arm-readline-test.patch @@ -0,0 +1,32 @@ +From dd77934ca6e2e8b2b894f2460017323b33b619b6 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Thu, 23 May 2024 16:10:32 -0400 +Subject: [PATCH] [ruby/readline-ext] Skip test_interrupt_in_other_thread on + arm32-linux + +This is a combination of main Ruby commit +https://github.com/ruby/ruby/commit/aefc98891c42024039f19ef45bdfe93fbc590b7c +and my PR correcting the regex https://github.com/ruby/ruby/pull/10819. +Upstream Ruby requests that changes to this test go to readline-ext repo +before being backported to 3.2 branch. + +https://github.com/ruby/readline-ext/commit/868f873a78 +--- + test/readline/test_readline.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb +index 7838f4f52e864e..ab70e4371122f0 100644 +--- a/test/readline/test_readline.rb ++++ b/test/readline/test_readline.rb +@@ -496,8 +496,8 @@ def test_interrupt_in_other_thread + # Maybe the same issue: https://github.com/facebookresearch/nle/issues/120 + omit if /i[3-6]86-linux/ =~ RUBY_PLATFORM + +- # Skip arm32-linux (Travis CI). +- omit "Skip arm32-linux" if /armv.+l-linux/ =~ RUBY_PLATFORM ++ # Skip arm32-linux (Travis CI). See aefc988 in main ruby repo. ++ omit "Skip arm32-linux" if /armv[0-9+][a-z]-linux/ =~ RUBY_PLATFORM + + if defined?(TestReadline) && self.class == TestReadline + use = "use_ext_readline" diff --git a/dev-lang/ruby/files/3.3/012-mkdir-path.patch b/dev-lang/ruby/files/3.3/012-mkdir-path.patch new file mode 100644 index 000000000000..6fd28e01bd76 --- /dev/null +++ b/dev-lang/ruby/files/3.3/012-mkdir-path.patch @@ -0,0 +1,13 @@ +--- a/configure.ac 2024-05-30 02:23:11.000000000 +0200 ++++ b/configure.ac 2024-06-01 10:10:07.602924940 +0200 +@@ -519,6 +519,10 @@ + ac_cv_path_mkdir="mkdir" + ]) + ++AS_CASE(["$target_os"],[*],[ ++ ac_cv_path_mkdir="mkdir" ++]) ++ + RUBY_PROG_MAKEDIRS + + AC_CHECK_PROG([DTRACE], [${ac_tool_prefix}dtrace], [${ac_tool_prefix}dtrace]) diff --git a/dev-lang/ruby/files/3.3/013-test-rlimit-constants.patch b/dev-lang/ruby/files/3.3/013-test-rlimit-constants.patch new file mode 100644 index 000000000000..c3790b13152b --- /dev/null +++ b/dev-lang/ruby/files/3.3/013-test-rlimit-constants.patch @@ -0,0 +1,159 @@ +From bea20365f43ee115ea6219c7113647eed3d9e342 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Wed, 7 Aug 2024 13:15:00 -0400 +Subject: [PATCH] Replace specific constant tests with just type checks + +As detailed in the attached issue, these constants can and do vary e.g. +between architectures on Linux. Hardcoding and asserting that they are +equal to specific values pretty much defeats the purpose of building +these in at compile time. Instead, simply assert that they exist and +are integers. + +Fixes: https://github.com/ruby/spec/issues/1150 +--- + core/process/constants_spec.rb | 116 ++++++++++++++++++++------------- + 1 file changed, 69 insertions(+), 47 deletions(-) + +diff --git a/core/process/constants_spec.rb b/core/process/constants_spec.rb +index 616c54b8e..57cacadef 100644 +--- a/spec/ruby/core/process/constants_spec.rb ++++ b/spec/ruby/core/process/constants_spec.rb +@@ -2,69 +2,91 @@ + + describe "Process::Constants" do + platform_is :darwin, :netbsd, :freebsd do +- it "has the correct constant values on BSD-like systems" do +- Process::WNOHANG.should == 1 +- Process::WUNTRACED.should == 2 +- Process::PRIO_PROCESS.should == 0 +- Process::PRIO_PGRP.should == 1 +- Process::PRIO_USER.should == 2 +- Process::RLIM_INFINITY.should == 9223372036854775807 +- Process::RLIMIT_CPU.should == 0 +- Process::RLIMIT_FSIZE.should == 1 +- Process::RLIMIT_DATA.should == 2 +- Process::RLIMIT_STACK.should == 3 +- Process::RLIMIT_CORE.should == 4 +- Process::RLIMIT_RSS.should == 5 +- Process::RLIMIT_MEMLOCK.should == 6 +- Process::RLIMIT_NPROC.should == 7 +- Process::RLIMIT_NOFILE.should == 8 ++ it "are all present on BSD-like systems" do ++ %i[ ++ WNOHANG ++ WUNTRACED ++ PRIO_PROCESS ++ PRIO_PGRP ++ PRIO_USER ++ RLIM_INFINITY ++ RLIMIT_CPU ++ RLIMIT_FSIZE ++ RLIMIT_DATA ++ RLIMIT_STACK ++ RLIMIT_CORE ++ RLIMIT_RSS ++ RLIMIT_MEMLOCK ++ RLIMIT_NPROC ++ RLIMIT_NOFILE ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :darwin do +- it "has the correct constant values on Darwin" do +- Process::RLIM_SAVED_MAX.should == 9223372036854775807 +- Process::RLIM_SAVED_CUR.should == 9223372036854775807 +- Process::RLIMIT_AS.should == 5 ++ it "are all present on Darwin" do ++ %i[ ++ RLIM_SAVED_MAX ++ RLIM_SAVED_CUR ++ RLIMIT_AS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :linux do +- it "has the correct constant values on Linux" do +- Process::WNOHANG.should == 1 +- Process::WUNTRACED.should == 2 +- Process::PRIO_PROCESS.should == 0 +- Process::PRIO_PGRP.should == 1 +- Process::PRIO_USER.should == 2 +- Process::RLIMIT_CPU.should == 0 +- Process::RLIMIT_FSIZE.should == 1 +- Process::RLIMIT_DATA.should == 2 +- Process::RLIMIT_STACK.should == 3 +- Process::RLIMIT_CORE.should == 4 +- Process::RLIMIT_RSS.should == 5 +- Process::RLIMIT_NPROC.should == 6 +- Process::RLIMIT_NOFILE.should == 7 +- Process::RLIMIT_MEMLOCK.should == 8 +- Process::RLIMIT_AS.should == 9 +- +- # These values appear to change according to the platform. +- values = [4294967295, 9223372036854775807, 18446744073709551615] +- values.include?(Process::RLIM_INFINITY).should be_true +- values.include?(Process::RLIM_SAVED_MAX).should be_true +- values.include?(Process::RLIM_SAVED_CUR).should be_true ++ it "are all present on Linux" do ++ %i[ ++ WNOHANG ++ WUNTRACED ++ PRIO_PROCESS ++ PRIO_PGRP ++ PRIO_USER ++ RLIMIT_CPU ++ RLIMIT_FSIZE ++ RLIMIT_DATA ++ RLIMIT_STACK ++ RLIMIT_CORE ++ RLIMIT_RSS ++ RLIMIT_NPROC ++ RLIMIT_NOFILE ++ RLIMIT_MEMLOCK ++ RLIMIT_AS ++ RLIM_INFINITY ++ RLIM_SAVED_MAX ++ RLIM_SAVED_CUR ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :netbsd, :freebsd do +- it "has the correct constant values on NetBSD and FreeBSD" do +- Process::RLIMIT_SBSIZE.should == 9 # FIXME: what's it equal? +- Process::RLIMIT_AS.should == 10 ++ it "are all present on NetBSD and FreeBSD" do ++ %i[ ++ RLIMIT_SBSIZE ++ RLIMIT_AS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + + platform_is :freebsd do +- it "has the correct constant values on FreeBSD" do +- Process::RLIMIT_NPTS.should == 11 ++ it "are all present on FreeBSD" do ++ %i[ ++ RLIMIT_NPTS ++ ].each do |const| ++ Process.const_defined?(const).should be_true ++ Process.const_get(const).should be_an_instance_of(Integer) ++ end + end + end + diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml index cf9a21622439..628c6c4c66b0 100644 --- a/dev-lang/ruby/metadata.xml +++ b/dev-lang/ruby/metadata.xml @@ -7,7 +7,7 @@ </maintainer> <use> <flag name="rdoc">Install <pkg>dev-ruby/rdoc</pkg> after installing Ruby.</flag> - <flag name="systemtap">Enable SystemTAP/DTrace tracing</flag> + <flag name="systemtap">Enable SystemTap/DTrace tracing</flag> </use> <upstream> <remote-id type="github">ruby/ruby</remote-id> diff --git a/dev-lang/ruby/ruby-3.1.4-r3.ebuild b/dev-lang/ruby/ruby-3.1.4-r3.ebuild index 49032262514a..d001f2f4830a 100644 --- a/dev-lang/ruby/ruby-3.1.4-r3.ebuild +++ b/dev-lang/ruby/ruby-3.1.4-r3.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 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit +rdoc socks5 +ssl static-libs systemtap tk valgrind xemacs" RDEPEND=" @@ -140,6 +140,11 @@ src_configure() { # as it's risky with newer compilers to leave it as it is. append-flags -fno-strict-aliasing + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is diff --git a/dev-lang/ruby/ruby-3.1.5.ebuild b/dev-lang/ruby/ruby-3.1.5.ebuild index 8f3d74c898fc..e99079d0b503 100644 --- a/dev-lang/ruby/ruby-3.1.5.ebuild +++ b/dev-lang/ruby/ruby-3.1.5.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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" RDEPEND=" @@ -71,6 +71,8 @@ PDEPEND=" src_prepare() { eapply "${FILESDIR}"/"${SLOT}"/011*.patch + eapply "${FILESDIR}"/"${SLOT}"/012*.patch + eapply "${FILESDIR}"/"${SLOT}"/020*.patch eapply "${FILESDIR}"/"${SLOT}"/902*.patch if use elibc_musl ; then @@ -147,6 +149,11 @@ src_configure() { # as it's risky with newer compilers to leave it as it is. append-flags -fno-strict-aliasing + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is diff --git a/dev-lang/ruby/ruby-3.1.4-r5.ebuild b/dev-lang/ruby/ruby-3.1.6-r1.ebuild index bad6e20d9e3b..39d96ae94853 100644 --- a/dev-lang/ruby/ruby-3.1.4-r5.ebuild +++ b/dev-lang/ruby/ruby-3.1.6-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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" RDEPEND=" @@ -71,6 +71,9 @@ PDEPEND=" src_prepare() { eapply "${FILESDIR}"/"${SLOT}"/011*.patch + eapply "${FILESDIR}"/"${SLOT}"/012*.patch + eapply "${FILESDIR}"/"${SLOT}"/013*.patch + eapply "${FILESDIR}"/"${SLOT}"/020*.patch eapply "${FILESDIR}"/"${SLOT}"/902*.patch if use elibc_musl ; then @@ -99,26 +102,17 @@ src_prepare() { spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die sed -i -e '/def test_test/askip "Depends on system setup"' test/ruby/test_file_exhaustive.rb || die + # MJIT is broken and removed in later ruby versions. + rm -f test/ruby/test_jit.rb || die + + # This test calls out to the system ruby which is not being tested + # and may not be the same version. + sed -e '/test_without_tty/aomit "Calls system ruby"' \ + -i test/readline/test_readline.rb || 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 - - # disable using security framework (GCC barfs on those headers) - sed -i \ - -e 's/MAC_OS_X_VERSION_MIN_REQUIRED/_DISABLED_/' \ - random.c || die - fi fi eapply_user @@ -138,12 +132,21 @@ src_configure() { unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS export MAKEOPTS="${makeopts_tmp}" + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + # -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 + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is @@ -177,7 +180,10 @@ src_configure() { # 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 \ + # except on Darwin, where we really need LIBPATHENV to set the right + # DYLD_ stuff during the invocation of miniruby for it to work + [[ ${CHOST} == *-darwin* ]] || export LIBPATHENV="" + INSTALL="${EPREFIX}/usr/bin/install -c" econf \ --program-suffix=${MY_SUFFIX} \ --with-soname=ruby${MY_SUFFIX} \ --with-readline-dir="${EPREFIX}"/usr \ @@ -207,10 +213,12 @@ src_configure() { } src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" } src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" emake V=1 check } @@ -228,10 +236,6 @@ src_install() { local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" - if [[ ${CHOST} == *darwin* ]] ; then - local -x DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" - fi - local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" for d in $(find "${S}/ext" -type d) ; do RUBYLIB="${RUBYLIB}:$d" diff --git a/dev-lang/ruby/ruby-3.2.3.ebuild b/dev-lang/ruby/ruby-3.2.3.ebuild index 1acabf564cb0..71fb23fe30c0 100644 --- a/dev-lang/ruby/ruby-3.2.3.ebuild +++ b/dev-lang/ruby/ruby-3.2.3.ebuild @@ -160,6 +160,11 @@ src_configure() { # as it's risky with newer compilers to leave it as it is. append-flags -fno-strict-aliasing + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is diff --git a/dev-lang/ruby/ruby-3.2.4-r1.ebuild b/dev-lang/ruby/ruby-3.2.4-r1.ebuild new file mode 100644 index 000000000000..7152cb0f52fc --- /dev/null +++ b/dev-lang/ruby/ruby-3.2.4-r1.ebuild @@ -0,0 +1,306 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic multiprocessing + +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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc:= ) + jit? ( >=virtual/rust-1.58.1 ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-debug/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20231008 +" + +DEPEND=" + ${RDEPEND} + valgrind? ( dev-debug/valgrind ) +" + +BUNDLED_GEMS=" + >=dev-ruby/debug-1.7.1[ruby_targets_ruby32(-)] + >=dev-ruby/irb-1.6.2[ruby_targets_ruby32(-)] + >=dev-ruby/matrix-0.4.2[ruby_targets_ruby32(-)] + >=dev-ruby/minitest-5.16.3[ruby_targets_ruby32(-)] + >=dev-ruby/net-ftp-0.2.0[ruby_targets_ruby32(-)] + >=dev-ruby/net-imap-0.3.4[ruby_targets_ruby32(-)] + >=dev-ruby/net-pop-0.1.2[ruby_targets_ruby32(-)] + >=dev-ruby/net-smtp-0.3.3[ruby_targets_ruby32(-)] + >=dev-ruby/power_assert-2.0.3[ruby_targets_ruby32(-)] + >=dev-ruby/prime-0.1.2[ruby_targets_ruby32(-)] + >=dev-ruby/rake-13.0.6-r2[ruby_targets_ruby32(-)] + >=dev-ruby/rbs-2.8.2[ruby_targets_ruby32(-)] + >=dev-ruby/rexml-3.2.5[ruby_targets_ruby32(-)] + >=dev-ruby/rss-0.2.9[ruby_targets_ruby32(-)] + >=dev-ruby/test-unit-3.5.7[ruby_targets_ruby32(-)] + >=dev-ruby/typeprof-0.21.3[ruby_targets_ruby32(-)] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby32(-)] + >=dev-ruby/bundler-2.3.3[ruby_targets_ruby32(-)] + >=dev-ruby/did_you_mean-1.6.1[ruby_targets_ruby32(-)] + >=dev-ruby/json-2.6.1[ruby_targets_ruby32(-)] + >=dev-ruby/rdoc-6.3.3[ruby_targets_ruby32(-)] + xemacs? ( app-xemacs/ruby-modes ) +" + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + eapply "${FILESDIR}"/"${SLOT}"/011*.patch + eapply "${FILESDIR}"/"${SLOT}"/020*.patch + eapply "${FILESDIR}"/"${SLOT}"/902*.patch + + if use elibc_musl ; then + eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch + fi + + 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 + + # Remove tests that are known to fail or require a network connection + rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die + rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die + + # Remove webrick tests because setting LD_LIBRARY_PATH does not work for them. + rm -rf tool/test/webrick || die + + # Avoid test using the system ruby + sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die + + # Avoid testing against hard-coded blockdev devices that most likely are not available + sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die + + # Avoid tests that require gem downloads + sed -i -e '/^test-syntax-suggest/ s/\$(TEST_RUNNABLE)/no/' common.mk || die + sed -i -e '/^check:/ s/\$(TEST_RUNNABLE)-\$(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest//' common.mk || die + + # Avoid test that fails intermittently + sed -i -e '/test_gem_exec_gem_uninstall/aomit "Fails intermittently"' test/rubygems/test_gem_commands_exec_command.rb || 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 + + # disable using security framework (GCC barfs on those headers) + sed -i \ + -e 's/MAC_OS_X_VERSION_MIN_REQUIRED/_DISABLED_/' \ + random.c || die + fi + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules="win32,win32ole" myconf= + + # Ruby's build system does interesting things with MAKEOPTS and doesn't + # handle MAKEOPTS="-Oline" or similar well. Just filter it all out + # and use -j/-l parsed out from the original MAKEOPTS, then use that. + # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing + # is set by the user in MAKEOPTS. See bug #900929 and bug #728424. + local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)" + unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS + export MAKEOPTS="${makeopts_tmp}" + + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + + # -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 + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + # 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 \ + --without-baseruby \ + --with-compress-debug-sections=no \ + --enable-mkmf-verbose \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support) \ + $(use_enable jit yjit) \ + $(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} \ + $(use_with valgrind) \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 check +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf 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) + + local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + if [[ ${CHOST} == *darwin* ]] ; then + local -x DYLD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${DYLD_LIBRARY_PATH+:}${DYLD_LIBRARY_PATH}" + fi + + local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + + # 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 README* + dodoc -r doc +} + +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(30|31|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-3.2.4.ebuild b/dev-lang/ruby/ruby-3.2.4.ebuild index 1c19b91c8e3d..524d5af27834 100644 --- a/dev-lang/ruby/ruby-3.2.4.ebuild +++ b/dev-lang/ruby/ruby-3.2.4.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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" RDEPEND=" @@ -79,6 +79,7 @@ PDEPEND=" src_prepare() { eapply "${FILESDIR}"/"${SLOT}"/010*.patch eapply "${FILESDIR}"/"${SLOT}"/011*.patch + eapply "${FILESDIR}"/"${SLOT}"/020*.patch eapply "${FILESDIR}"/"${SLOT}"/902*.patch if use elibc_musl ; then @@ -160,6 +161,11 @@ src_configure() { # as it's risky with newer compilers to leave it as it is. append-flags -fno-strict-aliasing + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is diff --git a/dev-lang/ruby/ruby-3.2.5.ebuild b/dev-lang/ruby/ruby-3.2.5.ebuild new file mode 100644 index 000000000000..2c3a3f8c63c1 --- /dev/null +++ b/dev-lang/ruby/ruby-3.2.5.ebuild @@ -0,0 +1,288 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic multiprocessing + +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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc:= ) + jit? ( >=virtual/rust-1.58.1 ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-debug/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/readline:0= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20231008 +" + +DEPEND=" + ${RDEPEND} + valgrind? ( dev-debug/valgrind ) +" + +BUNDLED_GEMS=" + >=dev-ruby/debug-1.7.1[ruby_targets_ruby32(-)] + >=dev-ruby/irb-1.6.2[ruby_targets_ruby32(-)] + >=dev-ruby/matrix-0.4.2[ruby_targets_ruby32(-)] + >=dev-ruby/minitest-5.16.3[ruby_targets_ruby32(-)] + >=dev-ruby/net-ftp-0.2.0[ruby_targets_ruby32(-)] + >=dev-ruby/net-imap-0.3.4[ruby_targets_ruby32(-)] + >=dev-ruby/net-pop-0.1.2[ruby_targets_ruby32(-)] + >=dev-ruby/net-smtp-0.3.3[ruby_targets_ruby32(-)] + >=dev-ruby/power_assert-2.0.3[ruby_targets_ruby32(-)] + >=dev-ruby/prime-0.1.2[ruby_targets_ruby32(-)] + >=dev-ruby/rake-13.0.6-r2[ruby_targets_ruby32(-)] + >=dev-ruby/rbs-2.8.2[ruby_targets_ruby32(-)] + >=dev-ruby/rexml-3.2.5[ruby_targets_ruby32(-)] + >=dev-ruby/rss-0.2.9[ruby_targets_ruby32(-)] + >=dev-ruby/test-unit-3.5.7[ruby_targets_ruby32(-)] + >=dev-ruby/typeprof-0.21.3[ruby_targets_ruby32(-)] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby32(-)] + >=dev-ruby/bundler-2.3.3[ruby_targets_ruby32(-)] + >=dev-ruby/did_you_mean-1.6.1[ruby_targets_ruby32(-)] + >=dev-ruby/json-2.6.1[ruby_targets_ruby32(-)] + >=dev-ruby/rdoc-6.3.3[ruby_targets_ruby32(-)] + xemacs? ( app-xemacs/ruby-modes ) +" + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + eapply "${FILESDIR}"/"${SLOT}"/011*.patch + eapply "${FILESDIR}"/"${SLOT}"/013*.patch + eapply "${FILESDIR}"/"${SLOT}"/902*.patch + + if use elibc_musl ; then + eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch + fi + + 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 + + # Remove tests that are known to fail or require a network connection + rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die + rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die + + # Remove webrick tests because setting LD_LIBRARY_PATH does not work for them. + rm -rf tool/test/webrick || die + + # Avoid test using the system ruby + sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die + + # Avoid testing against hard-coded blockdev devices that most likely are not available + sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die + + # Avoid tests that require gem downloads + sed -i -e '/^test-syntax-suggest/ s/\$(TEST_RUNNABLE)/no/' common.mk || die + sed -i -e '/^check:/ s/\$(TEST_RUNNABLE)-\$(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest//' common.mk || die + + # Avoid test that fails intermittently + sed -i -e '/test_gem_exec_gem_uninstall/aomit "Fails intermittently"' test/rubygems/test_gem_commands_exec_command.rb || 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 + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules="win32,win32ole" myconf= + + # Ruby's build system does interesting things with MAKEOPTS and doesn't + # handle MAKEOPTS="-Oline" or similar well. Just filter it all out + # and use -j/-l parsed out from the original MAKEOPTS, then use that. + # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing + # is set by the user in MAKEOPTS. See bug #900929 and bug #728424. + local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)" + unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS + export MAKEOPTS="${makeopts_tmp}" + + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + + # -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 + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + # 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 + # except on Darwin, where we really need LIBPATHENV to set the right + # DYLD_ stuff during the invocation of miniruby for it to work + [[ ${CHOST} == *-darwin* ]] || export LIBPATHENV="" + INSTALL="${EPREFIX}/usr/bin/install -c" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --with-readline-dir="${EPREFIX}"/usr \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --without-baseruby \ + --with-compress-debug-sections=no \ + --enable-mkmf-verbose \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support) \ + $(use_enable jit yjit) \ + $(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} \ + $(use_with valgrind) \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 check +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf 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) + + local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + + # 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 README* + dodoc -r doc +} + +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(30|31|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-3.3.0-r2.ebuild b/dev-lang/ruby/ruby-3.3.2.ebuild index 73b25c63a53d..5c94ac824b14 100644 --- a/dev-lang/ruby/ruby-3.3.0-r2.ebuild +++ b/dev-lang/ruby/ruby-3.3.2.ebuild @@ -78,7 +78,6 @@ PDEPEND=" src_prepare() { eapply "${FILESDIR}"/"${SLOT}"/010*.patch - eapply "${FILESDIR}"/"${SLOT}"/011*.patch eapply "${FILESDIR}"/"${SLOT}"/902*.patch if use elibc_musl ; then @@ -163,6 +162,11 @@ src_configure() { # as it's risky with newer compilers to leave it as it is. append-flags -fno-strict-aliasing + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is diff --git a/dev-lang/ruby/ruby-3.3.4-r1.ebuild b/dev-lang/ruby/ruby-3.3.4-r1.ebuild new file mode 100644 index 000000000000..cac3085b6240 --- /dev/null +++ b/dev-lang/ruby/ruby-3.3.4-r1.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic multiprocessing + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" + +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 + +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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="berkdb debug doc examples gdbm jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc:= ) + jit? ( >=virtual/rust-1.58.1 ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-debug/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20231226 +" + +DEPEND=" + ${RDEPEND} + valgrind? ( dev-debug/valgrind ) +" + +BUNDLED_GEMS=" + >=dev-ruby/debug-1.9.1[ruby_targets_ruby33(-)] + >=dev-ruby/irb-1.11.0[ruby_targets_ruby33(-)] + >=dev-ruby/matrix-0.4.2[ruby_targets_ruby33(-)] + >=dev-ruby/minitest-5.20.0[ruby_targets_ruby33(-)] + >=dev-ruby/net-ftp-0.3.3[ruby_targets_ruby33(-)] + >=dev-ruby/net-imap-0.4.9[ruby_targets_ruby33(-)] + >=dev-ruby/net-pop-0.1.2[ruby_targets_ruby33(-)] + >=dev-ruby/net-smtp-0.4.0[ruby_targets_ruby33(-)] + >=dev-ruby/power_assert-2.0.3[ruby_targets_ruby33(-)] + >=dev-ruby/prime-0.1.2[ruby_targets_ruby33(-)] + >=dev-ruby/racc-1.7.3[ruby_targets_ruby33(-)] + >=dev-ruby/rake-13.1.0[ruby_targets_ruby33(-)] + >=dev-ruby/rbs-3.4.0[ruby_targets_ruby33(-)] + >=dev-ruby/rexml-3.2.8[ruby_targets_ruby33(-)] + >=dev-ruby/rss-0.3.0[ruby_targets_ruby33(-)] + >=dev-ruby/test-unit-3.6.1[ruby_targets_ruby33(-)] + >=dev-ruby/typeprof-0.21.9[ruby_targets_ruby33(-)] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby33(-)] + >=dev-ruby/bundler-2.5.11[ruby_targets_ruby33(-)] + >=dev-ruby/did_you_mean-1.6.3[ruby_targets_ruby33(-)] + >=dev-ruby/json-2.7.1[ruby_targets_ruby33(-)] + >=dev-ruby/rdoc-6.6.2[ruby_targets_ruby33(-)] + xemacs? ( app-xemacs/ruby-modes ) +" + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + eapply "${FILESDIR}"/"${SLOT}"/013*.patch + eapply "${FILESDIR}"/"${SLOT}"/902*.patch + + if use elibc_musl ; then + eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch + fi + + 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 + + # Avoid the irb default gemspec since we will install the normal gem + # instead. This avoids a file collision with dev-ruby/irb. + rm lib/irb/irb.gemspec || die + + # Remove tests that are known to fail or require a network connection + rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die + rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb \ + spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die + + # Remove webrick tests because setting LD_LIBRARY_PATH does not work for them. + rm -rf tool/test/webrick || die + + # Avoid test using the system ruby + sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die + + # Avoid testing against hard-coded blockdev devices that most likely are not available + sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die + + # Avoid tests that require gem downloads + sed -e '/^\(test-syntax-suggest\|PREPARE_SYNTAX_SUGGEST\)/ s/\$(TEST_RUNNABLE)/no/' \ + -i common.mk + + # Avoid test that fails intermittently + sed -e '/test_gem_exec_gem_uninstall/aomit "Fails intermittently"' \ + -i test/rubygems/test_gem_commands_exec_command.rb || 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 + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules="win32,win32ole" myconf= + + # Ruby's build system does interesting things with MAKEOPTS and doesn't + # handle MAKEOPTS="-Oline" or similar well. Just filter it all out + # and use -j/-l parsed out from the original MAKEOPTS, then use that. + # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing + # is set by the user in MAKEOPTS. See bug #900929 and bug #728424. + local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)" + unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS + export MAKEOPTS="${makeopts_tmp}" + + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + + # -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 + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + # 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 + + # 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 + + # Fix co-routine selection for x32, bug 933070 + [[ ${CHOST} == *gnux32 ]] && myconf="${myconf} --with-coroutine=amd64" + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + # except on Darwin, where we really need LIBPATHENV to set the right + # DYLD_ stuff during the invocation of miniruby for it to work + [[ ${CHOST} == *-darwin* ]] || export LIBPATHENV="" + INSTALL="${EPREFIX}/usr/bin/install -c" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --without-baseruby \ + --with-compress-debug-sections=no \ + --enable-mkmf-verbose \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support) \ + $(use_enable jit yjit) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + $(use_with valgrind) \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 check +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf 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) + + local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + + # 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 README* + dodoc -r doc +} + +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(30|31|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} diff --git a/dev-lang/ruby/ruby-3.3.1.ebuild b/dev-lang/ruby/ruby-3.3.4.ebuild index 02b05be1c6ca..fac732e48cf1 100644 --- a/dev-lang/ruby/ruby-3.3.1.ebuild +++ b/dev-lang/ruby/ruby-3.3.4.ebuild @@ -5,6 +5,9 @@ EAPI=8 inherit autotools flag-o-matic multiprocessing +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" + MY_P="${PN}-$(ver_cut 1-3)" S=${WORKDIR}/${MY_P} @@ -12,8 +15,6 @@ 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 )" @@ -60,7 +61,7 @@ BUNDLED_GEMS=" >=dev-ruby/racc-1.7.3[ruby_targets_ruby33(-)] >=dev-ruby/rake-13.1.0[ruby_targets_ruby33(-)] >=dev-ruby/rbs-3.4.0[ruby_targets_ruby33(-)] - >=dev-ruby/rexml-3.2.6[ruby_targets_ruby33(-)] + >=dev-ruby/rexml-3.2.8[ruby_targets_ruby33(-)] >=dev-ruby/rss-0.3.0[ruby_targets_ruby33(-)] >=dev-ruby/test-unit-3.6.1[ruby_targets_ruby33(-)] >=dev-ruby/typeprof-0.21.9[ruby_targets_ruby33(-)] @@ -69,7 +70,7 @@ BUNDLED_GEMS=" PDEPEND=" ${BUNDLED_GEMS} virtual/rubygems[ruby_targets_ruby33(-)] - >=dev-ruby/bundler-2.5.3[ruby_targets_ruby33(-)] + >=dev-ruby/bundler-2.5.11[ruby_targets_ruby33(-)] >=dev-ruby/did_you_mean-1.6.3[ruby_targets_ruby33(-)] >=dev-ruby/json-2.7.1[ruby_targets_ruby33(-)] >=dev-ruby/rdoc-6.6.2[ruby_targets_ruby33(-)] @@ -156,12 +157,21 @@ src_configure() { unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS export MAKEOPTS="${makeopts_tmp}" + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + # -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 + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + # Socks support via dante if use socks5 ; then # Socks support can't be disabled as long as SOCKS_SERVER is @@ -189,6 +199,9 @@ src_configure() { modules="${modules},tk" fi + # Fix co-routine selection for x32, bug 933070 + [[ ${CHOST} == *gnux32 ]] && myconf="${myconf} --with-coroutine=amd64" + # Provide an empty LIBPATHENV because we disable rpath but we do not # need LD_LIBRARY_PATH by default since that breaks USE=multitarget # #564272 diff --git a/dev-lang/ruby/ruby-3.3.5.ebuild b/dev-lang/ruby/ruby-3.3.5.ebuild new file mode 100644 index 000000000000..cac3085b6240 --- /dev/null +++ b/dev-lang/ruby/ruby-3.3.5.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic multiprocessing + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="https://www.ruby-lang.org/" + +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 + +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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="berkdb debug doc examples gdbm jemalloc jit socks5 +ssl static-libs systemtap tk valgrind xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db:= ) + gdbm? ( sys-libs/gdbm:= ) + jemalloc? ( dev-libs/jemalloc:= ) + jit? ( >=virtual/rust-1.58.1 ) + ssl? ( + dev-libs/openssl:0= + ) + socks5? ( >=net-proxy/dante-1.1.13 ) + systemtap? ( dev-debug/systemtap ) + tk? ( + dev-lang/tcl:0=[threads] + dev-lang/tk:0=[threads] + ) + dev-libs/libyaml + dev-libs/libffi:= + sys-libs/zlib + virtual/libcrypt:= + >=app-eselect/eselect-ruby-20231226 +" + +DEPEND=" + ${RDEPEND} + valgrind? ( dev-debug/valgrind ) +" + +BUNDLED_GEMS=" + >=dev-ruby/debug-1.9.1[ruby_targets_ruby33(-)] + >=dev-ruby/irb-1.11.0[ruby_targets_ruby33(-)] + >=dev-ruby/matrix-0.4.2[ruby_targets_ruby33(-)] + >=dev-ruby/minitest-5.20.0[ruby_targets_ruby33(-)] + >=dev-ruby/net-ftp-0.3.3[ruby_targets_ruby33(-)] + >=dev-ruby/net-imap-0.4.9[ruby_targets_ruby33(-)] + >=dev-ruby/net-pop-0.1.2[ruby_targets_ruby33(-)] + >=dev-ruby/net-smtp-0.4.0[ruby_targets_ruby33(-)] + >=dev-ruby/power_assert-2.0.3[ruby_targets_ruby33(-)] + >=dev-ruby/prime-0.1.2[ruby_targets_ruby33(-)] + >=dev-ruby/racc-1.7.3[ruby_targets_ruby33(-)] + >=dev-ruby/rake-13.1.0[ruby_targets_ruby33(-)] + >=dev-ruby/rbs-3.4.0[ruby_targets_ruby33(-)] + >=dev-ruby/rexml-3.2.8[ruby_targets_ruby33(-)] + >=dev-ruby/rss-0.3.0[ruby_targets_ruby33(-)] + >=dev-ruby/test-unit-3.6.1[ruby_targets_ruby33(-)] + >=dev-ruby/typeprof-0.21.9[ruby_targets_ruby33(-)] +" + +PDEPEND=" + ${BUNDLED_GEMS} + virtual/rubygems[ruby_targets_ruby33(-)] + >=dev-ruby/bundler-2.5.11[ruby_targets_ruby33(-)] + >=dev-ruby/did_you_mean-1.6.3[ruby_targets_ruby33(-)] + >=dev-ruby/json-2.7.1[ruby_targets_ruby33(-)] + >=dev-ruby/rdoc-6.6.2[ruby_targets_ruby33(-)] + xemacs? ( app-xemacs/ruby-modes ) +" + +src_prepare() { + eapply "${FILESDIR}"/"${SLOT}"/010*.patch + eapply "${FILESDIR}"/"${SLOT}"/013*.patch + eapply "${FILESDIR}"/"${SLOT}"/902*.patch + + if use elibc_musl ; then + eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch + fi + + 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 + + # Avoid the irb default gemspec since we will install the normal gem + # instead. This avoids a file collision with dev-ruby/irb. + rm lib/irb/irb.gemspec || die + + # Remove tests that are known to fail or require a network connection + rm -f test/ruby/test_process.rb test/rubygems/test_gem{,_path_support}.rb || die + rm -f test/rinda/test_rinda.rb test/socket/test_tcp.rb test/fiber/test_address_resolve.rb \ + spec/ruby/library/socket/tcpsocket/{initialize,open}_spec.rb|| die + + # Remove webrick tests because setting LD_LIBRARY_PATH does not work for them. + rm -rf tool/test/webrick || die + + # Avoid test using the system ruby + sed -i -e '/test_dumb_terminal/aomit "Uses system ruby"' test/reline/test_reline.rb || die + + # Avoid testing against hard-coded blockdev devices that most likely are not available + sed -i -e '/def blockdev/a@blockdev = nil' test/ruby/test_file_exhaustive.rb || die + + # Avoid tests that require gem downloads + sed -e '/^\(test-syntax-suggest\|PREPARE_SYNTAX_SUGGEST\)/ s/\$(TEST_RUNNABLE)/no/' \ + -i common.mk + + # Avoid test that fails intermittently + sed -e '/test_gem_exec_gem_uninstall/aomit "Fails intermittently"' \ + -i test/rubygems/test_gem_commands_exec_command.rb || 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 + fi + + eapply_user + + eautoreconf +} + +src_configure() { + local modules="win32,win32ole" myconf= + + # Ruby's build system does interesting things with MAKEOPTS and doesn't + # handle MAKEOPTS="-Oline" or similar well. Just filter it all out + # and use -j/-l parsed out from the original MAKEOPTS, then use that. + # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing + # is set by the user in MAKEOPTS. See bug #900929 and bug #728424. + local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)" + unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS + export MAKEOPTS="${makeopts_tmp}" + + # Avoid a hardcoded path to mkdir to avoid issues with mixed + # usr-merge and normal binary packages, bug #932386. + export ac_cv_path_mkdir=mkdir + + # -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 + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + # 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 + + # 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 + + # Fix co-routine selection for x32, bug 933070 + [[ ${CHOST} == *gnux32 ]] && myconf="${myconf} --with-coroutine=amd64" + + # Provide an empty LIBPATHENV because we disable rpath but we do not + # need LD_LIBRARY_PATH by default since that breaks USE=multitarget + # #564272 + # except on Darwin, where we really need LIBPATHENV to set the right + # DYLD_ stuff during the invocation of miniruby for it to work + [[ ${CHOST} == *-darwin* ]] || export LIBPATHENV="" + INSTALL="${EPREFIX}/usr/bin/install -c" econf \ + --program-suffix=${MY_SUFFIX} \ + --with-soname=ruby${MY_SUFFIX} \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --without-baseruby \ + --with-compress-debug-sections=no \ + --enable-mkmf-verbose \ + --with-out-ext="${modules}" \ + $(use_with jemalloc jemalloc) \ + $(use_enable jit jit-support) \ + $(use_enable jit yjit) \ + $(use_enable socks5 socks) \ + $(use_enable systemtap dtrace) \ + $(use_enable doc install-doc) \ + $(use_enable static-libs static) \ + $(use_enable static-libs install-static-library) \ + $(use_with static-libs static-linked-ext) \ + $(use_enable debug) \ + ${myconf} \ + $(use_with valgrind) \ + --enable-option-checking=no + + # Makefile is broken because it lacks -ldl + rm -rf ext/-test-/popen_deadlock || die +} + +src_compile() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 EXTLDFLAGS="${LDFLAGS}" MJIT_CFLAGS="${CFLAGS}" MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS="" +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake V=1 check +} + +src_install() { + # Remove the remaining bundled gems. We do this late in the process + # since they are used during the build to e.g. create the + # documentation. + einfo "Removing default gems before installation" + rm -rf 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) + + local -x LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + + local -x RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + + # 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 README* + dodoc -r doc +} + +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(30|31|...)" + elog +} + +pkg_postrm() { + eselect ruby cleanup +} |