summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin19355 -> 19360 bytes
-rw-r--r--dev-lang/rust-bin/Manifest34
-rw-r--r--dev-lang/rust-bin/rust-bin-1.65.0.ebuild229
-rw-r--r--dev-lang/rust/Manifest36
-rw-r--r--dev-lang/rust/files/1.65.0-ignore-broken-and-non-applicable-tests.patch40
-rw-r--r--dev-lang/rust/rust-1.65.0.ebuild758
6 files changed, 1097 insertions, 0 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index 38cb94ddc958..2353ccd29bc4 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 34335a6a1017..2393d5f55c84 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -31,6 +31,40 @@ DIST rust-1.64.0-x86_64-unknown-linux-gnu.tar.xz 161922032 BLAKE2B e8a0d13deab59
DIST rust-1.64.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d13ab08a8ce4b9a92c60ab5b8c21087158b66d9a673b7a960103757a2b12216cab8e7713cda08753a5f5f921aa9c7d571da77a90166d6e7362549a49d6c1a501 SHA512 fda5b45652c0929fea19146dd2c5a895ae4c6db9a1bf448a7364899854ffa06a8eb52b35bfe28c8acdfb1633cd8afe6c5eabd622b7887ed267b1b72220ef4e6f
DIST rust-1.64.0-x86_64-unknown-linux-musl.tar.xz 265843112 BLAKE2B 2b267b5b9aae610734759a690e36600eeeedab7e0b679e651df269d7b71b147984c1d16cab4658076f05a8a854afc74d83e6e61dac3a8a6bf2b56660d3483285 SHA512 c722ddb6a7bfc5b8767e2a37e697f625b4e775582423720d1b01737ec3269c82e2212f7e5a672a062fa49c8c15c0d2d182ea14dd048cfd9e07704cbc04fd8ef0
DIST rust-1.64.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 783791aca41910e8074fd1c7f29e6fc1fdf51f80b1515bac99431305dbe6085574b2b2366c087675b6a9d98931a0cff1117cd864f634fdb4dd53792aab8ce5f9 SHA512 a6d0a72e9edbbc1e6caef7a9c0ec46518b95172afa4a33b2258286458d7b9afe72f9de8411a83567520a126b8377777e125cc639bac197a0495f17120fbcc1ad
+DIST rust-1.65.0-aarch64-unknown-linux-gnu.tar.xz 244905108 BLAKE2B 437213698ea99f4113f294ded23ae0e5dd27dec2715b37495a991deac462aecc36d34311014a822c8a94c50852abcab8f08d8df900509f2b29716c6ace939f16 SHA512 be706f4432a8ae3b8f9b6f41eb2dcb3bc5b8f648970d5324c0de4979f1d58b9d8d5f774628090fee8f8c59eff2c4a55ce96743d4b23ae209e1951fbbc486797b
+DIST rust-1.65.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1f023c371059404fa8fdb4d558117a650d323acf99c6ebbf937b337fcddb195bc68d739a3d06b4b8647d245a6e4effaff0008aad357b65e1e50bb62345e39bd0 SHA512 80285639fb445ac8b1c0cd36a28b72930e8c0e9c761473c5e2ee4d3daccc669afd7d2eb5e2788e5a3394e215bb5cb705fb1fd0d25a79d863c62a5e8d31282257
+DIST rust-1.65.0-aarch64-unknown-linux-musl.tar.xz 226435448 BLAKE2B 01388644e9383e1b1638b121b3af3a75787a3c243d9675df1a3c6bd45b8b52900fd7178b6a46c22b31a0cf2a33fa177370eec43c75ce5d050d8c4c716c4c25ff SHA512 654f4684dc6f9ee38f509f9abcd0628644df894d47e9cb139a990124cd34124da960656596a05eacf78bb762edb42e5e7536975a37e777366666d6f381766068
+DIST rust-1.65.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 111c2cf8308cce95c764d7e4c852d0070060a64db263a7ebc7de339a5084d42d9fb735c051cfda05eca2dc0481d7bd684dbd2a71b2ad4b527699619b5b2cd002 SHA512 d45b95d327fd3e6ed93e177cec7a53895450fa6a3b6bd71d7581c135aa3d36d45cdaa1e63977d966f60318cfa193a5af01227fd19e5b0e6edf6d15f67f03f49d
+DIST rust-1.65.0-arm-unknown-linux-gnueabi.tar.xz 205884452 BLAKE2B 79d399452cc745bce3fd350059a0cfdbcf8eef590af1f3b6963461ce962e86739d51b948fd7a7fd8a7bbedd9744b9d6b7d141bb25539452db6449aef6e654a12 SHA512 160a7daf5720a4349154eaee83ce42c412efe98ecf1c5bcc406efd8271038ca5b64d39ef8b7113acc5f7e08d7d41d53cc2ff342df2022aeccdf75a18570b6d2d
+DIST rust-1.65.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 0cf153865d61e041d680d5c984f952464a26acdcfb1265b2e34857b4e9ce2f575db56fa477cdeb3a8ae7505cced6644a3ddfe5a537a1184e463cb0ccb5157a1b SHA512 ab7dfb3e9e17daebd9fc02103585ef388688e91d50f72600456702970b9092847e1f08d4679474a1656b809e459a63d73f2bd717e97d389c614cbcf1a0be6c86
+DIST rust-1.65.0-arm-unknown-linux-gnueabihf.tar.xz 206130456 BLAKE2B e7e1cf41d0f1bb14788664b40d343f6b971d4a4a402991f540e64070e41d1605cb9e747915f5cdad666699fae257481f3d8924d9349462caca8f878a50705447 SHA512 36b1f984248162e13a39f17ac601dd5946fe6684217523952a4096bba4799cbf50e339619e5cfba6f2c0968e3f1991ab3054c2dbe9ca14851115dcfcb437327e
+DIST rust-1.65.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 71266fec366ab842bc2f974ddab79226d7dcdd451b4728b80642a9deb7062f672e18ecfceb427bd5c6660f1ee3393d7e60db22bf71d8f433d5debf8a20221ce2 SHA512 2666e29e5c1a0722c5d94c9c7ed893aef09ef780bb54cc0eb486922e747b39a26cbc383313f67929cd94155a0527f165ebe3b4e6a9a1e166942e6c1c53fe8ae8
+DIST rust-1.65.0-armv7-unknown-linux-gnueabihf.tar.xz 211761236 BLAKE2B 1e53831405ebc8bf2a24020715207a9d1c283e78f3d7feebebbe1029aa6495f7549aacceed291b209adaec135f2ef782d9e6dc97e018e21cff605cdcc6d8669a SHA512 3a54dee8768a67a08ad81cc89925971ff7b2e1fd054cb387c4f0dc5319e2bacaa4cdcb32bfa78e296401d07e5f4152d74ab6dbb1d0af068b01523b66e4cc1e48
+DIST rust-1.65.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 0ee1b71d77b777c32037f348203893be76310ae7548c40461a457b293376ffe617c2952f0d8f3a0e7913bee8f2d737898a74eac4f8afaa56e27e4871347a772e SHA512 ccd3ab729c0c692a1f70009f358130f60b2ee751f041c90baa4d3483243b72048e307c1f95e9c9e4c88d4c585e8bf49d9b24f6029b9ebbaa1e26730eecf3ebeb
+DIST rust-1.65.0-i686-unknown-linux-gnu.tar.xz 232207860 BLAKE2B 4f16a150a6baf641ac4deb14c9bdcfa1e110584a5d0646c2d0c689a159c1a5b048b820213f991fb11884311352a7fbe5a2a6e5d681b12b4e98648e10e434f808 SHA512 ebf7c91f95add689fd01c613e3d42502c4582559e3467d529fb61fa130ffcbd4e41c867e0cab6bf89fb6d49971ba205608928d54a493c7baf89669e8f8fbab98
+DIST rust-1.65.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 325a28f4199613aee583f2aacecc01f938ebc3aceb338d21ee78ab10d9311dd86ca0c29fdf2ae86d33087a520bcba02bcbb6ec32c53947b3e6c6945f19f9940a SHA512 0e3eb96a3327bbb33536e4d9438fe5635ae4c094b4bf689a1cfeec87194d0965c0ef8f9cbe62034fdaf8afd4cb5c2e2376805f234a5f0793e8fa500201cc60d3
+DIST rust-1.65.0-mips-unknown-linux-gnu.tar.xz 172934452 BLAKE2B da7d02247e357235a13fbd330763431bd8f259ff3c4e0cd70b3baf6b05efc82dad1e561ad5ad65eda0d195b3f443d402450bde8328ebee320817d022827630e1 SHA512 5f843083096349a75f959c0d00009033413afdbf984c6e5df46e181d6001a05b64e428bc96c58330b7cc32d8fb6b71d400e592b1c7916c644a341d409222fac5
+DIST rust-1.65.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e5323fc58614bb2f61831d9a3bd4e3e17e61d7d876e8ccea0d7bcd90d515cdb09cf6112922260fa7d53ba9944b183918448b31c2de431cee8b2f13e6e82f66ea SHA512 b0544165a5b7b49ea7861ca7cea20d6667976667c2253816f942f9b1473306615df5e5e8c1d28028ae79d7cdfe8bfcecefa8df65648976240af40ac08a8ca458
+DIST rust-1.65.0-mips64-unknown-linux-gnuabi64.tar.xz 170733288 BLAKE2B 59211c452f921cc337762bcd50cf6cbe8b59b843c1f8afcb82705092ffd4465b663f3428c718b473235be5308cf13663bebc87a2ce93abc81b11192479261527 SHA512 75012281166d17805ae718b4ef55084f6b59c2ff10ef44ab03efd03e0a72539438ab953384e62f2c90042ed5b044478e17ce64d6e9ad85bf3d40ab55bfaa37fd
+DIST rust-1.65.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 491ed32a0804f9b69cfe7622eed951aea8a88e6bb9d0cb90e7fb836807fbb0c02ca1d0f4ce54ec366fb5d314bab7702b2395218c8c6746f35b6a0654f079e8a2 SHA512 afad470d8ab02729ac1fba678a0459279e4b8bf687e7ae90bf51ddd5fab5b9f1d6e421ade260d101405387e793fda7fd6ed35df3a97875342fd93feb2e1598e9
+DIST rust-1.65.0-mipsel-unknown-linux-gnu.tar.xz 177698400 BLAKE2B eac9bbef703dd3d7a96dcb31ee0fd6f46d7046ec5d8e810605285a9b71248f0e97412f881d3ec77b4ce79057367523e36cde1a19733944d5a0fb56fc71e1d95f SHA512 2ae3976913b4d5f6a2bb7a778ffe7cad5bcfa643e37c217790605c5260cef44a2a98baaa5cc4fb70fbf63d5ae10c8d10ebd684d1f21a66c6915c5c58f488d7f0
+DIST rust-1.65.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 26b706e4c8a05a0e27050c8806d47dba83bf2e529ff10f622bd166aede62b2868a2be746c1b0c5d824df58658d5d125310004922bdd4a1224eb050368483b1df SHA512 49a35c5152d2cab469159b83b081f11897040e5b6ef641e4774a45bdf79b936860302812697469ea4429cfbfa90238958342d03bbca019a80fc7fcf666c571a1
+DIST rust-1.65.0-powerpc-unknown-linux-gnu.tar.xz 209510928 BLAKE2B ae05250069277c54f3658aa2474de6ce122de81f54a529cbed63b6e4c2354638904a018453a31dc2ecb364aa0c14bce23d97c4065cf8f7f0feb65e9107be78eb SHA512 a622011ac3c63b1b4f55a3fcf98fd1771af67b64a366473136b28f58e100635b823243e9a12f7694ee303e7338c40431e25554d5d72c16a72d0252c24c2cb7d1
+DIST rust-1.65.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1cd4262dc17770b85290cd85599e2992d8797ad775b329865997ed1a70b21a02ca68d642aa5ac11c3a08e60870c5de2f720e2a34b05658870573e0688ee23613 SHA512 d4b7fbe1cd9cef0815521b756f7bf201f782ad240d1a23a25d5768726d35cc4ac49163688d731a8d8be38abc7f0da14c960f513ae153251d24a917b4234d578d
+DIST rust-1.65.0-powerpc64-unknown-linux-gnu.tar.xz 209586876 BLAKE2B b54fcaa7dece3cae687c02ee0dd89a54d764cfccef2a465bc2356ff8ab358473dfe7a72988cfa2f5abfbc5228b555aa8f92d84ca88d43b20ff9fada0f3c9a26c SHA512 2615aba626dac4795cc065bf04472a2884786ca306e2349f7b58819b25a1a34a711d5a9773507b815180c0c4d8c4ba94891fe3d0581a9e7e0ee8d230eb5404eb
+DIST rust-1.65.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7d01b6a884f467489c5c69bf11baef91224144440e7ebfd935a27a34abd1449d777113d87c9c886d5e0266ae8482105f83cd2b6acb28760436a3b350a9752bd5 SHA512 459ea4225bd26426b2c405be8ff95122597d4cc00d012675d7c4ddd7ce4c9ebebdb9d9b15bcc3b629f0c28ee66e4c9ae7dfebb2f6931e0393c7613fcf8d33f15
+DIST rust-1.65.0-powerpc64le-unknown-linux-gnu.tar.xz 221871252 BLAKE2B 95bf6f73e72b1473ebc81eb3a4dce9616b4c7e30c2ea19460318f20242492e5f25ac883d52cdcf1bca9d43dd40c95c0fc1dec04f20c092c17045456177f643f7 SHA512 8e532f28e3d3249001f4e6adc5cff3265e9bcbe9090ce5e250ba49b01a56dc10eb65fde1d0030bc953a2822738e1318b0119d6710d2b28735c22a2f0e2ca1513
+DIST rust-1.65.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c2f8ad615cbf2dfd88a93db429d394fd092eb0bcb5c46d481aa2f39542fac03be3d18b1690457a5bbd73ab06263e930d1cf44272f42a90d0f5e34c3d10713d47 SHA512 c2e8832df43c1579e7022a6798d71c751ffd15ab52c6c86c7b2514f5d26665e9b2305ae9dfbb97efed89e1884c18e92175e43650ccf794f167794eb158e04e5b
+DIST rust-1.65.0-riscv64gc-unknown-linux-gnu.tar.xz 189556248 BLAKE2B f64876cfb9fd985f6d6a49b052ed007761a97d5e9e6e6bb2b7b44ad4a6d5b75dfa4e067a1de2878679171fb3c4c194b404cb6074f39a634196e95e989f80fd8a SHA512 0e16f18478de557303971f65166c4abc799da4bd41dc3787a79ac850c8f00db9e0bd505d101f471b9c9d2753a766c41be65af2e320a8a31188e816a18ad316bb
+DIST rust-1.65.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5026637766f3038cc096f6c1f6c214b2fcd91435cabd2687ec6005005cb746c08335ccbf667bd3a0da7c607b8c1f5f5bb1a084574780e0cc0d4d3827a753cd5f SHA512 7f2c209b7ed0a5b3af6506d3aba9f61c16e6026ea077e45fdd1efa668a4744234c5dc51de0f074d743b282ffec63de5ac13e559eee2c3bcf82b4d42fd8845837
+DIST rust-1.65.0-s390x-unknown-linux-gnu.tar.xz 226037296 BLAKE2B 8266773f4767aa44c764c938c89d2c7382b26aeec3a4947ff4d0b4bdfd8b97512599c28f6c8db5d3ef4c6ac23eca87735214352009167e7e22ddbfa979549646 SHA512 31728e9d3e2cf9659beeb3ee64e760ee98847262dd0807d33af720e5ecce4685a7963c559febcbc910ed47b686b258a9247f7d8f171a8c5883f5656282d19030
+DIST rust-1.65.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B efaaa539e4a89c6dc485d34ea8fc9ac4291b9dbbbfa67737e9ae438f45a010b398cf211a4b257cdb5a6ca3a8fdfd62e54f6a13987f09ed9825f3bc31be87b000 SHA512 8d7e65293a8ede819a023801341b5fb927586d1d98a8b4fa43b60501c08aacf2ff408024639778571e9a54527e2bc798b7e23e314188fc032b936dc3b14b82a6
+DIST rust-1.65.0-x86_64-unknown-linux-gnu.tar.xz 162028064 BLAKE2B 8c572cc304c165ac7d689ea4447498cebb3e91efa75c704833d34de46383038fb92b47fb568eb93ab9cc463616fef396c7a88b9019ec5c007748a22147069849 SHA512 255ad04109925684d201b89cf2462818a1b65fea503791dd83d5ef0802b1e80b5f6e4c444dcd516196836e8b41b039ddd4855c4e1440d28fe48e78e21e923c8a
+DIST rust-1.65.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7a9287b6125eab2c14a026d6b4d8a3e980b9fedac0436b75b1bf314b093b5e39de0d70045e183a2e823d729d24f43f6251a2fc28b072e3caa1950fbbddf149e6 SHA512 16abed6d7a17b9e5f3e399865ed5fee01272c8e6696ea2e784a6fb149df16da2c4123572dfb56c3c44d407d388033e52b552cd164600629cf61b33c011e4e415
+DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz 266683288 BLAKE2B 4312a53bca3e33f6633fd5eed1b17754813e54d688185ff4cca6c5d6b24713994fb5fc424113ab08c121319cc79da3d7d89518d18dbb1b491bc8ba2ec831c12e SHA512 6c7ddc98da3227b23dd681615bb8f8ea883f3bdd9547e35733cf6acaf2a625301c53449b1a3ddf88dad9a5c940f8324c3e1bb31d871092fc848b863256c85935
+DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 054f1b773518a9640f3d9226510cb0b00a7f8dc4a9046c325b82d038a50c699a8bd84f71ed62790e9b96b4d65ad12ea631f6a8bc18b3bafd66db3d21137cd378 SHA512 39aa000c2a1359cfd7d2eda2b22a9b10c0fe4aa024862b7ea67bd488e06fdee6f5cc4e98db7486b84ce53f1c299bbd5391f63e25df0358184533a5fdced4ce61
DIST rust-src-1.64.0.tar.xz 2437612 BLAKE2B 9bd5cb64c4ac98ffe60f15bf62517f3ba214ec788d939a27135bca4b770a7a760299ffa43090846e9a83c734a6b2d97102e51f9760f655cb596bda91214012a0 SHA512 a1867ea7a36f669fcde149578dceb8bc7503435d9c740594cd6181e0ea0e4be9d3c8b79f755c0f457bdbc3200149cd94eba17922d00610c5ff6be5fe1f8bd862
+DIST rust-src-1.65.0.tar.xz 2488012 BLAKE2B d48f5591e72e14084f2fb0d66c1365f1648060d514af23c0498e02adfd7223b1a79bd1f512859b058f9cabc4b88b9230d15960df7c30762a5263d1785b877a68 SHA512 247f822a9c2f16d1de29d1cf6fa7ff393b7c7fe01da66a7c0b4add6259d72403922b8b1bd1b511ed8a9cc0b2c12ff574945aa7fc76c731fba620b466bcdc2eac
EBUILD rust-bin-1.64.0-r1.ebuild 6874 BLAKE2B 712d0b0046332418063598f64fc8bd0c024397e27d846e3c11aebdae6c4d29d7fc3da892b64d2d5fdc31f319b19fb380dfb5f96718cdd3cf7da6c4ee8add2fa6 SHA512 1418917f21689335fdd10249a4c7703b4271d89a103b2fd4762a28a98935944daf2e0f9da9456c8e16ab11c123d34d82cd3d0893393d2492f6e076b5ddf453ab
+EBUILD rust-bin-1.65.0.ebuild 6876 BLAKE2B a2c2e6e32d595eb450e77592fef9251e45b1066d551e2f27b8eea09f79f8f0ba46b98e5f1d814c068635d0ba175d0ad788450d525f8fd6c3abca4ce4c1296676 SHA512 89fa1f940bb4cb7066e250792e5aff914b60fdce6ce76965fcbec2203bb5fcf4dcea1a1ddf4b53a55d6625e52fff16522737c0f3cf7ce141be68554baea2b783
MISC metadata.xml 696 BLAKE2B d6c2665e1859a18e6b1bf7c04a0de5adda80e34b759994e158a137219e314ed0e4890a8a7f680e1b7bfb940c04e3c0b49eb3518f2fc08dcc9e19cd5fb867d02e SHA512 b93c2ab79c454d8897948e810150cb2512ca606083a2aa2135425a69ac7b7077f64e3d86f8f8b13734640a05e668a870d70003d6dc9fd3d151ca7ffcf2fb3c44
diff --git a/dev-lang/rust-bin/rust-bin-1.65.0.ebuild b/dev-lang/rust-bin/rust-bin-1.65.0.ebuild
new file mode 100644
index 000000000000..80ac71badeff
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.65.0.ebuild
@@ -0,0 +1,229 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal
+
+MY_P="rust-${PV}"
+# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src"
+MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2022-11-03/rust-src-${PV}.tar.xz"
+GENTOO_BIN_BASEURI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}" # omit leading slash
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="$(rust_all_arch_uris ${MY_P})
+ rust-src? ( ${MY_SRC_URI} )
+"
+# Keep this separate to allow easy commenting out if not yet built
+#SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) "
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+#KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~s390 ~x86"
+IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rust-analyzer rust-src rustfmt"
+
+DEPEND=""
+
+RDEPEND="
+ >=app-eselect/eselect-rust-20190311
+ sys-apps/lsb-release
+"
+
+BDEPEND="
+ prefix? ( dev-util/patchelf )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
+
+QA_PREBUILT="
+ opt/${P}/bin/.*
+ opt/${P}/lib/.*.so
+ opt/${P}/libexec/.*
+ opt/${P}/lib/rustlib/.*/bin/.*
+ opt/${P}/lib/rustlib/.*/lib/.*
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/rust.asc"
+
+pkg_pretend() {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ # sadly rust-src tarball does not have corresponding .asc file
+ # so do partial verification
+ if use verify-sig; then
+ for f in ${A}; do
+ if [[ -f ${DISTDIR}/${f}.asc ]]; then
+ verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
+ fi
+ done
+ fi
+
+ default_src_unpack
+
+ mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
+}
+
+patchelf_for_bin() {
+ local filetype=$(file -b ${1})
+ if [[ ${filetype} == *ELF*interpreter* ]]; then
+ einfo "${1}'s interpreter changed"
+ patchelf ${1} --set-interpreter ${2} || die
+ elif [[ ${filetype} == *script* ]]; then
+ hprefixify ${1}
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+
+ # start native abi install
+ pushd "${S}" >/dev/null || die
+ local analysis std
+ analysis="$(grep 'analysis' ./components)"
+ std="$(grep 'std' ./components)"
+ local components="rustc,cargo,${std}"
+ use doc && components="${components},rust-docs"
+ use clippy && components="${components},clippy-preview"
+ use rls && components="${components},rls-preview,${analysis}"
+ use rustfmt && components="${components},rustfmt-preview"
+ use rust-analyzer && components="${components},rust-analyzer-preview"
+ # Rust component 'rust-src' is extracted from separate archive
+ if use rust-src; then
+ einfo "Combining rust and rust-src installers"
+ mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die
+ echo rust-src >> ./components || die
+ components="${components},rust-src"
+ fi
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${ED}/opt/${P}" \
+ --mandir="${ED}/opt/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ if use prefix; then
+ local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash)
+ ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin"
+ find "${ED}/opt/${P}/bin" -type f -print0 | \
+ while IFS= read -r -d '' filename; do
+ patchelf_for_bin ${filename} ${interpreter} \; || die
+ done
+ eend $?
+ fi
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver>
+ local ver_i="${i}-bin-${PV}"
+ ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" || die
+ dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}"
+ dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}"
+ dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}"
+ dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}"
+
+ # make all capital underscored variable
+ local CARGO_TRIPLET="$(rust_abi)"
+ CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
+ CARGO_TRIPLET="${CARGO_TRIPLET^^}"
+ cat <<-_EOF_ > "${T}/50${P}"
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"")
+ _EOF_
+ doenvd "${T}/50${P}"
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+ popd >/dev/null || die
+ #end native abi install
+
+ else
+ local rust_target
+ rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+ dodir "/opt/${P}/lib/rustlib"
+ cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
+ "${ED}/opt/${P}/lib/rustlib" || die
+ fi
+
+ # BUG: installs x86_64 binary on other arches
+ rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}."
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index f1ecd8c0cfe6..97e04e6b018f 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -4,6 +4,7 @@ AUX 1.62.1-musl-dynamic-linking.patch 898 BLAKE2B 09321e356d5c945f72e75e668bfee2
AUX 1.63.0-CVE-2022-36113.patch 2087 BLAKE2B 10afb960bf0624915f0047a364719cb7e593baa0da89cc929ba742ed178807518c2437eefc6f55a1d7cdccd31d63093e2c5ffc10ac3db3c8b63ab9e06d382536 SHA512 593ac73200def11f28fdbb146d67170340a500e3cc27c4c0263d01caee1405d0572ab4f4a192aa9d480b2b60d6460d0754f406bbc62e70615fb7d9952ec08e77
AUX 1.63.0-CVE-2022-36114.patch 3877 BLAKE2B 3542b04ab488961a2928f1a2103845e786acbe46342265f5469ba32e4f0419d9ebf545a01d25b71f0ebc4ce82aadd038d28e270b8db1214d3e5134433239fa7e SHA512 bee9794c6caa5057a07109e5b37ff004893e8e5eae2cd8e01985d968e384599333ece619f48f24237d75dbb6a03363154319d72e08261baab398b32146f1efae
AUX 1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch 2744 BLAKE2B 4eb03df7c21087a5833f031b85c999f95e8055492c61184bbe137407b4cdddb76d25f95d6beb5a1c6f82f42800f914f0fde60192c807a9548ee27ba226b10f65 SHA512 d489d0841ad297f8835b7adb1e5777865080f3f83a991da55a266da38396993c7b50f8ec98285ed7b174c879053670acedf9116b586c493338daac8f67741fb6
+AUX 1.65.0-ignore-broken-and-non-applicable-tests.patch 1504 BLAKE2B 6318227c4a11ef0b849a85f164fc446ba34ffc3e4314b3f18248aa6605f08aa9a1adfaa2d9b2154c9e29fcab203d3c322fcf67e770778cc788f37bfb86ef353d SHA512 54a05e43c7d01129d8590495d2d651d677ebec06b5302355fec87d3c9bfdaab96bae192d17fafe115039d74a0d56fffa653a03ff0a8528a88582d64f1bbe663d
DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz 228388556 BLAKE2B 2b2d8428c97bfeb64bd999670e4ef2b6c4732cdfd7cac0cf37c5adb8ee83fd467e1e94bcb6a9edf28838fd052d19a7cbc273175c8360696bbec4523e1ff069a6 SHA512 10964fe48ee59ef2e44e9d0a0daa750cd06cc52198664b544166a846667366e7f0000129612f4d68e1530dab28987f62ccacd82f6d5663d0091cf7a451469219
DIST rust-1.62.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6cf85d71d188bc931cbb21dac1387fa9fb8b45bcf0984bfd5af1a3f1ac581b74e37df337138b05b2d74ed1572d6e859418c33c2fe4bb72f5a3b15cb6302060d4 SHA512 452610627d8d01474ed38b7d3ff7c3c0174cc5b3468cbd0f274b6124ff6497dcae6f0abb6b9688f64be89c524c8fe18aaf5fd56dcd2530df6c247688cac1a230
DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz 223168712 BLAKE2B 9007a612ed5ec279c346abaeb4213a71d3acae9e5b1934380c9959e74db8b196b59f1197d1714a076040ff68f2b4f0e4937feb226cfaa0bdd272838d67eb07cb SHA512 253ba647102cb5599cfbfbfaf5f77ab2389e4bc77bce6cfd8aba037f6bd349081965d505fc30e9538df9353e923e66fa451ab73076d7224703cab1e24a81cf1f
@@ -68,10 +69,45 @@ DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a21
DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0b4465f1afbf2f5f9135cf722632ffd7df9ef4e92c65e9ef6d4aede5b1ff392973949a6737e88685033ee571dfefe9b099d477480d7aaec2a329926a87a6f5b2 SHA512 0c8d339204a23000cdebfaee7faaa576673bd8d98111ea187f5e19f03f7231f3bbec8158c5b04d8d903877f1addeebc9f4fdc6b1de0fc0ad2995742987eafb1c
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz 254705824 BLAKE2B 8d35bbc3ffa53b52d7d7aacc51b90283d9703a40d5623c184a79195799aa3768a34942e235e2002a0b72d76110c0d66fb5ea403f9d0c81021ead52cea2a51e40 SHA512 995530319a14bd6674d5be145e777b7fd482953e62ecf672a29e2c5b4bf567e010d7db4d5c6acef1603d79135e74f21955d9fc13ed7e1c33279d05aae39bdfec
DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
+DIST rust-1.64.0-aarch64-unknown-linux-gnu.tar.xz 245636524 BLAKE2B 90e405bc6e7f47aec091924bcd7a35017d591936b2697f2b0ddc5271e65fa431cc193a2b392489b6636896fa2d4f3d8f5096d197cfed36e812ea7f3986130c85 SHA512 c163b19a56148646ebbdb10b5b20459a206b4a1c45a2de9ce69f2e45dc5527cc69920f81007ee6fb75080782d534a2a39f7580d0c8cfdcf36ebed971b2513b63
+DIST rust-1.64.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3ed79e6a5168676c19b9092692576b72b7bee6cc6fc6fc9213d492ac9641974e0bfefd9eee2663852580ee05038becb3045ff4410fe96aa8e529afc4d3652abb SHA512 14e635fbd60512e8d36c50c2c07d510236cc73661a6294f0a01fe260a945581885c60783e72cbcc0d85b87a161e0940b34b496380bbab659c6e5d0dbb4050a4d
+DIST rust-1.64.0-aarch64-unknown-linux-musl.tar.xz 226328036 BLAKE2B 43119c95866b3bd7e1b0832079f4fa23d79f5168e1aeb1d9a984897486cdaabbf035150e5633114c3d87afc8cf47e2d591e7c32961cc7cef99595fec303bc348 SHA512 8af3a7293b73d5f3129a17651cc8009290e5eade4802a872bb2a568444c60b4227a89d419c751fa394bf81a38f553a7418a0abd6ec3234737148d1561b91bace
+DIST rust-1.64.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 4807f2cef672af6be484e5a7368110ebc84d4bb7aa0f97819171c43b066fac041aa341bc5df696347ecdc7e5de37dc8c159ef7308c8a487c105b977edc794a7b SHA512 ec4c9eb3d9207970f19ca9d6b12bfc293786fed57e20a3a9fa25fc6b70a80a12752c6f57c095731edc1fde1c608a94f7d89e89219f8ecd89a13758df891cc0ee
+DIST rust-1.64.0-arm-unknown-linux-gnueabi.tar.xz 207018112 BLAKE2B 1f8d1bb48e5f529b84c99a6941aa0c3c6d49287492b9f63f8e9d5688bd530c67ce9ea2dcd8951a34c96d54d559f4e84cdb569397613bbedba892341fd90817d9 SHA512 07dfe4449359c89719f440da7986f35fdc1873270a8910a708a0f37daef10cf7d8dca7b6b4fb6d741bed490ba12d4e9b455aa1d13d9ae80f22e2b9c879beafac
+DIST rust-1.64.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B d0653612a7e9bd4cf27ae5f7f4152ee0f14fde8d5e20a7b738a6925e395083ac851500e2b65e0a40a5b883fa441f11ec7574a5e40b4964fb38f237bdf0b17349 SHA512 3314a83af0a0fd2dbd73531952002a47d89ef155cf68037b387c5c7afbe7dc69c68bf0fa429eb45a721ae9176a82a876de04091e8fc3929c3c4825ee214c6124
+DIST rust-1.64.0-arm-unknown-linux-gnueabihf.tar.xz 208017632 BLAKE2B fc10f068fb154021391c309f36d2d18bdfe09b3e17d9ac02e8f0c258d87959ce7b62dfab80ebbfc6d0c68fa6beeb25daa7b7b3a7ce763637121c7afdcb32699a SHA512 bac5fe98e68a782683a5df0d199e8ce67d9db9fbe9f590075b34e33c898198d372abd94eeef48330d1a7799fa1396add3b1ffc154281dd5bd276f4409e3b4027
+DIST rust-1.64.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 210e7de45ab02fd2c83c1978104cedd28daa2499e475143660d5e3a6a4dd4897a866c6df22f929c61da08d2b61df489277fff73492a7e7a7749f2fe293de97df SHA512 221a0a70c03e049d2c6095575a2aabe1d32937123c86550b1f6f1b23734e996ff4bfc167b7e679809e3e383c25f15100772d8f75456e556d4ebd3aa73d789908
+DIST rust-1.64.0-armv7-unknown-linux-gnueabihf.tar.xz 212867232 BLAKE2B b3f9501c4cd68d9ca59d8a5c49cc512c0a97605eb74158c590db4ceabce5ff1aa99373c676d15676627c0631de8b58bfc4ca21463dd1109d6ec6451db909bea4 SHA512 3fc482ed9dd1648ccfd2fb459eb7c738ca26eab396b1a39b316cef10b8663e97b0ec008035936cf5e47f7cf9f8a0416cf09d638af174ffdf5b58b54b2ecb6975
+DIST rust-1.64.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B ba21487ad1a304be6cf2a12446ed674fb67e9d4b1b107ca675af236a45de6647bf96512a70a2e813466e85d388b51c674dc7435c185011ec9572bf28cbf513f6 SHA512 384f09eec47175b2cc40560a6b2ad4e792ab4b78e5c750231a312858882281ef33b40e797ccbb0a0bcb2ea3dfae4703b80941d936eb4cea229166375511b1514
+DIST rust-1.64.0-i686-unknown-linux-gnu.tar.xz 232295664 BLAKE2B 452a13cb499a29167a403b54d86c08fa84b4a10d51d7ef37954bc79f13d0ada0b3a256b32f804977d03b9e31331ef250e160b14f1c8fcdf93876001b9827957a SHA512 763966e449ce46e998f0ed9670d7e6cfae3a7147360c9cb85003cf382e1e01dabc1a448d35a102aafa96105fa65c284ec161b9bfa5061225de6d6acbf40ad480
+DIST rust-1.64.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b6055151a6442c5ae5968a380e3c5e9367307f91bc7304bcbd90d2a9434145682a70416125bb8dfecfcfce5449e6497591034adbfd4b5537601492757915c131 SHA512 1bb9b52aca4fc0f300e31d96e5fe5fbe0bec45a1ed848da66e1c83ef4fea20ebec86478ed94efd13dad3f8c6d52a330356d39a894387b87202e66400268fd4e0
+DIST rust-1.64.0-mips-unknown-linux-gnu.tar.xz 167831852 BLAKE2B 76e00291f2e2b18f2261677c1d6e322f8fef01da96514306b1fefc1a29e7e4fd0e5971614ad5c3a03a9a54321a01954d856b21df032205317c21b37470a6909c SHA512 29965d77a7fd6bcc74862d1c24a5f4843eb1870ece25691afdfa464c66617cb683cc73f8b991dee96d06e5e4791f6b71f7c81cf4f1d97539c3b9cbb15bf490da
+DIST rust-1.64.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 81f100c9a788c863b2f2388e7264b8e6b4ea062fd46d6c0e922561f491cf86227c46511ab538d8bc56a9b2d01d2ae19f105966ea00f2ea86592128e4c26b55ae SHA512 41e59d670efc9085c6e3ed59bb8808dc747eebfbd65ed976da04ff70095d91f15b43f8d257a09d2a6ee1cb07c5d1f49081529e0fc8234a26599a28ddaf167f4b
+DIST rust-1.64.0-mips64-unknown-linux-gnuabi64.tar.xz 172953460 BLAKE2B 68aa0d08ba233ebe95c1107574ce9165cc2afc0a43db044b6951055e30f22ed6070f9fe10f0482923f767e39fb99f887da59dcf679c3e9c16345f943b0c3012c SHA512 59250c13e980fc38b6da08faf7713c1c9ea2865793cfb0032a65a499bbfd4f7af94604bbdab4e0fd34a0be6b74db8cdcb8c3859e5c13d8a29d8c953d67a9bc84
+DIST rust-1.64.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B eb53e83dde3acdc3cfb84c7285a1373c4059c0c06e4cfe855339ce817a0a8cbea33da9fa0894a9640871003e8058482e46a31b04dd9ad1d8ae8e9ac1b3c72f7b SHA512 2e8438ca78bfd610c8c7b99a4aa2663cfddc611fa4495f490789d7838b80a8f90b9eb7f59171da187fdbc8a17b4ebc20eb69ccdaa75cca4966246e78dd41473d
+DIST rust-1.64.0-mipsel-unknown-linux-gnu.tar.xz 172189848 BLAKE2B aff9136ab374a3e39674c17b1ffa4fb8fe077301284b5dde927e0cf56e51edbb912b40d852aac4ad4d4e39f3ae20e68174dac338af6682735e8a031607652176 SHA512 9283e1e9eeff6c67c49e656709e1a6c6c52329aa913c6024af3aebd889b594f48f0c8172270c579a52d5980f7a42730a6184254b5c8002928f8f93c484dad211
+DIST rust-1.64.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 613ac8c773cc6585a99295e2770879cf7a9a56e1ac43256a1d8a56a12bd9b8aa08e49df96819805f4e98230d5c6d106eae837102c21f044e7e0b7756c453c529 SHA512 24d15870efaf03a916d69a358871a427869bc41ce164dcf8968564dc3f213603d0572f34b8ebbcd98d6653ff1e70664baf8c2dbdb32a0779f361338d4d3a0f43
+DIST rust-1.64.0-powerpc-unknown-linux-gnu.tar.xz 204541208 BLAKE2B 5bbd65d8aece3e32bca62d8a8b210cf155a786501c96e509462d0c45b15f19910794ff85ade0c42b575f41bd47f4f3250c011152b968ff1ad000ead6b7a200ad SHA512 13cc41679bf1bdb94d042de18696685087f3bfc84c0f99567b8c9dc6a5796c0f122499254ca8032eced8fa53623133a8b6652e14f398a9cea95ac3364a227f45
+DIST rust-1.64.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f4ed9d8a006f787d67b7aa18361079724dad1378416fabf18d380a67a45db6475d7da8e5389a057fd117da6af6dc7d891f9e6567af09f91c538ba6459b4e12db SHA512 f616b0e5ef7e0689f33905864c8d48405e18b5ada73c3cb9a8f9a6d80173ee3abf10448403fe7790be902123d55295412ff7af77db4770f6c824439af39e0a20
+DIST rust-1.64.0-powerpc64-unknown-linux-gnu.tar.xz 210911224 BLAKE2B b8726c1036d8de07684a7ed439a7d8365722d1224644a76219df776fc6bb0c97200afbc92a6054cbe0e98127c239cde9c06ef56a73a92b9ff320c135f8c0ecaf SHA512 8ed6150a13dfa136e16e0cee775f8c9d2926569fa17b6b88fb4e9ce1c1a127c8fda828a944e18e2bf184a0ae39a61db478103ad96acb6139e7cb25b69efdffcd
+DIST rust-1.64.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b8659a6b076db11acf124d73492fd21250df3924323616931cd8a8bfd5bb00ee1c48caf4e2448bd8e0120a3bf838cf73dcb810bfae8f87d487fb507b0ad132af SHA512 c24287ac0d49fda9fdc63421cc1901b8b55fee8b0701436a2d2c809ea03cec666b5a3c941a400bf73f4365576fc2a3bac85060013df76275dcc3dc32d376bbaa
+DIST rust-1.64.0-powerpc64le-unknown-linux-gnu.tar.xz 224504724 BLAKE2B dfe47070e6f9c1812b0d980c98e21c71e3d34ca41d7c4c0995b559a02cf394ec6043500a34f245624588fccd83335c32a4c57bb092b3c079f705ab4d8f1547d9 SHA512 545b1076d7bb3d32775e1a7343cbe1c6feaf5042f7a4524841970846b64251b5bc7be080994f129868f183072fb793f32a8a0ab588ac9b484e25cfac636630b8
+DIST rust-1.64.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 757dfda571cca4c2028464701970e66fc0a644cf2eec71b52ad6e499b05b3f4af1a9d4515b7ae116b07d5231b8e81ecc0a9e07c9e6603a5babada41e860f6b83 SHA512 fb22306416bb6b3021e53eebb97cb5f34a64873124b0c25409115feba2c2955082456b47b383e4ddaf3ce440b64547d9eabe444b75a78014aa119f7299bec99d
+DIST rust-1.64.0-riscv64gc-unknown-linux-gnu.tar.xz 191293592 BLAKE2B c32eb7b75b33b1eb53eab0b5823ade30c6dcffd8daddf04b7914a5f48ace80873573392659c5bd5a525cd954a9f078cdefba2873a3a1905f58cf9307360a4791 SHA512 b6e97215a5e8fa6f42cd609dd949f598f69779e8318f3c44e757f7c38fc67588db8169e0f263c7f121cdd3bd8c6cc225a32cc3aa80fcd7f718f9bee6f15cd94c
+DIST rust-1.64.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d922b1c72bd0fb7cfa0455f56d8c6ecee491a96e6bc54c0058ff01d8b152c2a87b4ade33f4445f345564fd1a2c9a54b81b52c1a37a32f1f91a78acc82a568567 SHA512 8860237891950bf1b9b958c950194b3617c5a865bdb1ea7834e84f74781b26959fb8a729d2043ee8cd63ee1144e307691b4adaf252d31c72f4e02ba60cea694e
+DIST rust-1.64.0-s390x-unknown-linux-gnu.tar.xz 225451932 BLAKE2B f7043af9d80b814e8b7988be8ddd2e14df361d08d89e96aed93a99b15719288aee064ed496008e486ee424cd8a9fa0edb78b34addd00646c1359d2bf504317ec SHA512 92702533159a4009be38314f03e26d36b45869709a0bc8f6394dddbd1ff61529f928071dadec36ba325cde589c5ac6b649ffc3c6db625473ed54e1686ada1723
+DIST rust-1.64.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 64c74bd0bb84f4c751dc1de20d12bfb9370cdf1db7957db07fa2f58ad692a10b8ee11a5c4bedc2f66f0291a91a1346d00de8e6f7ab57cd151003447aa8481dc9 SHA512 6301908c83618b61543c28026682901a342fb562b1cd1a2f78f8b0a388f06ea42b943bf822a67c2c4b1a2b4236250673a9d5bba95b85e182131a97395bffecbc
+DIST rust-1.64.0-x86_64-unknown-linux-gnu.tar.xz 161922032 BLAKE2B e8a0d13deab59b5f6e50aaf5a9fc39e032b759dadf4a7034f8824677de34940fab0e6e430299379f305f0849556608fc7db207db52bea6523ad83abda4e04624 SHA512 ab687e9142963c5f9d6d577022a0783eea9a3473ff6186950d2c6a15640bf7d3042857eaa1bffc1e472385893eded6e171d7f59dce988752830697398c766bd1
+DIST rust-1.64.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d13ab08a8ce4b9a92c60ab5b8c21087158b66d9a673b7a960103757a2b12216cab8e7713cda08753a5f5f921aa9c7d571da77a90166d6e7362549a49d6c1a501 SHA512 fda5b45652c0929fea19146dd2c5a895ae4c6db9a1bf448a7364899854ffa06a8eb52b35bfe28c8acdfb1633cd8afe6c5eabd622b7887ed267b1b72220ef4e6f
+DIST rust-1.64.0-x86_64-unknown-linux-musl.tar.xz 265843112 BLAKE2B 2b267b5b9aae610734759a690e36600eeeedab7e0b679e651df269d7b71b147984c1d16cab4658076f05a8a854afc74d83e6e61dac3a8a6bf2b56660d3483285 SHA512 c722ddb6a7bfc5b8767e2a37e697f625b4e775582423720d1b01737ec3269c82e2212f7e5a672a062fa49c8c15c0d2d182ea14dd048cfd9e07704cbc04fd8ef0
+DIST rust-1.64.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 783791aca41910e8074fd1c7f29e6fc1fdf51f80b1515bac99431305dbe6085574b2b2366c087675b6a9d98931a0cff1117cd864f634fdb4dd53792aab8ce5f9 SHA512 a6d0a72e9edbbc1e6caef7a9c0ec46518b95172afa4a33b2258286458d7b9afe72f9de8411a83567520a126b8377777e125cc639bac197a0495f17120fbcc1ad
DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
DIST rustc-1.63.0-src.tar.xz.asc 801 BLAKE2B b6c133768e368a7aeb0a4612a4c824d13f91ccdca6660feb5774ed6d79537084020780532c882ae3c9e4b6be3d36ceb0652eb134a580293ba8d8be74c4ba3c6e SHA512 f8807d46b9a3ca2a15a60f8062d63b3ee6e3210657cc752c948b3c7aa1626ec63cbd57529d010ad33f07ac47cf70dbf2cb50f200587338f77c631fc9e6786b17
DIST rustc-1.64.0-src.tar.xz 137841332 BLAKE2B 8acd9e0a4632ba2114018a5cd3f2d544324c601c246658f60a9e0be513c40375434d0a416f0bfd4d24493eae3fec7c9f5bb52d008c88cde14de503a3b6873dd1 SHA512 919f40acd8c6eaaef399aa3248503bea19feb96697ab221aaede9ee789ce340b47cb899d1e0e41a31e5d7756653968a10d2faaa4aee83294c9f1243949b43516
DIST rustc-1.64.0-src.tar.xz.asc 801 BLAKE2B 69f7bd7600d99794859c6fad4b44f0e98868e4e16041d6fe81d9d09a8435c75abac67a735adb0b81a2d9f85651841d404bc1ef4cd64fccd75e8a25d6d95729d0 SHA512 a831e3941849add1082c5b47b619ea87405b875d6eeb90a35f42742a511d124c29503debd17dcc8c6aa9e03a754ab51c3a15e99192bdd0dd1b8a59af9b6eb0b8
+DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be
+DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc
EBUILD rust-1.63.0-r1.ebuild 23703 BLAKE2B c49c010a8b6b947148cad4df27ada9b52b045826238568d298fae2ef74be466ba3a8b8cce1c8d727b74727c888c3c8d3be7afa908ee8dc567c467b0f0cfd329e SHA512 b5c88034b71d09b227a725521e84247c89594b56df5871c93a35543b5440ba700e2553cc07a98467bc6b9664159e2cf273417ab88a6eb3039780dbc8c8ebdb2b
EBUILD rust-1.64.0-r1.ebuild 23867 BLAKE2B b9d8aa35b84e668fb038fb813bfc6bc2bae4dce945e381cff0645a1fa9463a8cd30aa92e0018a407263929bd0da169191de136e634c9edacccd1ac0ffb69337b SHA512 4a174b1d34e6f7bfd860629d0bc06e99a7accf9eb7c7bf51f10db8b255237c63b3a5aee1291dd2ceb404676a67f5e507a7414ecc132c5926ee292cc047b0ced4
+EBUILD rust-1.65.0.ebuild 23874 BLAKE2B d711bf4d747cf4c9e5b69ac1e58360e9268fbb2fe15bac8f9f5dc2c2ff4af68a59339cd85192ef73a8004d438be409e16101baa32317b9cba618b441ee50d6cc SHA512 949541fbb80020a99e21d5fe70e22a9ec5dcc89b71cc95222a358dd0d08cbd52c088f6e1f3510766bdad5b558c5360270d1a595e1076f5d14c7e3d7665099704
MISC metadata.xml 1770 BLAKE2B d5881dc5ea39a5bfff7c74fa883dc1a6370db572568e10fce81467c2f2a17018de48123dfa7993d6d9644305bfc5ef5b0f445ef40362065fce943efb4af2e761 SHA512 c914e1a0cee95fa5cb332240f3eb6fbee73e5d8baabfa6bdcdc3e852c9480fea0686e435b969e14f45d8c791655edc6e6a7df2259ac99b6a6e63af65b09fa57e
diff --git a/dev-lang/rust/files/1.65.0-ignore-broken-and-non-applicable-tests.patch b/dev-lang/rust/files/1.65.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 000000000000..fddda12e6846
--- /dev/null
+++ b/dev-lang/rust/files/1.65.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,40 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] Ignore broken and non-applicable tests
+
+c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
+ src/test/ui/env-funky-keys.rs | 1 +
+ 6 files changed, 10 insertions(+)
+
+diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+index 9e770706857..6d92ec5cec8 100644
+--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
++++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+@@ -1,1 +1,3 @@
++# ignore-test
++
+ all:
+ python2.7 test.py
+diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
+index c5c824ac58d..f3fe047a79c 100644
+--- a/src/test/ui/env-funky-keys.rs
++++ b/src/test/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+--
+2.24.1
+
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
new file mode 100644
index 000000000000..eed4becde219
--- /dev/null
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -0,0 +1,758 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+# KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 15 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rls? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.65.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rls 512 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+# Is LLVM being linked against libc++?
+is_libcxx_linked() {
+ local code='#include <ciso646>
+#if defined(_LIBCPP_VERSION)
+ HAVE_LIBCXX
+#endif
+'
+ local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
+ [[ ${out} == *HAVE_LIBCXX* ]]
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+esetup_unwind_hack() {
+ # https://bugs.gentoo.org/870280
+ # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
+ # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
+ # the whole idea is for stage0 to bootstrap with fake libgcc_s.
+ # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
+ local fakelib="${T}/fakelib"
+ mkdir -p "${fakelib}" || die
+ # we need both symlinks, one for cargo runtime, other for linker.
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
+ export LD_LIBRARY_PATH="${fakelib}"
+ export RUSTFLAGS+=" -L${fakelib}"
+ # this is a literally magic variable that gets through cargo cache, without it some
+ # crates ignore RUSTFLAGS.
+ # this variable can not contain leading space.
+ export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
+}
+
+src_prepare() {
+ # this supidity is needed because patch is too large to be in filesdir
+ # and if we move it to devspace - it lacks checksum for sig verification
+ if [[ "${PV}" == 1.65.0 ]]; then
+ sed -i \
+ -e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \
+ -e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \
+ vendor/rustix/.cargo-checksum.json || die
+ else
+ die "remove sed mr forgetful maintainer"
+ fi
+ if ! use system-bootstrap; then
+ has_version sys-devel/gcc || esetup_unwind_hack
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools='"cargo"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rls && tools+=',"rls","analysis"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}