commit:     282216f801e64e496afdeaf04fad6f9bdead9fa0
Author:     Itai Ferber <itai <AT> itaiferber <DOT> net>
AuthorDate: Sat Oct 12 19:09:07 2024 +0000
Commit:     Itai Ferber <itai <AT> itaiferber <DOT> net>
CommitDate: Sun Oct 13 01:31:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=282216f8

dev-lang/swift: add 6.0.1

Signed-off-by: Itai Ferber <itai <AT> itaiferber.net>

 dev-lang/swift/Manifest                            |  32 +++
 .../swift/files/swift-6.0.1-link-with-lld.patch    |  74 +++++++
 ....0.1-swift-backtracing-noexecstack-gentoo.patch |  15 ++
 .../swift-6.0.1-swift-build-preset-gentoo.patch    |  51 +++++
 ...ift-6.0.1-swift-link-ncurses-tinfo-gentoo.patch | 188 ++++++++++++++++
 dev-lang/swift/metadata.xml                        |   3 +
 dev-lang/swift/swift-6.0.1.ebuild                  | 237 +++++++++++++++++++++
 7 files changed, 600 insertions(+)

diff --git a/dev-lang/swift/Manifest b/dev-lang/swift/Manifest
index 33bc33c04..35257ef3b 100644
--- a/dev-lang/swift/Manifest
+++ b/dev-lang/swift/Manifest
@@ -1,36 +1,68 @@
 DIST Yams-5.0.1.tar.gz 658324 BLAKE2B 
8e95d96df85115b59334c9e20e03120040f6095c3a3f00110c2cd890077dd17f2f79a22452d380e05e463860c367db39b4df13815ee00ea80964707ef038c9ee
 SHA512 
91feecb95d1997235e443dea925ff11fa665e94c12c8eca2ed066ef340a51ec0253df2545d91184c31423cb4b039e1f89ac8f743cf3f154c9d93495eecc45432
+DIST Yams-5.0.6.tar.gz 659441 BLAKE2B 
ef90ba557cf74d3f4e94a196ac2fc2347d8b20303a5be0063f95c2595d73db0eafe7b3782ad7f022161ea854dbd56bf7a88b4c347a7acd1a79692901f9aab7a2
 SHA512 
a529f7c3419ec353c360a2b14a9d939e85deebdd534049896347dce74e311cbe99c66565886397193ead24d5914bf266d4531d1be8f6a5a67174aa87f62e1617
 DIST indexstore-db-5.10.1.tar.gz 909365 BLAKE2B 
fde150aff5a46970aafc872be8f9a57e338c648e2d3f5ea49a223d72d3cd402496a1045716551fd07c9954ea123a87070593d6fdd315a825f57d9d513f01d6b3
 SHA512 
1fc62360a5cd4701da314774b4c5c6a6a9cc2a8d46881962fc80331006c255d173f8ace8d743a09b3fcdbf1e92570248666396a0b78ce8be19eeff65ab6c3235
+DIST indexstore-db-6.0.1.tar.gz 913499 BLAKE2B 
f2f2a4a658d26bd4d146d9ee47ed0dc87ffea7dfbe9eee9d9339ab31277ec4ee2eaf40f55c3b1bdb542a1e6ead120810b72e80649ada2665eadc05d88e54230b
 SHA512 
e7c6da5fdab81c9f385f456b5a9ef6c0724e353c26d13b6d9ef9deab042a6a512cb2627bcf797c1456f4a2d4e58403db55184ebc0a0dbbe8f63698fc65d1065b
 DIST llvm-project-5.10.1.tar.gz 171145818 BLAKE2B 
e314f2e8716cb36b43e1ec23fe2fe212e4ab79e711f4544d54788338067f75b87abe84ecc60b1b5f073f0349d45363346d8a6b89b85f2ae6801cd09709293f52
 SHA512 
c659041234da1fed29a7186f0e436b0867576096483333d71f11e72828b45e2c7bd9b15db7d3da348a114af48a649f8a484ba3bd4de84d2f5cdb8a7035c5ad30
+DIST llvm-project-6.0.1.tar.gz 197815984 BLAKE2B 
6be03eaa46debc55edfc509c82ef4ff50eda2a83356ad90db3800e6f972a37e2eea01aec041325e37a50f62568319121672a76f9777efa39276d819ca23cfec9
 SHA512 
c6943efd5407901ad8d5db885f3d03f5f5b7be006c01960c3a60a9a0f4e635e4e963bfa84d85cbdea10326f905524f091523ebdfbcd6b872b9c1a3d1ca94c691
 DIST sourcekit-lsp-5.10.1.tar.gz 301167 BLAKE2B 
a1ff3b22c4ab2583d39687aae385fc52dcbb02237035ace8bc0fc6c705db1cd6734dae1656078080c7599ad4b75f5e03def7f60b0e0361bcb25e45bc9ea3c676
 SHA512 
4a2f7c2129a69c05c8d158877efb1538f092f8eb2d1b1194661cb7c6f201330ecf7fd33bb0d06dd595bc6966e19b739d103478db6c9b2a4c2d7ae351bfb398a8
+DIST sourcekit-lsp-6.0.1.tar.gz 533792 BLAKE2B 
071e552c3b322e08e2c371a46be95ea61688a0742d8f7df4f0b0b44c2154f7c2fd2a3d67129805bb8056286947eeeba6c985e5f4e66be1b478454f9611bae0ab
 SHA512 
9e96a03d47364627bdc5b5d6a028c2f4da99a790892045f2538bcb6b44d533c37b31278db8f3c1041d66e1acae913b618399494ab030664cdfb5f8d61c4a2582
 DIST swift-5.10.1.tar.gz 31977733 BLAKE2B 
cc5d37fe5eaa50c912e3abad02e6b04c81cf66f8ea79c89868de323394dc720fc7e122c5b4d2e27291172d61b4c80259b2cf80547ccfaec0b14aae9b63b9b2d2
 SHA512 
212ede9ba6a874666ceeb30073dd2a9c8b6b08715f375c98b86bee4a78f4a235ad0f1e35ec3d7f9f97c79f963a9d8bd0a6c9737a8c32b073dca828c564145396
+DIST swift-6.0.1.tar.gz 34110271 BLAKE2B 
de6207012fda5f9dff7bc8c4e911fed9c64732f5f118db1f2699337b99f6491129b2816af8e9174d651f2189a009eb0e7bc3c90440dee6d18972f9dab3b9d2e0
 SHA512 
f0cd74beb4312e6211f804f9ef5b3e66cc64e62e9f6c91863e1bb26a647a82e67ca041e5289a2a9922c24a4f24da7a8f44c41d682460084e67642d5df73a6dee
 DIST swift-argument-parser-1.2.3.tar.gz 645638 BLAKE2B 
68fb561162f1d701ef7b67f6e4c47206b0fc446d5cd248d4b101436c4d444d146e0e39c384c4bf40e80406fa2a695350124c0da8f9144817ce03016a181c6e65
 SHA512 
2fa09e86da67b6feb09f3c11b656e0e17c050243f9cdf40da3646c881f441bb545c3820345934da60ab80f2e77f575d1c1adb55d8017277e4fe01b68b5a2f692
 DIST swift-asn1-1.0.0.tar.gz 72780 BLAKE2B 
87299655f63c9e9ca7633173a824f1b95a77288b127d6bff9c5d9a70d2ac948d4fe51a03fbf8109f3a812948b19e74a2eeebf1a734661e5068a0b2f87ec6df50
 SHA512 
f0e3bd7a4369b84a140e46a111d3985b62e74581ca631e4354ef769ae7f9190ffb3ff68ea3917df9c377fc308a8681a69b8dea4158a05daf798960be229a48c2
 DIST swift-atomics-1.0.2.tar.gz 158849 BLAKE2B 
d454e99d5588f2819238deaab15484eb01828cfe0be249381c9cd67fcd9b452df7b0815aa3788e8940889bccee8f1769738425b03b6aeb8ddea32a3827775c5d
 SHA512 
