From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4943D1582EF for ; Fri, 21 Feb 2025 11:14:46 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 2F3C134317F for ; Fri, 21 Feb 2025 11:14:46 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 5435D110478; Fri, 21 Feb 2025 11:14:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 4B6D5110478 for ; Fri, 21 Feb 2025 11:14:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA7BF3430D4 for ; Fri, 21 Feb 2025 11:14:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A173C2737 for ; Fri, 21 Feb 2025 11:14:27 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1740136395.690956264e1cf113a585760057c3eb39da220311.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust-bin/Manifest dev-lang/rust-bin/metadata.xml dev-lang/rust-bin/rust-bin-1.85.0_beta20250214.ebuild dev-lang/rust-bin/rust-bin-1.86.0_beta20250218.ebuild dev-lang/rust-bin/rust-bin-9999.ebuild X-VCS-Directories: dev-lang/rust-bin/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 690956264e1cf113a585760057c3eb39da220311 X-VCS-Branch: master Date: Fri, 21 Feb 2025 11:14:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 712f06b8-f5f7-4886-8dec-6b1d69cf63ab X-Archives-Hash: e7ba4f3b83c60da8c4b8411e70ccfac7 commit: 690956264e1cf113a585760057c3eb39da220311 Author: Matt Jolly gentoo org> AuthorDate: Tue Feb 11 06:07:07 2025 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Feb 21 11:13:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69095626 dev-lang/rust-bin: add `beta` and `nightly` channels Signed-off-by: Matt Jolly gentoo.org> Signed-off-by: Arthur Zamarin gentoo.org> dev-lang/rust-bin/Manifest | 58 ++++ dev-lang/rust-bin/metadata.xml | 1 + .../rust-bin/rust-bin-1.85.0_beta20250214.ebuild | 317 +++++++++++++++++++++ .../rust-bin/rust-bin-1.86.0_beta20250218.ebuild | 317 +++++++++++++++++++++ dev-lang/rust-bin/rust-bin-9999.ebuild | 317 +++++++++++++++++++++ 5 files changed, 1010 insertions(+) diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index ce1b51dead07..0a6534adbde0 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -438,6 +438,62 @@ DIST rust-1.84.1-x86_64-unknown-linux-gnu.tar.xz 182944280 BLAKE2B ad8fd7b70e868 DIST rust-1.84.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cc4f3a136c7b137743792db470427a0d7823ae37a88c52b7dce35cdb72602557119fa68d01e4fec338556148dd7d760b3b95740b6e23bf45e80042d9203b50c9 SHA512 1b6e80910fc91997badc3113412b177d136495c22c02a4483e0bf221e609617ba05a30f8756ad72931fa92cd1d837ec15c579ce27bcef65629622648880a9fd5 DIST rust-1.84.1-x86_64-unknown-linux-musl.tar.xz 263174048 BLAKE2B b3ec6201d10e5044ab27954a515a27d582a5aba75bb32437d4df2037225fc13fdaed68537add5baff1f390600ebdeab451a000624cab3a0a34b178043f0007b8 SHA512 f0c40edfdfcbef8472d0cf3c1bd167b2c7d9c238147048ad9d45ac8fac7d41b1e311757974fd6478b531c6788005aa4003c22ce223b47a2ad6444df10cfe4805 DIST rust-1.84.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9424c40f72bda9334c904fea44d91ecd229c15e571bc6840831d90ce8e535cd9bfc472925baf155ced21626aa74afdc8f1d143233a24952a1bd59d84c8e56322 SHA512 0cfd282306cc4596d6c10f927277532be276e06c0ecde2e695d06159729ac4a99148b0a8db3de3ede4e81e1bd4a67be74f8e9e696f445e83d10394f1834b73e4 +DIST rust-1.85.0_beta20250214-aarch64-unknown-linux-gnu.tar.xz 241961984 BLAKE2B 9553edf94165922470e138a62f2baead6e04aaa81384d22f5b6628462a1c5bbc2387fff5ff05a9efbb81aec5f28301f94d3c9b53899e80afc7997323dd44e089 SHA512 c846832d71d7203759749d8e3aca6c718b91b7e075e02a0a0eac71302d5ed2e23a23c611efc93c3dedec26e9e8931e819eb1d9fe757e9c7b51a6abc1cd6f0598 +DIST rust-1.85.0_beta20250214-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0323dc2fc992e29d8619978d560c888f1873df3b403a7e2a25ab06ae5979d2eb6c42481612f9fcf0b5e435ede3735603d8c1eda733e0f3523b3bddb055d6662b SHA512 f17268a0c2b6568da4c621c23a2b43f2645a3cf2355d4eb7af22be6c6b11df23053eed35fb891f7bcaaff0400910bb7d0e7749d87b0541c401b8ece37d994c90 +DIST rust-1.85.0_beta20250214-aarch64-unknown-linux-musl.tar.xz 218887600 BLAKE2B a2be264a1d7c9b78209484d175c959278a9b9596a1a917c1033d04061ffa42d3e1aac491ea02fef1d5d2c3642be72ca04c912f581a5fdcf216a9bd86b3567d3c SHA512 d391a7cb96dc34cd95b862c888d7c5fa199de6924726c3e5b82de96296e890913716083b11f9e7ecb153531b07bc98fec753be4d94cbc57f27c7bff4f31db203 +DIST rust-1.85.0_beta20250214-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B c7267af92640e3b302b4d640e1239ded358b9595d601947371663da6aa26c3c7a2ef67aaa02563d583441888f771c118fdb718cdb002fbdd95d864c3914bdd90 SHA512 2b538a1601b1cc97c95b6b582bb5edd92a4b13222469bd35d04161d4c17c9ff5e9b26d0bfd59e893bd59a07f4a81c7bc25e8d6cd66a22b9d73c5108a8fa23592 +DIST rust-1.85.0_beta20250214-arm-unknown-linux-gnueabi.tar.xz 203409584 BLAKE2B d696b495d48a31cb684722648ace6f4366c8b6f60a06bb7bcd5eae8ae43d700e2d52134e0c79ce8f06cfbd63edf9a732fa5e882c7d8018aa0433404816d2f241 SHA512 37496d82befcb09b4dbc08c1f8786f96d6bcddfc56cf4abf27a17942d43bd3a4ffa3290c274e8ef7f3bce973e575ebe0cb167dd8955babb1dc9d918cdf5370be +DIST rust-1.85.0_beta20250214-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 671a4c2f524b2d92d6a6bc680921890a283adb6885e8e71974255ac637a9409579a9c6306b39967fb4637ca5e10f2409b8079dc5489c079a718a7994ea7eb09f SHA512 f6af86317c175f32e4a754e295f67787ac9d8e53e1b5338c17481f3ce2e95a3213fe2090ab268c0d62a31d9b41e9321e975cab28c61f7e3e6baa2dfdb40322a8 +DIST rust-1.85.0_beta20250214-arm-unknown-linux-gnueabihf.tar.xz 203645720 BLAKE2B 8dc6adc0de500d3ec04734c6517d0db29cb0a318ea6fd09a32dd01dde29f32730d851ddd37543798d649eb5384b529a6956419c32a4089ac5b41e57dbb205fdf SHA512 5d2e069bb09bc4a3039eb3d0b2a8748d7ab615feb312f612d24329dde791b88b63f577f7abe1522262145044225ccca7e7f42b6821f922972703ea6f0a06bbe2 +DIST rust-1.85.0_beta20250214-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 7eb7dad663c6d93267387d1c23eeaed237443fadc990e0c03846441b3e42ff837d79772067abac23eb5945af05b030049486236b1895e2824779c2c6857fd9e1 SHA512 9bf603601a935b8ee099d590bf75ed7d3ff97b02491f2b003455ed700f020e915b00fb0a86324900871037a042a1fe48c063a15e419349de68bb50b054d2de64 +DIST rust-1.85.0_beta20250214-armv7-unknown-linux-gnueabihf.tar.xz 209642508 BLAKE2B 0c10989b96bbaabf9d3d3f3a7fc827a94f10bd64c52dd4315ea1dcb7c375a6429f5dd2270504bae87a89a7f283579cc85848c16736e520b710d00ca0e3a69dd1 SHA512 17578a5739c9725ac435a9cecac094ea33478145089b307977a2473d8192c1a82faa856c6acc456285d68a5fd36aaea7e87d8599986091633cd4ad2052b55b99 +DIST rust-1.85.0_beta20250214-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 849ea0c53e4760159dd020a89c06841cb94e8bced3bf9559d3caa8fecd4cb176363f06197bbe89af9f2dcaf9d390e398d4d621dfeb3bebad60f891a8dd25ff6e SHA512 1d11e90ba660af35f3e6c151a108c46b7a2e4dfb00b89f09747b3ae04e5de57cbddc2603bac428deb2a4e259d19eab91ef1a11c5dfac06f7582253aff8e24aa9 +DIST rust-1.85.0_beta20250214-i686-unknown-linux-gnu.tar.xz 236420288 BLAKE2B e850782dc7712b0f33bc2c1aa4a4f9948c897d26fc21d3a3f5c82288dda6aec1ce641cc80ec05e80706616f8ba4c63d55138a0cdde3c69f5783ec459d298b0c5 SHA512 830ca4e65229c0e3aac37ec9686aded2d9e687f99f0575b2e82baaa1210a426f20c1ca0780c08e80b00f8669cc3ec34579150c6169e71620b9a6359624b91f16 +DIST rust-1.85.0_beta20250214-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4bb60878bb7c2d01a9abf974b3153237bb5f193b826b048fa94efdf77f9c2d300c58d2faa8b154347d2483edf6a6a8a207b9b58a7aefaaf6e7ce0486fac8b039 SHA512 7b73d0974d0d1ef0f03a77e1eb18fd3dc49b1a46dfcfc787b97e6e85e467610f1cf248d552e6e2a2a2e018e451cb7b68b29492d4955e53258b4a0d83f06d536b +DIST rust-1.85.0_beta20250214-loongarch64-unknown-linux-gnu.tar.xz 234064868 BLAKE2B 7f79933f9bfc1423a0380264569717ae24de9a61a00d32e98eecf208a19dc972c45a75622d8e7beca4378f844d70e290a8367a4b7d6ac20a93852281cf88e359 SHA512 b3cde10427f8b86997a9a59c1a20629c2e26c7e02315a30c23ecc67dbc12a08bf65ea2c5f900ed2a5ff11cdc1c7f5c4a6a09396bf747662ddbdc635c9c7fa5b6 +DIST rust-1.85.0_beta20250214-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 05475853833084fef51946dd71bb53210b67880aa5231d85457578e78458827769e4e96ddd63360ab77dd2100b5025c33db297528b6a9f281076bfff690cbd79 SHA512 f7c3d430d55c1125256a111afa9986a71c5e003d7872b3fb2d5814ab6c9d01db27a325df484095f43926a00acbf8fc269e0b3db0300bb496b0bae176d77b16fe +DIST rust-1.85.0_beta20250214-powerpc-unknown-linux-gnu.tar.xz 226058044 BLAKE2B 8d9dc5a74f571266c80450b514a7ec31ff885b40c66a5f49ccac98ff211da57bdc069a38425603527b3ef16917e9f1ff58969444149ff3d2e748bbc7379ac622 SHA512 bd8babeb25a256a56b3fda300963834326fd97f2bfb14e3f93ff41737242bcb6b354a5e2b1260e25eb25a22d8304d9782a7cbf0e3219adde534dc6b2332f9c6c +DIST rust-1.85.0_beta20250214-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5387f2d7ef2f6a0228ed8512ab431f05ffe885a1223fbd2e81be37536a0b55bfe1331654284bb70f9f1061173a31e9b09fde15f65af74c93f9fede5f0d435a4e SHA512 0611673cca4faebc7863f28e5c0fb60a9364ed980b1d025352cba9b1a64ce3778f4ccd149c1dd1d98fceeee144db5438f360ce0ce33682231203e9eb1ec5f812 +DIST rust-1.85.0_beta20250214-powerpc64-unknown-linux-gnu.tar.xz 222607376 BLAKE2B 474d684c6d04101200acf157389f11a8bb4759f90b27997e698a79bb117b47fca5441e42688198f87c9c05bd186c5e1a116ad095287c928c312d979df56f1f20 SHA512 b28c976ebdedbcda8113432b4cc03be379f58511bdda97831019fa2f8a9881baae9b5a1bf587e1de7a59f2aac00cec95f168d739769518ad31f27ae3a8ce2255 +DIST rust-1.85.0_beta20250214-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8612b4387f98ac3e0e1cef6201b5afe4e76f58372f6bfbbaab3070e35fdc0fa6972ae6a85c8f8a9e9db07537fec0891adf6ca6eb64dc70d818c236bed4037f26 SHA512 e3c4a3f7b3c9304726502a398610ed9c8149b05a8bf33a5feb97be8600c0fec79456bf2556ddab4200ab3f410544b147703a69cc97db26bcbf33866e108f5bbb +DIST rust-1.85.0_beta20250214-powerpc64le-unknown-linux-gnu.tar.xz 235353360 BLAKE2B d0dfa8d88db47ebc5e73b9550cefb684832a6238376eadffcac2ee0bee25dbc836bc76439d59d84ddc4d63d8f92251791a47462ac0fb0294460c5e3170cd2b1f SHA512 97380f0f812c89e71056c09d55e7f4bf016a1dc82995d37bec1e4dd942cdbcdaa09347080bac08a0917b27e83dafc3c7ef2c18547b593b97ca9c1aeb796c7f58 +DIST rust-1.85.0_beta20250214-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 10b90d187f86edefea27d695b20d1b89d4c5fd71e3acf60c518c30254b428f96bb4abe78111949c3f921e30c2e652e61ad86e56e037d4f20b10eeb64470ee3bf SHA512 28c69aea648cc08b5c78f96a8359b8c15bb51401c8cf267b5dae1f4b6460e779981a82e60f1ff1d8636e5167eaa5c0e193645ca23aa6e20b445afabb9fe21c92 +DIST rust-1.85.0_beta20250214-riscv64gc-unknown-linux-gnu.tar.xz 221919388 BLAKE2B db2ebd1c76b198ec6fcc481918da3954663163be90eb81c5d3c7a92a124bdf7112d9d8fc67f20ed5d621a3075fb610bba45de41d3c44c9fcecc0681ffc7462f7 SHA512 418e16c07215463bed4093cd44cfcfad91948e24f20109de8c54e8e2a941b5ab3434a6e9e1fe829c57c4f6312e258b5470ceb0c1c7a86af53ed81221d8d52436 +DIST rust-1.85.0_beta20250214-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1e06c31dcaaf1ce82b0c9cc913d7e3e23aef3ad7a58f2a6713896edd25e2fdff48a5ea9515382f149b59347afbeec5bac3525ad41b46523efb311105b15e3e8b SHA512 2c54c1fa5cb4b868222a7273b531ec8808a89ccb3686fd9cdc70c61b4a572493bf09659ef8c90b3e430cb153693191f505c62102cfcfd42b81a4bfc4b0adcb65 +DIST rust-1.85.0_beta20250214-s390x-unknown-linux-gnu.tar.xz 224063628 BLAKE2B a699b0e1f65270600139c20b5c730a6bd4d163a51fa1d25a14f79b617d491022b95afc6e4a5545367be3f3c15a531b09ebbb747697fe9507eaf72ca9dcce35ec SHA512 11e6d3f56f4f1f449f382be1fede741f6137371ff87cf31166af2d58949225988a9c1a6bebb1b72e399d2a07ccd67bff860b7b2f258e38fe779363089a91df75 +DIST rust-1.85.0_beta20250214-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 745a4734949b577804360bdbce5814ba2daafacc29148fd0278d8443dfc54412e58b34745e287d39ea03a61e9bacc44aeb8ae47111e63b4aa572427e68cfa8d9 SHA512 88e444dd8d78f7c9075f61e1f223cbb63683579aed03a6f68c80c0b6e68ec4fda561020af4d2a5360c01cc04415cecafad2b54809e3060280201caf017068079 +DIST rust-1.85.0_beta20250214-x86_64-unknown-linux-gnu.tar.xz 182371436 BLAKE2B 1859fdb803b9da3433460fbf73c52b37dadc95f1b1760f90ad23f93342a230cd7a95ab1bd3e3809e2979126e155deef7cec38888a4c2fce410371f8033a67a2e SHA512 0f4756631ababb4e9961b7ae380cd39e2c3c1a7415bdf07519d2553e95f6d710573eb3cb6a84eca9bcb03af6e557a81cd35771bdf839d3e4ade39238a5744c63 +DIST rust-1.85.0_beta20250214-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 56f1e00d3e7ca2092ab7a5cc3e8465af4037ba99100e0773c4a65867428fc8adbeb0a571cae36ac1dd182c24eb5e5b89e306f476ae357ab387f6d5ff4d6a6bcf SHA512 bf17821fe53a0de5bb58ab03e87a9cd326bc4c97941a306909375285014bcd1126e5e32d62dac4a522f7a72b892c8371dfa3111f25d661a5d4e1a2ea802d3cee +DIST rust-1.85.0_beta20250214-x86_64-unknown-linux-musl.tar.xz 262699948 BLAKE2B 2197f33e5ccbc2e31925457c3af92ffe90dc258e66e9788a7520ab7a9ff3571214f099b14f4db80dff38e519a6f57784e85f335765816c7f44ae2edd96ea04a7 SHA512 a074b931d940bbc0cefb2d56fb9437afa1d002cc599a1779422d0f215eb9382b5b0322e31e0c92408d958ee561dcc9eabe237a6f8c7158986cd10ae550f4d9f6 +DIST rust-1.85.0_beta20250214-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2b0c359da43e5b3645632f88bf6f776763571ef7d08d043ee806dc4991fc84b9d0c0b87b10cf12cf354c3a026d0665e17baf1316d00b10f3fdb1f47d834dbf6a SHA512 30013c2d6ebb6d63a49f0a54be584e7dbfe24ae4065313e70cae138c8533bc0afc2c46f05862828f1a97d3c398be91e140380b1d3d83c0a54976dfe3b5314efb +DIST rust-1.86.0_beta20250218-aarch64-unknown-linux-gnu.tar.xz 241961984 BLAKE2B 9553edf94165922470e138a62f2baead6e04aaa81384d22f5b6628462a1c5bbc2387fff5ff05a9efbb81aec5f28301f94d3c9b53899e80afc7997323dd44e089 SHA512 c846832d71d7203759749d8e3aca6c718b91b7e075e02a0a0eac71302d5ed2e23a23c611efc93c3dedec26e9e8931e819eb1d9fe757e9c7b51a6abc1cd6f0598 +DIST rust-1.86.0_beta20250218-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0323dc2fc992e29d8619978d560c888f1873df3b403a7e2a25ab06ae5979d2eb6c42481612f9fcf0b5e435ede3735603d8c1eda733e0f3523b3bddb055d6662b SHA512 f17268a0c2b6568da4c621c23a2b43f2645a3cf2355d4eb7af22be6c6b11df23053eed35fb891f7bcaaff0400910bb7d0e7749d87b0541c401b8ece37d994c90 +DIST rust-1.86.0_beta20250218-aarch64-unknown-linux-musl.tar.xz 218887600 BLAKE2B a2be264a1d7c9b78209484d175c959278a9b9596a1a917c1033d04061ffa42d3e1aac491ea02fef1d5d2c3642be72ca04c912f581a5fdcf216a9bd86b3567d3c SHA512 d391a7cb96dc34cd95b862c888d7c5fa199de6924726c3e5b82de96296e890913716083b11f9e7ecb153531b07bc98fec753be4d94cbc57f27c7bff4f31db203 +DIST rust-1.86.0_beta20250218-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B c7267af92640e3b302b4d640e1239ded358b9595d601947371663da6aa26c3c7a2ef67aaa02563d583441888f771c118fdb718cdb002fbdd95d864c3914bdd90 SHA512 2b538a1601b1cc97c95b6b582bb5edd92a4b13222469bd35d04161d4c17c9ff5e9b26d0bfd59e893bd59a07f4a81c7bc25e8d6cd66a22b9d73c5108a8fa23592 +DIST rust-1.86.0_beta20250218-arm-unknown-linux-gnueabi.tar.xz 203409584 BLAKE2B d696b495d48a31cb684722648ace6f4366c8b6f60a06bb7bcd5eae8ae43d700e2d52134e0c79ce8f06cfbd63edf9a732fa5e882c7d8018aa0433404816d2f241 SHA512 37496d82befcb09b4dbc08c1f8786f96d6bcddfc56cf4abf27a17942d43bd3a4ffa3290c274e8ef7f3bce973e575ebe0cb167dd8955babb1dc9d918cdf5370be +DIST rust-1.86.0_beta20250218-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 671a4c2f524b2d92d6a6bc680921890a283adb6885e8e71974255ac637a9409579a9c6306b39967fb4637ca5e10f2409b8079dc5489c079a718a7994ea7eb09f SHA512 f6af86317c175f32e4a754e295f67787ac9d8e53e1b5338c17481f3ce2e95a3213fe2090ab268c0d62a31d9b41e9321e975cab28c61f7e3e6baa2dfdb40322a8 +DIST rust-1.86.0_beta20250218-arm-unknown-linux-gnueabihf.tar.xz 203645720 BLAKE2B 8dc6adc0de500d3ec04734c6517d0db29cb0a318ea6fd09a32dd01dde29f32730d851ddd37543798d649eb5384b529a6956419c32a4089ac5b41e57dbb205fdf SHA512 5d2e069bb09bc4a3039eb3d0b2a8748d7ab615feb312f612d24329dde791b88b63f577f7abe1522262145044225ccca7e7f42b6821f922972703ea6f0a06bbe2 +DIST rust-1.86.0_beta20250218-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 7eb7dad663c6d93267387d1c23eeaed237443fadc990e0c03846441b3e42ff837d79772067abac23eb5945af05b030049486236b1895e2824779c2c6857fd9e1 SHA512 9bf603601a935b8ee099d590bf75ed7d3ff97b02491f2b003455ed700f020e915b00fb0a86324900871037a042a1fe48c063a15e419349de68bb50b054d2de64 +DIST rust-1.86.0_beta20250218-armv7-unknown-linux-gnueabihf.tar.xz 209642508 BLAKE2B 0c10989b96bbaabf9d3d3f3a7fc827a94f10bd64c52dd4315ea1dcb7c375a6429f5dd2270504bae87a89a7f283579cc85848c16736e520b710d00ca0e3a69dd1 SHA512 17578a5739c9725ac435a9cecac094ea33478145089b307977a2473d8192c1a82faa856c6acc456285d68a5fd36aaea7e87d8599986091633cd4ad2052b55b99 +DIST rust-1.86.0_beta20250218-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 849ea0c53e4760159dd020a89c06841cb94e8bced3bf9559d3caa8fecd4cb176363f06197bbe89af9f2dcaf9d390e398d4d621dfeb3bebad60f891a8dd25ff6e SHA512 1d11e90ba660af35f3e6c151a108c46b7a2e4dfb00b89f09747b3ae04e5de57cbddc2603bac428deb2a4e259d19eab91ef1a11c5dfac06f7582253aff8e24aa9 +DIST rust-1.86.0_beta20250218-i686-unknown-linux-gnu.tar.xz 236420288 BLAKE2B e850782dc7712b0f33bc2c1aa4a4f9948c897d26fc21d3a3f5c82288dda6aec1ce641cc80ec05e80706616f8ba4c63d55138a0cdde3c69f5783ec459d298b0c5 SHA512 830ca4e65229c0e3aac37ec9686aded2d9e687f99f0575b2e82baaa1210a426f20c1ca0780c08e80b00f8669cc3ec34579150c6169e71620b9a6359624b91f16 +DIST rust-1.86.0_beta20250218-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4bb60878bb7c2d01a9abf974b3153237bb5f193b826b048fa94efdf77f9c2d300c58d2faa8b154347d2483edf6a6a8a207b9b58a7aefaaf6e7ce0486fac8b039 SHA512 7b73d0974d0d1ef0f03a77e1eb18fd3dc49b1a46dfcfc787b97e6e85e467610f1cf248d552e6e2a2a2e018e451cb7b68b29492d4955e53258b4a0d83f06d536b +DIST rust-1.86.0_beta20250218-loongarch64-unknown-linux-gnu.tar.xz 234064868 BLAKE2B 7f79933f9bfc1423a0380264569717ae24de9a61a00d32e98eecf208a19dc972c45a75622d8e7beca4378f844d70e290a8367a4b7d6ac20a93852281cf88e359 SHA512 b3cde10427f8b86997a9a59c1a20629c2e26c7e02315a30c23ecc67dbc12a08bf65ea2c5f900ed2a5ff11cdc1c7f5c4a6a09396bf747662ddbdc635c9c7fa5b6 +DIST rust-1.86.0_beta20250218-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 05475853833084fef51946dd71bb53210b67880aa5231d85457578e78458827769e4e96ddd63360ab77dd2100b5025c33db297528b6a9f281076bfff690cbd79 SHA512 f7c3d430d55c1125256a111afa9986a71c5e003d7872b3fb2d5814ab6c9d01db27a325df484095f43926a00acbf8fc269e0b3db0300bb496b0bae176d77b16fe +DIST rust-1.86.0_beta20250218-powerpc-unknown-linux-gnu.tar.xz 226058044 BLAKE2B 8d9dc5a74f571266c80450b514a7ec31ff885b40c66a5f49ccac98ff211da57bdc069a38425603527b3ef16917e9f1ff58969444149ff3d2e748bbc7379ac622 SHA512 bd8babeb25a256a56b3fda300963834326fd97f2bfb14e3f93ff41737242bcb6b354a5e2b1260e25eb25a22d8304d9782a7cbf0e3219adde534dc6b2332f9c6c +DIST rust-1.86.0_beta20250218-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5387f2d7ef2f6a0228ed8512ab431f05ffe885a1223fbd2e81be37536a0b55bfe1331654284bb70f9f1061173a31e9b09fde15f65af74c93f9fede5f0d435a4e SHA512 0611673cca4faebc7863f28e5c0fb60a9364ed980b1d025352cba9b1a64ce3778f4ccd149c1dd1d98fceeee144db5438f360ce0ce33682231203e9eb1ec5f812 +DIST rust-1.86.0_beta20250218-powerpc64-unknown-linux-gnu.tar.xz 222607376 BLAKE2B 474d684c6d04101200acf157389f11a8bb4759f90b27997e698a79bb117b47fca5441e42688198f87c9c05bd186c5e1a116ad095287c928c312d979df56f1f20 SHA512 b28c976ebdedbcda8113432b4cc03be379f58511bdda97831019fa2f8a9881baae9b5a1bf587e1de7a59f2aac00cec95f168d739769518ad31f27ae3a8ce2255 +DIST rust-1.86.0_beta20250218-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8612b4387f98ac3e0e1cef6201b5afe4e76f58372f6bfbbaab3070e35fdc0fa6972ae6a85c8f8a9e9db07537fec0891adf6ca6eb64dc70d818c236bed4037f26 SHA512 e3c4a3f7b3c9304726502a398610ed9c8149b05a8bf33a5feb97be8600c0fec79456bf2556ddab4200ab3f410544b147703a69cc97db26bcbf33866e108f5bbb +DIST rust-1.86.0_beta20250218-powerpc64le-unknown-linux-gnu.tar.xz 235353360 BLAKE2B d0dfa8d88db47ebc5e73b9550cefb684832a6238376eadffcac2ee0bee25dbc836bc76439d59d84ddc4d63d8f92251791a47462ac0fb0294460c5e3170cd2b1f SHA512 97380f0f812c89e71056c09d55e7f4bf016a1dc82995d37bec1e4dd942cdbcdaa09347080bac08a0917b27e83dafc3c7ef2c18547b593b97ca9c1aeb796c7f58 +DIST rust-1.86.0_beta20250218-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 10b90d187f86edefea27d695b20d1b89d4c5fd71e3acf60c518c30254b428f96bb4abe78111949c3f921e30c2e652e61ad86e56e037d4f20b10eeb64470ee3bf SHA512 28c69aea648cc08b5c78f96a8359b8c15bb51401c8cf267b5dae1f4b6460e779981a82e60f1ff1d8636e5167eaa5c0e193645ca23aa6e20b445afabb9fe21c92 +DIST rust-1.86.0_beta20250218-riscv64gc-unknown-linux-gnu.tar.xz 221919388 BLAKE2B db2ebd1c76b198ec6fcc481918da3954663163be90eb81c5d3c7a92a124bdf7112d9d8fc67f20ed5d621a3075fb610bba45de41d3c44c9fcecc0681ffc7462f7 SHA512 418e16c07215463bed4093cd44cfcfad91948e24f20109de8c54e8e2a941b5ab3434a6e9e1fe829c57c4f6312e258b5470ceb0c1c7a86af53ed81221d8d52436 +DIST rust-1.86.0_beta20250218-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1e06c31dcaaf1ce82b0c9cc913d7e3e23aef3ad7a58f2a6713896edd25e2fdff48a5ea9515382f149b59347afbeec5bac3525ad41b46523efb311105b15e3e8b SHA512 2c54c1fa5cb4b868222a7273b531ec8808a89ccb3686fd9cdc70c61b4a572493bf09659ef8c90b3e430cb153693191f505c62102cfcfd42b81a4bfc4b0adcb65 +DIST rust-1.86.0_beta20250218-s390x-unknown-linux-gnu.tar.xz 224063628 BLAKE2B a699b0e1f65270600139c20b5c730a6bd4d163a51fa1d25a14f79b617d491022b95afc6e4a5545367be3f3c15a531b09ebbb747697fe9507eaf72ca9dcce35ec SHA512 11e6d3f56f4f1f449f382be1fede741f6137371ff87cf31166af2d58949225988a9c1a6bebb1b72e399d2a07ccd67bff860b7b2f258e38fe779363089a91df75 +DIST rust-1.86.0_beta20250218-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 745a4734949b577804360bdbce5814ba2daafacc29148fd0278d8443dfc54412e58b34745e287d39ea03a61e9bacc44aeb8ae47111e63b4aa572427e68cfa8d9 SHA512 88e444dd8d78f7c9075f61e1f223cbb63683579aed03a6f68c80c0b6e68ec4fda561020af4d2a5360c01cc04415cecafad2b54809e3060280201caf017068079 +DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-gnu.tar.xz 182371436 BLAKE2B 1859fdb803b9da3433460fbf73c52b37dadc95f1b1760f90ad23f93342a230cd7a95ab1bd3e3809e2979126e155deef7cec38888a4c2fce410371f8033a67a2e SHA512 0f4756631ababb4e9961b7ae380cd39e2c3c1a7415bdf07519d2553e95f6d710573eb3cb6a84eca9bcb03af6e557a81cd35771bdf839d3e4ade39238a5744c63 +DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 56f1e00d3e7ca2092ab7a5cc3e8465af4037ba99100e0773c4a65867428fc8adbeb0a571cae36ac1dd182c24eb5e5b89e306f476ae357ab387f6d5ff4d6a6bcf SHA512 bf17821fe53a0de5bb58ab03e87a9cd326bc4c97941a306909375285014bcd1126e5e32d62dac4a522f7a72b892c8371dfa3111f25d661a5d4e1a2ea802d3cee +DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-musl.tar.xz 262699948 BLAKE2B 2197f33e5ccbc2e31925457c3af92ffe90dc258e66e9788a7520ab7a9ff3571214f099b14f4db80dff38e519a6f57784e85f335765816c7f44ae2edd96ea04a7 SHA512 a074b931d940bbc0cefb2d56fb9437afa1d002cc599a1779422d0f215eb9382b5b0322e31e0c92408d958ee561dcc9eabe237a6f8c7158986cd10ae550f4d9f6 +DIST rust-1.86.0_beta20250218-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2b0c359da43e5b3645632f88bf6f776763571ef7d08d043ee806dc4991fc84b9d0c0b87b10cf12cf354c3a026d0665e17baf1316d00b10f3fdb1f47d834dbf6a SHA512 30013c2d6ebb6d63a49f0a54be584e7dbfe24ae4065313e70cae138c8533bc0afc2c46f05862828f1a97d3c398be91e140380b1d3d83c0a54976dfe3b5314efb DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4 DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd @@ -451,3 +507,5 @@ DIST rust-src-1.82.0.tar.xz 2966368 BLAKE2B 4162e7393ac21a095ac1541ea7b62fafa561 DIST rust-src-1.83.0.tar.xz 2998424 BLAKE2B de758c5bfb29865a3ab7ab02d17b0282272fa7d1cf5da333a6a19d6a16813320317785e9bab02e3ba9ca6ee9f26e0c96b00a117f33b74c82b13ece44133e3130 SHA512 e1f0ccae1fd4202d86cde1f1e2f4491983ec49fafb2b9eaca6260e9173bea0e0cc2567946e48e3ce48f0a620f63dc44d30334f06c935628158de110d43c7d53b DIST rust-src-1.84.0.tar.xz 3016148 BLAKE2B e948d4edb88f81ecfb49f56a3ca6331c4e9de17bd9f56af823e1cefdc5098abebc2bb013d7c12ca1713a43fec588f33befcb7146713eeade1511914f70146d62 SHA512 ccb45d57c7cdac311478a5b4689144297717e6404f9c4fb168127804f13f72c15433b32765f90ce56e6f34435229e754241cb3656b28a4b33c6070b6f79b7c53 DIST rust-src-1.84.1.tar.xz 3016012 BLAKE2B c9edeaf0797a22e384c54b3fe3e7c833464c09f8828474e05400a561a369d836626387caa495689e4b14fad691a85d6859098c84347211a6f79e2ef2c8d9d6f2 SHA512 564c440a05b67fd3a5dcb4dea21800d32ae65ca12230b804b5efa4bd468fe1b185bd7ed89041782018f70f60afd7554d7755edbe20e9cdc930a9fad390deb317 +DIST rust-src-1.85.0_beta20250214.tar.xz 3035860 BLAKE2B 506df30188382d43798c6661a8b730c10a74a230bf5ceb7c04f2892f14a45630182ee174f79b564dc5a6dd8e3bc84963b8391fc9641efc57d0ed90e69b89d545 SHA512 4c7cc4d1860f7d97f615ff5dc030754a7fb72d1eb47b27a2e25dbb5a9b0326b8a1b82b6b60a784da910c4730d3b728bb27e1d27f30dabdb7e455143550f0c424 +DIST rust-src-1.86.0_beta20250218.tar.xz 3035860 BLAKE2B 506df30188382d43798c6661a8b730c10a74a230bf5ceb7c04f2892f14a45630182ee174f79b564dc5a6dd8e3bc84963b8391fc9641efc57d0ed90e69b89d545 SHA512 4c7cc4d1860f7d97f615ff5dc030754a7fb72d1eb47b27a2e25dbb5a9b0326b8a1b82b6b60a784da910c4730d3b728bb27e1d27f30dabdb7e455143550f0c424 diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml index bc1f3f39e1de..b5d78dd6edde 100644 --- a/dev-lang/rust-bin/metadata.xml +++ b/dev-lang/rust-bin/metadata.xml @@ -25,5 +25,6 @@ rust-lang/rust + projg2/rust-bootstrap diff --git a/dev-lang/rust-bin/rust-bin-1.85.0_beta20250214.ebuild b/dev-lang/rust-bin/rust-bin-1.85.0_beta20250214.ebuild new file mode 100644 index 000000000000..97bd2bca573d --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.85.0_beta20250214.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL="yes" + +inherit edo llvm-r1 multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal optfeature + +if [[ ${PV} == *9999* ]]; then + # We need to fetch a tarball in src_unpack + PROPERTIES+=" live" +elif [[ ${PV} == *beta* ]]; then + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src" + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/ + SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV}) + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz ) + " +else + # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src" + SRC_URI="$(rust_all_arch_uris "${PV}") + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz ) + " + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then + # Keep this separate to allow easy commenting out if not yet built + SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) " + SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) + )" + SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz ) + )" + SRC_URI+=" ppc64? ( elibc_musl? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64le-unknown-linux-musl.tar.xz ) + ) )" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + sys-apps/lsb-release + sys-devel/gcc:* + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" +[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +# stripping rust may break it (at least on x86_64) +# https://github.com/rust-lang/rust/issues/112286 +RESTRICT="strip" + +QA_PREBUILT=" + opt/rust-bin-${SLOT}/bin/.* + opt/rust-bin-${SLOT}/lib/.*.so* + opt/rust-bin-${SLOT}/libexec/.* + opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.* + opt/rust-bin-${SLOT}/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="/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() { + if [[ ${PV} == *9999* ]]; then + # We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch + local rust_bin_url rustc_src_url + # Cut down on webrequests by fetching the nightly toml once + curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" || + die "Failed to fetch nightly revision info" + rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + einfo "Using nightly Rust from: ${rust_bin_url}" + + if use rust-src; then + einfo "Using nightly Rust-src from: ${rustc_src_url}" + # We need to fetch the rust-src tarball + einfo "Fetching nightly rust-src tarball ..." + curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" || + die "Failed to fetch nightly rust-src tarball." + # no verify-sig here, just unpack it + tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball" + fi + + einfo "Fetching nightly Rust tarball ..." + curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball" + if use verify-sig; then + einfo "Fetching nightly signature ..." + curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature" + verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \ + "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc" + fi + tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball" + else + # 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 + + fi + case ${PV} in + *9999*) + mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die + ;; + *beta*) + mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die + ;; + *) + mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die + ;; + esac +} + +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 +} + +rust_native_abi_install() { + pushd "${S}" >/dev/null || die + local analysis="$(grep 'analysis' ./components || die "analysis not found in components")" + local std="$(grep 'std' ./components || die "std not found in components")" + local components=( "rustc" "cargo" "${std}" ) + use doc && components+=( "rust-docs" ) + use clippy && components+=( "clippy-preview" ) + use rustfmt && components+=( "rustfmt-preview" ) + use rust-analyzer && components+=( "rust-analyzer-preview" "${analysis}" ) + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + case ${PV} in + *9999*) + mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die + ;; + *beta*) + mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die + ;; + *) + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + ;; + esac + echo rust-src >> ./components || die + components+=( "rust-src" ) + fi + edo ./install.sh \ + --components="$(IFS=,; echo "${components[*]}")" \ + --disable-verify \ + --prefix="${ED}/opt/rust-bin-${SLOT}" \ + --mandir="${ED}/opt/rust-bin-${SLOT}/man" \ + --disable-ldconfig + + docompress /opt/${P}/man/ + + if use prefix; then + local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin" + find "${ED}/opt/${SLOT}/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 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-/bin/rustc- + local ver_i="${i}-bin-${SLOT}" + ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die + dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}" + $(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-${PN}-${SLOT}" + /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-${PN}-${SLOT}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${PN}-${SLOT}" + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi; then + rust_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 + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust-bin/rust-bin-1.86.0_beta20250218.ebuild b/dev-lang/rust-bin/rust-bin-1.86.0_beta20250218.ebuild new file mode 100644 index 000000000000..97bd2bca573d --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.86.0_beta20250218.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL="yes" + +inherit edo llvm-r1 multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal optfeature + +if [[ ${PV} == *9999* ]]; then + # We need to fetch a tarball in src_unpack + PROPERTIES+=" live" +elif [[ ${PV} == *beta* ]]; then + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src" + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/ + SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV}) + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz ) + " +else + # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src" + SRC_URI="$(rust_all_arch_uris "${PV}") + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz ) + " + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then + # Keep this separate to allow easy commenting out if not yet built + SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) " + SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) + )" + SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz ) + )" + SRC_URI+=" ppc64? ( elibc_musl? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64le-unknown-linux-musl.tar.xz ) + ) )" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + sys-apps/lsb-release + sys-devel/gcc:* + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" +[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +# stripping rust may break it (at least on x86_64) +# https://github.com/rust-lang/rust/issues/112286 +RESTRICT="strip" + +QA_PREBUILT=" + opt/rust-bin-${SLOT}/bin/.* + opt/rust-bin-${SLOT}/lib/.*.so* + opt/rust-bin-${SLOT}/libexec/.* + opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.* + opt/rust-bin-${SLOT}/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="/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() { + if [[ ${PV} == *9999* ]]; then + # We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch + local rust_bin_url rustc_src_url + # Cut down on webrequests by fetching the nightly toml once + curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" || + die "Failed to fetch nightly revision info" + rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + einfo "Using nightly Rust from: ${rust_bin_url}" + + if use rust-src; then + einfo "Using nightly Rust-src from: ${rustc_src_url}" + # We need to fetch the rust-src tarball + einfo "Fetching nightly rust-src tarball ..." + curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" || + die "Failed to fetch nightly rust-src tarball." + # no verify-sig here, just unpack it + tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball" + fi + + einfo "Fetching nightly Rust tarball ..." + curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball" + if use verify-sig; then + einfo "Fetching nightly signature ..." + curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature" + verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \ + "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc" + fi + tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball" + else + # 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 + + fi + case ${PV} in + *9999*) + mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die + ;; + *beta*) + mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die + ;; + *) + mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die + ;; + esac +} + +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 +} + +rust_native_abi_install() { + pushd "${S}" >/dev/null || die + local analysis="$(grep 'analysis' ./components || die "analysis not found in components")" + local std="$(grep 'std' ./components || die "std not found in components")" + local components=( "rustc" "cargo" "${std}" ) + use doc && components+=( "rust-docs" ) + use clippy && components+=( "clippy-preview" ) + use rustfmt && components+=( "rustfmt-preview" ) + use rust-analyzer && components+=( "rust-analyzer-preview" "${analysis}" ) + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + case ${PV} in + *9999*) + mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die + ;; + *beta*) + mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die + ;; + *) + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + ;; + esac + echo rust-src >> ./components || die + components+=( "rust-src" ) + fi + edo ./install.sh \ + --components="$(IFS=,; echo "${components[*]}")" \ + --disable-verify \ + --prefix="${ED}/opt/rust-bin-${SLOT}" \ + --mandir="${ED}/opt/rust-bin-${SLOT}/man" \ + --disable-ldconfig + + docompress /opt/${P}/man/ + + if use prefix; then + local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin" + find "${ED}/opt/${SLOT}/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 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-/bin/rustc- + local ver_i="${i}-bin-${SLOT}" + ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die + dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}" + $(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-${PN}-${SLOT}" + /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-${PN}-${SLOT}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${PN}-${SLOT}" + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi; then + rust_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 + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust-bin/rust-bin-9999.ebuild b/dev-lang/rust-bin/rust-bin-9999.ebuild new file mode 100644 index 000000000000..2e2e6314f879 --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-9999.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 20 ) +LLVM_OPTIONAL="yes" + +inherit edo llvm-r1 multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal optfeature + +if [[ ${PV} == *9999* ]]; then + # We need to fetch a tarball in src_unpack + PROPERTIES+=" live" +elif [[ ${PV} == *beta* ]]; then + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src" + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/ + SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV}) + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz ) + " +else + # curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src" + SRC_URI="$(rust_all_arch_uris "${PV}") + rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz ) + " + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} != *9999* && ${PV} != *beta* ]] ; then + # Keep this separate to allow easy commenting out if not yet built + SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) " + SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) + )" + SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz ) + )" + SRC_URI+=" ppc64? ( elibc_musl? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64le-unknown-linux-musl.tar.xz ) + ) )" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + sys-apps/lsb-release + sys-devel/gcc:* + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" +[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +# stripping rust may break it (at least on x86_64) +# https://github.com/rust-lang/rust/issues/112286 +RESTRICT="strip" + +QA_PREBUILT=" + opt/rust-bin-${SLOT}/bin/.* + opt/rust-bin-${SLOT}/lib/.*.so* + opt/rust-bin-${SLOT}/libexec/.* + opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.* + opt/rust-bin-${SLOT}/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="/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() { + if [[ ${PV} == *9999* ]]; then + # We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch + local rust_bin_url rustc_src_url + # Cut down on webrequests by fetching the nightly toml once + curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" || + die "Failed to fetch nightly revision info" + rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2) + einfo "Using nightly Rust from: ${rust_bin_url}" + + if use rust-src; then + einfo "Using nightly Rust-src from: ${rustc_src_url}" + # We need to fetch the rust-src tarball + einfo "Fetching nightly rust-src tarball ..." + curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" || + die "Failed to fetch nightly rust-src tarball." + # no verify-sig here, just unpack it + tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball" + fi + + einfo "Fetching nightly Rust tarball ..." + curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball" + if use verify-sig; then + einfo "Fetching nightly signature ..." + curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature" + verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \ + "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc" + fi + tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball" + else + # 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 + + fi + case ${PV} in + *9999*) + mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die + ;; + *beta*) + mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die + ;; + *) + mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die + ;; + esac +} + +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 +} + +rust_native_abi_install() { + pushd "${S}" >/dev/null || die + local analysis="$(grep 'analysis' ./components || die "analysis not found in components")" + local std="$(grep 'std' ./components || die "std not found in components")" + local components=( "rustc" "cargo" "${std}" ) + use doc && components+=( "rust-docs" ) + use clippy && components+=( "clippy-preview" ) + use rustfmt && components+=( "rustfmt-preview" ) + use rust-analyzer && components+=( "rust-analyzer-preview" "${analysis}" ) + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + case ${PV} in + *9999*) + mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die + ;; + *beta*) + mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die + ;; + *) + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + ;; + esac + echo rust-src >> ./components || die + components+=( "rust-src" ) + fi + edo ./install.sh \ + --components="$(IFS=,; echo "${components[*]}")" \ + --disable-verify \ + --prefix="${ED}/opt/rust-bin-${SLOT}" \ + --mandir="${ED}/opt/rust-bin-${SLOT}/man" \ + --disable-ldconfig + + docompress /opt/${P}/man/ + + if use prefix; then + local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin" + find "${ED}/opt/${SLOT}/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 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-/bin/rustc- + local ver_i="${i}-bin-${SLOT}" + ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die + dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}" + dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}" + $(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-${PN}-${SLOT}" + /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-${PN}-${SLOT}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${PN}-${SLOT}" + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi; then + rust_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 + + if has_version dev-debug/gdb || has_version llvm-core/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +}