summaryrefslogtreecommitdiff
path: root/dev-lang/rust
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-21 02:01:39 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-21 02:01:39 +0100
commit3518f21ee7106f4268edf4404299dda157795e3c (patch)
tree66e26d8d7c87fe200d97584ffb8550404e22d665 /dev-lang/rust
parentf48011012cdabc60f67e96296bc600f2c3f20ce8 (diff)
gentoo auto-resync : 21:10:2022 - 02:01:39
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/Manifest40
-rw-r--r--dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch166
-rw-r--r--dev-lang/rust/files/1.63.0-CVE-2022-36113.patch48
-rw-r--r--dev-lang/rust/files/1.63.0-CVE-2022-36114.patch102
-rw-r--r--dev-lang/rust/rust-1.63.0-r1.ebuild774
-rw-r--r--dev-lang/rust/rust-1.64.0-r1.ebuild2
6 files changed, 1130 insertions, 2 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 3a74d02b05a8..9e19eb4a2c77 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,6 +1,41 @@
AUX 1.55.0-ignore-broken-and-non-applicable-tests.patch 2895 BLAKE2B cd2fd9b237786f187afe8d60e0ee6b9d1451233d554ca168e2f9d2a58f775c707d4d0a04899f8884152c3064689fa3fa31716f3b77e0002136ca7348c63e415e SHA512 993028842080ebc158ffe08f78315caaefa28958d890147286b53965eccff4d21f2edfcee153a2ceba03875d6bb03a2af7acaeb2deb8ccb7a5dc17cdffe73f0f
+AUX 1.61.0-gentoo-musl-target-specs.patch 6319 BLAKE2B e29e1e5642707948fb9c7ecc5e2b792163d77929e5a57cd4cc785a198bd7bf98e3f6756bd250b41bfc23b44930aaae436333c24171e4add5a26bc64dcc0a14bf SHA512 7eb870d066b8d3f6258ab0439465698339b60dfae0b107dd6f649f1ad4f658c5af0bfbe8497d7f1f6c309563715f35ba021e417b45ceeb0b7b9a088da3a0672d
AUX 1.62.1-musl-dynamic-linking.patch 898 BLAKE2B 09321e356d5c945f72e75e668bfee2a78158131713b917d7a70834dfb0e9c732a1d259ac5406e12552ffa5741dd03c08a5a04e3c68d3e6f905318486b23f081e SHA512 3edefd746a2b1eacaef7b3fd51b14a36ec0a5a4f8893355c48d3afba862405451f4d6961b22b429db1b402572d841d91351ac4759ab8ef3891fd00641d827d48
+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
+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
+DIST rust-1.62.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 54d54528fed34d0325d50a44ea732c99268d0acd2d78fe778dee369e18e9d7f6a8164617715a8c73aae59d2e856ff437343087542d2eeba9e613cd0418e9cf43 SHA512 79a049aad9cf0d50455747bbd2809611ca9d8eb2890c4a0dda71b64842c75cc4503f9f308d6f418e0f207d5cea04d21b352d45c1774a24b9270071d232dfb1d6
+DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz 203832692 BLAKE2B 964278ec2d9375d864cd03f7ec4fae1ca89fceebad51ccc2a017fbdf5ed354bd599d8c3eaf9eb9e86870f3d4b7fae8bb9011ae630742b3cc9e6ed38e14e8eae4 SHA512 d388e752fe7fa67c91719858be9ffc872c2b8fa45f6d63ae18298a79bc242e640784722d82461629bd0f07ce56a7dd850376ca9882bf0a084a5a19b01e5d59f3
+DIST rust-1.62.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 1f24c48e0648f80d7107db921917372bd51ff4b630bd36830d5bb76386b486776311c67854bd4d6366e820003b89ba1a4c8eecbe001f2221c1063661c71ab513 SHA512 f134e874d59bc7979e821f881098f9d91eb81a1c5c68db80d738def722273ecf4957d842c3f0ee9f9b415448477bcd0b022624cea95f99850bd2267dc545423f
+DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz 203946052 BLAKE2B b0e2a8a0068dc758d772f3dbc8003a57fdb43ead64e30bdf338c60b195bb2f78ef7e7a6df6dd2f02f13f47b9e913ab2fc010ce9fc6d39d5014709a71886e7eb6 SHA512 515d16b3ec5e8ec4af24c6baaf4e5443774c2140e5379019f29ce8a63eb1fd908408f42092e0fc0c3dd5e62ac7d43357af13fd74678cd2635451a2d775934386
+DIST rust-1.62.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 661439263a89d2206fbb7c3e00ac42e5975403670953df6be12dbf10e624a3bce0a16a846084aa621284e1d2dbb997af19b0f45808a2ddf7bb65af306a1745ba SHA512 bade26ccb646cc16822ae3235c00d048373f6c38eea79af128e3f299e8a69086fd254b4cd7c602c653d6573232594a27c7f8eb915797b8f1afbf56db3efb5008
+DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz 209318492 BLAKE2B 959488e4a957e19e5fe44e9b2b83406e135d7598cf4fa9db3b132c80cc40a54a73dee3c0b3db6f2f9299adf1b2d80fe453d1f0dab73fe46cacd5fa2ebf45b3ac SHA512 2c447c39f22f1f11f1e58d6adfea440a7d0bb91ffbb60df555b4e3eb41379b586f531a31c3ef86bb5e7a5b46889071f509157dc031fa174d93942d21dd241180
+DIST rust-1.62.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B a1e12a459d62fccd35bbc34d043f8a7512dfe3edb6563f02b84bfdd1e4cdf9c16570302644d71dc208dfe9782f48d4310a13b748d22571d1d43dcf7b61b2819a SHA512 82d2d1eb7ee0f8ba0bfaf93cd2ef0899973f535080af960a2b0f54049285df43e758a9bbe2f0e36e64e85bd530e4511e8ed828ce046c82b74a252b92e7dd42db
+DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz 223720860 BLAKE2B 117364630b38f4a97f9b7183ca7e9f30836ffd0f73c4e3ce2af97ad3c837edc7fa247afba70858009b5ba34bcb7adc87f29b8c87f03f79d060d9bab68b0625ba SHA512 99a87fef7870ee3478ac2faf1ebaec9fde28737ddc2423ec3da4173051f542e24b5666b0e276b3fdd2f02259f16bd119bf79515d057c63da2f6659c0e7ea2fd3
+DIST rust-1.62.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b9b4289aa38ad09d7f5098665a490dfa934676c37385f966d10c978f5320e374976617fb31a5e835661a81edab1ff244c74d8f8f5748954817db8171ed251b0d SHA512 9c44413bf71c416ad08289b4fa0223cb2a5299609ea5c94aff4f0bf7e793a9794155ee0c12a9f19c1c6e20112eb642f22be357d287adcea4e53e0285214c9661
+DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz 161572400 BLAKE2B b1f4b797319574b4e7cfb0d591988444238f3a735466e336b4c13e3af6754d18962f6f282011147c35ea48df375651d4cad3c368042073ff4da35c9ea6ab4855 SHA512 8c3cbb699f1a821889b70c56653380ad2a6d42d2ed444610cad5971230f3cbe5b7e71f1775f21788f0f54dad2f9c2c7eaa81ecde1a319d98ffcdb3701d6ef144
+DIST rust-1.62.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b68152d3a6221cb57d03826055477be0701c6520228ef2c67cf856a4d5bee5854ecc7dfe3e062121ba5d1e82be0eda0691e0d133ba5d644fed78fbf328021a9f SHA512 eedc2ba881ae0e2d709c8f2cb92ad360c091953b48bf77ce5eb1c93e296f0d532e29f9613d21327e8ca388cc5db7d26a8e612300bb3f94195db08d1d40f15909
+DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz 166210748 BLAKE2B d3a612e44132db49ab41eaf822a472f11b24b250ad1c5ca61a85b161d0a892d392d9a4789b42b4f35968887895e964ffbb5dfa69a8205b2ee94baf02cb2ef311 SHA512 f3ea74fad41c197c8af69d65ff6024832ddfeb3c7fd4913b35219b1954fc7b6d3ebc345686043ee3250c17624e133b6c8680272b5b73c38dce1d6c39b763b002
+DIST rust-1.62.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 15806c5684651c2920692d36c733ad8b8a6b8d39e901889457988205e04dd425083bf119053040b73ddba65a44d9330db021a85094d2c84e60c7cd1724d95116 SHA512 46f83dc667361cf4bd10103b1aa990796c1a45ee1af02c142f068fee7aa235c9d982189757184378b2230940134b1462116c09a3c0c043810e077fcf33bac316
+DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz 165275936 BLAKE2B a875ff4675559f9a4b7ff87c271dc4f51112a68c06677b78bbd97f7b4af8f69c75407ef711a9d700ddbf9d85863e24c2f3e27956181bbe00e4afd83220290998 SHA512 9e489cb27b9b8f00e9fd2210b3bf5c1e60ddc83c5fe3d9a381fc4469badda89c02948554d70710d8438333d6629c24282a8a9855241e46ded9c6cf368dce1c2e
+DIST rust-1.62.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 63b7d7487a7dd561a95a175584b798fea1b4157e59b660ec2063724e6ef4ceb7455a1912fb73a88c9315de0d80e6e622ef5c81258b670833e15c421cc3bbc562 SHA512 83420778147112aec58ad81f39f61a13fef97dbae6ff927c55a360588cab56cb58c48c31d19ed6b3b77d73277b044559db6184224d4e4d5bd5371e4cd3f701c2
+DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz 183062288 BLAKE2B c987b07862687203f716494cf5dde444d150628ae021f7a0ed990b47c892b7c247a6f8e790a2a88d49c3abcfe6236b18bbebaf76e0f2720a8c318b8f8e3e5a01 SHA512 d0db86e475fadf2535bc6955abb7b6e397553ad6843ddd369e15c9c35800866f27dcd0515a898a65f7ca868672cf458114320769cd14db258a279cfd3de3c57b
+DIST rust-1.62.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7398231bfc5624f6e7ef8af55405b861fc06fbfbca9159b9c60a1ab27a5bee6551d228958e6f56abfb598c6f24f53d35f510e863176d03639c47703bd8064c7c SHA512 8713ef73a1a9f30f246dc61086993f2f4a8d6f04595401b312c43fc97f667b44126e4b7f176001b68622d452bb74ee460d60ae2e6d44938e02c4da4fcdfc7855
+DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz 191619800 BLAKE2B 276f427d0ceed4926f46081c57f6aba69e3c541d896dbbd0375da0d1f6461840e20ab8b7cbb9dec53b67dfff668e91fc8c68ea70aa3d9f333e2b21ec345a876f SHA512 039d321f90f960276ad06ccdcc2549d2c07335d61b21abcc534b33ff406e130d54dd3d79d471be9588546e30f5e1d4952e33c7890cb2d66eac80436471d3db89
+DIST rust-1.62.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8ca8447d2c69ba58439ed36077882da80696427190761e5dcde99c8957fd476c73fbcc8111ebb3409c86e0a7c315dfbf7f1202204f7755a9ed87eb523bf34e38 SHA512 0f8efdf23aacf435e06854aed7f4366f5fe0f83a9a256d1026b02c2817badbd072a726bce052b0333e8cdc2907fd0e5b81a9cdef617a34e7d963d9d3c4742fb5
+DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz 201394312 BLAKE2B 60bc2fc5beee3f6d0ce695fed0c2148982b6ae3936bbf44fe0ccb97be80e9a2532f20c7234c924f500c4edc3bf82d4ca25b1f1dadc89bb29718c4a9e41bb8894 SHA512 4a8cfcffb7069e2bc4679a8da9acecf12514c512854bb9eef6f3f861e319b0098fd206d743ef7a0f25ef5b65892ad9dcc0adc1bc19525900c3edf5ea5489849e
+DIST rust-1.62.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 55391a58d2ffd6c21b1ff6d77595e424cf269ad44d59f7c2a29d149306563028b402e7393e4d802a47818d7e831455768e86d4f9d882ad0ca70cf216ed72c9db SHA512 c1cf19959de1348ed34448a3f9999ef53324be81d1c99967e4091406463dc0dc28a384f8f04e07e4b54791d1d4a2b1c4aea570503abb0c91c83eafdb5e389243
+DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz 194848260 BLAKE2B 35a283e87bd0d338500ed71d539760cc19a1522875d20f7cdf8cce7ac79fdf993530082e0078a9f12c2df41d3366dec30f5326f9584ab9dd0bc37811bc931e1b SHA512 60a9e4a0ffec3763e6e5f4f9a7f3f52f423b6af86eeb4eddbd5fa00682ec3f6881a6d0be717079f508c1d0ef94f3d794b7da2884ed5b7c88219aabd49bf20662
+DIST rust-1.62.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2cc8e9724e3d0f3af2d5c8e8c9f51f7f5e2d36a9e8cda23bf16fdcce0ecbd1a8965b0fc7b339dc27c779346cfe3f26fe8a2d3e1929431a2190452cbe4a949978 SHA512 587b6ab43a3c0258b0393e13f9f231f086527dd28f7f65fa6f00ac61c974e1d8c0305c2cc154a8a106d506b17f505ec8d8e6e5d39d4512072ab39da680fa1574
+DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz 218505248 BLAKE2B 6f8026b1779527f0dd781843e2f2deb423c2b541711d3e8efb981ea972cd5405568e6ca274e1b78cc6427e038d59e147652da26cedaa83b02f5daa79491db2f3 SHA512 10c99efe46acbe2bdbd27f28cae28d6db223c3cee2abc835d04f7ff1662c8b998d354ae22af9dcf00c078e96cdbb1f01df5f6c9e9c587d3459ea88f9acf37267
+DIST rust-1.62.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7053c6f041695ad7b9c5ea304a0d71b9b17c5737b7d7082ef2de6e52dc52bc18c170c3fe7e7a658823abc5f80ab775b544dd2b2b3e27690bd8209357945b0f04 SHA512 8bc1d64180f55b0ed93fd506bc193a51e4519a66ed8d6f4e331395bcdb8584171d81397d594460952d7983129aa08e278ee15a584571d404f2f6a304d1d7241d
+DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607b5a3a29b2676dc12466e0c9969f6ac31a588a5dff2d3c10ade70e705873e2606ed84efeaeeb87b8afe6c88285edbdd2bf1a8433f24c48009c21 SHA512 b329dc015dc70ceae0a3b9b8d8e674fb443769bf82f88ed06ca306cedaa52e26756a2491c92315e51b63d4272c0a1f43b2150d5636101814f6e2b59772f1f048
+DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1602b9cfbdf1b66c479f13b7171cb445068b5f18eae620435b25c3ab1e762e41977e31f02158d259acf16b0c8cdf895af16d6f68904939333b030f21b6c7a01 SHA512 2d79af9fca5a7e19448aeefd330fcc436c3ecb8e617662f144b12303ef2a214a3ae3ec4d9a42f68a4d0d6e343b81b495deddf3df23031aacfbead0c97b083174
+DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz 254266584 BLAKE2B f566cdc94726532c50726ccf081eb2b825e52a56c74eb9d9e846f9933dafedef0a8a1b7c485938f96ae9945706192218cc318750738596923329bc23ef770ce1 SHA512 9cd01f0539db8cd344e9dd39fc5ffcd5b65c9c8c95ed692b9f7c23bc19c970c9f0056f8c8bb61813f1402143177a5b1c20bf844e64af8cf0be110e17e30aa4af
+DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 46f38806b5a6b67953c607d4a3074a9177e14245e746771d876530c398ea98019e534a22a099c087ea2386124cc952f0a488e45f8175922b19b42441d6607938 SHA512 bc30af1e75cbfc8b488782af26d91ccee6e3b3220913af8d2ca3fc6beb5790bd81e3348f8da5c0c542bd13ab6c4cee77f50f4ba0d48e9600620034acc2dafe15
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz 230083616 BLAKE2B 2b66b809d53cc971c9cd44435c10c4bf0faa20dcc3782b47955d0fac252c370c670f0adb59f51b6842b46277d584c5fd44b94202e57aed078480f5cb6952d815 SHA512 c9f7b885008c58f7aac0edd5b6cd0295d768215e2b26cb1f590206248d468fa78409f42f48d505080ee14e2a59dd887cfc564db5a41e91ed36d738a90961f89e
DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a323669f0587c9785c587ac0eac72915e421a61d2b5252c2dcc7f637176d5d425fc8cbcfa6ef848fd0d7acfa17cd430e4d42e8c03729c563dda59aa13e6d5c5b SHA512 be2e1eff9228576b66e0a0434e1edbb4525d0ef66743082afef1ef55565e312e63fed7274d01298128fda0c7ab63827d5aed90f50e184582781a4e10ee311de1
DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz 224541836 BLAKE2B b32b7886ddc5da3af0c6e394ecb167288897b2c44b0108e33aeabb3842ff563c769e635413b092a36246bbcf137d692e94c6ce66cccad34c7e728c4cf4af7bc2 SHA512 e462c8b94defc5ac5dfe923c3a6273c3d414cf576840d46a680a4f333bc34fea874c4ec4363c4e1891a6fe95087bf4a68bba7f316bfed9db6313be989afd7428
@@ -33,7 +68,10 @@ 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 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
-EBUILD rust-1.64.0-r1.ebuild 23984 BLAKE2B de561824ee651ef4255834ad131c67282efa53711d13139d0266b5611255e36f2fa0ea195d40556d924b17f312b51b7a2bfa52906fdedc75deb918a94333bd4b SHA512 6ccd9578f65a00e7d1cb7690664ba6009bd4f73a6ad0813bdf4b75e5d331d9a5f45dcce2a323107a30addc8c900eff814e36a027b3969d0a75e84d22b65c4dfc
+EBUILD rust-1.63.0-r1.ebuild 23703 BLAKE2B c49c010a8b6b947148cad4df27ada9b52b045826238568d298fae2ef74be466ba3a8b8cce1c8d727b74727c888c3c8d3be7afa908ee8dc567c467b0f0cfd329e SHA512 b5c88034b71d09b227a725521e84247c89594b56df5871c93a35543b5440ba700e2553cc07a98467bc6b9664159e2cf273417ab88a6eb3039780dbc8c8ebdb2b
+EBUILD rust-1.64.0-r1.ebuild 23977 BLAKE2B a961154829964e4bf6540f545d216dcff959281e5ca8561184a0fd9e3d939cb0181d62f1411cf7df2ae381f875a890233940db383cf0307f9c1c6a7a4a5e9008 SHA512 8c37d87d10fc37e3cc6967e88e3697a37fda0876c26ffa893ef16d0be2bdd0b8c46448d75960dd6625098d453d22edf4e0a344e8563a7d5b7d7d2b293f7ca1d8
MISC metadata.xml 1770 BLAKE2B d5881dc5ea39a5bfff7c74fa883dc1a6370db572568e10fce81467c2f2a17018de48123dfa7993d6d9644305bfc5ef5b0f445ef40362065fce943efb4af2e761 SHA512 c914e1a0cee95fa5cb332240f3eb6fbee73e5d8baabfa6bdcdc3e852c9480fea0686e435b969e14f45d8c791655edc6e6a7df2259ac99b6a6e63af65b09fa57e
diff --git a/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch b/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
new file mode 100644
index 000000000000..970148124365
--- /dev/null
+++ b/dev-lang/rust/files/1.61.0-gentoo-musl-target-specs.patch
@@ -0,0 +1,166 @@
+From 331c3839ebb0099101e1d2f88205ea42f4e3b319 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Tue, 24 May 2022 12:03:20 -0700
+Subject: [PATCH] add gentoo musl target specs
+
+---
+ .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +
+ .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +
+ .../src/spec/i686_gentoo_linux_musl.rs | 11 +
+ compiler/rustc_target/src/spec/mod.rs | 8 +
+ compiler/rustc_target/src/spec/mod.rs.orig | 2465 +++++++++++++++++
+ .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +
+ .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +
+ .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +
+ .../src/spec/x86_64_gentoo_linux_musl.rs | 11 +
+ 9 files changed, 2550 insertions(+)
+ create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+ create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/mod.rs.orig
+ create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+
+diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..ca5f28f
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::aarch64_unknown_linux_musl::target();
++
++ base.llvm_target = "aarch64-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+new file mode 100644
+index 0000000..24b3b30
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::armv7_unknown_linux_musleabihf::target();
++
++ base.llvm_target = "armv7-gentoo-linux-musleabihf".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..cab0923
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::i686_unknown_linux_musl::target();
++
++ base.llvm_target = "i686-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index bd5b712..34b923b 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -808,6 +808,14 @@ macro_rules! supported_targets {
+ }
+
+ supported_targets! {
++ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl),
++ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf),
++ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl),
++ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl),
++ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl),
++ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl),
++ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl),
++
+ ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
+ ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
+ ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
+diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..b188a7c
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..395f603
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64le_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64le-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..cb3121d
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+new file mode 100644
+index 0000000..2fcdb66
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::x86_64_unknown_linux_musl::target();
++
++ base.llvm_target = "x86_64-gentoo-linux-musl".into();
++ base.options.vendor = "gentoo".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+--
+2.35.1
+
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
new file mode 100644
index 000000000000..a87687dce387
--- /dev/null
+++ b/dev-lang/rust/files/1.63.0-CVE-2022-36113.patch
@@ -0,0 +1,48 @@
+From 97b80919e404b0768ea31ae329c3b4da54bed05a Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 18 Aug 2022 17:17:19 +0200
+Subject: [PATCH] CVE-2022-36113: avoid unpacking .cargo-ok from the crate
+
+---
+ src/cargo/sources/registry/mod.rs | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
+
+diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+index c17b822fd0..a2863bf78a 100644
+--- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
++++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+@@ -639,6 +639,13 @@ impl<'cfg> RegistrySource<'cfg> {
+ prefix
+ )
+ }
++ // Prevent unpacking the lockfile from the crate itself.
++ if entry_path
++ .file_name()
++ .map_or(false, |p| p == PACKAGE_SOURCE_LOCK)
++ {
++ continue;
++ }
+ // Unpacking failed
+ let mut result = entry.unpack_in(parent).map_err(anyhow::Error::from);
+ if cfg!(windows) && restricted_names::is_windows_reserved_path(&entry_path) {
+@@ -654,16 +661,14 @@ impl<'cfg> RegistrySource<'cfg> {
+ .with_context(|| format!("failed to unpack entry at `{}`", entry_path.display()))?;
+ }
+
+- // The lock file is created after unpacking so we overwrite a lock file
+- // which may have been extracted from the package.
++ // Now that we've finished unpacking, create and write to the lock file to indicate that
++ // unpacking was successful.
+ let mut ok = OpenOptions::new()
+- .create(true)
++ .create_new(true)
+ .read(true)
+ .write(true)
+ .open(&path)
+ .with_context(|| format!("failed to open `{}`", path.display()))?;
+-
+- // Write to the lock file to indicate that unpacking was successful.
+ write!(ok, "ok")?;
+
+ Ok(unpack_dir.to_path_buf())
diff --git a/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
new file mode 100644
index 000000000000..1afbaa94138c
--- /dev/null
+++ b/dev-lang/rust/files/1.63.0-CVE-2022-36114.patch
@@ -0,0 +1,102 @@
+From d1f9553c825f6d7481453be8d58d0e7f117988a7 Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 18 Aug 2022 17:45:45 +0200
+Subject: [PATCH] CVE-2022-36114: limit the maximum unpacked size of a crate to
+ 512MB
+
+This gives users of custom registries the same protections, using the
+same size limit that crates.io uses.
+
+`LimitErrorReader` code copied from crates.io.
+---
+ src/cargo/sources/registry/mod.rs | 6 +++++-
+ src/cargo/util/io.rs | 27 +++++++++++++++++++++++++++
+ src/cargo/util/mod.rs | 2 ++
+ 3 files changed, 34 insertions(+), 1 deletion(-)
+ create mode 100644 src/cargo/util/io.rs
+gyakovlev: 'sed -i 's|/src/cargo|/src/tools/cargo/src/cargo|g'
+
+diff --git a/src/tools/cargo/src/cargo/sources/registry/mod.rs b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+index a2863bf78a..c9c414e500 100644
+--- a/src/tools/cargo/src/cargo/sources/registry/mod.rs
++++ b/src/tools/cargo/src/cargo/sources/registry/mod.rs
+@@ -182,7 +182,9 @@ use crate::util::hex;
+ use crate::util::interning::InternedString;
+ use crate::util::into_url::IntoUrl;
+ use crate::util::network::PollExt;
+-use crate::util::{restricted_names, CargoResult, Config, Filesystem, OptVersionReq};
++use crate::util::{
++ restricted_names, CargoResult, Config, Filesystem, LimitErrorReader, OptVersionReq,
++};
+
+ const PACKAGE_SOURCE_LOCK: &str = ".cargo-ok";
+ pub const CRATES_IO_INDEX: &str = "https://github.com/rust-lang/crates.io-index";
+@@ -194,6 +196,7 @@ const VERSION_TEMPLATE: &str = "{version}";
+ const PREFIX_TEMPLATE: &str = "{prefix}";
+ const LOWER_PREFIX_TEMPLATE: &str = "{lowerprefix}";
+ const CHECKSUM_TEMPLATE: &str = "{sha256-checksum}";
++const MAX_UNPACK_SIZE: u64 = 512 * 1024 * 1024;
+
+ /// A "source" for a local (see `local::LocalRegistry`) or remote (see
+ /// `remote::RemoteRegistry`) registry.
+@@ -615,6 +618,7 @@ impl<'cfg> RegistrySource<'cfg> {
+ }
+ }
+ let gz = GzDecoder::new(tarball);
++ let gz = LimitErrorReader::new(gz, MAX_UNPACK_SIZE);
+ let mut tar = Archive::new(gz);
+ let prefix = unpack_dir.file_name().unwrap();
+ let parent = unpack_dir.parent().unwrap();
+diff --git a/src/tools/cargo/src/cargo/util/io.rs b/src/tools/cargo/src/cargo/util/io.rs
+new file mode 100644
+index 0000000000..f62672db03
+--- /dev/null
++++ b/src/tools/cargo/src/cargo/util/io.rs
+@@ -0,0 +1,27 @@
++use std::io::{self, Read, Take};
++
++#[derive(Debug)]
++pub struct LimitErrorReader<R> {
++ inner: Take<R>,
++}
++
++impl<R: Read> LimitErrorReader<R> {
++ pub fn new(r: R, limit: u64) -> LimitErrorReader<R> {
++ LimitErrorReader {
++ inner: r.take(limit),
++ }
++ }
++}
++
++impl<R: Read> Read for LimitErrorReader<R> {
++ fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
++ match self.inner.read(buf) {
++ Ok(0) if self.inner.limit() == 0 => Err(io::Error::new(
++ io::ErrorKind::Other,
++ "maximum limit reached when reading",
++ )),
++ e => e,
++ }
++ }
++}
++
+diff --git a/src/tools/cargo/src/cargo/util/mod.rs b/src/tools/cargo/src/cargo/util/mod.rs
+index 28f685c209..47bbf37aad 100644
+--- a/src/tools/cargo/src/cargo/util/mod.rs
++++ b/src/tools/cargo/src/cargo/util/mod.rs
+@@ -14,6 +14,7 @@ pub use self::hasher::StableHasher;
+ pub use self::hex::{hash_u64, short_hash, to_hex};
+ pub use self::into_url::IntoUrl;
+ pub use self::into_url_with_base::IntoUrlWithBase;
++pub(crate) use self::io::LimitErrorReader;
+ pub use self::lev_distance::{closest, closest_msg, lev_distance};
+ pub use self::lockserver::{LockServer, LockServerClient, LockServerStarted};
+ pub use self::progress::{Progress, ProgressStyle};
+@@ -44,6 +45,7 @@ pub mod important_paths;
+ pub mod interning;
+ pub mod into_url;
+ mod into_url_with_base;
++mod io;
+ pub mod job;
+ pub mod lev_distance;
+ mod lockserver;
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
new file mode 100644
index 000000000000..3b832d98e84e
--- /dev/null
+++ b/dev-lang/rust/rust-1.63.0-r1.ebuild
@@ -0,0 +1,774 @@
+# 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="~riscv"
+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-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=( 14 )
+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}(-)] )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+ wasm? ( sys-devel/lld )
+"
+
+# 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
+"
+
+# 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.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.63.0-CVE-2022-36113.patch
+ "${FILESDIR}"/1.63.0-CVE-2022-36114.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() {
+ 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
+
+ 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_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${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\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use miri; then
+ tools="\"miri\",$tools"
+ fi
+ if use profiler; then
+ tools="\"rust-demangler\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+ if use rust-src; then
+ tools="\"src\",$tools"
+ fi
+
+ 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
+ doc-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##*.})"
+
+ cat <<- _EOF_ >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ _EOF_
+
+ 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_
+ # 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
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _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="
+ cat "${S}"/config.env || die
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ # we need \n IFS to have config.env with spaces loaded properly. #734018
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) 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 ! (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) 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() {
+ (
+ IFS=$'\n'
+ env $(cat "${S}"/config.env) 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 )
+
+ 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"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _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
+
+ 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
+}
diff --git a/dev-lang/rust/rust-1.64.0-r1.ebuild b/dev-lang/rust/rust-1.64.0-r1.ebuild
index 5ab3c8782e28..4ecd5bb436ec 100644
--- a/dev-lang/rust/rust-1.64.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.64.0-r1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ~mips ppc64 ~riscv sparc x86"
+ KEYWORDS="amd64 arm arm64 ~mips ppc64 sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"