b538a9709eadfe96831393b977add28227da65d814b248bd03effc2bb7e36fff69cca692a6fd5946a029d43ddaca9b38aee91d9abf01e09ec8e5473d07d6886f
+DIST swift-atomics-1.2.0.tar.gz 195733 BLAKE2B 
60c7cd17e382ae0028712943bdc5c7b76fa22e33405da0a713255cb1bdfcb4ca0c7c6ef70b610081f95e4de024cc58976e3e7c6e387a95842ac9871eb68e5d81
 SHA512 
efd9a6e6b016fb0ad2de5d98fb219b893e271378a8c8d23d01215e855830fc6f1728eaec74ba33983ab9e8aece5ed65e310bbae84c289b43e458941080293351
 DIST swift-certificates-1.0.1.tar.gz 456979 BLAKE2B 
909bfd5ec060cc827541a9740d6ace4ff62f254d510bdb25d3d44692a8c0322572b34779cf3e14c48753d2a936a217912c055831945f99c36dfcab7a42dddb2a
 SHA512 
ea645425fffdb377efe1de9b897a7a6e42dc6668ce93068bbe6de69d42ab6e9801b6d9ff817b728d58eb9e2f66c4932869c281864bc432bd9fb9acb829311c41
 DIST swift-cmark-5.10.1.tar.gz 311407 BLAKE2B 
fae5e3b6146299012b0881049a2118bcb6c630e292d16217915661dc17d9f05c5995d69e7939243469fb3fd4cf0652ca226e867d5bb1802dd4e495caa81f1ccb
 SHA512 
cb7ffad3ec3fbc74de28df56f4ec5850047abf38ae4a2fdfa37aeacd122c52e3164ef965b582a184911612608df0e450481f9f8c25d11c565518ab39a0d24199
+DIST swift-cmark-6.0.1.tar.gz 308687 BLAKE2B 
623dae43eef586aba898338feca08f844f20f29c693fd88aa6be5eab67603c6dacfba413a29f6dfe98e40a2bbed44f50e746541f9ff2fb8add22ed8159a6714c
 SHA512 
5f5dd39e9e686b6872312193eb45d2b219e5d3867b5fb9c2a833adf6dbd93d54c022ce7e2b96c2a9006118c1b2acf676937a127a4a8341f316154c32ba6ba3ca
 DIST swift-collections-1.0.5.tar.gz 3796586 BLAKE2B 
eeb5ec3418b79ba956c1417bc8c12b8affc2d517dcb174f2215de1bec00c802572e6c19598005298ffc6a57e31493d7cdd1c9214b97762f9bff6d0fa01f2263c
 SHA512 
87309c52e5d2115ce8aedda05f35f40e919b367663d9032a159a31163fda7d0aa78df9049e424bda65fe58c4f2a1c74a784c4c6b485581eef450a022a5a7d700
+DIST swift-collections-1.1.2.tar.gz 5627660 BLAKE2B 
176151fe819cd5ca0d5b71712dd080b53bd839fb3c99e35e572fb13f81c3e2b5e2ef986a845a19bf41496cb782a787fe042cced24946b2705a1f7ab47ee8e9ca
 SHA512 
830a3a8923e498a58e5638bda5157c0a8ca20032daa73e752bb445314e3c8050cda85dfba78105f3e76d66832e804b8efc6c05aec117b687a83fc34e9c724639
 DIST swift-corelibs-foundation-5.10.1.tar.gz 4479830 BLAKE2B 
3fc6773d5fe6971d73360105a25af8d69b6d0f89aa2e04e54f914a433edd97bc7f28f02876fbf84c602ea6c81431d0f490013b988abb56e9a3503c095222994a
 SHA512 
e4ff04e1eb742455f52b43f0a3a1725d0c1c132d2192e4779073c7690ff12991c62c20ca0a42b81d2af12b394e4720309a07cd303ba12f22c2f917570ed0ff5d
+DIST swift-corelibs-foundation-6.0.1.tar.gz 2323149 BLAKE2B 
35f19a069045d5bc0704d1a0dd5965ea76fd7f2471294e07341c9a9b7c31b270cbd0a103474d3eba7c00e2eccd522b42ff3d7cb9949a270e3f83e2a5f355bbba
 SHA512 
4473cbf1601fcfa6931bb52e961c3fbaa7b649e3f8c53b9d192b1dd842b5b0d0ef97ced7bcd4e56b79beb19b05f7c1303de13a00fe371a039708b73bc78e7160
 DIST swift-corelibs-libdispatch-5.10.1.tar.gz 594770 BLAKE2B 
7e983d27e04dba01f04a2a2e3d5ff6652a2b435497b5cbf392fd77fd385d8dc67a7f1cba7d483a2ee69a9e39e0b7761e31d63dcf6aa8cf068356994c446151ed
 SHA512 
fa8278adbdfd5b041c89a7b14a17aaa805a6f4db12221ff469288bb8d945fd28f16a8d66f56148aeba2e6be30bd6655fbe375d7843d1cb54407527d998e6d6fa
+DIST swift-corelibs-libdispatch-6.0.1.tar.gz 595115 BLAKE2B 
2db7fe92b86c800c6d17f567772eab6c2f4c3e79b31443aec2a53794ad1d6067d1bf88d79e93960af47b99e83631ae77608afdc514e2f307c1f231c8670353bc
 SHA512 
b277dcfa15a9c7d0b6a7148b0c0d8cb000df314c9af3fb9461c6128ab64e89909f0ac8e7c68521e019024894e4cff5dac03597abcf91596541dcd7d40da180c4
 DIST swift-corelibs-xctest-5.10.1.tar.gz 85377 BLAKE2B 
aca181aa499b90009678fd10d3a60c063546d66f511ddab9ea88b8674d3919b969924ffacd350aef7a9c7b7ba911a15022f7fce3b578d4dccaa29d89e6f094ca
 SHA512 
6dad6f84ef5a47a74d25211efc25cc2baa13bf0019145cc96ad4d5ac7ddcf79b60dd775f610d099848e3a7b4856f8bb9c06558f6f971324474ae2e6fa8a7cd4f
+DIST swift-corelibs-xctest-6.0.1.tar.gz 86268 BLAKE2B 
3dd8db95be1508e9b7f79d375d65d935e7c3c5ec0c0cd4ffca5fb7851bfb58d895c81e7459b0bbbb2e0c9907ace3b6d7e335c6cb1b4c5f36053ef6dbf4c02f6e
 SHA512 
9bfb582d42cc7a905df25204c6a7645ac3c0d167f9c3f1ea81be3ebe9cb6efabb5e410903c1644d2be06c18468caf3b9656c6a7e0abcc5b9b16cc9f0d2774a86
 DIST swift-crypto-3.0.0.tar.gz 6840005 BLAKE2B 
847314bbb05a744198d85b740175b393c3d2b67df068fb096702d932a3482a61fb1d89b95516974437d4ddabdcb8f5f227e8dd9965a4bd69ecd19ddde9c5f88e
 SHA512 
2d79147d32bfb8449726c73c8b267262cf1ddc7c18637f4168e3fd848ba71c0719b23b5683ca513260cbc537fc439e38488ae16010717303625bceb7d5edd36f
 DIST swift-docc-5.10.1.tar.gz 16281601 BLAKE2B 
b95080699fa1ac9b85a8d6f4e596016362e0699800db088b802ac9abf0ee537416eb63fe1c785a57b0dafd24cb269af1872f0b48eef7e0eabf4c1c3ad2f12e47
 SHA512 
d72849e583211ff5fef449de2257629b67511476f06724ed798428bd4f5e29224860854bbd262c3d4ae786397704d9589eb2d84a9d4d95f385fba9bc491e208b
+DIST swift-docc-6.0.1.tar.gz 16449825 BLAKE2B 
ff775fabcece5977d89bced3cde8c80126619fc302e1556b9bfdb8db4c0f5d1975376c03094a31890ee1140567c005b2a1387bab8605274d21d4b819bce871f8
 SHA512 
