diff options
Diffstat (limited to 'sys-devel/rust-std')
-rw-r--r-- | sys-devel/rust-std/Manifest | 14 | ||||
-rw-r--r-- | sys-devel/rust-std/files/1.51.0-bootstrap-panic.patch | 43 | ||||
-rw-r--r-- | sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch | 45 | ||||
-rw-r--r-- | sys-devel/rust-std/metadata.xml | 14 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.56.1.ebuild | 154 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.68.2.ebuild (renamed from sys-devel/rust-std/rust-std-1.54.0.ebuild) | 11 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.71.1.ebuild (renamed from sys-devel/rust-std/rust-std-1.55.0.ebuild) | 11 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.72.0.ebuild (renamed from sys-devel/rust-std/rust-std-1.52.1.ebuild) | 11 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.73.0.ebuild (renamed from sys-devel/rust-std/rust-std-1.53.0.ebuild) | 13 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.74.1.ebuild | 155 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.75.0.ebuild (renamed from sys-devel/rust-std/rust-std-1.51.0.ebuild) | 19 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.76.0.ebuild | 159 | ||||
-rw-r--r-- | sys-devel/rust-std/rust-std-1.77.1.ebuild | 155 |
13 files changed, 569 insertions, 235 deletions
diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest index 68535d7586d3..c313ce130552 100644 --- a/sys-devel/rust-std/Manifest +++ b/sys-devel/rust-std/Manifest @@ -1,6 +1,8 @@ -DIST rustc-1.51.0-src.tar.xz 109596164 BLAKE2B c1ac89655adfe7db8005476d42c748cf1896f52888141229fd6dda43855dbb08c21c8e1f11398d2f1f9dd5f8d508d9158a3bda4f1b282d1b184ea4c701100837 SHA512 ded91468ddf3e6627f00e7ec3d44452aa24eb727a183c0de9d90264f593119a54300d56b09251a88260db480b48554181ae195c538996a32d68d48b6587ac0df -DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c -DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24 -DIST rustc-1.54.0-src.tar.xz 116286856 BLAKE2B 5ac47822646a0b6205f09282168b4d4ddcace9f6bc8f242c890327ca4074626f129514f8bcae5c5556015745f718990cce490658076f5cd3526623439540416b SHA512 5162f85b43ca2c5af93fdbfb2597d75df8a838f7fcc025a5298499ce1043db50f1ea2fbba753e47ce5daad3d80d4b612acf6527ef902c34117763e687fdbbcfa -DIST rustc-1.55.0-src.tar.xz 117197580 BLAKE2B 8d9739ce7571146aee0e07c6287de9a8c4f1a914606cd47819eb1ef118b15772ecf22d0d43d7732f03c234a013fa54a4a7f0578a3f136af518f71bf64a03305d SHA512 7522f2fa95d5af92472404ecc97d7d9e745e88c933196a83fa373ce1efff6db3c295e0e2afdbfa1ff00644554efa0c3c7f6c11f9119ecf9010cb440b3f27c2da -DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f +DIST rustc-1.68.2-src.tar.xz 147835648 BLAKE2B 4b6deab818d915afe67a96f4d32a758c15a832041a77d9da5d065a903ea2718e0e7ebbc0cd1baaa436b655bdb93a62e0fb76f9e37aed595c064e0857201bb091 SHA512 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3 +DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4 +DIST rustc-1.72.0-src.tar.xz 151630408 BLAKE2B 7b26e5a9335f9262567b2a6aaf3b8ad6dc813688f532c54502c12c7b59d02082a082fe49ae370b0748fb13f8245dad13a58927d8563ba96fdf3639d4a128f236 SHA512 aed27c1babfec7f9b0815bc395302cff4f8e8ed83d8d3bde202f6c86fba4aec14ad2d3e99f4e22618c6727d876262511bfbcd83513731ea4b9c664462c97945b +DIST rustc-1.73.0-src.tar.xz 154319536 BLAKE2B 077bdedb36fdbc30db3c6331ac6014615eb79393ad42e38488d037ba38eaa6542467d39b2a14228d0bf6717110f915bf6fdcf0074c6293f413720cc748316eff SHA512 75c59680a82cb9d076b9434744a1c65908524ef769293952f5d9c5779d9a9c6fa4d9aa0c7e7d6b7566a21a50a27cd6ae452b5283a4d4606b2fa1acc24dfd8e0c +DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d +DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495 SHA512 7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606 +DIST rustc-1.76.0-src.tar.xz 162267908 BLAKE2B 0cf726841a837d9906d82a6216e65edad1e3e4a798ccd1ca3824c2098d0c45473854b8bf183c6e9ca70ba095752e77c4f5ef575d98c07243d609857214175f5e SHA512 92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf +DIST rustc-1.77.1-src.tar.xz 162796048 BLAKE2B 18a9fd095808ba78bf50ec94f7fd4087a1033ec79750aa593bacf64219c77ef90c030d41a7d8bc43f7ec8eb30b316c225024be4aeb517100ff6723487f8bb282 SHA512 e057ae638e4c3e54fdb367d48f4b85458121cee0d0ee1ed72f346940b8acad2f16cd9cc8abc16fcf4a17bf244b3300bb56a7e7be3bd0c23b034692c983b84fe8 diff --git a/sys-devel/rust-std/files/1.51.0-bootstrap-panic.patch b/sys-devel/rust-std/files/1.51.0-bootstrap-panic.patch deleted file mode 100644 index 529d5a1f402f..000000000000 --- a/sys-devel/rust-std/files/1.51.0-bootstrap-panic.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 31c93397bde772764cda3058e16f9cef61895090 Mon Sep 17 00:00:00 2001 -From: Joshua Nelson <jyn514@gmail.com> -Date: Mon, 8 Feb 2021 22:51:21 -0500 -Subject: [PATCH] Use format string in bootstrap panic instead of a string - directly - -This fixes the following warning when compiling with nightly: - -``` -warning: panic message is not a string literal - --> src/bootstrap/builder.rs:1515:24 - | -1515 | panic!(out); - | ^^^ - | - = note: `#[warn(non_fmt_panic)]` on by default - = note: this is no longer accepted in Rust 2021 -help: add a "{}" format string to Display the message - | -1515 | panic!("{}", out); - | ^^^^^ -help: or use std::panic::panic_any instead - | -1515 | std::panic::panic_any(out); - | ^^^^^^^^^^^^^^^^^^^^^^ -``` ---- - src/bootstrap/builder.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index f1a160250dbe1..0f5fcb4af400d 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -1490,7 +1490,7 @@ impl<'a> Builder<'a> { - for el in stack.iter().rev() { - out += &format!("\t{:?}\n", el); - } -- panic!(out); -+ panic!("{}", out); - } - if let Some(out) = self.cache.get(&step) { - self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step)); diff --git a/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch b/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch new file mode 100644 index 000000000000..c68ceba15e82 --- /dev/null +++ b/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch @@ -0,0 +1,45 @@ +From 4b7e0a0b56aa2446e670dfd6558380a1039a86aa Mon Sep 17 00:00:00 2001 +From: Arlo Siemsen <arsiem@microsoft.com> +Date: Thu, 4 Jan 2024 11:40:56 -0600 +Subject: [PATCH] Handle vendored sources when remapping paths + +Signed-off-by: Randy Barlow <randy@electronsweatshop.com> +--- + src/bootstrap/src/core/builder.rs | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index 4e20babc55a..3770d0687b2 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -1799,15 +1799,20 @@ pub fn cargo( + } + + if self.config.rust_remap_debuginfo { +- // FIXME: handle vendored sources +- let registry_src = t!(home::cargo_home()).join("registry").join("src"); + let mut env_var = OsString::new(); +- for entry in t!(std::fs::read_dir(registry_src)) { +- if !env_var.is_empty() { +- env_var.push("\t"); +- } +- env_var.push(t!(entry).path()); ++ if self.config.vendor { ++ let vendor = self.build.src.join("vendor"); ++ env_var.push(vendor); + env_var.push("=/rust/deps"); ++ } else { ++ let registry_src = t!(home::cargo_home()).join("registry").join("src"); ++ for entry in t!(std::fs::read_dir(registry_src)) { ++ if !env_var.is_empty() { ++ env_var.push("\t"); ++ } ++ env_var.push(t!(entry).path()); ++ env_var.push("=/rust/deps"); ++ } + } + cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var); + } +-- +2.43.0 + diff --git a/sys-devel/rust-std/metadata.xml b/sys-devel/rust-std/metadata.xml index 8615dcf23eb8..afe7492af107 100644 --- a/sys-devel/rust-std/metadata.xml +++ b/sys-devel/rust-std/metadata.xml @@ -1,9 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>gyakovlev@gentoo.org</email> - <name>Georgy Yakovlev</name> + <maintainer type="person" proxied="yes"> + <email>randy@electronsweatshop.com</email> + <name>Randy Barlow</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>navi@vlhl.dev</email> + <name>Anna Figueiredo Gomes</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>matoro_gentoo@matoro.tk</email> + <name>Matoro Mahri</name> </maintainer> <maintainer type="project"> <email>rust@gentoo.org</email> diff --git a/sys-devel/rust-std/rust-std-1.56.1.ebuild b/sys-devel/rust-std/rust-std-1.56.1.ebuild deleted file mode 100644 index 7ca481644a6a..000000000000 --- a/sys-devel/rust-std/rust-std-1.56.1.ebuild +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 2020-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs - -DESCRIPTION="Rust standard library, standalone (for crossdev)" -HOMEPAGE="https://www.rust-lang.org" -SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" - -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" -SLOT="stable/$(ver_cut 1-2)" -# please do not keyword -#KEYWORDS="" #nowarn -IUSE="debug" - -BDEPEND=" - ${PYTHON_DEPS} - ~dev-lang/rust-${PV}:= -" - -DEPEND="|| - ( - >="${CATEGORY}"/gcc-4.7:* - >="${CATEGORY}"/clang-3.5:* - ) -" - -RDEPEND="${DEPEND}" - -# need full compiler to run tests -RESTRICT="test" - -QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" - -S="${WORKDIR}/${P/-std/c}-src" - -# -# The cross magic -# -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -is_cross() { - [[ ${CHOST} != ${CTARGET} ]] -} - -toml_usex() { - usex "$1" true false -} - -pkg_pretend() { - is_cross || die "${PN} should only be used for cross" -} - -pkg_setup() { - python-any-r1_pkg_setup -} - -src_prepare() { - default -} - -src_configure() { - # do the great cleanup - strip-flags - filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' - strip-unsupported-flags - - local rust_root x - rust_root="$(rustc --print sysroot)" - rtarget="$(rust_abi ${CTARGET})" - rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. - rbuild="$(rust_abi ${CBUILD})" - rhost="$(rust_abi ${CHOST})" - - echo - for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do - einfo "$(printf '%10s' ${x^^}:) ${!x}" - done - - cat <<- EOF > "${S}"/config.toml - [build] - build = "${rbuild}" - host = ["${rhost}"] - target = ["${rtarget}"] - cargo = "${rust_root}/bin/cargo" - rustc = "${rust_root}/bin/rustc" - submodules = false - python = "${EPYTHON}" - locked-deps = true - vendor = true - extended = true - verbose = 2 - 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) - debuginfo-level-rustc = 0 - backtrace = true - incremental = false - default-linker = "$(tc-getCC)" - rpath = false - dist-src = false - remap-debuginfo = true - jemalloc = false - [dist] - src-tarball = false - [target.${rtarget}] - cc = "$(tc-getCC ${CTARGET})" - cxx = "$(tc-getCXX ${CTARGET})" - linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') - EOF - - einfo "${PN^} configured with the following settings:" - cat "${S}"/config.toml || die -} - -src_compile() { - env RUST_BACKTRACE=1 \ - "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ - library/std --stage 0 || die -} - -src_test() { - ewarn "${PN} can't run tests" -} - -src_install() { - local rustlib="lib/rust/${PV}/lib/rustlib" - dodir "/usr/${rustlib}" - pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die - cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die - popd > /dev/null || die -} diff --git a/sys-devel/rust-std/rust-std-1.54.0.ebuild b/sys-devel/rust-std/rust-std-1.68.2.ebuild index 7ca481644a6a..dec75d768962 100644 --- a/sys-devel/rust-std/rust-std-1.54.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.68.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.55.0.ebuild b/sys-devel/rust-std/rust-std-1.71.1.ebuild index 7ca481644a6a..dec75d768962 100644 --- a/sys-devel/rust-std/rust-std-1.55.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.71.1.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.52.1.ebuild b/sys-devel/rust-std/rust-std-1.72.0.ebuild index 7ca481644a6a..dec75d768962 100644 --- a/sys-devel/rust-std/rust-std-1.52.1.ebuild +++ b/sys-devel/rust-std/rust-std-1.72.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.53.0.ebuild b/sys-devel/rust-std/rust-std-1.73.0.ebuild index 7ca481644a6a..1432096c3a0d 100644 --- a/sys-devel/rust-std/rust-std-1.53.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.73.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..12} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -11,7 +11,7 @@ DESCRIPTION="Rust standard library, standalone (for crossdev)" HOMEPAGE="https://www.rust-lang.org" SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" SLOT="stable/$(ver_cut 1-2)" # please do not keyword #KEYWORDS="" #nowarn @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.74.1.ebuild b/sys-devel/rust-std/rust-std-1.74.1.ebuild new file mode 100644 index 000000000000..1432096c3a0d --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.74.1.ebuild @@ -0,0 +1,155 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + 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) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} diff --git a/sys-devel/rust-std/rust-std-1.51.0.ebuild b/sys-devel/rust-std/rust-std-1.75.0.ebuild index 935388d41a01..c63efccf3b0c 100644 --- a/sys-devel/rust-std/rust-std-1.51.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.75.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..12} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -11,7 +11,7 @@ DESCRIPTION="Rust standard library, standalone (for crossdev)" HOMEPAGE="https://www.rust-lang.org" SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" SLOT="stable/$(ver_cut 1-2)" # please do not keyword #KEYWORDS="" #nowarn @@ -36,9 +36,11 @@ RESTRICT="test" QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" -S="${WORKDIR}/${P/-std/c}-src" +PATCHES=( + "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0 +) -PATCHES=( "${FILESDIR}"/1.51.0-bootstrap-panic.patch ) +S="${WORKDIR}/${P/-std/c}-src" # # The cross magic @@ -126,11 +128,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.76.0.ebuild b/sys-devel/rust-std/rust-std-1.76.0.ebuild new file mode 100644 index 000000000000..c63efccf3b0c --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.76.0.ebuild @@ -0,0 +1,159 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +PATCHES=( + "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0 +) + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + 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) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} diff --git a/sys-devel/rust-std/rust-std-1.77.1.ebuild b/sys-devel/rust-std/rust-std-1.77.1.ebuild new file mode 100644 index 000000000000..7037dfd72e6f --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.77.1.ebuild @@ -0,0 +1,155 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + 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) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} |