3e80aab54c509097ad8edb27d605c31d89e2dea7c1939386ac34c2dde41a841f352631012e942a112ad87a8655dcde9e25ba417119ee69626c40addae75ba211
 DIST swift-docc-render-artifact-5.10.1.tar.gz 284108 BLAKE2B 
1edcdd656a856cc5c75983fd433a3bd0b6288238731fd9e6d2deaaa83b5284fbdab64080027670d90405bafb0ba82296adc4409bb0247ff7ec38b26f0a4094a3
 SHA512 
d646a4263cade323c2a19f06f1c909e02606b92953b72aa37dc1e49e99199085484d68f90259a821b4e81f2b18de624648db50bde0d8cfd852c291cad39ff282
+DIST swift-docc-render-artifact-6.0.1.tar.gz 292345 BLAKE2B 
122ddcf1fdad0bc4f207e192ce1f5697054ba9f22ad599ad33985d64c188a917fee0d4744d8e785f5caaa2c513ca7420d59a998dc60ac321c1f586b9a0d1e89c
 SHA512 
07c2512e46ea38109f89fe0d5f09f419ed6be85b9e407613c300be769570c65d5d895ffbd0bc392c57aa1f9d0b65db665b92c3f4e5c0c37b6967471ca7652665
 DIST swift-docc-symbolkit-5.10.1.tar.gz 171631 BLAKE2B 
fd72a3e7e36162a0ef91ad60166b4abbe56b52c4ca7bebbd045163e45fc85f196999ddaedd8066dc8c6fd24e949c4f299ca3d9023b73abbda1a9c618a71c5e16
 SHA512 
cf7a058aeded8455656fa70443b9e280488391957e9003c85c4166925ec6de74675fe9a61571da5897853626e91e4353d72abc76d71a79f4f32e2e4d5b7f4ed9
+DIST swift-docc-symbolkit-6.0.1.tar.gz 195712 BLAKE2B 
48809aebe676179c44d4e9d40cc900c2dabb25522b1172bbbf0a821152ebee98d64e0784954f29a3d5e2f0079bf9577a8002961ba0b028100b7b30677ef2e838
 SHA512 
2f7c87c77db7de1c9592b76e9586a148d5c1d63640fdc6bcea2b97fc7df43abf410aa220e3c6a86c98362d5867f2bb146b876f0944b4f2dc1390b8ee1a8a89f6
 DIST swift-driver-5.10.1.tar.gz 2444415 BLAKE2B 
5cd3ed582e1473db8c6d571be8d459b29fe4d1b21ffdc686f72b96495c7f0f33565ed27f8822cc157d2db4b7703b07b23dddd9a0ac925d52af68c55dfcc7c0b8
 SHA512 
77ce7412cf2a5077331250b1fa70e56b6300340aef7224089840018519cab46bcc011074478045e4bf30502912a0619a842bc082509145871a3c0f1da14ccde5
+DIST swift-driver-6.0.1.tar.gz 2470598 BLAKE2B 
1df1901a0083b7a4c2725f20c9fc5f57d55ba2852d70329f161effeed5189fbbe2932f78bd6e5d2d77f02d1d624361da2640e17bdcae03d714733371270f4922
 SHA512 
42c9978ec26f9ed81b981f80bf4f12d4abf97a7f852a6d97bd564ca5eca8e26dad9e1acb19ed119b54301a828a6c6f52d6e5ab7f4fb29725fe42ca935978002d
 DIST swift-experimental-string-processing-5.10.1.tar.gz 2579674 BLAKE2B 
0f65c0daaeef6bd461fd13d85f822d7878e1d7c99fd03fa828f54f87743048807aee2aa24e5c6962acf29b06aeb56f4578df89f12427585a891a37caf9032abc
 SHA512 
89650c6b68ee6a256fadda84e68d7ea4faf3c09859e80bcc270ca36433ed3e652c7139ed868f6f515e3193928a100c99500574eb614dbf97c345cbfefdb245c2
+DIST swift-experimental-string-processing-6.0.1.tar.gz 2589496 BLAKE2B 
ce0da5423ee06fe2c2931d6c00ee490c490dfacf64fda6ffde841e27e19be283468a6f64efaee43c982058e15d9ac17dbb9fafcc95d3749f969a0785fe772a4f
 SHA512 
be5ef92d5ad8cd34fecd31dd427c275fdc537d2795ea5fd76e27484b6c43e1a3187b603c5544a5cde7806763f9fbf33103910a9054a2d27549028f847dac371f
 DIST swift-format-5.10.1.tar.gz 253210 BLAKE2B 
3ca03c57a538e7a894d01d102dea53b07535022b63291633fed55e762be1065951af20cb34aa1e039f43b2cc819a6096474cb693b072f312524191b38ecd564d
 SHA512 
ea072e5c73f14e3c7382bdeba8029ac32d85cb69f99ded1af20c0f3412c8f40ff1ec831edf3e0c8453ffc6fe2d0ae0acdff57cdf914dd796520420ac486c11ef
+DIST swift-format-6.0.1.tar.gz 270873 BLAKE2B 
5a20aeeea7f9e9d7039cf4526711ffd2cd267d523f973a334f82922a649b2df1875ddbfd672519c46b926e5f14b8f85d905321fe28bafba00c7f304d4735352b
 SHA512 
d22e7e03ff61e0044c14b467d5f981e2ed1828452cca72514258a50b26e950448d7836a6267f972e91582a0c97a61f970b72d75c54521df1fc13c240b0bd3fee
+DIST swift-foundation-6.0.1.tar.gz 1732371 BLAKE2B 
1baef46399c67a24a33f4f49cec0ee5fe781e112bed723e5b0fd757bc12cd0cdf55bf8084ac82887bb31b7fb111a14c7a201a7c7dbf46522f3c8181fc45708eb
 SHA512 
65df70d1c0ec7a07faca665d7f88e769b66b6518ba3cb307b7c973e3de0866900a42a9ff4a307b57169c04a438eae8d5b6fa73dacbb475f0415d07a7f9f360cb
+DIST swift-foundation-icu-6.0.1.tar.gz 26058644 BLAKE2B 
2cd20b5e1957a0d5e360d0195e79980aac4da021ac64c369ee32032389d6b9d8a4b692ec90b20483b070e2b8ed0aa8f90fbfd3b69846659c3545c182bce584a2
 SHA512 
dec761318b18cef38162c7c5f63c920320ac34abb7bc8943d3ae6b9f8a7412cda2d11674b9d290f88bcc75c26159cc2414fa4238d4fb4763006c51d2385c297f
 DIST swift-installer-scripts-5.10.1.tar.gz 187723 BLAKE2B 
dc5839f547771b6728be204e90be5b34499dc2490b9ef6fb025c62ba580c6e7e3e0bfc0f186dc88c72f9229362c1867db5818b5b212230d38e4b6de1edd5d075
 SHA512 
91ff31237218415271008867c11447bbec7c78999430792d338e404aa9a0028b23d6f1526eaa2f75aa9a3db341a9d1cbd769807e8ac5920140d8e68ed4febb8f
+DIST swift-installer-scripts-6.0.1.tar.gz 189290 BLAKE2B 
207b0d1fc927b7784376d2d96189ba99a4d51763bb8e7e1ce623fd0d8401fab59731ffc539706b73f884e025e7f6df603a95be0a218ff859444abed94cc5f2b2
 SHA512 
f5f60baf92f7d83060809efb00650e761ef8d27f00d00424f42082b303a7d5ebfb50b40a90a5943c0aa48c325954afb722d1530f2aa034467921d0067ffbbbd3
 DIST swift-integration-tests-5.10.1.tar.gz 17872 BLAKE2B 
33061a544f0c34d9719e2e1da7f1ea5ca72c2f7f15fd8bd2626fac6e07a14d76b40fc299adf8925c9c6e94c6052578d8124355757f4fd4163341fdf9e680b03b
 SHA512 
52dbcd7a9b509253b6f2df4467ebcf0ade8d941581883fa9edf6461ab308f2e07b80e95aa673155066324802e57397887d01249bf055178e08ca7483c11b2250
+DIST swift-integration-tests-6.0.1.tar.gz 19487 BLAKE2B 
16a3f7df00c8bbe6faced2ddcc76f13ba9190a375a9884ab23c9cbe8b539b4329059821efe4b1534081ae80664b433d2aa6f09b62baff8fba7d40ca79e0aab94
 SHA512 
5a7719455e75a8ae54838ca272764154437c5d9a984c035aa23988585ea2698882f97419780ff84b74ffce5da1cf67d6f4af8eae4dacd9e394f3b3f398d510a3
 DIST swift-llbuild-5.10.1.tar.gz 7092051 BLAKE2B 
ddbbb05375e024a1b832e42d1a37b6baf09f59dfe4b4b208b000ba274431c39679c5e1e8c4bba3f27caed87e98d1201b1ccd0f693808a3e9ac5566ae8f4823d8
 SHA512 
010ac22ff4c6e803a537e6e84b3f6047d74fc35f773fcf51f52f9d1546196ed73ab42ab90d1346a0a74239c4f1d11cd183018f42726df42dc921bf0d2235d850
+DIST swift-llbuild-6.0.1.tar.gz 7092245 BLAKE2B 
e5d171a36722a44f32cfcd344efd1daaeab034ae90ccbbc7b9a33230978e1483556a234d00db318a7eeacff25cafa8300ab70d51ea80670a4811eb5acd4cc0d4
 SHA512 
d38e3df709f795c002d5d77ee2faf593179d591a9acb9e5a74c06dca4a52ff2f9533ba43b6b76579980a4f5c5a6058e188cf2c5e5443501b00cf7c0760917ae9
 DIST swift-llvm-bindings-5.10.1.tar.gz 7164 BLAKE2B 
e466b395f8964b2f340737b47675af65d71742d581fda08ccca66025314a8a792f11a0edccb4816ef3508f3fb15039986432164ece827d59812db9af81d62d5a
 SHA512 
c2f5ed4e6e33b3f9bf3c746cf01a59e98476b402e69cd8dc6f3527e6376669274360ad1aa2035d9dea87d3ab43cf20817aa42a779a3b777d9670e4f954800262
+DIST swift-llvm-bindings-6.0.1.tar.gz 7225 BLAKE2B 
78c83f1edb4ecebb9992578f91f46e7ce89bbd3695324b82c8be6f4b2d6f6e635bb2f9dac4ca629009d5d690a0491af8f588510baad43080003b9f234b428a2f
 SHA512 
873ea61c49aa862954c42f8de9611c2aa100295f37673209d7906aa2f92426baba82fa771dc7063a22578e8218475049c35daf75a9b0130f6fe2a98174beec34
 DIST swift-lmdb-5.10.1.tar.gz 153468 BLAKE2B 
56b94dd54ed68d3d70cd482273d0e963c540009401ed497b65a4be03975d4370fa674b82cd3ad1d90b8399111fd20d44ca57991868785fb3d5bb81ffb74bbc5b
 SHA512 
ffbdb5f0efd84b9826c23919a7d4941f6b71ad78a389814e56c2862f441a37484c020aa54e5984076634d5f15c088eeaa84b658f357d4585109c4ca8535ef6cc
+DIST swift-lmdb-6.0.1.tar.gz 153794 BLAKE2B 
0b14ad733747dbc546f35f7318e3e704fc88bf456d421d2b75b6be761d794d6a161d3f0852a35389ee277e47312c1a05f4ffaba8d80f9dcd1c0dadab47744ad7
 SHA512 
d137067c79e802451fc4882908aebc986504f9b2c3cd25bdbfdf6d52aea1ee53c5a0f5ff5df591036814d241f5d1471a7a61bcef1dbafb80304ba807302b7b84
 DIST swift-markdown-5.10.1.tar.gz 107990 BLAKE2B 
fdb8519b634d86b7e2ecc5b12e31f412657cd5462d5c45ef64b621243e1710978a7b05916a1a22acf96741acef3ca94ffeaab6e3bf353fdbd57ac0655cb408dc
 SHA512 
df4d1f240c0d92b2df9bd48b5cd750402a2f855d2a989d7c3722f3eeeaec067d7562caa38b8ea664114359b9c6bf4f2d5502acd62225e3a5e278bf9525f7d24c
+DIST swift-markdown-6.0.1.tar.gz 113374 BLAKE2B 
b9f66189ed9ef91c837b667a2c8574bf705249981fd8ae1f6556a0424750d3fd7851de3bdb9234bd3c5c8149ec0fa04b6eb1538eebd7d8a900cf71e3a9d007b1
 SHA512 
394a4e4d2b176a19aa0f5c294ce6da30cf3fc1d696c7cb53363ffe0187905c4d43d0475c94a02c5dd98a6cc7f56ba2ac4c5b1ca5f6220e4cbadbfc04d0ea8b37
 DIST swift-nio-2.31.2.tar.gz 761397 BLAKE2B 
567acc6487769e5b8b68a7d51e93f84646bcf66d8569b41a631077af3b2be3ab6bf1aaa2d3f59d2705b9f1e2448d99754e625409a78c29dc80770577b0bfa631
 SHA512 
e8b8bc5d49c92e327d660c1ee34a9bbdb169e19501211ed56765c51303905494f808d4b76ae9f9a50718db5efe337961ef6baad146197c9d7ba7a8b6c08e3a8e
 DIST swift-nio-ssl-2.15.0.tar.gz 2448033 BLAKE2B 
a4f795ca965313d4ec33e9b265f2af9fe1a483bc1f266602056c97bb190ff56010c62d3729b66ff1180ff9c2b8f48e697f237b87c3ce0602b717d8d2e8c00b16
 SHA512 
5ba54beb93d669715b05627455003aad29847f04886ed08fd6bcc37f3ffcb64183c033ae3220446d69bc720a3da5940f3979b8039ddbe8869d81d70a18c42e36
 DIST swift-numerics-1.0.1.tar.gz 55942 BLAKE2B 
ef3be69b6ac73a86f2dfb7dd5757129d45a2b8dc67500a656d8d68fadba05340032eaa710110cfe7a95ddb438785011416aad8c988e25ba3161dd0a2184bced5
 SHA512 
7d0d8f27d8c639f92fb652183ade9032b36f39e19b966aa734cab5b4d43ce5d342856dddd87ac1d4cd605c18583c8e629f37634e440de34ec0d5e18aa138d0ba
+DIST swift-numerics-1.0.2.tar.gz 55992 BLAKE2B 
0d869a2a03294d7bb098384aad390e9a52cd5ed6108625872139cbfb691d7e2ee63ab3c2729eeabc3ca061757e32c1580a881e09c925b8d7e60ecd5d8628cf1a
 SHA512 
2d6a2c6aa21a86ece26983cbcaa366bd726e4e0c4341e4801510a0227be8856280102fd04726a91b5b335aaf7eb609b04113d6af824e904ae4c768755dd6707a
 DIST swift-package-manager-5.10.1.tar.gz 1522538 BLAKE2B 
79406e3f28f6cd577b42c3afdfaa64cd180364eda4165b0256ee36979b340d609162e8dcfcd63c57f7ac5277a92facf5cf9b304dbe19aab6f6632b1bbd379ceb
 SHA512 
303e2b02bdc16cfe3a8812e4d5a79de09ef7367a2f0bbca28c55e2f037b0a8dab684bcaa7189dbcc6c6876d21a4e4da2b0956743b99a0b2c7d4a1be415e0df92
+DIST swift-package-manager-6.0.1.tar.gz 1640349 BLAKE2B 
edf72eb5864a181c7090f5c61ddbcb1aec4b4952f494c665443d252b537b2027a9e0de268c83c21537727b22428a96c5ccbeee329b00c28c6fd8c54f7ff3b1b1
 SHA512 
483925892b96ae83aeb9849dd994ae4be2802735aa761b70809f155c3181cfba77cc7cfac72ccb3cad99ef3cdd6e62907915fcdafad05988a85994bb794959fc
 DIST swift-stress-tester-5.10.1.tar.gz 97998 BLAKE2B 
a06b983df45c3664f5e74c235f44c1dc887d7ceb10a8751b8f800e33fe8d6017429e50d3e7598f0d3eec4741445884c1224f445d13eb08fd8de0773e59cb84ef
 SHA512 
a0f63b902e7243b455a0e7f60b11e8c0e6448c56a8db39c96fc40bd99a79f2a23147f631b04d79713832bca44403c5cba5b2a8d96eb5bbd4515295a00126290e
+DIST swift-stress-tester-6.0.1.tar.gz 73848 BLAKE2B 
881a3997d48420a99435d01d26c74e82fce1a2bc3c712925efd79710f4dbce1d3cd37b51af5d67bf71c16e4ebb84d4a8e86269e2db4cb47786967e0f2f435eff
 SHA512 
7aecac7ffa302d1812a0d7ef4ab6f21ba867ad90cb76bc547bc4bc3ad46d8a2db009464dc22f008c12ad1b280fe779add77c2cafa3d68a401c018e09d867f7bc
 DIST swift-syntax-5.10.1.tar.gz 1142270 BLAKE2B 
f80ede64271445136a68bdefec85d9da6657b4c14e987af5f6ee7b3054e0a1908ae2ada6980da4bc27a8ed8ada4459ec96efe6fba119a4ad4c1487174405f576
 SHA512 
6c163502fcf9ae5775ebe7ddc9446a69a2f31e78a161a3f6414a173f501d5479e8be5023a8514ec14a54d5448404df4a4505b4459a8b06fa6b470a453cab5769
+DIST swift-syntax-6.0.1.tar.gz 1260971 BLAKE2B 
d005463b72cc9350a9eb276f96f2d8e6190fa6730a1b2338eb9a57c09a4cd86c99f19ccdea5a4b91a46865dfebd178d489937c5ec1b8346c476313b416c807da
 SHA512 
539328a40541f1de56b4626a40aa6868fb2c998e6b0fada9d0ad2d5fa974210fa74a61fe2dd860826786bf29729a19ebb32e449336fd62b5dbf0397f241d1384
 DIST swift-system-1.1.1.tar.gz 69981 BLAKE2B 
c6e6685228642bcdf403806b58d5ca426ef3c5f85737ddfd52e189b326871f2c482436c90a841c35e83db6dec95cbad3538a38b5c112de9ae7495d7495c61861
 SHA512 
fec08fbc352197215596974303cd7e08b46ff44b1bd36c70b95be4e7490880f4d7e645e64e90f1c81bfca06d9302c600ccc02c9f5cc7b83a69da46489b105e1c
+DIST swift-system-1.3.0.tar.gz 74773 BLAKE2B 
ce43ab596ebbcc58d082482d57057b2fc50c2f832ffd38f9bea6a1d54c1f6d79722add4ebf7efa41278e0d1ed47e10353a0ebe63956a4891b68502b91e623df4
 SHA512 
64c53b2e43e0b01135f2566e11af0f527557b64d3acb63904cc6e7ed74a4c08118c887670fd2ecc82e3036d96ed1dffd6066f37d9c660b1e65a63a1f5cee7586
+DIST swift-testing-6.0.1.tar.gz 313164 BLAKE2B 
56395ae2765f92de15f674d99953af928c3b5f476f69dc6de7fd0cef48f0ac2d2a6f7fec3eb1df570cdc9c7db8a8ebfe60fa05303c16e6e00cb868e45843b313
 SHA512 
b8ba58ed115dbbd4a0f864048a7a40df899d5639a24584a67bde7283b3e9495c55d133af774d57ad93fc3f697b9b90095e9541367a5cda0ccfca0b2deacd1697
 DIST swift-tools-support-core-5.10.1.tar.gz 240649 BLAKE2B 
42c4106a94252fd5cc0667e94daf107373996a1aac71c0f2d73307c6186d18e61f04cbae574cfd75e848262ab423faaea79555f0b15b699d3441d2f6d80d2bfe
 SHA512 
d69d2e4e9b1e6c44b97c88b73101f7b66a8adb59275e77ca0e3ededd7bf444285a649855f94e7f8aee7b965b734e9b657eef65671f3ce0c4b0c6971380672e6a
+DIST swift-tools-support-core-6.0.1.tar.gz 241682 BLAKE2B 
283d75a689a109980429d566d3e1929adb18448d6f2141be160282570ba2fd13341f4492177728b3d642d283369477f01ae0fe120dce57c5883e42d094f28603
 SHA512 
d37f65e7fda89578c2ecfda3a0f3edfbf67b43ce7a5821e86e72cbec8d17f329a9ea518ecf3e8a51aa54e183cf0e982593a9978472fae51440faa14478f0f74a
 DIST swift-xcode-playground-support-5.10.1.tar.gz 127305 BLAKE2B 
702f331c5dbb6fd6c11506b8cd10cdf27d36ee4ab273d5a18d5d80c068ba3fdb7a8b99eeb27f4dfcb7a8bfa060a73452ed4a8e98ac7eb33f8ea657ae67573b21
 SHA512 
d1f9a178891c64c3e40cd2ae56a48b8afedeb1981330776a04bddff9b94dcaf09542291bf234e6ed1515e046fa8fced506e7b3c3461bc690ca01a58640222c24

diff --git a/dev-lang/swift/files/swift-6.0.1-link-with-lld.patch 
b/dev-lang/swift/files/swift-6.0.1-link-with-lld.patch
new file mode 100644
index 000000000..706f7f476
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-link-with-lld.patch
@@ -0,0 +1,74 @@
+# Swift defaults to building with `gold` on Linux because `bfd` can't correctly
+# handle Swift symbols; Gentoo no longer supports `gold`, so we have to make
+# sure that we build with `lld`.
+
+--- a/swift/lib/Driver/UnixToolChains.cpp
++++ b/swift/lib/Driver/UnixToolChains.cpp
+@@ -109,36 +109,7 @@ ToolChain::InvocationInfo 
toolchains::GenericUnix::constructInvocation(
+   return II;
+ }
+
+-std::string toolchains::GenericUnix::getDefaultLinker() const {
+-  if (getTriple().isAndroid()
+-      || (getTriple().isMusl()
+-          && getTriple().getVendor() == llvm::Triple::Swift))
+-    return "lld";
+-
+-  switch (getTriple().getArch()) {
+-  case llvm::Triple::arm:
+-  case llvm::Triple::aarch64:
+-  case llvm::Triple::aarch64_32:
+-  case llvm::Triple::armeb:
+-  case llvm::Triple::thumb:
+-  case llvm::Triple::thumbeb:
+-    // BFD linker has issues wrt relocation of the protocol conformance
+-    // section on these targets, it also generates COPY relocations for
+-    // final executables, as such, unless specified, we default to gold
+-    // linker.
+-    return "gold";
+-  case llvm::Triple::x86:
+-  case llvm::Triple::x86_64:
+-  case llvm::Triple::ppc64:
+-  case llvm::Triple::ppc64le:
+-  case llvm::Triple::systemz:
+-    // BFD linker has issues wrt relocations against protected symbols.
+-    return "gold";
+-  default:
+-    // Otherwise, use the default BFD linker.
+-    return "";
+-  }
+-}
++std::string toolchains::GenericUnix::getDefaultLinker() const { return "lld"; 
}
+
+ bool toolchains::GenericUnix::addRuntimeRPath(const llvm::Triple &T,
+                                               const llvm::opt::ArgList &Args) 
const {
+--- 
a/swift-driver/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
++++ 
b/swift-driver/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
+@@ -17,26 +17,7 @@ import struct TSCBasic.AbsolutePath
+
+ extension GenericUnixToolchain {
+   private func defaultLinker(for targetTriple: Triple) -> String? {
+-    if targetTriple.os == .openbsd || targetTriple.os == .freeBSD ||
+-         targetTriple.environment == .android ||
+-         targetTriple.isFullyStaticLinux {
+-      return "lld"
+-    }
+-
+-    switch targetTriple.arch {
+-    case .arm, .aarch64, .armeb, .thumb, .thumbeb:
+-      // BFD linker has issues wrt relocation of the protocol conformance
+-      // section on these targets, it also generates COPY relocations for
+-      // final executables, as such, unless specified, we default to gold
+-      // linker.
+-      return "gold"
+-    case .x86, .x86_64, .ppc64, .ppc64le, .systemz:
+-      // BFD linker has issues wrt relocations against protected symbols.
+-      return "gold"
+-    default:
+-      // Otherwise, use the default BFD linker.
+-      return ""
+-    }
++    "lld"
+   }
+
+   private func majorArchitectureName(for triple: Triple) -> String {

diff --git 
a/dev-lang/swift/files/swift-6.0.1-swift-backtracing-noexecstack-gentoo.patch 
b/dev-lang/swift/files/swift-6.0.1-swift-backtracing-noexecstack-gentoo.patch
new file mode 100644
index 000000000..83cf5de04
--- /dev/null
+++ 
b/dev-lang/swift/files/swift-6.0.1-swift-backtracing-noexecstack-gentoo.patch
@@ -0,0 +1,15 @@
+# The Swift backtracer needs to get CPU context information when producing
+# backtraces, which is necessarily written in assembly. Because it tries to be
+# portable, it doesn't include a note indicating that the assembled binary
+# doesn't require an executable stack; we need to include one explicitly to 
turn
+# it off.
+
+--- a/swift/stdlib/public/Backtracing/get-cpu-context.S
++++ b/swift/stdlib/public/Backtracing/get-cpu-context.S
+@@ -140,3 +140,6 @@ FN(_swift_get_cpu_context):
+         bx  lr
+ #endif
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif

diff --git a/dev-lang/swift/files/swift-6.0.1-swift-build-preset-gentoo.patch 
b/dev-lang/swift/files/swift-6.0.1-swift-build-preset-gentoo.patch
new file mode 100644
index 000000000..747fb6ab0
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-swift-build-preset-gentoo.patch
@@ -0,0 +1,51 @@
+# Individual preset options:
+#
+# 1. mixin-preset: building for Linux, without compiler assertions, and with
+#    most tests disabled
+# 2. build-ninja=0, libicu=0, skip-build-curl, skip-build-zlib: we'd prefer to
+#    pick these up from the system
+# 3. build-swift-libexec=0: don't build binaries normally installed in
+#    `/usr/local/libexec` because we're not allowed to install there ourselves
+# 4. extra-cmake-options:
+#    * -DSWIFT_USE_LINKER=lld: let Swift know we'll be building it with `lld`
+#    * -DBUILD_TESTING, -DSWIFT_INCLUDE_TESTS, -DSWIFT_INCLUDE_TEST_BINARIES:
+#      the `no_test` preset disables building most, but not all tests; we don't
+#      need to build any of them
+#    * -DCOMPILER_RT_BUILD_ORC: the `compiler-rt` library defaults to building
+#      the ORC LLVM JIT library, which we don't require; we disable it because
+#      it builds with executable stacks, which trip up warnings on installation
+#    * -DPython3_FIND_UNVERSIONED_NAMES: LLDB ships with Python bindings, and
+#      uses CMake to search for Python. By default, CMake tries to find the
+#      latest version installed on disk (currently, `python3.13`, then
+#      `python3.12`, then...). This might not be the version of Python 
specified
+#      by `PYTHON_SINGLE_TARGET`, which we want to respect. We use
+#      `python_setup` to place `${EPYTHON}` at the front of `PATH` as the
+#      unversioned `python3`, so we want CMake to discover and use this binary
+#      first before falling back to its search
+# 5. llvm-targets-to-build: we don't currently support architectures other than
+#    amd64, so there's no point in building LLVM for multiple architectures; if
+#    this changes (or we start supporting cross-compilation), we'll need to
+#    build for more than just the host
+
+--- a/swift/utils/build-presets.ini
++++ b/swift/utils/build-presets.ini
+@@ -3040,3 +3040,19 @@ skip-test-cmark
+ skip-test-swift
+ skip-build-benchmarks
+ skip-test-foundation
++
++[preset: gentoo]
++mixin-preset=buildbot_linux,no_assertions,no_test
++build-ninja=0
++build-swift-libexec=0
++extra-cmake-options=
++       -DLLVM_USE_LINKER=lld
++       -DBUILD_TESTING:BOOL=NO
++       -DSWIFT_INCLUDE_TESTS:BOOL=NO
++       -DSWIFT_INCLUDE_TEST_BINARIES:BOOL=NO
++       -DCOMPILER_RT_BUILD_ORC:BOOL=NO
++       -DPython3_FIND_UNVERSIONED_NAMES=FIRST
++libicu=0
++llvm-targets-to-build=host
++skip-build-curl
++skip-build-zlib

diff --git 
a/dev-lang/swift/files/swift-6.0.1-swift-link-ncurses-tinfo-gentoo.patch 
b/dev-lang/swift/files/swift-6.0.1-swift-link-ncurses-tinfo-gentoo.patch
new file mode 100644
index 000000000..1a0f6fa2e
--- /dev/null
+++ b/dev-lang/swift/files/swift-6.0.1-swift-link-ncurses-tinfo-gentoo.patch
@@ -0,0 +1,188 @@
+# Various Swift components require linking against `curses`; Gentoo doesn't
+# `curses` as an alias for `ncurses`, so we have to link against `ncurses`
+# explicitly. `ncurses` on Gentoo also doesn't expose the `curses` terminfo
+# database interface (e.g., `set_curterm`, `del_curterm`, etc.), so we have to
+# also explicitly link against `tinfo`.
+
+--- a/swift/utils/test-prefix-map/Makefile
++++ b/swift/utils/test-prefix-map/Makefile
+@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
+           -I$(objroot)/tools/clang/include \
+           -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
+
+-LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lcurses
++LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lncurses -ltinfo
+
+ main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/PrefixMap.h
+        $(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
+--- a/swift/utils/test-successor-map/Makefile
++++ b/swift/utils/test-successor-map/Makefile
+@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
+           -I$(objroot)/tools/clang/include \
+           -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
+
+-LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lcurses
++LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lncurses -ltinfo
+
+ main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/SuccessorMap.h
+        $(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
+--- a/llbuild/Package.swift
++++ b/llbuild/Package.swift
+@@ -227,7 +227,8 @@ let package = Package(
+             path: "lib/llvm/Support",
+             linkerSettings: [
+                 .linkedLibrary("m", .when(platforms: [.linux])),
+-                .linkedLibrary("ncurses", .when(platforms: [.linux, .macOS, 
.android]))]
++                .linkedLibrary("ncurses", .when(platforms: [.linux, .macOS, 
.android])),
++                .linkedLibrary("tinfo", .when(platforms: [.linux]))]
+         ),
+     ],
+     cxxLanguageStandard: .cxx14
+--- a/llbuild/lib/llvm/Support/CMakeLists.txt
++++ b/llbuild/lib/llvm/Support/CMakeLists.txt
+@@ -64,6 +64,4 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+     execinfo)
+ endif()
+ 
+-if(${CMAKE_SYSTEM_NAME} MATCHES "Android|Darwin|Linux")
+-  target_link_libraries(llvmSupport PRIVATE curses)
+-endif()
++target_link_libraries(llvmSupport PRIVATE ncurses tinfo)
+--- a/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
++++ b/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
+@@ -33,7 +33,8 @@ target_link_libraries(XcodePerfTests PRIVATE
+   llbuildNinja
+   llbuildBuildSystem
+   llbuildCommands
+-  curses
++  ncurses
++  tinfo
+   SQLite::SQLite3
+   "${MACOSX_SDK_PATH}/System/Library/Frameworks/Foundation.framework"
+   "${MACOSX_PLATFORM_PATH}/Developer/Library/Frameworks/XCTest.framework"
+--- a/llbuild/products/libllbuild/CMakeLists.txt
++++ b/llbuild/products/libllbuild/CMakeLists.txt
+@@ -28,7 +28,7 @@ endif()
+ 
+ if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+   target_link_libraries(libllbuild PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+ 
+ target_include_directories(libllbuild
+@@ -79,7 +79,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+     llbuildNinja
+     llvmSupport
+     SQLite::SQLite3
+-    curses)
++    ncurses tinfo)
+ 
+   # Manually set up the remaining framework structure.
+   set(LLBUILD_FW_INPUTS)
+--- a/llbuild/products/llbuild/CMakeLists.txt
++++ b/llbuild/products/llbuild/CMakeLists.txt
+@@ -16,5 +16,5 @@ endif()
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(llbuild PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+--- a/llbuild/products/swift-build-tool/CMakeLists.txt
++++ b/llbuild/products/swift-build-tool/CMakeLists.txt
+@@ -10,7 +10,7 @@ target_link_libraries(swift-build-tool PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(swift-build-tool PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+ 
+ install(TARGETS swift-build-tool
+--- a/llbuild/tests/lit.site.cfg.in
++++ b/llbuild/tests/lit.site.cfg.in
+@@ -21,7 +21,7 @@ config.sqlite_library = "@SQLite3_LIBRARY@"
+ if sys.platform == 'Windows':
+   config.curses_library = ''
+ else:
+-  config.curses_library = '-lcurses'
++  config.curses_library = '-lncurses -ltinfo'
+ config.threads_library = "@CMAKE_THREAD_LIBS_INIT@"
+ if "@CMAKE_DL_LIBS@":
+   config.dl_library = "-l@CMAKE_DL_LIBS@"
+--- a/llbuild/unittests/Basic/CMakeLists.txt
++++ b/llbuild/unittests/Basic/CMakeLists.txt
+@@ -14,5 +14,5 @@ target_link_libraries(BasicTests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(BasicTests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+--- a/llbuild/unittests/BuildSystem/CMakeLists.txt
++++ b/llbuild/unittests/BuildSystem/CMakeLists.txt
+@@ -16,5 +16,5 @@ target_link_libraries(BuildSystemTests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(BuildSystemTests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+--- a/llbuild/unittests/CAPI/CMakeLists.txt
++++ b/llbuild/unittests/CAPI/CMakeLists.txt
+@@ -15,5 +15,5 @@ target_link_libraries(CAPITests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(CAPITests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+--- a/llbuild/unittests/CAS/CMakeLists.txt
++++ b/llbuild/unittests/CAS/CMakeLists.txt
+@@ -8,6 +8,6 @@ target_link_libraries(CASTests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(CASTests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+ 
+--- a/llbuild/unittests/Core/CMakeLists.txt
++++ b/llbuild/unittests/Core/CMakeLists.txt
+@@ -15,6 +15,6 @@ target_link_libraries(CoreTests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(CoreTests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+ 
+--- a/llbuild/unittests/Evo/CMakeLists.txt
++++ b/llbuild/unittests/Evo/CMakeLists.txt
+@@ -11,6 +11,6 @@ target_link_libraries(EvoTests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(EvoTests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+ 
+--- a/llbuild/unittests/Ninja/CMakeLists.txt
++++ b/llbuild/unittests/Ninja/CMakeLists.txt
+@@ -8,5 +8,5 @@ target_link_libraries(NinjaTests PRIVATE
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(NinjaTests PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()
+--- a/llbuild/utils/adjust-times/CMakeLists.txt
++++ b/llbuild/utils/adjust-times/CMakeLists.txt
+@@ -7,5 +7,5 @@ target_link_libraries(adjust-times PRIVATE llvmSupport)
+ 
+ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   target_link_libraries(adjust-times PRIVATE
+-    curses)
++    ncurses tinfo)
+ endif()

diff --git a/dev-lang/swift/metadata.xml b/dev-lang/swift/metadata.xml
index 415909a00..e059c62b3 100644
--- a/dev-lang/swift/metadata.xml
+++ b/dev-lang/swift/metadata.xml
@@ -15,6 +15,9 @@
     <slot name="5">
       The Swift 5 language, compiler, and tooling.
     </slot>
+    <slot name="6">
+      The Swift 6 language, compiler, and tooling.
+    </slot>
     <subslots>
       Minor Swift versions.
     </subslots>

diff --git a/dev-lang/swift/swift-6.0.1.ebuild 
b/dev-lang/swift/swift-6.0.1.ebuild
new file mode 100644
index 000000000..6b4aaa42c
--- /dev/null
+++ b/dev-lang/swift/swift-6.0.1.ebuild
@@ -0,0 +1,237 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( {15..18} )
+PYTHON_COMPAT=( python3_{10..13} )
+inherit llvm-r1 python-single-r1
+
+DESCRIPTION="A high-level, general-purpose, multi-paradigm, compiled 
programming language"
+HOMEPAGE="https://www.swift.org";
+
+SRC_URI="
+       
https://github.com/apple/swift-argument-parser/archive/refs/tags/1.2.3.tar.gz 
-> swift-argument-parser-1.2.3.tar.gz
+       https://github.com/apple/swift-asn1/archive/refs/tags/1.0.0.tar.gz -> 
swift-asn1-1.0.0.tar.gz
+       https://github.com/apple/swift-atomics/archive/refs/tags/1.2.0.tar.gz 
-> swift-atomics-1.2.0.tar.gz
+       
https://github.com/apple/swift-certificates/archive/refs/tags/1.0.1.tar.gz -> 
swift-certificates-1.0.1.tar.gz
+       
https://github.com/apple/swift-collections/archive/refs/tags/1.1.2.tar.gz -> 
swift-collections-1.1.2.tar.gz
+       
https://github.com/apple/swift-corelibs-libdispatch/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-corelibs-libdispatch-${PV}.tar.gz
+       https://github.com/apple/swift-crypto/archive/refs/tags/3.0.0.tar.gz -> 
swift-crypto-3.0.0.tar.gz
+       https://github.com/apple/swift-nio-ssl/archive/refs/tags/2.15.0.tar.gz 
-> swift-nio-ssl-2.15.0.tar.gz
+       https://github.com/apple/swift-nio/archive/refs/tags/2.31.2.tar.gz -> 
swift-nio-2.31.2.tar.gz
+       https://github.com/apple/swift-numerics/archive/refs/tags/1.0.2.tar.gz 
-> swift-numerics-1.0.2.tar.gz
+       https://github.com/apple/swift-system/archive/refs/tags/1.3.0.tar.gz -> 
swift-system-1.3.0.tar.gz
+       https://github.com/jpsim/Yams/archive/refs/tags/5.0.6.tar.gz -> 
Yams-5.0.6.tar.gz
+       
https://github.com/swiftlang/indexstore-db/archive/refs/tags/${P}-RELEASE.tar.gz
 -> indexstore-db-${PV}.tar.gz
+       
https://github.com/swiftlang/llvm-project/archive/refs/tags/${P}-RELEASE.tar.gz 
-> llvm-project-${PV}.tar.gz
+       
https://github.com/swiftlang/sourcekit-lsp/archive/refs/tags/${P}-RELEASE.tar.gz
 -> sourcekit-lsp-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-cmark/archive/refs/tags/${P}-RELEASE.tar.gz 
-> swift-cmark-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-corelibs-foundation/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-corelibs-foundation-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-corelibs-xctest/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-corelibs-xctest-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-docc-render-artifact/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-docc-render-artifact-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-docc-symbolkit/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-docc-symbolkit-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-docc/archive/refs/tags/${P}-RELEASE.tar.gz 
-> swift-docc-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-driver/archive/refs/tags/${P}-RELEASE.tar.gz 
-> swift-driver-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-experimental-string-processing/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-experimental-string-processing-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-format/archive/refs/tags/${P}-RELEASE.tar.gz 
-> swift-format-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-foundation-icu/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-foundation-icu-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-foundation/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-foundation-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-installer-scripts/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-installer-scripts-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-integration-tests/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-integration-tests-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-llbuild/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-llbuild-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-llvm-bindings/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-llvm-bindings-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-lmdb/archive/refs/tags/${P}-RELEASE.tar.gz 
-> swift-lmdb-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-markdown/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-markdown-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-package-manager/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-package-manager-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-stress-tester/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-stress-tester-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-syntax/archive/refs/tags/${P}-RELEASE.tar.gz 
-> swift-syntax-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-testing/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-testing-${PV}.tar.gz
+       
https://github.com/swiftlang/swift-tools-support-core/archive/refs/tags/${P}-RELEASE.tar.gz
 -> swift-tools-support-core-${PV}.tar.gz
+       
https://github.com/swiftlang/swift/archive/refs/tags/${P}-RELEASE.tar.gz -> 
${P}.tar.gz
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-link-with-lld.patch"
+       "${FILESDIR}/${P}-swift-backtracing-noexecstack-gentoo.patch"
+       "${FILESDIR}/${P}-swift-build-preset-gentoo.patch"
+       "${FILESDIR}/${P}-swift-link-ncurses-tinfo-gentoo.patch"
+)
+
+S="${WORKDIR}"
+LICENSE="Apache-2.0"
+SLOT="6/0"
+KEYWORDS="~amd64"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="strip"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       !~dev-lang/swift-5.10.1:0
+       >=app-eselect/eselect-swift-1.0
+       >=dev-db/sqlite-3
+       >=dev-libs/icu-69
+       >=dev-libs/libedit-20221030
+       >=dev-libs/libxml2-2.11.5
+       >=net-misc/curl-8.4
+       >=sys-libs/ncurses-6
+       >=sys-libs/zlib-1.3
+       dev-lang/python
+       $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}=')
+"
+
+BDEPEND="
+       ${PYTHON_DEPS}
+       >=dev-build/cmake-3.24.2
+       >=dev-build/ninja-1.11.1
+       >=dev-db/sqlite-3
+       >=dev-libs/icu-69
+       >=dev-libs/libedit-20221030
+       >=dev-libs/libxml2-2.11.5
+       >=dev-util/patchelf-0.18
+       >=dev-vcs/git-2.39
+       >=sys-apps/coreutils-9
+       >=sys-libs/ncurses-6
+       >=sys-libs/zlib-1.3
+       || (
+               <dev-lang/swift-${PV}:*
+               >dev-lang/swift-${PV}:*
+       )
+       $(llvm_gen_dep '
+               sys-devel/clang:${LLVM_SLOT}=
+               sys-devel/lld:${LLVM_SLOT}=
+       ')
+       dev-lang/python
+       $(python_gen_cond_dep '
+               dev-python/setuptools[${PYTHON_USEDEP}]
+       ' python3_{12..13})
+"
+
+# Adapted from `flag-o-matic.eclass`'s `raw-ldflags`: turns GCC-style flags
+# (`-Wl,-foo`) into Clang-style flags (`-Xlinker -foo`).
+clang-ldflags() {
+       local flag input="$@"
+       [[ -z ${input} ]] && input=${LDFLAGS}
+       set --
+       for flag in ${input//,/ } ; do
+               case ${flag} in
+                       -Wl) ;;
+                       *) set -- "$@" "-Xlinker ${flag}" ;;
+               esac
+       done
+       echo "$@"
+}
+
+pkg_setup() {
+       # Sets `${EPYTHON}` according to `PYTHON_SINGLE_TARGET`, sets up
+       # `${T}/${EPYTHON}` with that version, and adds it to the `PATH`.
+       python_setup
+
+       # Sets up `PATH` to point to the appropriate LLVM toolchain, and ensure
+       # we're using the toolchain for compilation.
+       llvm-r1_pkg_setup
+       CC="$(type -P clang)"
+       CXX="$(type -P clang++)"
+       LD="$(type -P ld.lld)"
+
+       # Swift builds with CMake, which picks up `LDFLAGS` from the 
environment and
+       # populates `CMAKE_EXE_LINKER_FLAGS` with them. `LDFLAGS` are typically
+       # given as GCC-style flags (), which Clang understands;
+       # unfortunately, CMake passes these flags to all compilers under the
+       # assumption they support the same syntax, but `swiftc` _only_ 
understands
+       # Clang-style flags (`-Xlinker -foo`). In order to pass `LDFLAGS` in, we
+       # have to turn them into a format that `swiftc` will understand.
+       #
+       # We can do this because we know we're compiling with Clang 
specifically.
+       export LDFLAGS="$(clang-ldflags)"
+}
+
+src_unpack() {
+       default
+
+       # The Swift project expects a specific directory structure that we have 
to
+       # match. For most directories, it's enough to trim the version number 
at the
+       # end:
+       find "${S}" \
+               -mindepth 1 -maxdepth 1 \
+               -execdir sh -c \
+                       "mv '{}' \"\$(echo '{}' | sed -e 
's_-\(swift-${PV}-RELEASE\|\([0-9]\+\.\)*[0-9]\+\)\$__' | tr '[:upper:]' 
'[:lower:]')\"" ';' \
+               || die
+
+       # Some one-off fixups:
+       pushd "${S}" \
+               && mv 'swift-cmark' 'cmark' \
+               && mv 'swift-llbuild' 'llbuild' \
+               && mv 'swift-package-manager' 'swiftpm' \
+               && popd \
+               || die
+}
+
+src_compile() {
+       # Building swift-driver writes to this directory for some reason, but 
the
+       # contents are irrelevant.
+       addpredict /var/lib/portage/home/.swiftpm
+
+       # Versions of Swift 6.0 and later require an existing Swift compiler to
+       # bootstrap from. We can use any version from 5.10.1 and on.
+       local swift_version="$(best_version -b "${CATEGORY}/${PN}")"
+       swift_version="${swift_version#${CATEGORY}/}" # reduce to ${PVR} form
+       swift_version="${swift_version%-r[[:digit:]]*}" # reduce to ${P} form
+
+       local original_path="${PATH}"
+       export PATH="/usr/lib64/${swift_version}/usr/bin:${original_path}"
+       "${S}/swift/utils/build-script" \
+               --preset=gentoo \
+               install_destdir="${S}/${P}" \
+               installable_package="" \
+               || die
+
+       export PATH="${original_path}"
+}
+
+src_install() {
+       # `libTesting` as built has its RPATH set to the absolute path to its
+       # containing dir, which is in the build sandbox. This directory won't 
exist
+       # after installation, and is the same as '$ORIGIN'.
+       patchelf --set-rpath '$ORIGIN' 
"${S}/${P}/usr/lib/swift/linux/libTesting.so" || die
+
+       # The Swift build output is intended to be self-contained, and is
+       # _significantly_ easier to leave as-is than attempt to splat onto the
+       # filesystem; we'll install the output versioned into `/usr/lib64` and
+       # expose the relevant binaries via linking.
+       local dest_dir="/usr/lib64/${P}"
+       mkdir -p "${ED}/${dest_dir}" \
+               && cp -pPR "${S}/${P}/." "${ED}/${dest_dir}" \
+               || die
+
+       # Swift ships with its own `clang`, `lldb`, etc.; we don't want these 
to be
+       # exposed externally, so we'll just symlink Swift-specific binaries into
+       # `/usr/bin`. (The majority of executables don't need to be exposed as
+       # `swift <command>` calls `swift-<command>` directly.)
+       local bin
+       for bin in swift swiftc sourcekit-lsp; do
+               # We only install versioned symlinks; non-versioned links are 
maanged
+               # via `eselect swift`.
+               dosym -r "${dest_dir}/usr/bin/${bin}" "/usr/bin/${bin}-${PV}"
+       done
+}
+
+pkg_postinst() {
+       # If we're installing the latest version of Swift, then update symlinks 
to
+       # it. (We don't want to call `eselect swift update` unconditionally in 
case
+       # we're installing an older version of Swift, and the user has 
intentionally
+       # selected a version other than the latest.)
+       if ! has_version ">${CATEGORY}/${P}"; then
+               eselect swift update
+       fi
+}
+
+pkg_postrm() {
+       # We don't want to leave behind symlinks pointing to this Swift version 
on
+       # removal.
+       local eselect_swift_version="$(eselect swift show)"
+       if [[ "${eselect_swift_version}" == *"${P}" ]]; then
+               eselect swift update
+       fi
+}


Reply via email to