* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-01-16 21:14 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-01-16 21:14 UTC (permalink / raw
To: gentoo-commits
commit: 874b8c43f6369ea7b70595becfc1aae3af0ca331
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Jan 16 21:02:00 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Jan 16 21:02:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=874b8c43
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.65.0.ebuild | 2 +-
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
dev-lang/rust/rust-1.67.1-r1.ebuild | 2 +-
dev-lang/rust/rust-1.68.2.ebuild | 2 +-
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.70.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
dev-lang/rust/rust-1.72.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.73.0.ebuild | 2 +-
dev-lang/rust/rust-1.74.1.ebuild | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index 3513eb0..28e6e22 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index 5833cbf..ff8ef70 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.67.1-r1.ebuild b/dev-lang/rust/rust-1.67.1-r1.ebuild
index cc92884..fab0e06 100644
--- a/dev-lang/rust/rust-1.67.1-r1.ebuild
+++ b/dev-lang/rust/rust-1.67.1-r1.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index 9e9e171..3b4d652 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index 14be2a5..4ba27d4 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index c032464..9d37467 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index 726196b..973b832 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index a12798a..a001486 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -93,7 +93,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.72.0-r1.ebuild b/dev-lang/rust/rust-1.72.0-r1.ebuild
index faa9254..38c6fb1 100644
--- a/dev-lang/rust/rust-1.72.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.72.0-r1.ebuild
@@ -95,7 +95,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
index 1df89fa..e1ffc54 100644
--- a/dev-lang/rust/rust-1.73.0.ebuild
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -94,7 +94,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index 8b3f655..65707cd 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -94,7 +94,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- >=dev-util/cmake-3.13.4
+ >=dev-build/cmake-3.13.4
app-alternatives/ninja
)
test? ( dev-debug/gdb )
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-11-09 17:02 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-11-09 17:02 UTC (permalink / raw
To: gentoo-commits
commit: 8d0db2028a747761c13f1c8d1e9c7177d920ed6f
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Nov 9 15:33:29 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sat Nov 9 15:33:29 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=8d0db202
dev-lang/rust: stabilize 1.81.0 for ppc, ppc64, sparc
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.81.0.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.81.0.ebuild b/dev-lang/rust/rust-1.81.0.ebuild
index 268b1e8..422f4ed 100644
--- a/dev-lang/rust/rust-1.81.0.ebuild
+++ b/dev-lang/rust/rust-1.81.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-11-09 17:02 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-11-09 17:02 UTC (permalink / raw
To: gentoo-commits
commit: aa5c0c3545475ac2c1b3bfe905928b903f91bd3f
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Nov 9 15:51:12 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sat Nov 9 15:51:12 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=aa5c0c35
dev-lang/rust: add new slotted versions
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1-r100.ebuild | 739 ++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.74.1-r100.ebuild | 773 +++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.75.0-r100.ebuild | 776 +++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.77.1-r100.ebuild | 775 +++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.79.0-r100.ebuild | 778 +++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.80.1-r100.ebuild | 777 +++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.81.0-r100.ebuild | 778 +++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.82.0-r100.ebuild | 785 ++++++++++++++++++++++++++++++++++
8 files changed, 6181 insertions(+)
diff --git a/dev-lang/rust/rust-1.71.1-r100.ebuild b/dev-lang/rust/rust-1.71.1-r100.ebuild
new file mode 100644
index 0000000..ab26599
--- /dev/null
+++ b/dev-lang/rust/rust-1.71.1-r100.ebuild
@@ -0,0 +1,739 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 16 )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+fi
+
+S="${WORKDIR}/${MY_P}-src"
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
+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 LoongArch Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.71.1-fix-bootstrap-version-comparison.patch
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+)
+
+eapply_crate() {
+ pushd "${1:?}" > /dev/null || die
+ local patch="${2:?}"
+ eapply "${patch}"
+ "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
+ popd > /dev/null || die
+}
+
+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 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-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate vendor/openssl-sys-0.9.85 "${FILESDIR}"/1.71.0-libressl-openssl-sys.patch
+ eapply_crate vendor/openssl-sys "${FILESDIR}"/1.71.0-libressl-openssl-sys.patch
+
+ 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc", "rust-demangler"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = true
+ 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
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ rust-demangler
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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-demangler
+ /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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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.74.1-r100.ebuild b/dev-lang/rust/rust-1.74.1-r100.ebuild
new file mode 100644
index 0000000..8d39d06
--- /dev/null
+++ b/dev-lang/rust/rust-1.74.1-r100.ebuild
@@ -0,0 +1,773 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 17 )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
+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}) )
+"
+
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc", "rust-demangler"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ 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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ rust-demangler
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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-demangler
+ /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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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.75.0-r100.ebuild b/dev-lang/rust/rust-1.75.0-r100.ebuild
new file mode 100644
index 0000000..6c0f87b
--- /dev/null
+++ b/dev-lang/rust/rust-1.75.0-r100.ebuild
@@ -0,0 +1,776 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 17 )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
+fi
+
+S="${WORKDIR}/${MY_P}-src"
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
+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 ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ # This patch shouldn't be necessary for later versions of Rust because its
+ # code was backported from master.
+ "${FILESDIR}"/1.75.0-handle-vendored-sources.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc", "rust-demangler"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ 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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ rust-demangler
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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-demangler
+ /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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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.77.1-r100.ebuild b/dev-lang/rust/rust-1.77.1-r100.ebuild
new file mode 100644
index 0000000..10f0bd9
--- /dev/null
+++ b/dev-lang/rust/rust-1.77.1-r100.ebuild
@@ -0,0 +1,775 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 17 )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
+fi
+S="${WORKDIR}/${MY_P}-src"
+
+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 ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.76.0-loong-code-model.patch # remove for >=1.78.0
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys "${FILESDIR}"/1.77.1-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc", "rust-demangler"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ 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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ rust-demangler
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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-demangler
+ /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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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.79.0-r100.ebuild b/dev-lang/rust/rust-1.79.0-r100.ebuild
new file mode 100644
index 0000000..2eb297d
--- /dev/null
+++ b/dev-lang/rust/rust-1.79.0-r100.ebuild
@@ -0,0 +1,778 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 18 )
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.78.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc", "rust-demangler"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ 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)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ rust-demangler
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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-demangler
+ /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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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.80.1-r100.ebuild b/dev-lang/rust/rust-1.80.1-r100.ebuild
new file mode 100644
index 0000000..ca97261
--- /dev/null
+++ b/dev-lang/rust/rust-1.80.1-r100.ebuild
@@ -0,0 +1,777 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 18 )
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ 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)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ rust-demangler
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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-demangler
+ /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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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.81.0-r100.ebuild b/dev-lang/rust/rust-1.81.0-r100.ebuild
new file mode 100644
index 0000000..3af577b
--- /dev/null
+++ b/dev-lang/rust/rust-1.81.0-r100.ebuild
@@ -0,0 +1,778 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 18 )
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \
+ 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
+
+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}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+ "${FILESDIR}/1.81.0-backport-bug937164.patch"
+ "${FILESDIR}/1.81.0-backport-llvm-pr101761.patch"
+ "${FILESDIR}/1.81.0-backport-llvm-pr101766.patch"
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ 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)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+
+ 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 rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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
+ 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/rust-1.82.0-r100.ebuild b/dev-lang/rust/rust-1.82.0-r100.ebuild
new file mode 100644
index 0000000..c57f20a
--- /dev/null
+++ b/dev-lang/rust/rust-1.82.0-r100.ebuild
@@ -0,0 +1,785 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 19 )
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \
+ 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"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="${PV}"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+LLVM_DEPEND=()
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+for _x in "${ALL_LLVM_TARGETS[@]}"; do
+ LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" )
+done
+LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" )
+LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" )
+
+# 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-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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
+ dev-lang/rust-common
+ sys-apps/lsb-release
+ !dev-lang/rust:stable
+ !dev-lang/rust-bin:stable
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm-r1_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix)/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() {
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ # Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set.
+ if use x86; then
+ if ! use cpu_flags_x86_sse2; then
+ eapply "${FILESDIR}/1.82.0-i586-baseline.patch"
+ grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed -i 's/march=i686/-march=i586/g' || die
+ fi
+ fi
+
+ if ! use system-bootstrap; then
+ has_version sys-devel/gcc || esetup_unwind_hack
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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 = true
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ 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)/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ docompress /usr/lib/${PN}/${PV}/share/man/
+
+ # 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
+
+ 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 rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}"
+ MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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
+ 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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-10-22 16:44 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-10-22 16:44 UTC (permalink / raw
To: gentoo-commits
commit: d8583bf8de509de1f867ae9f404cd333085a3dba
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Oct 22 16:15:24 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Oct 22 16:30:45 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=d8583bf8
dev-lang/rust: add 1.82.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 30 ++
dev-lang/rust/rust-1.82.0.ebuild | 794 +++++++++++++++++++++++++++++++++++++++
2 files changed, 824 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 73973e0..e15098b 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -200,6 +200,34 @@ DIST rust-1.80.1-x86_64-unknown-linux-gnu.tar.xz 167553060 BLAKE2B abc6430cfbbea
DIST rust-1.80.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bb52100a14bfa2775ca7cab5cd0f9dbc489ec3b26a8687876c97b666435c44ce58d86fd9f11d4f4832e79c05fa3ddefd7157edc91a3da25ffeba07da61fbddf9 SHA512 08aad912e47341bff29ee1d1b52cd02df8e609747f7061e61ed6a401d798140a8587378aa992b0d52af955a44d2284eefa00f27a6e94b4ed561c06eed60ad6fe
DIST rust-1.80.1-x86_64-unknown-linux-musl.tar.xz 248220632 BLAKE2B 7f0954379658df0a5cb0bb4bd49fdd1d216bfa5a200789124667d13ad97f0a5278f57e5b6278a969558c834de43a5d7e3f5ad3e331cc5a4c428dc097453a9394 SHA512 079cd3384c0b7f85d5fb2f02f27febe423ff533d71463097fbaa90449a955699fc25d8e4ae16489f7d7920c34c318c0f2e8185eeb9c6fd64c0851e4366c5eca2
DIST rust-1.80.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B bad9fdebe33c251b8802ecb0150a074e86becac00874137f793b1805bf36373903fbcfd4744b1086851fd1357c6c81262a7eb321685640d856dc2ee3a37917a7 SHA512 405de0a8676755a63a4fc1e61dd358960efc90e4fd2417cfb4311bfaab5a744397e1f751afbe6a9515c1d92626a79fc782272261eed2f72b37b88fd77a84d7c0
+DIST rust-1.81.0-aarch64-unknown-linux-gnu.tar.xz 230690876 BLAKE2B b037b62f61558f1e26a2d56042a8423480e79f582f9f20248181730518782f55371e6bac982bce532310f939f1c562541fcc93f6f5ea17f6f9a03972fa4c52d0 SHA512 de2e9da3461eba35fef1f22dd4ea90668b8e3d121b1acb3a9d862c291c6784ce6b2ffd9dc5f1bed99625e746ef9ad7a65d74142479fe1d6bd6b678fdeee6cc15
+DIST rust-1.81.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1979ad9d4c2aa30f963565a7058b3251edabd972d80d368d69074d975606962991b23a2ae9f7ebe7225adf06789b0090da48b0a6418e82ae45b2a3e67065714d SHA512 cf6a64e759b2118ce5fc5489f543cbef34900aec37f5416c0836f8990a589677a02f3fe8ca02898089c770507fb61c36a48b21a4f50acd38f1350f077a95a44d
+DIST rust-1.81.0-aarch64-unknown-linux-musl.tar.xz 208644312 BLAKE2B e732d3a4d3ddf0b1fdaac1324567bcea86bbb36dcdc921409bf8484a116dab346e3e5d6cdba0bed82d29f6d144a97db8b471c5c4bf2b339ef0ff86109dda66af SHA512 874cd6bcf870a3f416768a029ee2a32a88fd396e4fbf1150214281379db9f599f68b3dc9eb7c9152e9c17933ab11cfbbc80e19c1a8083343e583bc3994feca17
+DIST rust-1.81.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B ded7ede2657f16f9e054aae69b8bf2f50606674259b258f1acae75c5275966cbde256d957028b7220ff23ee83ea366aa80e6ad059e5880a76031a466aba4e528 SHA512 b31e6a06c8bec7d955bc73a6275535bbf6bf864f55abb1604ff3a78d26bc2a5d384f34df36336164b0dd3a475281949429bca75e736f1e8dccd48d7f84174ee7
+DIST rust-1.81.0-arm-unknown-linux-gnueabi.tar.xz 192297828 BLAKE2B d1ac0b2649039f3b13568906b97627e6dc0e9e0df4c9d784192240e86e1424fb0fc0816c88d45b7baa6c473f175d4765e62a64994bf5b58031a40a6a1fa864ae SHA512 bd64fbac076bf31da5acadd1d3a85adb692d58644c3fcc1f338473eb6ead3bcf4463ec1d7d46b5fb1d55498ff7684958f4b1591425c2aa8184405d01fae261a4
+DIST rust-1.81.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B d2c507d2480665a8a983b5eb2f2eb85265ab1e8aecf278ca44d9f2ca7b5b2cb76577962df6866e81e6daa3912942df3fe0c4bfa75fe18173c4a6c05284bd0393 SHA512 6ca22e556388877bb9be06144ffcafad07126cfedbf77a27c6c3ede0be3ab6803df7d6d3e55cbdb0f210c02a02c7dfd26a3c3e5fd48338b4b7fc71fcb469242e
+DIST rust-1.81.0-arm-unknown-linux-gnueabihf.tar.xz 192357588 BLAKE2B 5236afdc2fb725b2be3a2cab4d66a6ec518038e1a557ea4950f683fe3ec716a6ca0e6ebdf99b8068856c90c3e60220a5f8d1140c23c1c6a5e1f8d0c96fc80d9c SHA512 03d2709ad7ccb87161b65771b4b7882163c9a80a814684ac8687780d5f9da031c9e667bd35baa3af89c3d7275e377c50d36b47fac585454c623acf6f8bab8cf7
+DIST rust-1.81.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e819b6a30627c1af87f18dcdeff40eccd70249509f07b8157cceee047f756afe0ede798243a0b7a0b9842e42af5833e5a23c3b31771a1f4371711942b744b6ce SHA512 8eeaa15f932b9202acfd4d9210207d231a63cd5f3b77da4001e0d04a2e4f004c259150c83b608a5f84f59b29fe7933455409eb20b66739e3c238e13332e2273a
+DIST rust-1.81.0-armv7-unknown-linux-gnueabihf.tar.xz 197884288 BLAKE2B 060bc7c00c438011ecaad2a51b9edd2e96ac46bb1be602f14fd0eafebb2ef6d4bce979678d9ee7f99c6490565bb57b3f1abd1b3e2f387d247957763762b19082 SHA512 ad149183fa630b3b5c5258fb5b6ad993960c1fee979c4586206463bf76694ddba4854e451b79139a9455503bb3839b1efc92e9c27996f6557b7416078708b1a2
+DIST rust-1.81.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f61a7fc711100cba3ae558eab15f165ac5c539c7adb1f82b4c83bc82b7a6c5eb294bcc43e351cb28e7886582b9f996b909e55896c267fa1456bc97d9accf34e2 SHA512 fb6851bf3cdc3c3c83ae9e3fdd04cdccbc6f1661c0656f4d9562c1d911c2e82f16854e88ac434d93804587697319545b6c659b68712198d7a62ba3877b4dedde
+DIST rust-1.81.0-i686-unknown-linux-gnu.tar.xz 224016868 BLAKE2B cbc147e42563ba1cd9e39e313d824c78d20e308c95e02bffef02d25b08e92309d5db0e5c0d5e0bfb30d593235bd3a58e6b4614043b3c12a6619406861c48a25b SHA512 b48d934b6644cce7f34db35ae69a4ddc9c9e71851dd1ca221e86d3a6cc107f29e0070515cec3d548e422161a031528927b93d4499e47eeefa87488dfb23591bf
+DIST rust-1.81.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3cfb29d5ff9f00e5f14631466a3a5bc5ae0a3dadeed3e2b22ee000ebc57bf02ca6db5f2ac01756a6fdc753bb4cd83e5e6ed8fd9e356b6325f5b7eb17e7714d7e SHA512 1fd1ca2016876f2456eb832bc9c6d1ab2be237a619d5f6fd4e1ee0f31bdad3d3c1c95d5f45069512d0c8a140115a594be3d1f888fd9b5a342ddd7cda1d5e5ce7
+DIST rust-1.81.0-loongarch64-unknown-linux-gnu.tar.xz 200885152 BLAKE2B 46b23442632d7c3368454a031643a795cf54b732d2c180960008e38be97070708a433d1094f529aa78479fbd89adf1c4ceac38af919f28577e8f766029cf40c3 SHA512 2e090423c8c5ddc1dc29d5ad19cdaebb9abad45bc7a229f911385f50cd2951b587a187ed8deb01aa41aa643465d7c7ac2b91d94c80265c03362de39b99eba82e
+DIST rust-1.81.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 70aa0a550992b32ef666751336ebe2c81f3834d4117942cdc7f8b1eeadb1e5efa5fc63e283517e5535f406ff0e36b4577e559e24281e388a362463ed046fa340 SHA512 70c85d06e5b29968b6efb10efbece2761f81697395bf037581adf9e3aec0141266ae59644b6951e646749bcc23b038d5601b804c6d389b64c87b4be24847db42
+DIST rust-1.81.0-powerpc-unknown-linux-gnu.tar.xz 213304904 BLAKE2B b9d126cc787323ec18e978aaccbb8f92ccf753314fcc6a5d2d496400f4bc7885b543bd7ecae782a6c1dba737708358be26be68f69b47e982617e9a80af47d279 SHA512 a84bdad9877f7c8df2cd495447cca2a0e1448a8a13ee0fbcd2ca6f662317cbebf9425238edf3b5a1277b723b9c44eb4d363339c00a35e0ff86b6a568b61ec2f2
+DIST rust-1.81.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d2fba08b5be0026227e071993272a12e0d27af3b8e3b2fbd039a9c9a229317e9014d2e0f2c981387e6b46907e258e309424c2aef22d3512743d28ce035a85dc3 SHA512 156319d1904834794476d80a3b047a4099b983cb950ab3e9882ff34c0451eddff7cad8b160406abf23df40d195fdce925052177de2243ec8e8415edaac3c643c
+DIST rust-1.81.0-powerpc64-unknown-linux-gnu.tar.xz 210257620 BLAKE2B 686cb5e08befb0d4a19a7e34478c6916abd6aa7a05f09d83a7f8c4fcf59e144371a7442a1f14cd34b149dd056df119d5748ece4311d69af79725cb9b3b662126 SHA512 14f5feaeba8cb9e0a3326e5d74cba9be832fe6570308d5735f7fe7486fe240ef0f3cd2396c853bf34cc784f05fedd7a975dcb922775c59f3262a67fac1383839
+DIST rust-1.81.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d30e35436bbe3869278f4936b2b132d0a243bf0288470e837246a59239c2813025757f684f23c639517836e25895835a7ab0fd488834e2f53cfd1155e1c8a2fd SHA512 3b302c6c999df3e9aa0ab1a0638692cb6f88d44598e00bc862ecd2c384afffb259b8072738055800efc9f0c5b8de07a0fe3de1cab1bde28a9faf1951411a9bf6
+DIST rust-1.81.0-powerpc64le-unknown-linux-gnu.tar.xz 224307656 BLAKE2B 3891f93aa2bfb62fe23b463cdbd7db50182bb175cfadf2969b32d093897f517afb7dd97ecaefe90f220998f7436d41651c32e5a46957c2114d1ebc70834dd917 SHA512 9f6fa6bf0d5ba935b9ad5661287ad8aad5fc8d6b28fdbce6cd81730539d087ea512dba7b0133de08761d12b580b8b1c5d7ca35a4f1277a8bb683c109177ce83a
+DIST rust-1.81.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e96b56de2542596db2db9030382e8d87a9fee884888b58c0050b81487eaf22c2e6d62d11dfc7763a1f647318c2bd0b29e03dcbbe1809ea8162432874758caa7c SHA512 0e568a763276ca4e9c359d6dfc32d1f369ee04e160026c7660ff5f14175022175d23589df9c03c0c8c270d7e74a5e54754d23c8a1b0545b67b6d6c3d3ee82628
+DIST rust-1.81.0-riscv64gc-unknown-linux-gnu.tar.xz 223006516 BLAKE2B 5627ee83ed51726bcdb50757393f2333d76d705e18d65681c1872df6dd3e2beb9a18910b4d5e7da5c30f83b4c9f80117f2ef9c212cdd92eebc6cfce182ef579f SHA512 57cf209d364d43164402cddeed0ebe41b3e3ca69f79cec4f83055cf999493ed1cd87bc852b90707b2809cacceb39a83c4236712220105cd6a71be30250d4ae6e
+DIST rust-1.81.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0eaff43543493165dd86a2ffa30a4039b599302970e5c4380e8640c8c61881480c86b2ef98159ccf464c2fe39e23d14191aa11fccecb8ea8f56feebabfcd0d2a SHA512 4b5b7f01801692aa4087b5f010993d4b14b73be9c2dc964555ba140a939e434400cb4ed4756238725dcb2ab66e5ed67bb1d4688a92fcbc6c8af23f21fdaee568
+DIST rust-1.81.0-s390x-unknown-linux-gnu.tar.xz 212322092 BLAKE2B 11237159a0e70c84e296cd54ac52721a887057ad12269328cf67483d55e603df3f55381c4413871b83fe58a26a52c32ba5e77e7b3426016eb35a207275598c29 SHA512 1ca177d52cd897da497191c4ff869ad9e22047d37f4955e134d51a8ac5a5c24d9ff109a6e955e71df0ac0fa1776939ee39ae384f2fa12ac4740e2aecf92dfd61
+DIST rust-1.81.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a982e7308aca7fac8a93d299a9dcb00f5bea71e1b7061fada84fdf2cbe1cc5bf7ea65abff857a234896b950e06e1bc76c0e796a9570039b2314ac17dc4e9f4ea SHA512 cf8cfdecaeb589db64df6ff0418d68332c8b516d401f0e9bccf9651bb085f57d3bef4941fa60788ca372a9a2407a406dfb24c153a64549925a47c15196815683
+DIST rust-1.81.0-x86_64-unknown-linux-gnu.tar.xz 170439044 BLAKE2B 5377d8972a729b0135c2461adcdc179719a0af99e8e9656b3c9eb487144c306d49dd42737d71195773e4b03e4287215955a7bab34094c19a9f07fba04a706a62 SHA512 a648b735d91348dfda6a66b4ca09f3449ff4abbd1d727fce8c91ec409a82bfc873988b06aa0907e145c486d035df12c68fa14466ccd2148ac0a99d5934335ae2
+DIST rust-1.81.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9f39dedf33efd6fe4d66e10e3cb064851b1637a50e97d3bc19c48bf989e1e94d694df493eb437d2c2e58989933dbb05a7d25c276b26331475f44ea2d9d52909c SHA512 37908051e511cf223e92379ecf577ee1644d6aa13583b622b78d445367ca9e8a4253d77a5237831eeef15607c71e99ae3ef42451803466fad303bb523e13475c
+DIST rust-1.81.0-x86_64-unknown-linux-musl.tar.xz 251142276 BLAKE2B da30177914f8574ff896b64a60279913d48330818c6e96e10d3180964ed542697f29c6ca7e7c81fb1b814e1d9ceb8bbf6e119596b59564a64a08e30ce72ce4b8 SHA512 3b772269362556bebbff72a13abf05f745fd88128367ab1e5879ed3c0f3f5a1f7370faec1b2bce521a38662d58d94a8e4eb6b085c8e0f166979af490492e17c8
+DIST rust-1.81.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e13afc29a5a06bd9453db22a6bc6894d8fb671ad9e3989852c9348ded5a22c908ec58ddc20b0f2d94e6bd291eb0e9fec09277f95ba9528bb7d333748ebb79959 SHA512 da0689376503be19af92d88e2731296c6a5286cec60d42dcebd4738b23e3e1a1bb303982e2a9e6bc14a8f7a8872321b9e9c25915cde43fa1772ddfdb149997c7
DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
DIST rustc-1.71.1-src.tar.xz.asc 801 BLAKE2B a88c073a70552d73e2d7695eceabdaa478f34501b7271fabf7f4a09f3efa545181f34353e45776b05918e6aeba88adb02f9731454f7085a7abf1602fc6589983 SHA512 9dd0406cf22f1daa7fcfd015fc1c6f8d36586aa99bf14c1491ee464c1f892ab759feb83e8b55b64713170fb777fdbe038fb5fd01a59c911b6599223baaba0677
DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
@@ -214,3 +242,5 @@ DIST rustc-1.80.1-src.tar.xz 199234944 BLAKE2B 39891362f2a4bc249f5d943e3ded48d2a
DIST rustc-1.80.1-src.tar.xz.asc 801 BLAKE2B 0fb361678e4b580c89ccc35fd1b29d24ab41af854e5a34d24192671c93140b7d2c91e740a51f1eaa6854d5970bb91a0510aac9cb6cbf2883e77a2b941d65b010 SHA512 9d5731db73b8a982b956cb2c4736c0fc7dedab785d9855508e6a1fc2d2163d561fdcd5b254ea5f7b1f27b3903d10d9d2403366e63f9c690ab722c401109a7c1d
DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad0670be6872f691b4c9f36faf06803f072720ebd04f06745c355d807991b38312cc830b12d6d3f50b0574bb7325340b7 SHA512 b8a837ced521d2ca2c7f228a0640da591384519e4dbc1ae768524d50616da6abbd2f7bdae3777caebc0447dac91bf76481282ce5a2264d7f30e173caa6321a51
DIST rustc-1.81.0-src.tar.xz.asc 801 BLAKE2B 01cd9f386d3fd73f4eb43b14d7d479ebababb8640abbff170e697817b94b8a18edd801c6047ecf3c084a0a51764c5e4f3f4bd6b00e8ae000ef0b850e9506572a SHA512 19c0da9d67f2bd9fd79a2078f0f486ee7fad5646a09a609b7e30d9531851955ae8df0ec69f9ddc09e2fd6e74d529648335b0fda833839c88c54c84494ec1988e
+DIST rustc-1.82.0-src.tar.xz 219769328 BLAKE2B 611f33e134c2d459c9af1695c0a4d033df93afc986e91a17fceb0dd293fb4ffbd5f7475ef571d36cecf49da6c3fdb3801c98d7f72f9dd1c39e42502f649b192f SHA512 d158c7c71c1814bde2a3ec3cbeabe34949bd3201b730c0d7ec6baad4158bb28dd13696c430a6b99dc38b9d23ad7ddf8dde7d2487cbfbbbe9c3473016994210f0
+DIST rustc-1.82.0-src.tar.xz.asc 801 BLAKE2B 8138fb15b8d7ec15be45378fe663207a8e87e3c527348ab079995b1840a771ed6e9d5464eb8855ac9e006c0cfcf54b1a4fea489d31e6c9899cb03e6f4c737b67 SHA512 3cd6b27e72041baf9996efa10f25aca2e04f3e3727b60ecfd90c1bef9c52d216d2dc130802f935b110e35766645a27637a01661aa8d5acf02bf64b02a107c93c
diff --git a/dev-lang/rust/rust-1.82.0.ebuild b/dev-lang/rust/rust-1.82.0.ebuild
new file mode 100644
index 0000000..6f52248
--- /dev/null
+++ b/dev-lang/rust/rust-1.82.0.ebuild
@@ -0,0 +1,794 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing optfeature \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 19 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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 )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "vendor/${1:?}" > /dev/null || die
+ eapply "${2:?}"
+ popd > /dev/null || die
+ clear_vendor_checksums "${1}"
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ 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() {
+ eapply_crate openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ docompress /usr/lib/${PN}/${PV}/share/man/
+
+ # 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 rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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
+ 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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-10-18 15:17 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-10-18 15:17 UTC (permalink / raw
To: gentoo-commits
commit: 218dec4a6066d728c630ef496395405f6ef24380
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Oct 18 14:52:17 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Oct 18 14:52:17 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=218dec4a
dev-lang/rust: stabilize 1.81.0 for amd64, arm, arm64, x86
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.81.0.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.81.0.ebuild b/dev-lang/rust/rust-1.81.0.ebuild
index 828c4d3..268b1e8 100644
--- a/dev-lang/rust/rust-1.81.0.ebuild
+++ b/dev-lang/rust/rust-1.81.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-09-18 16:28 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-09-18 16:28 UTC (permalink / raw
To: gentoo-commits
commit: 35bb1de7420b54062e47691e1ff54563ad59a2f0
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Sep 18 14:48:52 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Sep 18 14:48:52 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=35bb1de7
dev-lang/rust: stabilize 1.80.1
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.80.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.80.1.ebuild b/dev-lang/rust/rust-1.80.1.ebuild
index 1c0817b..8c4b5b1 100644
--- a/dev-lang/rust/rust-1.80.1.ebuild
+++ b/dev-lang/rust/rust-1.80.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-09-18 16:28 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-09-18 16:28 UTC (permalink / raw
To: gentoo-commits
commit: 7e57b195d1e7a4e35a5154f1eb64340db0f2cb02
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Sep 18 16:22:23 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Sep 18 16:22:23 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=7e57b195
dev-lang/rust: add 1.81.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 30 ++
dev-lang/rust/rust-1.81.0.ebuild | 793 +++++++++++++++++++++++++++++++++++++++
2 files changed, 823 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 9feed34..0fa5d30 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -256,6 +256,34 @@ DIST rust-1.79.0-x86_64-unknown-linux-gnu.tar.xz 165014992 BLAKE2B abd9f73c8439f
DIST rust-1.79.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9cd1a51580d9f70f96c83b603716a5edbd8e1c4d4c2f53c07aa9d37c6c47f3bd252c0a1cf26b77bcd60842fb83ed74cd7b6e4ab3a039c3938423372485f8c1f4 SHA512 b65621f91085f4a5c6f84ed5e530fe56502ca12c5b18486afb1197156c5f6087110578647d428a58a1a6c04765569a28c38ae40a14c72fd41f39948349e8115d
DIST rust-1.79.0-x86_64-unknown-linux-musl.tar.xz 247326760 BLAKE2B 36bf6787c69971ba7c445d1895001c005af0aeb48aaa3309e971237125a2b6de3ef5f1534572f8a3f4c1bc024962a8fd030e91b63c02f03444b5aec1a3ed2e5a SHA512 02e5c2a67f5470f3320b04e7c4f0a6f5dbd361d5a97aee7e5860d04224683166b21375794c94ae040a2cc6fc119380be9d3465b8c5e1798abd4142d621cf9f99
DIST rust-1.79.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 6dde2d3096f7e47d31b1e13e7e5f41cf278e770dcb8a222d76ab5b93b2ca8a6d9e5b45515e097e5285bd2d76130546b3eb302a8391102460c4564e654c88f03c SHA512 4618852fdd81684ddf5bd8758d2551f1c800ef1614fed8ba91a9a1d29b3b51a0b9bf169c499dd8890347f999d002e5aba7b49a98eb819f20bdfe82fa375ed45a
+DIST rust-1.80.1-aarch64-unknown-linux-gnu.tar.xz 226220216 BLAKE2B 41c7a5ba5108da3ae79fc6d6fa229d2a91e6e217c92bbcbe37fe35d48418e0c787a29c43ffb406acabd410efcca0464da325120f925dfd6d1ee0822f0041f517 SHA512 4279028abc347ff1436d055f79523a24f98d94938dd7eb73516bcf39dbbfbd941418d4b1227576870c75a7c0b4c23c74b0528e1c5b8a39d54422af1ee2abb74f
+DIST rust-1.80.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 20c46e31535278145d143f619851edf151feb786b6d3112022b63e9dc882aad300665af16ba9dc600554f3d8f95d4ed7715bab5b57fab3e33a2c81fd7cd664a7 SHA512 dc104a9a30945d8f3d3a74cbc31b87ac4cffb81b4dd80a53b3e86432058830d4287542166db273895d9758bbfc36814c384c35a98b360ecf18938c6ebf6beb05
+DIST rust-1.80.1-aarch64-unknown-linux-musl.tar.xz 206752364 BLAKE2B 924f6c1f6b01c048ee9f1fc632e74abf1f5c11936effeb797d45fd500b1ce5a1638cc8061226018dd3e5a910e1d20a7645efbd25dbc5e3b2336cb3d20817fece SHA512 74a9846b328f2a79a75f7cb4c795a78c40ec1c30ac864e20046fa39324800e40ec13737bc580d5949dca92472c1512c747f67d8b67cd5e3e9048b22e2a8b7866
+DIST rust-1.80.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 49100a62a57a4147c13379bee868f5725b96f4dfa59c83c6d3a1a67eed86b0ed02bb0684b096dd557d07f54d0c3fb32bace38c81aed55cea7a0c001d53049897 SHA512 955d39f554413d51da50d2c66a8e9dd57aa28c850f12410b58a8ae1d8d768b7b5d2687bc6b88218f800f3e4242e282d6fc8d2e76616c30c926af1f9a461b2d9e
+DIST rust-1.80.1-arm-unknown-linux-gnueabi.tar.xz 190441552 BLAKE2B 2907546fe513550e8bb79eb60382503ae55dab8420be41be6d57ef04e9582362324de8639a43671181e439223cf2c677ee4f4819455a264c2eb34ce6e79bfef1 SHA512 1ec38d348e1c888cbbc7b391571e84a3026a5c59fe065d79e5769241c6af9f39c0f689c981695846a9109ab3c9baee9b225316868dd2fed18d15f4f1c81cb5f2
+DIST rust-1.80.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 106a856965e94aa260258aa8bb973a513cd13aef7b15f0c5794a699fbfa5445dbdd3628084d7a913849f0dd274075a28bad25a758e031ce851a6afe463dcc882 SHA512 ce34d38c05e8b4a7df9f0a79fe107b7d313bc467b1cf82cac43b8ab9b6ae3e4d3c1f4428f3a627110ce3b66f89086982cc95d0b2b2e85187095f66338aa92d0c
+DIST rust-1.80.1-arm-unknown-linux-gnueabihf.tar.xz 190747600 BLAKE2B 481473bfac35b8a45c4c3a5593b76abf88fe6eb50f0b2a424b1c5ed846e56234c2faa22910623514d0f6804d13f78d28cc3e4cff956ae558ac1dd655a0b62057 SHA512 540f74fe1f43ad8c407620ec47eae1ac4a3c4ddc8497cb79d0784393d17581c41576df7e114efbd6541a8626802c7961c998cd0895618b254814b66efc3bb01d
+DIST rust-1.80.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f1d4aa5cbe123f566d63c3f9165766622048f463c78c0d9635949ac46d6910c1b9c59b0d8c7fce034c1b070416e1ac3f998c4b0c91c796e18669f9294a75bc89 SHA512 f4a75d28a245eaea7deabbbe282cad493175c303f9f0744a248728a7753603ba7e4acf488b3e8e3478a8f7160ed92963d255f0216b1fb598b66a91eb51c30a6f
+DIST rust-1.80.1-armv7-unknown-linux-gnueabihf.tar.xz 195804620 BLAKE2B f279fd6944aaa76a7a35007e0521003140e4a3569cd36e57d7fa4ed7f72b37ffb7d03412588d1b0671677fd95bd6b6626eb9603d55b81971e148ad0137bbbc2d SHA512 487aa0be4230659db1c5cf2436c65062f1c3061fa085f38ec84dce029a6ef3614657ba407d1aa13c1e5ff2cf6e87f7ffc0c1a1947c3dc641a5b6843cdde85615
+DIST rust-1.80.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 15b450c4743e45c4c2eb9a1ec6afd448a30ad64e9a885bbedd7f8a7f59db45926e7ae4b1b0f350a783adafe93ccecec40f6436b62c8063eac5ad4e91c5418576 SHA512 b5ce5e78cacafd3f0ccfa2797aebecb360bbf56140cf1a1f3dc6c200e7a6ac7d3eceefc0f3cd3fd109ff1b8755b7828c2808ac9bf53f23a3e49c27d6c6050e8c
+DIST rust-1.80.1-i686-unknown-linux-gnu.tar.xz 221151480 BLAKE2B 01c4a29b5cdc47b0070b031984daa5d6f77844cb3ab9a82a40440b5c4a7a1f6bdccd4b8f46e3ab13bc194997c4a1341de484319ad3e8f642c67f7b8d8481c846 SHA512 2c0cc27407265f686d5b3a5e9f00f751924ae47f3d6a5cc044c56278843ee76ba3cedd63575447feb5cda0a2b1d2a26d7a78e0c558e2f47b7cb09f40aa6b8425
+DIST rust-1.80.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 549b27298fbed09727ae6c6086127aab9c0ebf9a6fce70c2e102fd29e983e31b1907f3a2e7c18800ff7b2efcd6f49c36aa11a5021fb9f57e6148e62628cc56a2 SHA512 c20ea2b577aa263e70211198a9fe896b9d560b737d74d640ee107a89dd9d5b31bc843e2fdda75bf21318fd3aaaea58c4ee918d003f7bf7636aa5636fb657133a
+DIST rust-1.80.1-loongarch64-unknown-linux-gnu.tar.xz 172528232 BLAKE2B d308b0aab1ef8dc338025d9a106920f507035efdc04390e9618b6a936ec117b70c791d14d5a73aeb0533f1e8d1952ae36bc3d4e624239d5a64ecfaefa70aa5ab SHA512 1c6d689e43cad549f2f8aa96fd5bf52080276c1de386b771206c7533feb11a47bf515ea72dc7f406852ca7dc5632f1436dde69014d8bf35bd0f25bcc85c3cfa0
+DIST rust-1.80.1-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 92b347907616b18ae06d85a1380d01bd078c3ea4a03fdf808b79794ffeb1d6661057688050130aec61d29062f07a030ebcf15fe3d866cb411325c44a2c393a33 SHA512 7245d91fc398d787e8bfa2e0bbceda9aa30665699f01bc5490f29f690fc1f8fd5d5ee8d4a941d38f0dc5c4cb7c275bf4b6d4bd3727b1bad65326594101f90cf4
+DIST rust-1.80.1-powerpc-unknown-linux-gnu.tar.xz 185400364 BLAKE2B 2b37d052d0fc4f612c298e87be9a0afcac3ef8548f3914530737d0435cbdf270e0c3b8422c08f84f96192f89805a9bff9d3fe570eb056afc1fd902202a806025 SHA512 1350aa8c105555778231b4ef7ce1c4c8850cc112ccc2f72621bbb3c011a0733da91df7521bbab0aa3269b4ad61231a631660593d7608d017083cd7af375fde30
+DIST rust-1.80.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B da5dfb8d287b7a30a32443b0edb80a3994c68f732ce02a6f6d735d589db2c273962e02925fa88311698672eca10441850066c2f1ab2e48ded8ca33109e298509 SHA512 f0d381594d6b164e068cb80e39a508774633db64abd4a9ba68eba48fd627fbda6c0cdf849137f61e196ab44e0f93eba5d08f3dd60fe5820259b8d9fafdd51407
+DIST rust-1.80.1-powerpc64-unknown-linux-gnu.tar.xz 183179096 BLAKE2B 0b7b7af392b8aa1a1df14ea4f53fd231c5c475eddbadd2105a5222393162b187109201f96dbb30c9877ff1c684af48b9868d17dbf26113193cab572d8ea40852 SHA512 67ce98a6f89997c13f576493644634f8ee5055952500e4f6d6ae096fee9570d6e5938c483892e76325905fec35184ff7f7edc21e4ec30199e821017890825289
+DIST rust-1.80.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b5b296291d031d254a4be6f000abade2b5d67cea8cecb332505469af3ec3ed1e21454ba41f96ed4e77dc2324c339f136ad04f034191a639394e6d9390065ac19 SHA512 9ddacb0ccd9da29fb93c66a2d701a03af6a4a2e9911c06a09d9fd5bde2647931e6c61e623d418200038e232227010206561e431331ef866324e9020dfba4597b
+DIST rust-1.80.1-powerpc64le-unknown-linux-gnu.tar.xz 194097292 BLAKE2B 1134beec940443b111594c86f912b2bf26bf3ace83cab3f0176175a6e891d047701e08e8ebc62094fdb4bd7b4d2de115ba0125ecd5ff6b3a20906db30c86c480 SHA512 4275343153b6acec8ba3a25dd4e85abc3ea7872a9cca4cea6f394fc24db6461db7fe7c047d158b61bb0635983a6a033f25da39f5fa1d6d9ee6d3eb956799dafa
+DIST rust-1.80.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 280558f7b575a5b79c7367715e74f333b7e9bb0d4f6ffd9939ed9daf33899dfc19cf59eca2cfafdd2ad1d6d71ea58486d04931fc3d089c9c491c8374985a1960 SHA512 6c784aa10878531b44e5927b2cab5a81efd4767a5e723747e4a9c506b4c48141b44c98ce364459db47ad8f03f4f066fe96d070806695d76a6abc9e0c7a53a09c
+DIST rust-1.80.1-riscv64gc-unknown-linux-gnu.tar.xz 194141700 BLAKE2B e174c185d35d3974c923233807ff1a27f6736af2a8b97f92153c0518aad4f46653d5e5bab219b51ee1b58cac7216a29e5ad6499a982de8f52f6871903a307b71 SHA512 4d69bfd0fdd2de634a3ab873e8e2929c53baec12e4edcb220b8054c672324dba7a94d06a9c35474b8ba74b2e408d7b42a857ad11a4b7a346509b5fde23e8c779
+DIST rust-1.80.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 274048978581a816fd8a9c396e7adffa509004121d5e9dc8df53a9f4a850dc7a0bca8652760c1f27c1c0dd57be5a91ff60e2d39ad7681b17efdea91312d0fc40 SHA512 5c34ff90acd4307a57733f8371abf4712c3ca06bf9db88f1d3e3ed9dda1c16a7775d713804ec4f1bc46089428b6b5472ab7e416f10e21d33f10b84b1a33d1957
+DIST rust-1.80.1-s390x-unknown-linux-gnu.tar.xz 209785288 BLAKE2B 01792daab79e7abed8bdeca53295928429b6814672aa4e0426316ec790d22b22abf25d3d5513582206d18f53147e60d252a0557ab9cca3b594c89ad603d94ea7 SHA512 66b20f5d001e978e2db5277da5f01271f0500a59877a849ccadebd5823eaeee35066abdd5d449e024cd5ae8ee41dd60fad77a00648cac1db62137d6722729fd6
+DIST rust-1.80.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c0a1a6036d3c3e9af835c281fd347a842cea15bea5f3d5f109f4080a2f93020d5e1c1a7de1894c03e8a2c87c6560f792a0c8024e68eb55d10e50da098f1e621 SHA512 7bbc3e8d3b039b522e62101714f5edb85046cfc06375df4b49c9ece891f8fc57e86027e1fd12a5837be7623c9137840551389e7dec4b2700e1dac0ae69121729
+DIST rust-1.80.1-x86_64-unknown-linux-gnu.tar.xz 167553060 BLAKE2B abc6430cfbbea5dd0ea42a6a3e2796b6f499d5a8343616d310ed22b541bdb15803d882dca9be743a81768bdf55f78c7a803bb594844d7dc3d2bdf09bd3f3d312 SHA512 73e6000af98efe5d90ab484ad88f455f07ccdabe49400d25ac16eeaa51327a5d17eaaae5ef3eb0b04b9aba2015c379eeb2a00076d82ba959e53e3dba470a228b
+DIST rust-1.80.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bb52100a14bfa2775ca7cab5cd0f9dbc489ec3b26a8687876c97b666435c44ce58d86fd9f11d4f4832e79c05fa3ddefd7157edc91a3da25ffeba07da61fbddf9 SHA512 08aad912e47341bff29ee1d1b52cd02df8e609747f7061e61ed6a401d798140a8587378aa992b0d52af955a44d2284eefa00f27a6e94b4ed561c06eed60ad6fe
+DIST rust-1.80.1-x86_64-unknown-linux-musl.tar.xz 248220632 BLAKE2B 7f0954379658df0a5cb0bb4bd49fdd1d216bfa5a200789124667d13ad97f0a5278f57e5b6278a969558c834de43a5d7e3f5ad3e331cc5a4c428dc097453a9394 SHA512 079cd3384c0b7f85d5fb2f02f27febe423ff533d71463097fbaa90449a955699fc25d8e4ae16489f7d7920c34c318c0f2e8185eeb9c6fd64c0851e4366c5eca2
+DIST rust-1.80.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B bad9fdebe33c251b8802ecb0150a074e86becac00874137f793b1805bf36373903fbcfd4744b1086851fd1357c6c81262a7eb321685640d856dc2ee3a37917a7 SHA512 405de0a8676755a63a4fc1e61dd358960efc90e4fd2417cfb4311bfaab5a744397e1f751afbe6a9515c1d92626a79fc782272261eed2f72b37b88fd77a84d7c0
DIST rustc-1.71.0-src.tar.xz 151962928 BLAKE2B da8d83cd6621947816630ae487efe7d087266c1352949cedbbd441ba7c7f7c7beb13b9470e66e2f3359c37a050d0e44d22481c418532d3ebb339a456ab092648 SHA512 2c93bafdd248563765a285add48ca77c1e4bad4d5431675ae6a5cdee4cfe7a41e6bcc880a489ca1069a307fd9a005f2d5f8e230dfc95b4a69152b4f9ca49ac44
DIST rustc-1.71.0-src.tar.xz.asc 801 BLAKE2B e5ddc4b18a6caeeb63c5aed5b5d15989d086f408787d2e603e50e7b8548dc078683062627280fd2a0393bec01c314eb1cc59f9b0e3146abf07b8365a0b44c640 SHA512 cb1b208c8b2bfccf02c73c4246fb238edb0dd10e292c1ef781920964e54e40add3089d988769982c0ce06b719014685b1c37daa2d08b513d86ad73808f4ce3ac
DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
@@ -276,3 +304,5 @@ DIST rustc-1.79.0-src.tar.xz 162359512 BLAKE2B 753c0e9c537644d1a12b4d38024c22952
DIST rustc-1.79.0-src.tar.xz.asc 801 BLAKE2B 860283021f513f5d4c81ea1f8d9567f0a052cc53a1d51d7fd9a804a39b855e24e06ea4c73db53176c1cf846910147de6bbc26da35755f3d0d4b296503e691e64 SHA512 51eec85d71817fe21073502c1d18e44ce694dc11b1c181e82462b529a24a610c8e215e6f2640e8b6d80f028207a360e43354cafa863f49a12c547b4c5f52d7e7
DIST rustc-1.80.1-src.tar.xz 199234944 BLAKE2B 39891362f2a4bc249f5d943e3ded48d2add9cd9c0ee3c085d7fbefbfbc784f1e029308d9486cd35a6c03b77243077dc1196c75980faeea0d4319cee057509b6a SHA512 3c746108a86eeb734c1a8c8f63ba1a45e2cb03a8cb553395a167d07dc3ce5d8d9ea365ddd95533b6952d915069b86cad7ad218d27861e0889f8e878136bd32ab
DIST rustc-1.80.1-src.tar.xz.asc 801 BLAKE2B 0fb361678e4b580c89ccc35fd1b29d24ab41af854e5a34d24192671c93140b7d2c91e740a51f1eaa6854d5970bb91a0510aac9cb6cbf2883e77a2b941d65b010 SHA512 9d5731db73b8a982b956cb2c4736c0fc7dedab785d9855508e6a1fc2d2163d561fdcd5b254ea5f7b1f27b3903d10d9d2403366e63f9c690ab722c401109a7c1d
+DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad0670be6872f691b4c9f36faf06803f072720ebd04f06745c355d807991b38312cc830b12d6d3f50b0574bb7325340b7 SHA512 b8a837ced521d2ca2c7f228a0640da591384519e4dbc1ae768524d50616da6abbd2f7bdae3777caebc0447dac91bf76481282ce5a2264d7f30e173caa6321a51
+DIST rustc-1.81.0-src.tar.xz.asc 801 BLAKE2B 01cd9f386d3fd73f4eb43b14d7d479ebababb8640abbff170e697817b94b8a18edd801c6047ecf3c084a0a51764c5e4f3f4bd6b00e8ae000ef0b850e9506572a SHA512 19c0da9d67f2bd9fd79a2078f0f486ee7fad5646a09a609b7e30d9531851955ae8df0ec69f9ddc09e2fd6e74d529648335b0fda833839c88c54c84494ec1988e
diff --git a/dev-lang/rust/rust-1.81.0.ebuild b/dev-lang/rust/rust-1.81.0.ebuild
new file mode 100644
index 0000000..aec14cf
--- /dev/null
+++ b/dev-lang/rust/rust-1.81.0.ebuild
@@ -0,0 +1,793 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing optfeature \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
+
+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}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 18 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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 )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "${1:?}" > /dev/null || die
+ local patch="${2:?}"
+ eapply "${patch}"
+ "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
+ popd > /dev/null || die
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ 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() {
+ eapply_crate vendor/openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate vendor/openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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
+ 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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-08-27 19:35 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-08-27 19:35 UTC (permalink / raw
To: gentoo-commits
commit: 892aa48dc09ffa5cd704dc3055bd83a83afe8be2
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Aug 27 19:29:41 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Aug 27 19:33:41 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=892aa48d
dev-lang/rust: unkeyword for ~mips
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.73.0.ebuild | 2 +-
dev-lang/rust/rust-1.74.1.ebuild | 2 +-
dev-lang/rust/rust-1.75.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.76.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.77.1.ebuild | 2 +-
dev-lang/rust/rust-1.78.0.ebuild | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
index 6bf90ad..09877e3 100644
--- a/dev-lang/rust/rust-1.73.0.ebuild
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index 5fec8f3..1c371e2 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
diff --git a/dev-lang/rust/rust-1.75.0-r1.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
index d874d98..3a04abd 100644
--- a/dev-lang/rust/rust-1.75.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.75.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 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
diff --git a/dev-lang/rust/rust-1.76.0-r1.ebuild b/dev-lang/rust/rust-1.76.0-r1.ebuild
index 0f297fa..c21350f 100644
--- a/dev-lang/rust/rust-1.76.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.76.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 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
diff --git a/dev-lang/rust/rust-1.77.1.ebuild b/dev-lang/rust/rust-1.77.1.ebuild
index 77f9195..344df7c 100644
--- a/dev-lang/rust/rust-1.77.1.ebuild
+++ b/dev-lang/rust/rust-1.77.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
+ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
diff --git a/dev-lang/rust/rust-1.78.0.ebuild b/dev-lang/rust/rust-1.78.0.ebuild
index eb2c9c6..5c80f7d 100644
--- a/dev-lang/rust/rust-1.78.0.ebuild
+++ b/dev-lang/rust/rust-1.78.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-08-14 15:40 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-08-14 15:40 UTC (permalink / raw
To: gentoo-commits
commit: 423aacdbf401fc691553d8113c04e772dada9e11
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Aug 14 15:39:38 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Aug 14 15:39:38 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=423aacdb
dev-lang/rust: add 1.80.1
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 30 ++
dev-lang/rust/rust-1.80.1.ebuild | 798 +++++++++++++++++++++++++++++++++++++++
2 files changed, 828 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 9a6d48b..9feed34 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -228,6 +228,34 @@ DIST rust-1.78.0-x86_64-unknown-linux-gnu.tar.xz 163959816 BLAKE2B 1987a6a0ea169
DIST rust-1.78.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1b6b8e54c0eebbde2a803d14db3d75363c306c621845cad89c927a51a5df0ccb5d1406c8806a82d5d611d0a12c6d6c5ed0f113fe802e4b6a8e504e64562e168c SHA512 10072d0684b40a71176f36ad85b7161e1392b3f52c035bfd0c6bbf5889599234a7201d85a13f04de0269ef9d8e0c51d15a4e9a9151b3fa27cf9a6e8663203786
DIST rust-1.78.0-x86_64-unknown-linux-musl.tar.xz 245914600 BLAKE2B 66cc40b70ca70eebee5c173eefb07758a8a7421cbf421329b3b405bdab1651334a5ff1202b450139c89039a4c3fd6ecf8b78ed218c62e81c983e6bb7353a335c SHA512 21190a0034aab2757cdcbc2e456fdacc972634f25f5c75daa089030a82b407037d3c7d3528c8d126d48d2a6840edf97526007bef41689a86ef1eec8f8c569f08
DIST rust-1.78.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2ebc83f961f3bb1681bfd2e3f08b2c394bd8701c68b873eb524a9f9a79f3d3858ae75f76c0e0bc452cbdde9466b1d1b2723d04a8d41f68902355150c86d41042 SHA512 a32e7706ab9483a464e3001aebda8975ced4ef66a64f534d67c0a0e2b508f8db0523cfef4a66bb2b264bad486566c7f684d01ba96055133eccf0e9da4abfa46e
+DIST rust-1.79.0-aarch64-unknown-linux-gnu.tar.xz 224366944 BLAKE2B bd890cfad2348f7bf1d97adde1a5ab244665474ea4d77dfc2cec60679829f84c30378f2a979acc3dddc51ce563b03ff86d04903602a079a85684d98a86ffa4ce SHA512 0cf80ea35cb501f406323a438ecca348fb957cd4a57a4c7ff42bbaa0c736d16a99187b821e29d2e51519e1cb76e533af7c5893c6204fc0736f8e2186235742e3
+DIST rust-1.79.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c249d0badfd29130477841602b385e1d152488d43799e9e3b77cf92234b197501182edf59536f77b02b49f806a7dcd748f352458f97f15af6c8f0580659d3eb4 SHA512 2cd2fdde6ad1acd769af2a3ca97bff3e4cf3b57a3a7d1890ab592d2abb85be17f7c3f27cc1b994e70f9f6cd52e8e44314d1d182aafbf68fea4d52df1c9482afd
+DIST rust-1.79.0-aarch64-unknown-linux-musl.tar.xz 205404384 BLAKE2B 21dd98d62bc965e24b3a60c0e48fdc907e2bd6919a90923f26cb833218d6e1f23d3385c7e67d96d7651d65ef963f668abd9f1c9e4d3e80aeb726b50d09a2ca80 SHA512 358e8b8a76e1a48d6829735f04b2d3cd3ddae86684ba10c778a9f96ce4bb0f080c0d706bcf5c6d141d1d52685a8e92a48d8020008320ec8aa158fa911745678a
+DIST rust-1.79.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 99fcb4bb3818cf56ab9686aaede04dc104d156cb8c7989c3355974901cf7b84d9182239b526bc0208d7f4bbd80f959f896934796d1d431336820e10477c271c6 SHA512 9ce170419411e08bdb80aaad72c559fd0d81d7e5c2f088359ba2994dbc9a1f25bd6a35b2e3a02ac2ead12be6dac3d8cdb48764e85f8aea3babc031e242d66a5d
+DIST rust-1.79.0-arm-unknown-linux-gnueabi.tar.xz 189377704 BLAKE2B 6d2e12a9fd86d41dce2946404130fc314ce291e1610f1bdbe13214e04ccf91ef36b373d49bb06d4f871da1bf99568d194d27aaecde841634fab1fd222e44563f SHA512 630973e33a82d4dc27ef6ec07084bbb0c6555add6fe1324b0a743c39902ce02ad1b3142b3e56b6b37678b523ff37fdaf0f60518a83500ceb4db9544e7f60ac7d
+DIST rust-1.79.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 26045e38094ef9e424bd7050819c43998f9ddcd54f52c08b2f9d538e2729b1af1015847b55501a55d43db073f63324aaa594ba3ac27989665cb0855f58275b22 SHA512 73a365ab6ba6938f21e2f29d2ee8992e32998d159572a137621d451837dfb05b6f0bea8985165c6c22f16ce66d6f732393c8dc7680f2ac31df006b0cc2d26533
+DIST rust-1.79.0-arm-unknown-linux-gnueabihf.tar.xz 189222624 BLAKE2B c9ce961bd7f7bd8fdb05781096162f89bb2aa374963dad03f764a69570efb634a5c0fb3f776755869649a69ac1a95830a78e638f6e06d4840f1b2c2dadcac2fc SHA512 787e02c3b6415ed337964ff4db0d0e8cf5642f65ff733c6d70119c3ef328e9507ff66c5b2e4191bc0bcd1dd6755b656efd3d46b7629f3d20079f06d8fadcc10d
+DIST rust-1.79.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B c5729c56ee5a3efed7f8f5af46e459a844f67a87c71c9e280efc07771964fd06838263f254a19801bd6d072d98f3d326691add5495c62a8d06f74a39375557eb SHA512 0b1d5c144d8a9bc8d370052ddafe7d6a5b8fdc00038bcb2581c5e4787a1c8419c628bdd12398cdac94178cd6c876f10e23b5660755274e0f1648b86e54d78477
+DIST rust-1.79.0-armv7-unknown-linux-gnueabihf.tar.xz 194892388 BLAKE2B 82113120753281bab2e52dde18b399e878bc1c055e2a1123c7bf5e0432c39ce04cb24886ebfde6094683046af94a8e80d456647980632df8da65268c4461e857 SHA512 d923042c4c9db09ff62444e6222bb4c404f322b2c43722514bc4c126fe1f9988cc8c38191bd66f8f24c535509c683e9fa30b3091d40a118b3366062135aef7e3
+DIST rust-1.79.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 2cc6281091bd0dd012fe0d229aa0691fc3698ebac5bd77d8c2d811907d1a6d8fe73f19d4b456bc9619f6e7cc403e8d55c46fd02140103a72f5b82c2c2c3986a0 SHA512 4aa5854d7430b07550d72f3aa3d8b5f27d8d11542c9bc22c8088624fa1dcb2a6d194cf058e741b1a0eebbf04874aa844ee89511ca14ddf73568eccbc404d6a43
+DIST rust-1.79.0-i686-unknown-linux-gnu.tar.xz 220956232 BLAKE2B ab8bfc213938a0c512177765f4d5bb2333f5533506fb28ecc70744c545595a7e534d7e5dad5afdd6b7d6570bc0602ed7ed68de7df4d7a210c606e23cde5fb6e2 SHA512 7238d0102625d82f7595bf4346dc49cb83daa0ea0ab456b6526f4995d20e5ce7f10517bbc3de09937eb10a4c537edeb2636127f9f8aa7d45c7577a665d70820f
+DIST rust-1.79.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 838bd51b74f1f6c77a5ad10cf992f3e398f2f68510685d1146ea3b15bdb2ab7a994aec3e96b5b3a1a14a82c082a87c8cbfc77f01609bde2e096f1934a1fa61eb SHA512 f8a2aa8271348761c5c8c93406c65fdc05502c8d21d67fff82f1a706770891a820bd05acf8d3e8401a44a66c35a11f40e3594d5b42b6554060b3bb58a0dc6afd
+DIST rust-1.79.0-loongarch64-unknown-linux-gnu.tar.xz 171612592 BLAKE2B d06003c1817a191d8aea38068ad03449090538962aa9ae74423343032b2e1aae4784daa702fdee4f4b089341fcbac1d03048783b7cf082eee46df1a2b6323b31 SHA512 86c39ca2b43fd58893e490008c99ce7f8e8c8e087701b90838de8f589a3e5b5b0d3b20c86ea9803da2ed72301d44b68866fe219b65a5af9f0e7e3120b3d9b994
+DIST rust-1.79.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6f826cc05d126b8c6422674c9dfb496a61424144d7a76bf4e5225d7bc782c0d63dd55ea03c534494b633601bd027a922458d9f06dec5f5cf701c8907fe53cbf6 SHA512 c443a8a08ae2e65e3ff46e4b5f910ac24b8dda0ba62b67dd41888cf1504a78e9a6ff9415480b8c684a7f9390bf7b279e3fb7a7a22bc4139d6a91457753df4131
+DIST rust-1.79.0-powerpc-unknown-linux-gnu.tar.xz 184251688 BLAKE2B 372338527063379f922bb3ea83c98f21b2201cf0e75f61cb0a42c1c1c6b651eeab1532d972af72a2afdc7afb5e7a96c40b0482c248350b7886a1274c869d2a08 SHA512 e1a26ddaf53b070edaa630bfcf6ba94659f841804e2feb90fab05e8856cc616d413f5af45b67cab57fea2483221c8caa52e373e7e7d29039541ab2142c4187a3
+DIST rust-1.79.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 22c2867d40f0fe13888112294ea2571718064a30983903f7ce8b13a4a13684c34ac224990ebb0254e262686c097bed6e46d9a70e86bb282c447c9e690ef551d8 SHA512 68ea8142bb72430fadf274549d1830a8348ba74a02a52bdab1cf1b811e70592896f8cf9d34687bacc34aaa06603f89e5794211227c573a4f29ed34744b0f5a2d
+DIST rust-1.79.0-powerpc64-unknown-linux-gnu.tar.xz 182063040 BLAKE2B 0bf5d662cf69bff1a345dc54525319dfec98b2743744eb03712e9a2cce8cd45d968b9cc67ffa33a5b5a5a47f3a0a5568103d4e3de3efc7c2d837453dcdc077c7 SHA512 f65745bdb3c98f20c37c7bbe737ebd3b1107868fd56f1a9c42a4adfc14592e853cdd19217354070e5d18d31145be18c3b10681768d9f025b5846488937bd8a78
+DIST rust-1.79.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 80be893561f5021b4e57843a5a6c9db7f97d9e31a0748c2ef1768fe0074f29401a39de781d1eadadfe760e8d7f9a286045c6bec2bee1b2a889ccfb9625ae8477 SHA512 843e1cdda3dbceb93cd0b345ef0f551946cc37dc5085f52cfcc3c9f6e31f8d4d6b176afdf1c255f5bd7283473b717963aa0e6bd905c2eb89f3543cf5e88dfff0
+DIST rust-1.79.0-powerpc64le-unknown-linux-gnu.tar.xz 192753084 BLAKE2B ba53cdb229484dca210de50bc7cd493fae04b4c664551fb5b7f7bd6bc7dc3bbb59b79d183f20a9dada393d586eb49956fda1a358bb5b5761fe8d65f7ab58b3a1 SHA512 d8db247ecfb154247d7243e8caaab0680bb81e11aa0ed3e627b6a0d96a21a0a2099a7bdcdacb57a8b84910d6716754843d80a9149a8ee02fdbb6bc411a352112
+DIST rust-1.79.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3e5ce77c7a2afdf0ddc4d8d53bf7ccaf8506986c1cf196837a3a6d82d648b4515b4c8cbeedb2998df233a1c5428ccfd82865482c0d0493248fb0631e100d4986 SHA512 5e63caeb8b20c7dde37099cdc0c246694b67dc2380104c83d3cbff7810cac521104d4d6cf6763559e13cc9e4bb5387bad761e79fc7bacf48536db1918b59246d
+DIST rust-1.79.0-riscv64gc-unknown-linux-gnu.tar.xz 195616336 BLAKE2B a17b0f9022681233e23ae3c3eaaf93da6d730ba604a9d327cd4a2553cd8c7321929e294de27866e995a591554db4f31f2b9f371747e4b45e473ac2c2a466ba63 SHA512 8a8c6be44ecf5d4cf35bdb32c2a56136fb007e9502f7f42980b5cec135bc481252b890be74d6ba638c2d885d1fb9bea58349e6ba67dbbb8efccdfe7bd6c7009d
+DIST rust-1.79.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a20afcbcc4814988594537e0ef1ded539c29987941044d2174c5f16b84286d3d8b29321bcd205f5081dcc8ed487d21f88396a0420a7fc3626748b8ad1e0ca2be SHA512 cee5e0ebd5e7fd00ddda6549f749603376284071db7f806175b1913b39a94a5540cf535f30d45afd06ae95ea42b0fc6b71517bede7f09dc0221d5516abf32450
+DIST rust-1.79.0-s390x-unknown-linux-gnu.tar.xz 208109368 BLAKE2B 8c110bff01f7a7456a6044a782198c74a793af0fe4acf6881fb9af4c8193cb6c513cbcc8113320fee027a6eb046a0ca4319d014379c6f670f915314448fb927a SHA512 07de1f7da8d8d23c63ed081cd56c96a9becbd4b7149f87636918bce8155a25ea95579ef8694adf6e455ba6cdc19776677f430713a6ef6c607a7efd26db4658a8
+DIST rust-1.79.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 28a2586c96e2ee2263cae8c2dcd21a0017d09969114cc905a37408717c412a162fed12023df801497906a6aa77b294121699a56d05e270b28e2831796a15f4e8 SHA512 64c85ecf772b73e2e6f2002053a8bf659d518e7be2a9d0056fe38e991e47304471372206a8e45250d6a143086b3b1f4fc68f4e19388c040735e8475c981fd8a0
+DIST rust-1.79.0-x86_64-unknown-linux-gnu.tar.xz 165014992 BLAKE2B abd9f73c8439f6f4f9ea1b586cb0b2d3ddf3351e42dd49e01e2267d1bc2f9dc27dbbe9b866d5a571a983e3c537f003ea9a6570258af64edc26cb86fdd8e64d86 SHA512 c027a015cc6544d288b51bad6ebf8a9afd40932a06972cf61bf64bfe4997dda7ecaa2d53c4f4fb2200bcf1a7df16c3a44ade1b8366a32ce9a4c85357cc76dd0c
+DIST rust-1.79.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9cd1a51580d9f70f96c83b603716a5edbd8e1c4d4c2f53c07aa9d37c6c47f3bd252c0a1cf26b77bcd60842fb83ed74cd7b6e4ab3a039c3938423372485f8c1f4 SHA512 b65621f91085f4a5c6f84ed5e530fe56502ca12c5b18486afb1197156c5f6087110578647d428a58a1a6c04765569a28c38ae40a14c72fd41f39948349e8115d
+DIST rust-1.79.0-x86_64-unknown-linux-musl.tar.xz 247326760 BLAKE2B 36bf6787c69971ba7c445d1895001c005af0aeb48aaa3309e971237125a2b6de3ef5f1534572f8a3f4c1bc024962a8fd030e91b63c02f03444b5aec1a3ed2e5a SHA512 02e5c2a67f5470f3320b04e7c4f0a6f5dbd361d5a97aee7e5860d04224683166b21375794c94ae040a2cc6fc119380be9d3465b8c5e1798abd4142d621cf9f99
+DIST rust-1.79.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 6dde2d3096f7e47d31b1e13e7e5f41cf278e770dcb8a222d76ab5b93b2ca8a6d9e5b45515e097e5285bd2d76130546b3eb302a8391102460c4564e654c88f03c SHA512 4618852fdd81684ddf5bd8758d2551f1c800ef1614fed8ba91a9a1d29b3b51a0b9bf169c499dd8890347f999d002e5aba7b49a98eb819f20bdfe82fa375ed45a
DIST rustc-1.71.0-src.tar.xz 151962928 BLAKE2B da8d83cd6621947816630ae487efe7d087266c1352949cedbbd441ba7c7f7c7beb13b9470e66e2f3359c37a050d0e44d22481c418532d3ebb339a456ab092648 SHA512 2c93bafdd248563765a285add48ca77c1e4bad4d5431675ae6a5cdee4cfe7a41e6bcc880a489ca1069a307fd9a005f2d5f8e230dfc95b4a69152b4f9ca49ac44
DIST rustc-1.71.0-src.tar.xz.asc 801 BLAKE2B e5ddc4b18a6caeeb63c5aed5b5d15989d086f408787d2e603e50e7b8548dc078683062627280fd2a0393bec01c314eb1cc59f9b0e3146abf07b8365a0b44c640 SHA512 cb1b208c8b2bfccf02c73c4246fb238edb0dd10e292c1ef781920964e54e40add3089d988769982c0ce06b719014685b1c37daa2d08b513d86ad73808f4ce3ac
DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
@@ -246,3 +274,5 @@ DIST rustc-1.78.0-src.tar.xz 159181212 BLAKE2B dedae58e413689de258f852c988a9a91d
DIST rustc-1.78.0-src.tar.xz.asc 801 BLAKE2B a40b0eab4e9263694e79f21d92652402579f4a0587fa48b4043211bc645d4303f9af7629e9c8361938748163e99fa7cd04108156780f23f9c8600361785e834b SHA512 ef16c9eed79f36576517e9dd77b56aa767ae9dc745f5df1839e24b76084ac791b27926f3d608b41695ae6022aa10cbdd3650cad163f35037c60d3bd0427b3cbd
DIST rustc-1.79.0-src.tar.xz 162359512 BLAKE2B 753c0e9c537644d1a12b4d38024c22952a19513791c3da6f955690c544e58964bacbdb579f94cd05910697fc31f77ed6553e5ad3b111bbdfebeea8d2a4fa19f5 SHA512 99d7f276292e5c270648473ff73e9888413a3325ef3a4d7a45f8ce77a42ac87996905f1d875888ce084b621f642017bc9e31a00da1439108dbe19b85d0eab085
DIST rustc-1.79.0-src.tar.xz.asc 801 BLAKE2B 860283021f513f5d4c81ea1f8d9567f0a052cc53a1d51d7fd9a804a39b855e24e06ea4c73db53176c1cf846910147de6bbc26da35755f3d0d4b296503e691e64 SHA512 51eec85d71817fe21073502c1d18e44ce694dc11b1c181e82462b529a24a610c8e215e6f2640e8b6d80f028207a360e43354cafa863f49a12c547b4c5f52d7e7
+DIST rustc-1.80.1-src.tar.xz 199234944 BLAKE2B 39891362f2a4bc249f5d943e3ded48d2add9cd9c0ee3c085d7fbefbfbc784f1e029308d9486cd35a6c03b77243077dc1196c75980faeea0d4319cee057509b6a SHA512 3c746108a86eeb734c1a8c8f63ba1a45e2cb03a8cb553395a167d07dc3ce5d8d9ea365ddd95533b6952d915069b86cad7ad218d27861e0889f8e878136bd32ab
+DIST rustc-1.80.1-src.tar.xz.asc 801 BLAKE2B 0fb361678e4b580c89ccc35fd1b29d24ab41af854e5a34d24192671c93140b7d2c91e740a51f1eaa6854d5970bb91a0510aac9cb6cbf2883e77a2b941d65b010 SHA512 9d5731db73b8a982b956cb2c4736c0fc7dedab785d9855508e6a1fc2d2163d561fdcd5b254ea5f7b1f27b3903d10d9d2403366e63f9c690ab722c401109a7c1d
diff --git a/dev-lang/rust/rust-1.80.1.ebuild b/dev-lang/rust/rust-1.80.1.ebuild
new file mode 100644
index 0000000..1c0817b
--- /dev/null
+++ b/dev-lang/rust/rust-1.80.1.ebuild
@@ -0,0 +1,798 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 18 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/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 )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.79.0-revert-8c40426.patch
+)
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+eapply_crate() {
+ pushd "${1:?}" > /dev/null || die
+ local patch="${2:?}"
+ eapply "${patch}"
+ "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
+ popd > /dev/null || die
+}
+
+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 --root="${BROOT}" 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 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
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ 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() {
+ eapply_crate vendor/openssl-sys-0.9.92 "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+ eapply_crate vendor/openssl-sys-0.9.102 "${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
+
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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 "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ [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)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ 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
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ 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
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ musl-root = "$($(tc-getCC) -print-sysroot)/usr"
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ wasm_target="wasm32-unknown-unknown"
+ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-07-24 18:56 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-07-24 18:56 UTC (permalink / raw
To: gentoo-commits
commit: 4b002155ed554bb73ff222d2111aed04f1f1b214
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Jul 24 18:56:13 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Jul 24 18:56:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=4b002155
dev-lang/rust: stabilize 1.79.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.79.0.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.79.0.ebuild b/dev-lang/rust/rust-1.79.0.ebuild
index 0e26ed2..f02d1c5 100644
--- a/dev-lang/rust/rust-1.79.0.ebuild
+++ b/dev-lang/rust/rust-1.79.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-05-31 0:59 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-05-31 0:59 UTC (permalink / raw
To: gentoo-commits
commit: 35e477f923d1344a5cdc055355817aab2570bd90
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri May 24 13:31:08 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri May 24 13:31:08 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=35e477f9
dev-lang/rust: update maintainers
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/metadata.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 1cf83c8..85c7e7c 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -9,6 +9,10 @@
<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>
<name>Rust Project</name>
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-05-03 1:06 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-05-03 1:06 UTC (permalink / raw
To: gentoo-commits
commit: 68326e23e4206e31bafe7b29e9db66e57db937bc
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri May 3 01:03:08 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri May 3 01:03:08 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=68326e23
dev-lang/rust: stabilize 1.77.1
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.77.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.77.1.ebuild b/dev-lang/rust/rust-1.77.1.ebuild
index c441f51..77f9195 100644
--- a/dev-lang/rust/rust-1.77.1.ebuild
+++ b/dev-lang/rust/rust-1.77.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-04-22 23:44 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-04-22 23:44 UTC (permalink / raw
To: gentoo-commits
commit: 36a72511b6f14369ae20fdcb2677f5d4c5f0130a
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Apr 22 23:31:22 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Apr 22 23:31:22 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=36a72511
dev-lang/rust: stabilize 1.75.0-r1 for ppc, sparc
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.75.0-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.75.0-r1.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
index a190e48..d874d98 100644
--- a/dev-lang/rust/rust-1.75.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.75.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 ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-04-05 17:24 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-04-05 17:24 UTC (permalink / raw
To: gentoo-commits
commit: ad7ce4275501d267dec5d93a66e163a38389afb2
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Apr 5 16:51:23 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Apr 5 16:51:23 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ad7ce427
dev-lang/rust: stabilize 1.75.0-r1 for arm, x86
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.75.0-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.75.0-r1.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
index 24bbf25..a190e48 100644
--- a/dev-lang/rust/rust-1.75.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.75.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 ~loong ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-04-02 18:50 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-04-02 18:50 UTC (permalink / raw
To: gentoo-commits
commit: f41a0dbdfe46c64f4f0203b1b31a5eb2b735f37f
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Apr 2 16:28:13 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Apr 2 16:28:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=f41a0dbd
dev-lang/rust: update DESCRIPTION
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
dev-lang/rust/rust-1.73.0.ebuild | 2 +-
dev-lang/rust/rust-1.74.1.ebuild | 2 +-
dev-lang/rust/rust-1.75.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.76.0-r1.ebuild | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index 973b832..5eed9ea 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -24,7 +24,7 @@ fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-DESCRIPTION="Systems programming language from Mozilla"
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index a001486..36d61ae 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -24,7 +24,7 @@ fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-DESCRIPTION="Systems programming language from Mozilla"
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
index e1ffc54..6bf90ad 100644
--- a/dev-lang/rust/rust-1.73.0.ebuild
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -24,7 +24,7 @@ fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-DESCRIPTION="Systems programming language from Mozilla"
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index f070e1e..5fec8f3 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -24,7 +24,7 @@ fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-DESCRIPTION="Systems programming language from Mozilla"
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
diff --git a/dev-lang/rust/rust-1.75.0-r1.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
index a590879..24bbf25 100644
--- a/dev-lang/rust/rust-1.75.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r1.ebuild
@@ -24,7 +24,7 @@ fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-DESCRIPTION="Systems programming language from Mozilla"
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
diff --git a/dev-lang/rust/rust-1.76.0-r1.ebuild b/dev-lang/rust/rust-1.76.0-r1.ebuild
index 031dd3a..0f297fa 100644
--- a/dev-lang/rust/rust-1.76.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.76.0-r1.ebuild
@@ -24,7 +24,7 @@ fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-DESCRIPTION="Systems programming language from Mozilla"
+DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-03-24 15:22 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-03-24 15:22 UTC (permalink / raw
To: gentoo-commits
commit: 1790417538bd5f4f69d61a9412eecd1409701fbd
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Mar 24 14:09:11 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Mar 24 14:09:11 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=17904175
dev-lang/rust: stabilize 1.75.0-r1 for amd64, arm64, ppc64
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.75.0-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.75.0-r1.ebuild b/dev-lang/rust/rust-1.75.0-r1.ebuild
index fe636c4..a590879 100644
--- a/dev-lang/rust/rust-1.75.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.75.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 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-03-24 15:22 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-03-24 15:22 UTC (permalink / raw
To: gentoo-commits
commit: f328b7d3652c638e3fdbe96c2a645ce533968554
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Mar 24 14:12:48 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Mar 24 14:12:48 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=f328b7d3
dev-lang/rust: add 1.76.0-r1, drop 1.76.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/{rust-1.76.0.ebuild => rust-1.76.0-r1.ebuild} | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dev-lang/rust/rust-1.76.0.ebuild b/dev-lang/rust/rust-1.76.0-r1.ebuild
similarity index 99%
rename from dev-lang/rust/rust-1.76.0.ebuild
rename to dev-lang/rust/rust-1.76.0-r1.ebuild
index 0fc5c81..031dd3a 100644
--- a/dev-lang/rust/rust-1.76.0.ebuild
+++ b/dev-lang/rust/rust-1.76.0-r1.ebuild
@@ -42,7 +42,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
-IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
@@ -479,7 +479,8 @@ src_configure() {
deny-warnings = $(usex wasm $(usex doc false true) true)
backtrace-on-ice = true
jemalloc = false
- lto = "$(usex lto fat off)"
+ # See https://github.com/rust-lang/rust/issues/121124
+ lto = "$(usex lto thin off)"
[dist]
src-tarball = false
compression-formats = ["xz"]
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-03-11 14:57 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-03-11 14:57 UTC (permalink / raw
To: gentoo-commits
commit: 66a7126313570b5fbc7626721ef00ff39a1f2f77
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Mar 11 14:56:55 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Mar 11 14:56:55 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=66a71263
dev-lang/rust: commit the correct rust ebuild
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.76.0.ebuild | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dev-lang/rust/rust-1.76.0.ebuild b/dev-lang/rust/rust-1.76.0.ebuild
index 5c6cef7..0fc5c81 100644
--- a/dev-lang/rust/rust-1.76.0.ebuild
+++ b/dev-lang/rust/rust-1.76.0.ebuild
@@ -178,6 +178,14 @@ clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
}
+eapply_crate() {
+ pushd "${1:?}" > /dev/null || die
+ local patch="${2:?}"
+ eapply "${patch}"
+ "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
+ popd > /dev/null || die
+}
+
toml_usex() {
usex "${1}" true false
}
@@ -303,6 +311,8 @@ esetup_unwind_hack() {
}
src_prepare() {
+ eapply_crate vendor/openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+
# Clear vendor checksums for crates that we patched to bump libc.
# NOTE: refresh this on each bump.
#for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-03-10 8:30 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-03-10 8:30 UTC (permalink / raw
To: gentoo-commits
commit: 7df79838cd06ee0aac31fa3b5ebdcff76429b2cf
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Mar 10 07:42:11 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Mar 10 07:42:11 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=7df79838
dev-lang/rust: stabilize 1.74.1 for arm, x86
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.74.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index d6fd639..f070e1e 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-02-16 15:06 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-02-16 15:06 UTC (permalink / raw
To: gentoo-commits
commit: b39b8c394f93c87c743262e8e891c4609b01f84d
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Feb 16 15:05:00 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Feb 16 15:05:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=b39b8c39
dev-lang/rust: drop 1.72.0-r1
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 2 -
dev-lang/rust/rust-1.72.0-r1.ebuild | 770 ------------------------------------
2 files changed, 772 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index f6d351f..c0e77d3 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -120,8 +120,6 @@ DIST rustc-1.71.0-src.tar.xz 151962928 BLAKE2B da8d83cd6621947816630ae487efe7d08
DIST rustc-1.71.0-src.tar.xz.asc 801 BLAKE2B e5ddc4b18a6caeeb63c5aed5b5d15989d086f408787d2e603e50e7b8548dc078683062627280fd2a0393bec01c314eb1cc59f9b0e3146abf07b8365a0b44c640 SHA512 cb1b208c8b2bfccf02c73c4246fb238edb0dd10e292c1ef781920964e54e40add3089d988769982c0ce06b719014685b1c37daa2d08b513d86ad73808f4ce3ac
DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
DIST rustc-1.71.1-src.tar.xz.asc 801 BLAKE2B a88c073a70552d73e2d7695eceabdaa478f34501b7271fabf7f4a09f3efa545181f34353e45776b05918e6aeba88adb02f9731454f7085a7abf1602fc6589983 SHA512 9dd0406cf22f1daa7fcfd015fc1c6f8d36586aa99bf14c1491ee464c1f892ab759feb83e8b55b64713170fb777fdbe038fb5fd01a59c911b6599223baaba0677
-DIST rustc-1.72.0-src.tar.xz 151630408 BLAKE2B 7b26e5a9335f9262567b2a6aaf3b8ad6dc813688f532c54502c12c7b59d02082a082fe49ae370b0748fb13f8245dad13a58927d8563ba96fdf3639d4a128f236 SHA512 aed27c1babfec7f9b0815bc395302cff4f8e8ed83d8d3bde202f6c86fba4aec14ad2d3e99f4e22618c6727d876262511bfbcd83513731ea4b9c664462c97945b
-DIST rustc-1.72.0-src.tar.xz.asc 801 BLAKE2B 7f0c94f9961edd6ad48372ef768ac69e39b6b7ef0514dc099510d7b53b336d12ac20092e52fbff0c524a6dcfd8c9c69542ae081aaa16ffc3a7ac8fe2ae70e8f8 SHA512 6c8776ddb5050ce29538d9845156cdf370b99d09051fa8c42c68a4d71ff0a6163abc029ac1355af55f1b9b371549e98ebb7e76535d76b77be548fdf917ed6195
DIST rustc-1.73.0-src.tar.xz 154319536 BLAKE2B 077bdedb36fdbc30db3c6331ac6014615eb79393ad42e38488d037ba38eaa6542467d39b2a14228d0bf6717110f915bf6fdcf0074c6293f413720cc748316eff SHA512 75c59680a82cb9d076b9434744a1c65908524ef769293952f5d9c5779d9a9c6fa4d9aa0c7e7d6b7566a21a50a27cd6ae452b5283a4d4606b2fa1acc24dfd8e0c
DIST rustc-1.73.0-src.tar.xz.asc 801 BLAKE2B fac2f8652e9a103e8a678b30222e1a505671253827d1d092c4964230a535a85e21cedf00b70f108ac5cb2db961b50e482223e8eaa5b0d585777dd43d80c5931e SHA512 e80ef6280c50522a575f040610184fcf5f45444db2534c6a334e66a69f3338b43d8b34cf035685f28d0e8f006427bbe413611c49fe028c9f72810d74ccfab15e
DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
diff --git a/dev-lang/rust/rust-1.72.0-r1.ebuild b/dev-lang/rust/rust-1.72.0-r1.ebuild
deleted file mode 100644
index 38c6fb1..0000000
--- a/dev-lang/rust/rust-1.72.0-r1.ebuild
+++ /dev/null
@@ -1,770 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-# Temporarily set to 1.72.0 since it fixed issues in the stdlib that prevented bootstrapping on musl 1.2.4. Set back to
-# normal in 1.73.0.
-RUST_STAGE0_VERSION="${PV}"
-
-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 LoongArch Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 16 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
- wasm? ( sys-devel/lld:${_s} )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-build/cmake-3.13.4
- app-alternatives/ninja
- )
- test? ( dev-debug/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 )
- rust-analyzer? ( rust-src )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch
- "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
- "${FILESDIR}"/1.67.0-doc-wasm.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-clear_vendor_checksums() {
- sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
-}
-
-eapply_crate() {
- pushd "${1:?}" > /dev/null || die
- local patch="${2:?}"
- eapply "${patch}"
- "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
- popd > /dev/null || die
-}
-
-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 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() {
- eapply_crate vendor/openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
-
- # Clear vendor checksums for crates that we patched to bump libc.
- for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
- terminal_size tracing-tree; do
- clear_vendor_checksums "${i}"
- done
-
- 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets+=",\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- # cargo and rustdoc are mandatory and should always be included
- local tools='"cargo","rustdoc"'
- use clippy && tools+=',"clippy"'
- use miri && tools+=',"miri"'
- use profiler && tools+=',"rust-demangler"'
- use rustfmt && tools+=',"rustfmt"'
- use rust-analyzer && tools+=',"rust-analyzer"'
- use rust-src && tools+=',"src"'
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if is_libcxx_linked; then
- # https://bugs.gentoo.org/732632
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- enable-warnings = false
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- lto = "$(usex lto fat off)"
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- compression-profile = "balanced"
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- export CFLAGS_${rust_target//-/_}="${arch_cflags}"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- # but we patch it and set to false here as well
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="\"${RUSTFLAGS}\""
- echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
- echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
- echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- env | grep "CFLAGS_.*"
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
- use rust-analyzer && symlinks+=( rust-analyzer )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- if use rust-analyzer; then
- echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version dev-debug/gdb || has_version dev-debug/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
-}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-02-16 15:06 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-02-16 15:06 UTC (permalink / raw
To: gentoo-commits
commit: da640ab91b978144a6056791a18961b084032250
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Feb 16 15:04:16 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Feb 16 15:04:16 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=da640ab9
dev-lang/rust: update maintainers
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/metadata.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 65d7703..1cf83c8 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -1,10 +1,6 @@
<?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>
<maintainer type="person" proxied="yes">
<email>randy@electronsweatshop.com</email>
<name>Randy Barlow</name>
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-01-31 0:07 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-01-31 0:07 UTC (permalink / raw
To: gentoo-commits
commit: c8dda96e6f166f1ee497de850a1391f36875e9d3
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Jan 30 23:55:54 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Jan 30 23:55:54 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c8dda96e
dev-lang/rust: stabilize 1.74.1 for ppc64, sparc
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.74.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index 65707cd..eee5354 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ~loong ~mips ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-01-14 15:06 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-01-14 15:06 UTC (permalink / raw
To: gentoo-commits
commit: f3509597cf3611bd587b3dabb38e88437f0df65f
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Jan 14 15:01:04 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Jan 14 15:03:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=f3509597
dev-lang/rust: stabilize 1.74.1 for amd64, arm64, ppc
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.74.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index 570d9a1..8b3f655 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~loong ~mips ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2024-01-14 15:06 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2024-01-14 15:06 UTC (permalink / raw
To: gentoo-commits
commit: fe62bc3f58017925056dd9788040c5f19d2633ea
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Jan 14 15:00:33 2024 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Jan 14 15:03:36 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=fe62bc3f
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.65.0.ebuild | 10 +++++-----
dev-lang/rust/rust-1.66.1.ebuild | 10 +++++-----
dev-lang/rust/rust-1.67.1-r1.ebuild | 10 +++++-----
dev-lang/rust/rust-1.68.2.ebuild | 10 +++++-----
dev-lang/rust/rust-1.69.0-r1.ebuild | 10 +++++-----
dev-lang/rust/rust-1.70.0.ebuild | 10 +++++-----
dev-lang/rust/rust-1.71.0.ebuild | 10 +++++-----
dev-lang/rust/rust-1.71.1.ebuild | 10 +++++-----
dev-lang/rust/rust-1.72.0-r1.ebuild | 10 +++++-----
dev-lang/rust/rust-1.73.0.ebuild | 10 +++++-----
dev-lang/rust/rust-1.74.1.ebuild | 10 +++++-----
11 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index b1f6639..3513eb0 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..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
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -743,7 +743,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index 802f01a..5833cbf 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..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
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -741,7 +741,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.67.1-r1.ebuild b/dev-lang/rust/rust-1.67.1-r1.ebuild
index 1b9602c..cc92884 100644
--- a/dev-lang/rust/rust-1.67.1-r1.ebuild
+++ b/dev-lang/rust/rust-1.67.1-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..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
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -732,7 +732,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index dd90e1e..9e9e171 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..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
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -731,7 +731,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index 5a7d077..14be2a5 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..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
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -732,7 +732,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index d09be33..c032464 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -733,7 +733,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index 22d7d80..726196b 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -740,7 +740,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 5886501..a12798a 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -94,9 +94,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -740,7 +740,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.72.0-r1.ebuild b/dev-lang/rust/rust-1.72.0-r1.ebuild
index a0fa9dd..faa9254 100644
--- a/dev-lang/rust/rust-1.72.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.72.0-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -96,9 +96,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -751,7 +751,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
index 023222d..1df89fa 100644
--- a/dev-lang/rust/rust-1.73.0.ebuild
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -95,9 +95,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -750,7 +750,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index 0256c22..570d9a1 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
@@ -95,9 +95,9 @@ BDEPEND="${PYTHON_DEPS}
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
>=dev-util/cmake-3.13.4
- dev-util/ninja
+ app-alternatives/ninja
)
- test? ( sys-devel/gdb )
+ test? ( dev-debug/gdb )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
@@ -750,7 +750,7 @@ src_install() {
pkg_postinst() {
eselect rust update
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ if has_version dev-debug/gdb || has_version dev-debug/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
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-12-23 20:16 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-12-23 20:16 UTC (permalink / raw
To: gentoo-commits
commit: b7f871e2958b1624f3e67ab0f57dafcbb4f22710
Author: Hélder Rodrigues <v <AT> sqrtd <DOT> dev>
AuthorDate: Sat Dec 23 15:34:17 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sat Dec 23 20:15:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=b7f871e2
dev-lang/rust: apply libressl-openssl-sys patch on 1.74.1
Signed-off-by: Hélder Rodrigues <v <AT> sqrtd.dev>
Closes: https://github.com/gentoo/libressl/pull/546
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.74.1.ebuild | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
index 0851f21..0256c22 100644
--- a/dev-lang/rust/rust-1.74.1.ebuild
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -175,6 +175,14 @@ clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
}
+eapply_crate() {
+ pushd "${1:?}" > /dev/null || die
+ local patch="${2:?}"
+ eapply "${patch}"
+ "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
+ popd > /dev/null || die
+}
+
toml_usex() {
usex "${1}" true false
}
@@ -288,6 +296,7 @@ esetup_unwind_hack() {
}
src_prepare() {
+ eapply_crate vendor/openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
# Clear vendor checksums for crates that we patched to bump libc.
# NOTE: refresh this on each bump.
#for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-12-22 14:56 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-12-22 14:56 UTC (permalink / raw
To: gentoo-commits
commit: 635fff7d5953a3cb91cc4e4d98701ea7f8f8c1cc
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Dec 22 14:51:43 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Dec 22 14:51:43 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=635fff7d
dev-lang/rust: update metadata.xml
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/metadata.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index d67d277..e28f627 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -12,7 +12,6 @@
<use>
<flag name="clippy">Install clippy, Rust code linter</flag>
<flag name="dist">Install dist tarballs (used for bootstrapping)</flag>
- <flag name="lto">Optimize the build using Link Time Optimization (LTO)</flag>
<flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly, sometimes is broken)</flag>
<flag name="nightly">Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release)</flag>
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</flag>
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-12-12 19:49 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-12-12 19:49 UTC (permalink / raw
To: gentoo-commits
commit: af4b78935f59ce8aca0c0e2c8b65f78dea74ec63
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Dec 12 19:47:59 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Dec 12 19:47:59 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=af4b7893
dev-lang/rust: add 1.74.1
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 30 ++
dev-lang/rust/rust-1.74.1.ebuild | 760 +++++++++++++++++++++++++++++++++++++++
2 files changed, 790 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index b0ec111..50ff5bb 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -264,6 +264,34 @@ DIST rust-1.72.0-x86_64-unknown-linux-gnu.tar.xz 163402880 BLAKE2B 0f498510f8bba
DIST rust-1.72.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 51083330fef8b0e9f4fafe71e3a08891bec9be8e1c2e64ef37cba463e99c13f44639981c8aae6c86d50c6a23c4846a4f056535dbcbf39a2d9096615862feff87 SHA512 284b74f87e192451ba95cc423089d64334f43da8c221f45acb683a088e7dfd783c488c7ed3fe68619aff4c245271cdcf4b1b8c5f0bef1f8c3d3af0ca13d394c4
DIST rust-1.72.0-x86_64-unknown-linux-musl.tar.xz 234831716 BLAKE2B 3ee1a5727ad120bcf173dcee3770e342f107777984b06782f5ae588a58e5da94ad4550b00c168ddbe84350605100558bc01e139763b5734cdea32545ee6ee41e SHA512 62d5967669164ce7e8b6815298d79380ca96cce5a6c8a67db84cd3d5fdb6825ba9d2a91d59c2185a93b1c26030ef017c63942dc7a363e742d0abf356bca6f1f5
DIST rust-1.72.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B e04731dd5edfe93d17cb032d772917d49bd46f195738cefe2e685f42b9ba5148d120e8d71c627cae46a665235f14ac0b35aff58498ff92da7edfdc5d6e562773 SHA512 2ed245aa779c594f8d9cbcbf63e7c68165d600408a25288163ceebf78946210a36958a3df80c50b2006e11930e09ecec0eee233ff659a9d2ffc78c1b55d3b0fc
+DIST rust-1.73.0-aarch64-unknown-linux-gnu.tar.xz 216033148 BLAKE2B 78bac094c78d68102cd5ca6a7bc9ac8a51ecd3e14cc5c66fefca0a0597b5ba439c22d69a323a6e7cafdfec60cadf0672c91ca5f85065ac8d7913c83437ec0256 SHA512 58198ebecaa4652e0477eed6ad2c29524e7a3e991ed437775281ce526c8485b2a1a49c75ac6fd5bdcc6cb997cee4d1b4d82fba49c03ad38bcafa764f5a9bdfb1
+DIST rust-1.73.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d4b85efab3aef10fd6940630ed3cbf6cca12961228482ce42cdbd4c0c185c55b9ccecb1ca386e7a5c02fa33b77685dc8e2d619ecdec0cb5afc7a01402be5a22e SHA512 b7392e301c00e2ee1be692e6b5a44fdadc4b442979bf8f09fe71f80d82b6f395d0505621ba8eb54fe6145812f7f9c0d2b278e474d6edde51a2318cf27f5080bc
+DIST rust-1.73.0-aarch64-unknown-linux-musl.tar.xz 197525740 BLAKE2B ed84c438426bb0fc9a5a320731ae448f242b70a764d67e46e53a37f0e76262a183886e83fb27166e030740a27e6a79ef1c8f50bfc4a2c9c5d915ee5fa74a251f SHA512 b1a3007217dbb771e459b92a2ce0efca3babb34e9901cd44006d7c8ca92f48f67bdb877d3ec4710c58ad1645da4830a52cc2062b6b5a9827b8d57d508f4029a6
+DIST rust-1.73.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2e2a965b37bdeec12fbe3f605c4bd10bb51adc7dd1c2e2d185b7306e8c75415d678b1bd83eb68e8a05099eb77958a928e867f87b0a4f05b5315b89869f120a64 SHA512 b65b08a68571cd0cf17f4469c1eb95868e00e6244e30ac0d3c30e0ad6abcaed143a7389002c0f90b2ddbd79b9c9c3856d66387f701a8d0eb9f1683ce456e4910
+DIST rust-1.73.0-arm-unknown-linux-gnueabi.tar.xz 180327600 BLAKE2B f28725f19259806f934298d2b6dde6bf59e5f8bc3ee0ad9b1cf0565a5383a31189170f26495b3103bbc9d86d2ac9b83147b3803508a53b96eebd214d2b0aff90 SHA512 27900c5faa9076db40cc85d973274a09ff44a76936312f905a3d9751d0b7480dc260ed3cec91a65bb78382c67208b28978e2079e28a47a25aa6279d09adcc045
+DIST rust-1.73.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 03ad365e06dbaf30d4ca2d8d2d3066d4f956ba5426f2c5b601c3830d9b0741b3655d26eafb3853b41ab01dc377065ca330f9d6fcf89de066c50adb0c9c9fe3bd SHA512 ecef5fe8359d8dbf23337398c1cb90a269ae169a1cd08525361d6f39e0a24dd22c1819c7ee0fe3828431ad492af89d19bf8c3c7b111f7925831362e2050d1040
+DIST rust-1.73.0-arm-unknown-linux-gnueabihf.tar.xz 180870680 BLAKE2B fea49832d8eefa7545b76114874de3d653ed888f753b68cd7636b7a1462bb564e19bbe37a5f3b94cf9a06640bf81f6fcc97f224f0f3e1745eb19f99ae193d3af SHA512 3648672256182cf6c73e31a05af3084b996bf25e1ccad8b96d68501e57a4ae4cf57befdf84db27e3e1a9fa3af051117e94ffcefd14246794e7528020bc26f4d5
+DIST rust-1.73.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 7046fad305aabf192a1084328d739754bf76c27fd3f1efcc4be36047ef6c4bf899ef8ae7e3cb359e23578af4c9a25d4e1f453ed8695ba33c630d46351234de69 SHA512 7e046b79d4d0a1bee3c7c5f6b8e3020a342a39e9913a24ef672aa1d197e63905653acc24652b720a4b996029661503e2dfc3b678f297ce15c548281ed772ac23
+DIST rust-1.73.0-armv7-unknown-linux-gnueabihf.tar.xz 184898496 BLAKE2B d0b2ce03ce7ab5e2c843989958a00524fc59000f62dc07f9783f4b9f22c734b67b33e403e3300fe3350322e1ad2b59e64e41b339d5f5c258b29dcdd98dec9c61 SHA512 ca48bb9b683058321b0ae770faf2fd607e03ff5e9291626ccbeba707f5ef8c211c29b9ddf52dfa11958691a127f95dedb742010018bbd6be2fc1d7ddced44190
+DIST rust-1.73.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 12e19ff5f586a7f67bf7e4f6ee96d919293500bbfb3bec306b412a423a3dafe94fe63939f371a644e1d3a1575a6a21df78f11ee63a8dbae9af3a2ce6b03d5104 SHA512 9e1f316abb8f7861fe1188aba1880732b957514fe58de3f10e340c430c1ce64e9627feec1a655335d33605cc6f5ee32830159a8215c5a233f25ebff18e2c7bf7
+DIST rust-1.73.0-i686-unknown-linux-gnu.tar.xz 209918920 BLAKE2B 545c48dce0e275228e260669d0f5b93977a9c7a02237d4ae9d84ed69236f5e412c5980e2c5823478949214c2b775c89c836bbd43e25406c20fbdc52cee328240 SHA512 a80742d14acc1d018ac35b77abba4491b5eafe28bc3173527c865b0e930572f2a92d4fc459db51c34600f8288b20b5790346b5f8e6fbdfcb080f1f14f44a2db4
+DIST rust-1.73.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9800a96cf8484b0370f343c2fdda0762bab534fa7551a7716e7665bc90b651207c471ef5e06b2d7acb766959155b5d593b375487b01cf65e980ebc721c3a4042 SHA512 dc0c25c270701ff6509bbff3fd173178ec8aa3e5cf606fe87b803e6f1279dde3571d22cf0c7f28bb0ba5410c08a491f9b9b937d0aa796c0ba30fe43f7e381c1e
+DIST rust-1.73.0-loongarch64-unknown-linux-gnu.tar.xz 161763960 BLAKE2B 1ae7019055a4fb457733826750d2c20708e7d8bfeb8532ac1af5027387bd1f992c2ab1fe08d088b07581b0a81d7ea7ac8e44ff077887297a4d4da2a633089de0 SHA512 9840e1454506e3f0880e8113040eecd1b363bb78371386aa069271e18e70600f81e19358539785a3bd1ada7244b4830362e6f0b466798cda7647ed795072342d
+DIST rust-1.73.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cacbbd7793d6f693cf2c1211529cb4a0c888f3ed4d8674f610e034a7216fcf7f4ecc85331aaeaa89ec02c1412a62fdbda29a3bca6faa64dee0f8d419d055b41d SHA512 64b8594f2f19151927f5b74584822a78b15da97fc8f5e4823dfc222056a203ed68ced70cca915e1694ea6b36fdef5697e5b56062cb761a0d9557e5c08ec8ea07
+DIST rust-1.73.0-powerpc-unknown-linux-gnu.tar.xz 176694620 BLAKE2B e8b43ea4b9ad78ece530985afdeb140e0e960213272857cedcfe4e9262c190c7d26ce77d46fd113d2742cb159442c256a081bb6cf23e6977fa5ca8c6cf21ec30 SHA512 03f889dad45d1bd9ee4af52209af3d763ad5362cf1a617c86b050e0d2fe00c39edc716fc32a83c6e45c118b97d828c32f682ffec5b32f215d6694509a885772f
+DIST rust-1.73.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e63cf87a2fb0584f2fc5c01a98dbb12bd9a7f4aace54a08505a0b4f9e7141705409d8bff1cd3a2d7cf40504ea274f29e11624ba050d56e4ec2a4e794fdf188f1 SHA512 a86db43be2a2fd92638e6355ac4117e707073fbb98631a8b41064e5b01e12bc1d2c594547778d9c99ec3e24c5c4dce6603cbfcb3715b11aef9d2c2758ee8b7d6
+DIST rust-1.73.0-powerpc64-unknown-linux-gnu.tar.xz 176165132 BLAKE2B 3750ef413de00047fa957ecc6c832995e072b58b78f994bdd6b8291583acd0a4ab54634d4e4778456bce6420135c83e9961aef5e615fd62806531686e33a31d8 SHA512 9f1a669f7d532a831df76292916493e1bcd4a56d95d3819c477898eb0510bc8760d008fc1e7d383927f8afbeff826b0598f9bc4067f692f530856c8e444f44df
+DIST rust-1.73.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1c1db86107b48a554d815811b518f7b28abac90cd08920362643a538670e7859ce43d179de24551b5e4409e0a421029e66b8374b27ddd699ca68fe0f47b8904 SHA512 04604baa0f13693d4bc7a0729df7041a55c0cb9efa11ef511d29d2b5a50c3575867c1ecbb6a23a030dc014876bc9c02e370c8d0eb531249833fbb52dd964f2b4
+DIST rust-1.73.0-powerpc64le-unknown-linux-gnu.tar.xz 187628140 BLAKE2B 1ab716a7d2e536ca3447fc0aa2751d774259ea2e39ee3cc150bfe11967e57bd85b484cf050a39cba717a0552dabe6d1aa79ca7dc24abe4b43d4802fb9cc1bc85 SHA512 d6566978f47067b84715ef39756721ced5f5430d5c92f51b673db39d1e1666a8dd933e998d4fe3ccbc36ec47c62b4fe7e335c4e3b830d27571dcf9e534446d0d
+DIST rust-1.73.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b3a29cf580d750a17436036d6bdb2457cafde123c289205aa239457afa4de10b4b97c9f3ccc23cd296a1a388802ac4f696c71e45a2ff7c97d15d63f2a04cba3 SHA512 5840b7986e9472a4907ae01eee0c4a40664ce1a29ff159557766bcf50da773d246a74ffed2bc5bc735d255514e0daba55d10bdbf7d8d2c3a6aeebd704f3009b3
+DIST rust-1.73.0-riscv64gc-unknown-linux-gnu.tar.xz 182202208 BLAKE2B 836d89e6ce276d100edce8016f5a466b99e8aff2646be7e58dea2f38678e4fdb9b93fff1126573a112e19cdb32ee5290fa58df0e5cbb1c309e65927ae1439b52 SHA512 c49031996ecde5dfda4b8bf3869b37ecb51c89e3fb8f69d3d43d865bf2ed6dfa928f0239460f0f3c7b7168eedee9b5a957d956f39ad42fc7276fe64a649ee501
+DIST rust-1.73.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 119d6cf2b0b4f8950d51aac6eb865619412e513c6c87f31702572cb2120a20cb23133a763036cbac0a9977a20dccfb58a8b034d19d13892ffbde05c01970ec92 SHA512 578c2576f66d0ad344549a94cf83f80551dbec7ecf2ff8616d81cd1eb3a7154b89701a05caf6a21649361ccdd1abfd37b33de935e91dba02dd914945de3930b5
+DIST rust-1.73.0-s390x-unknown-linux-gnu.tar.xz 201224624 BLAKE2B 5f9f28c5f511a3bd119233e4a2b882119b18a42a8c235bafc57f35e365496fe9d6d88c6278e014345f76a98a235ecec31335178a6b047e5b2188d391ba465e70 SHA512 e946192961623be1e3ab4b3e2c86f16f9fd716ee3ccf88137e6ed7ca92b9e8376552a9b46b48c127f6be76a1fc7b240d9b8db568390fd7d81605634ebb431ea4
+DIST rust-1.73.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d05fc43c55e47b3a32e8be8f97b072961e920ed09d368968d1121dfaa0dc36e11ca61a0b03df2f708d0eff31a80367b5d465434b851da4c8ff00ce9ecd577bce SHA512 5950cfd08f49bfd0f1277e2f07e333e7188d65d6a61d738dbe586bde8f3647862ef6d6ca5f52d74f357ae3997f1554a2c7cd0399392cde7ec32b1f2aaf8a4c6b
+DIST rust-1.73.0-x86_64-unknown-linux-gnu.tar.xz 161588916 BLAKE2B 10c1c57641e2ae076c55826985d8ef43034a3e4b6fd15d109f949e8bc655dfb16d45ce86482992cc2aa3f4000f3432b8be17019f9f5d29a92fb42c37cd7df72e SHA512 b70886b5ecac41a7e6ea85d1b2d1aa557a0395d3f8abe4b8d1ad91f3b32ac9ae73bebfd7a9c48ebef4141be041cf5bdfab8bdb78e1b4969afb439daca203d5a3
+DIST rust-1.73.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 22e68ec4e6bfa49c15344675abd20ef9449d928943dafc64bfa1cf78dd36ccbce4802af8d4adb84762194dabc512efa74655a93785c127e6942ebeca8f6e3303 SHA512 56e53a1047a23a7f37250a785de2422ee2a3a72fdedb9a02530b3cc1cd978370cbbfc0e67d75f3d537f48c6c78f91d3de949ac2c9392a79404609b169cedaa40
+DIST rust-1.73.0-x86_64-unknown-linux-musl.tar.xz 236190528 BLAKE2B 062b54b31742bc846bdff63fb38be3a3a1f6d2f061da26cee6a0b089feee995fe3dbea536675495ed75d47d657c3d4bf04e36f6752f59f8308f7eb9a397d6e38 SHA512 abd01e0c98a8aa447d01613e24302ca81a8cce7d41179ed60834a39ed1942de0459add3c498a63f94bb1ee8662a2750b375b49894e3108da45f47d3a643cfdba
+DIST rust-1.73.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9822879d0f14eb5387a623d111ed7a3b1ff038522c071608bd254c4b3479da8a1e9ed78c69c267c1156c45a9cbb2f7db00d123b85f28021a743d392d1cb65c75 SHA512 ff65fd3ca47afeb10f7434d8d4f91b6649739167639c3eadf178aa1339553c5316bd0bb393cd53fcce17c126dcf8db1f1dca6e87044b14762bb20ed8f5a500b7
DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be
DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc
DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac4613b8e3f0092bc0df29c9685f4a4012c0bd1b600911c2d19bcfa8f5a84b8a3c39d4c9e062a62cd61925b59129e1cd72b9 SHA512 1944c024c603140d0a9236043a3bd1d0d211dd8d368d6d82a3a620f1ff43b29624755b0943f2b38b40a188c7eee77a840238ea757eaf435e2a3fa6a0e6b82832
@@ -284,3 +312,5 @@ DIST rustc-1.72.0-src.tar.xz 151630408 BLAKE2B 7b26e5a9335f9262567b2a6aaf3b8ad6d
DIST rustc-1.72.0-src.tar.xz.asc 801 BLAKE2B 7f0c94f9961edd6ad48372ef768ac69e39b6b7ef0514dc099510d7b53b336d12ac20092e52fbff0c524a6dcfd8c9c69542ae081aaa16ffc3a7ac8fe2ae70e8f8 SHA512 6c8776ddb5050ce29538d9845156cdf370b99d09051fa8c42c68a4d71ff0a6163abc029ac1355af55f1b9b371549e98ebb7e76535d76b77be548fdf917ed6195
DIST rustc-1.73.0-src.tar.xz 154319536 BLAKE2B 077bdedb36fdbc30db3c6331ac6014615eb79393ad42e38488d037ba38eaa6542467d39b2a14228d0bf6717110f915bf6fdcf0074c6293f413720cc748316eff SHA512 75c59680a82cb9d076b9434744a1c65908524ef769293952f5d9c5779d9a9c6fa4d9aa0c7e7d6b7566a21a50a27cd6ae452b5283a4d4606b2fa1acc24dfd8e0c
DIST rustc-1.73.0-src.tar.xz.asc 801 BLAKE2B fac2f8652e9a103e8a678b30222e1a505671253827d1d092c4964230a535a85e21cedf00b70f108ac5cb2db961b50e482223e8eaa5b0d585777dd43d80c5931e SHA512 e80ef6280c50522a575f040610184fcf5f45444db2534c6a334e66a69f3338b43d8b34cf035685f28d0e8f006427bbe413611c49fe028c9f72810d74ccfab15e
+DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
+DIST rustc-1.74.1-src.tar.xz.asc 801 BLAKE2B ddf73175b164233babf31ca3a381b03e20c0f36d017c1d5f85d6ab11f0986d861ab23b11c061e6b2444ced70c3d6a494cc3de4ec86f0deb221a805491bd75420 SHA512 9a96ff9ba9a4e2af4e267b2ec126fc0675c78d0eb767703daa2f28491c3d85c2ab00fbd8584390bf658812ec6c4ab6c57e43b386db59fd505bd3134a8873a09e
diff --git a/dev-lang/rust/rust-1.74.1.ebuild b/dev-lang/rust/rust-1.74.1.ebuild
new file mode 100644
index 0000000..0851f21
--- /dev/null
+++ b/dev-lang/rust/rust-1.74.1.ebuild
@@ -0,0 +1,760 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 17 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+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 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() {
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-11-14 17:45 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-11-14 17:45 UTC (permalink / raw
To: gentoo-commits
commit: 51ba58911c10ee74fde91c396ed56b401b5adabd
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Nov 14 16:59:11 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Nov 14 16:59:11 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=51ba5891
dev-lang/rust: stabilize 1.71.1 for arm, ppc, ppc64, sparc
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 9796068..5886501 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
+ KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-11-05 3:44 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-11-05 3:44 UTC (permalink / raw
To: gentoo-commits
commit: 79a04936c09b8fbd9250167d28d94b1e280fd818
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Nov 5 03:40:27 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Nov 5 03:40:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=79a04936
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.65.0.ebuild | 2 +-
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
dev-lang/rust/rust-1.67.1-r1.ebuild | 2 +-
dev-lang/rust/rust-1.68.2.ebuild | 2 +-
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.70.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
dev-lang/rust/rust-1.72.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.73.0.ebuild | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index 20d9685..b1f6639 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -161,7 +161,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.64.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index ffb1b22..802f01a 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.64.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.67.1-r1.ebuild b/dev-lang/rust/rust-1.67.1-r1.ebuild
index 4112cfc..1b9602c 100644
--- a/dev-lang/rust/rust-1.67.1-r1.ebuild
+++ b/dev-lang/rust/rust-1.67.1-r1.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.64.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index 92918ae..dd90e1e 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.64.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index b7894b6..5a7d077 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.64.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index 51d464d..d09be33 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index 284e6e3..22d7d80 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.71.0-fix-bashcomp-installation.patch
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 82e06a1..9796068 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -159,7 +159,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.71.1-fix-bootstrap-version-comparison.patch
diff --git a/dev-lang/rust/rust-1.72.0-r1.ebuild b/dev-lang/rust/rust-1.72.0-r1.ebuild
index 06956e0..a0fa9dd 100644
--- a/dev-lang/rust/rust-1.72.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.72.0-r1.ebuild
@@ -161,7 +161,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
index 44df771..023222d 100644
--- a/dev-lang/rust/rust-1.73.0.ebuild
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -160,7 +160,7 @@ 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
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-10-18 17:01 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-10-18 17:01 UTC (permalink / raw
To: gentoo-commits
commit: c881d9de00195dce9125d3a408d17cfc5a5d10ed
Author: Caleb Stein <caleb <AT> calebstein <DOT> net>
AuthorDate: Wed Oct 18 16:22:33 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Oct 18 17:00:00 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c881d9de
dev-lang/rust: fixed rust-1.73.0 failing to build
Signed-off-by: Caleb Stein <caleb <AT> calebstein.net>
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.73.0.ebuild | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
index abb848a..44df771 100644
--- a/dev-lang/rust/rust-1.73.0.ebuild
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -175,6 +175,14 @@ clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
}
+eapply_crate() {
+ pushd "${1:?}" > /dev/null || die
+ local patch="${2:?}"
+ eapply "${patch}"
+ "${EPREFIX}"/bin/sh "${FILESDIR}"/rehash-crate.sh "${patch}" || die
+ popd > /dev/null || die
+}
+
toml_usex() {
usex "${1}" true false
}
@@ -288,6 +296,8 @@ esetup_unwind_hack() {
}
src_prepare() {
+ eapply_crate vendor/openssl-sys "${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
+
# Clear vendor checksums for crates that we patched to bump libc.
for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
terminal_size tracing-tree; do
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-10-15 22:19 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-10-15 22:19 UTC (permalink / raw
To: gentoo-commits
commit: 3f1c5c0e4dcf4d4448764b2bad87cd10f2b5b428
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Oct 15 17:20:37 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Oct 15 17:20:37 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=3f1c5c0e
dev-lang/rust: add 1.73.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 2 +
dev-lang/rust/rust-1.73.0.ebuild | 759 +++++++++++++++++++++++++++++++++++++++
2 files changed, 761 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 564615a..b0ec111 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -282,3 +282,5 @@ DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585
DIST rustc-1.71.1-src.tar.xz.asc 801 BLAKE2B a88c073a70552d73e2d7695eceabdaa478f34501b7271fabf7f4a09f3efa545181f34353e45776b05918e6aeba88adb02f9731454f7085a7abf1602fc6589983 SHA512 9dd0406cf22f1daa7fcfd015fc1c6f8d36586aa99bf14c1491ee464c1f892ab759feb83e8b55b64713170fb777fdbe038fb5fd01a59c911b6599223baaba0677
DIST rustc-1.72.0-src.tar.xz 151630408 BLAKE2B 7b26e5a9335f9262567b2a6aaf3b8ad6dc813688f532c54502c12c7b59d02082a082fe49ae370b0748fb13f8245dad13a58927d8563ba96fdf3639d4a128f236 SHA512 aed27c1babfec7f9b0815bc395302cff4f8e8ed83d8d3bde202f6c86fba4aec14ad2d3e99f4e22618c6727d876262511bfbcd83513731ea4b9c664462c97945b
DIST rustc-1.72.0-src.tar.xz.asc 801 BLAKE2B 7f0c94f9961edd6ad48372ef768ac69e39b6b7ef0514dc099510d7b53b336d12ac20092e52fbff0c524a6dcfd8c9c69542ae081aaa16ffc3a7ac8fe2ae70e8f8 SHA512 6c8776ddb5050ce29538d9845156cdf370b99d09051fa8c42c68a4d71ff0a6163abc029ac1355af55f1b9b371549e98ebb7e76535d76b77be548fdf917ed6195
+DIST rustc-1.73.0-src.tar.xz 154319536 BLAKE2B 077bdedb36fdbc30db3c6331ac6014615eb79393ad42e38488d037ba38eaa6542467d39b2a14228d0bf6717110f915bf6fdcf0074c6293f413720cc748316eff SHA512 75c59680a82cb9d076b9434744a1c65908524ef769293952f5d9c5779d9a9c6fa4d9aa0c7e7d6b7566a21a50a27cd6ae452b5283a4d4606b2fa1acc24dfd8e0c
+DIST rustc-1.73.0-src.tar.xz.asc 801 BLAKE2B fac2f8652e9a103e8a678b30222e1a505671253827d1d092c4964230a535a85e21cedf00b70f108ac5cb2db961b50e482223e8eaa5b0d585777dd43d80c5931e SHA512 e80ef6280c50522a575f040610184fcf5f45444db2534c6a334e66a69f3338b43d8b34cf035685f28d0e8f006427bbe413611c49fe028c9f72810d74ccfab15e
diff --git a/dev-lang/rust/rust-1.73.0.ebuild b/dev-lang/rust/rust-1.73.0.ebuild
new file mode 100644
index 0000000..abb848a
--- /dev/null
+++ b/dev-lang/rust/rust-1.73.0.ebuild
@@ -0,0 +1,759 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 17 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+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 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() {
+ # Clear vendor checksums for crates that we patched to bump libc.
+ for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ terminal_size tracing-tree; do
+ clear_vendor_checksums "${i}"
+ done
+
+ 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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 rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-10-09 17:14 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-10-09 17:14 UTC (permalink / raw
To: gentoo-commits
commit: 6ada0b21f0f90f8757e84bb65dd9e4c82b57f832
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Oct 9 17:12:21 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Oct 9 17:12:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=6ada0b21
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.65.0.ebuild | 2 +-
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
dev-lang/rust/rust-1.67.1-r1.ebuild | 2 +-
dev-lang/rust/rust-1.68.2.ebuild | 2 +-
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.70.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.0.ebuild | 2 +-
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
dev-lang/rust/rust-1.72.0-r1.ebuild | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index 265bf15..20d9685 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -588,7 +588,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index a3baedb..ffb1b22 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -586,7 +586,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.67.1-r1.ebuild b/dev-lang/rust/rust-1.67.1-r1.ebuild
index 72c5fa7..4112cfc 100644
--- a/dev-lang/rust/rust-1.67.1-r1.ebuild
+++ b/dev-lang/rust/rust-1.67.1-r1.ebuild
@@ -577,7 +577,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index 17586be..92918ae 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -576,7 +576,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index 249ca44..b7894b6 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -577,7 +577,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index 29201cd..51d464d 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.ebuild
@@ -578,7 +578,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.71.0.ebuild b/dev-lang/rust/rust-1.71.0.ebuild
index be3e2a9..284e6e3 100644
--- a/dev-lang/rust/rust-1.71.0.ebuild
+++ b/dev-lang/rust/rust-1.71.0.ebuild
@@ -585,7 +585,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 64d6d31..82e06a1 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -584,7 +584,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
diff --git a/dev-lang/rust/rust-1.72.0-r1.ebuild b/dev-lang/rust/rust-1.72.0-r1.ebuild
index 3c98e6a..06956e0 100644
--- a/dev-lang/rust/rust-1.72.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.72.0-r1.ebuild
@@ -595,7 +595,7 @@ src_configure() {
}
src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}
src_test() {
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-09-29 19:19 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-09-29 19:19 UTC (permalink / raw
To: gentoo-commits
commit: 2d3683984299f0fc33908f3cfc65616b36c09887
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Sep 29 19:18:16 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Sep 29 19:19:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=2d368398
dev-lang/rust: stabilize 1.71.1 for x86
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 3404f12..64d6d31 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-09-17 16:22 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-09-17 16:22 UTC (permalink / raw
To: gentoo-commits
commit: 9d8e6675e1547fadb8d6a08a9f0fe2bcf7bdf1e8
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Sep 17 16:09:01 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Sep 17 16:09:01 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=9d8e6675
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1.ebuild | 1 +
dev-lang/rust/rust-1.72.0.ebuild | 1 +
2 files changed, 2 insertions(+)
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 29c9e95..3404f12 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -692,6 +692,7 @@ src_install() {
_EOF_
rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.old || die
rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
# note: eselect-rust adds EROOT to all paths below
diff --git a/dev-lang/rust/rust-1.72.0.ebuild b/dev-lang/rust/rust-1.72.0.ebuild
index a8796dd..fe4ccac 100644
--- a/dev-lang/rust/rust-1.72.0.ebuild
+++ b/dev-lang/rust/rust-1.72.0.ebuild
@@ -690,6 +690,7 @@ src_install() {
_EOF_
rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.old || die
rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
# note: eselect-rust adds EROOT to all paths below
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-09-17 16:22 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-09-17 16:22 UTC (permalink / raw
To: gentoo-commits
commit: 305ea7f16e7337de5777d7586989dc53403d31a5
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Sep 17 16:08:21 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Sep 17 16:08:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=305ea7f1
dev-lang/rust: stabilize 1.71.1 for amd64, arm64
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index ea7f9c6..29c9e95 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-08-29 21:11 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-08-29 21:11 UTC (permalink / raw
To: gentoo-commits
commit: a87a231a3d87b52699aee970064d3163b20f14dd
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Aug 29 21:11:07 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Aug 29 21:11:07 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a87a231a
dev-lang/rust: stabilize 1.69.0-r1 for sparc
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index 3065a01..249ca44 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.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 ~ppc ppc64 ~riscv ~sparc x86"
+ KEYWORDS="amd64 arm arm64 ~mips ~ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-08-06 21:40 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-08-06 21:40 UTC (permalink / raw
To: gentoo-commits
commit: 5b2b2e9c9a7a21c4c332e9f6b30b51816f22aa27
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Aug 6 21:07:04 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Aug 6 21:07:04 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=5b2b2e9c
dev-lang/rust: keyword 1.71.1 for ~loong
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.71.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.71.1.ebuild b/dev-lang/rust/rust-1.71.1.ebuild
index 54d0fc5..ea7f9c6 100644
--- a/dev-lang/rust/rust-1.71.1.ebuild
+++ b/dev-lang/rust/rust-1.71.1.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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-07-20 19:07 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-07-20 19:07 UTC (permalink / raw
To: gentoo-commits
commit: 53e8e86bc2db742ce413aacab89ca8b57e214066
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Jul 20 14:07:17 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Thu Jul 20 14:07:17 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=53e8e86b
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 12 ++++++++++++
dev-lang/rust/rust-1.65.0.ebuild | 2 +-
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
dev-lang/rust/rust-1.67.1-r1.ebuild | 2 +-
dev-lang/rust/rust-1.68.2.ebuild | 2 +-
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.70.0.ebuild | 2 +-
7 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 1ec6410..5c4765f 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -14,6 +14,8 @@ DIST rust-1.64.0-mips-unknown-linux-gnu.tar.xz 167831852 BLAKE2B 76e00291f2e2b18
DIST rust-1.64.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 81f100c9a788c863b2f2388e7264b8e6b4ea062fd46d6c0e922561f491cf86227c46511ab538d8bc56a9b2d01d2ae19f105966ea00f2ea86592128e4c26b55ae SHA512 41e59d670efc9085c6e3ed59bb8808dc747eebfbd65ed976da04ff70095d91f15b43f8d257a09d2a6ee1cb07c5d1f49081529e0fc8234a26599a28ddaf167f4b
DIST rust-1.64.0-mips64-unknown-linux-gnuabi64.tar.xz 172953460 BLAKE2B 68aa0d08ba233ebe95c1107574ce9165cc2afc0a43db044b6951055e30f22ed6070f9fe10f0482923f767e39fb99f887da59dcf679c3e9c16345f943b0c3012c SHA512 59250c13e980fc38b6da08faf7713c1c9ea2865793cfb0032a65a499bbfd4f7af94604bbdab4e0fd34a0be6b74db8cdcb8c3859e5c13d8a29d8c953d67a9bc84
DIST rust-1.64.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B eb53e83dde3acdc3cfb84c7285a1373c4059c0c06e4cfe855339ce817a0a8cbea33da9fa0894a9640871003e8058482e46a31b04dd9ad1d8ae8e9ac1b3c72f7b SHA512 2e8438ca78bfd610c8c7b99a4aa2663cfddc611fa4495f490789d7838b80a8f90b9eb7f59171da187fdbc8a17b4ebc20eb69ccdaa75cca4966246e78dd41473d
+DIST rust-1.64.0-mips64el-unknown-linux-gnuabi64.tar.xz 175504748 BLAKE2B 9399b396f23b5fac32c3f78902e2a2ba21b2ec4d6f1333a963c7f8b025f45667c2a895b36e25991d71f0fe9938807c592b955bbafc6a627fdf98384c371f366a SHA512 97d929193c5fbbf20a2347570a803b1f62f7af40745e82996bf286b2b87edf24f6c1f1a938d4571d6ec1583d8940cca03390c3f5517ac1026e277d92cf650db2
+DIST rust-1.64.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 8d728073e720b39572b1150e04bc58cd0c1cf0b96e56699ad52cb3bb32dc28b9c5d8e163f07419f289c1ad028a99036c8cb979e02c7df425e74a883239a7b2f2 SHA512 56458270e4810c3bc711aeb14b0f89ec56352a3fb98a5f34a56a1309ce5ff265806cc9c147bd4268c2e1cdd51dd13659aa4f58ad6de9b2ce2e6e89981798c996
DIST rust-1.64.0-mipsel-unknown-linux-gnu.tar.xz 172189848 BLAKE2B aff9136ab374a3e39674c17b1ffa4fb8fe077301284b5dde927e0cf56e51edbb912b40d852aac4ad4d4e39f3ae20e68174dac338af6682735e8a031607652176 SHA512 9283e1e9eeff6c67c49e656709e1a6c6c52329aa913c6024af3aebd889b594f48f0c8172270c579a52d5980f7a42730a6184254b5c8002928f8f93c484dad211
DIST rust-1.64.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 613ac8c773cc6585a99295e2770879cf7a9a56e1ac43256a1d8a56a12bd9b8aa08e49df96819805f4e98230d5c6d106eae837102c21f044e7e0b7756c453c529 SHA512 24d15870efaf03a916d69a358871a427869bc41ce164dcf8968564dc3f213603d0572f34b8ebbcd98d6653ff1e70664baf8c2dbdb32a0779f361338d4d3a0f43
DIST rust-1.64.0-powerpc-unknown-linux-gnu.tar.xz 204541208 BLAKE2B 5bbd65d8aece3e32bca62d8a8b210cf155a786501c96e509462d0c45b15f19910794ff85ade0c42b575f41bd47f4f3250c011152b968ff1ad000ead6b7a200ad SHA512 13cc41679bf1bdb94d042de18696685087f3bfc84c0f99567b8c9dc6a5796c0f122499254ca8032eced8fa53623133a8b6652e14f398a9cea95ac3364a227f45
@@ -46,6 +48,8 @@ DIST rust-1.65.0-mips-unknown-linux-gnu.tar.xz 172934452 BLAKE2B da7d02247e35723
DIST rust-1.65.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e5323fc58614bb2f61831d9a3bd4e3e17e61d7d876e8ccea0d7bcd90d515cdb09cf6112922260fa7d53ba9944b183918448b31c2de431cee8b2f13e6e82f66ea SHA512 b0544165a5b7b49ea7861ca7cea20d6667976667c2253816f942f9b1473306615df5e5e8c1d28028ae79d7cdfe8bfcecefa8df65648976240af40ac08a8ca458
DIST rust-1.65.0-mips64-unknown-linux-gnuabi64.tar.xz 170733288 BLAKE2B 59211c452f921cc337762bcd50cf6cbe8b59b843c1f8afcb82705092ffd4465b663f3428c718b473235be5308cf13663bebc87a2ce93abc81b11192479261527 SHA512 75012281166d17805ae718b4ef55084f6b59c2ff10ef44ab03efd03e0a72539438ab953384e62f2c90042ed5b044478e17ce64d6e9ad85bf3d40ab55bfaa37fd
DIST rust-1.65.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 491ed32a0804f9b69cfe7622eed951aea8a88e6bb9d0cb90e7fb836807fbb0c02ca1d0f4ce54ec366fb5d314bab7702b2395218c8c6746f35b6a0654f079e8a2 SHA512 afad470d8ab02729ac1fba678a0459279e4b8bf687e7ae90bf51ddd5fab5b9f1d6e421ade260d101405387e793fda7fd6ed35df3a97875342fd93feb2e1598e9
+DIST rust-1.65.0-mips64el-unknown-linux-gnuabi64.tar.xz 174670568 BLAKE2B 5cadd21fe86c15fc305ced94c3ef002c7c9494857aecf2c82a1d79bacbe72f9ea37c4f9cc552cc2af256b5602ad8a0cce28483a0a0f44ee887f22f240a231b46 SHA512 f16a3b29ce635eb8a384c9bd802778cdddfb030459cbc7beb2b5c861bbc7287bf20dbb552d48f8548086436b5dacd8aa3f4eebe82a2bad5785791f6db2c52d93
+DIST rust-1.65.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 57ea482eab56a7e17f37709efadd39fdd8ee536de16522996b2a9ab78f8450dd1b14f76360fcab79f3017d3ace389c10755e8865c93e4979a1c37ee5fb039f4c SHA512 ee045f7f129434ee1a1c7dc0612ecb93a4bddc17e5ed3f5b3c751ddf001e4a711f5419c9de7756335fcf59dc6119facb12c8f37fae8acbfb4c407c896761a4ad
DIST rust-1.65.0-mipsel-unknown-linux-gnu.tar.xz 177698400 BLAKE2B eac9bbef703dd3d7a96dcb31ee0fd6f46d7046ec5d8e810605285a9b71248f0e97412f881d3ec77b4ce79057367523e36cde1a19733944d5a0fb56fc71e1d95f SHA512 2ae3976913b4d5f6a2bb7a778ffe7cad5bcfa643e37c217790605c5260cef44a2a98baaa5cc4fb70fbf63d5ae10c8d10ebd684d1f21a66c6915c5c58f488d7f0
DIST rust-1.65.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 26b706e4c8a05a0e27050c8806d47dba83bf2e529ff10f622bd166aede62b2868a2be746c1b0c5d824df58658d5d125310004922bdd4a1224eb050368483b1df SHA512 49a35c5152d2cab469159b83b081f11897040e5b6ef641e4774a45bdf79b936860302812697469ea4429cfbfa90238958342d03bbca019a80fc7fcf666c571a1
DIST rust-1.65.0-powerpc-unknown-linux-gnu.tar.xz 209510928 BLAKE2B ae05250069277c54f3658aa2474de6ce122de81f54a529cbed63b6e4c2354638904a018453a31dc2ecb364aa0c14bce23d97c4065cf8f7f0feb65e9107be78eb SHA512 a622011ac3c63b1b4f55a3fcf98fd1771af67b64a366473136b28f58e100635b823243e9a12f7694ee303e7338c40431e25554d5d72c16a72d0252c24c2cb7d1
@@ -78,6 +82,8 @@ DIST rust-1.66.1-mips-unknown-linux-gnu.tar.xz 187966796 BLAKE2B 193f18a9c56465d
DIST rust-1.66.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a04c0f9320d663658b758e6b89709645433a0d16548c511945c439ce134617c8a05d7e9ff988e8f7a1ef62a726284548bf8b259648f614c3a2205ee9c02b3a91 SHA512 4b581b997a643c0ee6105c141c7859e86d9b2cb6dda85d867593829978911dc5a6c343a11712a334b94188078c0d3b1e7e734334b8b4a16b38afab228172bc6b
DIST rust-1.66.1-mips64-unknown-linux-gnuabi64.tar.xz 184874416 BLAKE2B 64d96a026634cce03496be36ea7a42986e0fedc75d6c61e0f9a6ffe5cd3432bacd353276636c58989d02328be62f760bc0157c5999262bbac5c570dbc049635a SHA512 ce4b5ff464e358b085c18c21697cf7f339c19db163a873bf68b24e2febf42e69e582bbfc9f95cc38a6c96610a8ccfe6ec431cb2f98be10c48f9c1cbf027456a0
DIST rust-1.66.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B fdcc56efc4f7df5d13595661d59354e4fcc757e966360fccf8a86d42f31f952334b9cedd107d23e4132b90e3082013cc26076a0754455d2759e2bb878afe023e SHA512 c5918b76fdfa39ba89c980ec2d252b3755439c8baece26d27f3515e800061370c2715620a052d3f22bd57412d058f5e3f53084bee08b5026b0f50112e6c41b93
+DIST rust-1.66.1-mips64el-unknown-linux-gnuabi64.tar.xz 187791816 BLAKE2B b81e214da1dc385bb1af0b01dcdaa5f2f9751b5faa6c9e05f501baeb6f1a298bb0af8829dd04736b76a063a5c28e303f2e295a54bd9093e6520ffd3de37f254f SHA512 4a21385af4b8441ecb717979e2b7329ce9384aa0008c350032d704d57e719464b0efa527745caa55c8e8784a4ae46b19b59631c5649fa50c0c83395864756c95
+DIST rust-1.66.1-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 896dd352cdfe8b920c036bf7dd40d8cf810993c21703dec7c30b6cb3eeb96d949fcb513c3982030ab34ae18fd158e4ad9910445af7515aaec45ceed5b6f1affe SHA512 a92e152ce501b43e7f808af2ced2f7528ab788c43334e3a127066b1e2dea24535c8e50a10e2ae766ec841520592e3171ff267eeadcfc995ac71478ddbafcefc3
DIST rust-1.66.1-mipsel-unknown-linux-gnu.tar.xz 191073888 BLAKE2B b88ebb699e97e7e243138bf5674956afac0204bcc19882efd59340bd45256e9ba07b7e160895faffd81c62b533b2d305b088c08d3a99060e91025627ec8b7c7b SHA512 9afe6b80df0e24f2cedd65e7ab5fb25cd28be69b3e442c80a8f92291c7ad7ff7c2f8ec2e901bdeeb8084467700db4c19055edfe4ca8ccf7f6ffbf69e5c20426f
DIST rust-1.66.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9a8c4eb0683465c63d1d5f25eedbc2ee96331960cbb2704d67a806852a05544f646cfe8220a3582d6e05dd30e63fdb736d176c0467166192501d168e5a0fb7d2 SHA512 e35e0e6b94feb551dc1a06e36ad0c70fe2641dc5671fc74fe99baede8c40cbca828259eafbf790af43cb8775fcf8c38442d2ca3349277b07bacbb508676b25d3
DIST rust-1.66.1-powerpc-unknown-linux-gnu.tar.xz 209784584 BLAKE2B d582f2efaf7401dfc8ece24026653dd52acd3bd5f3a87d12eaf1be5170909ebf009189312d59d5508beb6a68bb88545ce97af1d87049dd61b2736ddd9fbb9ffc SHA512 b8a9f4115864e0e6262c603e11b2dd9a66706c120aecbd0e7b0acc79ff1675f0dbbd2c6c0095d21be664a04408e610f07b4e09adc31f73b0fc92dbb2083f9b13
@@ -110,6 +116,8 @@ DIST rust-1.67.1-mips-unknown-linux-gnu.tar.xz 195834044 BLAKE2B feab999cd49f72b
DIST rust-1.67.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 100dcd13886287128065952d0b535208a0807c22175dd8fd04f16a16d76d2c9d32dd6b6da5ca929c517519e167e100607c7749ed6c512fae89e2e0313e7b7202 SHA512 5cebd45755d5accb15da29423eb7addf18a72326238ef6a0c2ca09776ac008490165d2b1fb069ec7a34d509bdfa7cf1212a87344e0dda4746dfb89afe404225a
DIST rust-1.67.1-mips64-unknown-linux-gnuabi64.tar.xz 193892140 BLAKE2B d17cc8b42ad0e2a658dbc170dfc7256ecfd0b520cb6670eac4be63e1a92c54ff9018ee4ef9cf90b1e29d052cb6076ccbb163348b99113fd2e0d9155436129f91 SHA512 92e5c3238d4544583ed8ab989d598275e729e7795b0d645a822ca7cdb5be9fe419fba3a7f2d8db11393ce03ac02873ee876ae55f959609f0a6f4b4f1273a7929
DIST rust-1.67.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 95c5e4829068b02c16f7e8e38b2d94a4f913bbd77b226d1c83c8cdc7ef198192b76ff67dc86f7978dd1b9cbb14bb627dc106fc2921a501c340f7d0442629f8e6 SHA512 32be92455ccb54328d1f62381501009e8dbe15f1b4f83e99a894bf5e7eb469a23aeeb3ef440be1ee798e00bfe865ec21d2dd6b2c58a475e1ec789425e53bd356
+DIST rust-1.67.1-mips64el-unknown-linux-gnuabi64.tar.xz 197223484 BLAKE2B 7130399156aab2972b680ef6a00337f9c33c1491648059d6705073c1990d959c21bbad55cb3de8bc7eec7a6163eb5b62b98e0ef5d8566434c356a3f1971bac48 SHA512 f77536697a3a24b03e3de54da00e0bf28b3506af1d20976256f3a0785c2b9acb745c7ce70a60c5e39c3ac728a57c018bc67cf0fc97f92b680b73e18f8e76e034
+DIST rust-1.67.1-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 1972af2185453d079e993f46ec45a7caf5926c079c205c992d2536d6b09a57e6a3f9442e422481307c0adb01ba896051ade0f1fe0eeccc4761fbcf6748540c39 SHA512 7ae033e29054154a9e735274e2b4f4c6ae8f5bbf1ab2138124130b53191ecede373948955fd2a0cb771ac3e596d416c4d38e362f295c38451b039dc3a55ae266
DIST rust-1.67.1-mipsel-unknown-linux-gnu.tar.xz 199598332 BLAKE2B b894bef4c2f847a26be0badc6d069fad636f0cf1286a1643b876709ff292bfe3a2307f1a2904bf6e0c596c13dccd91baba0e0c4fcb45a7cfb71e555207a61292 SHA512 9574f8f078deae22bcdbeb89c7aaf1c26a49fb61cd9a7d777421497b85c243fdcbad8c25d1a80aab4ae0b03f6849628318371dc323e27e308c85ac556e2d649f
DIST rust-1.67.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B dac540a5283281c495e4cc629e7d81279c55db4fce3191af55e88cfcb857a0f86eebeff9a0b8ba95d4da4654c5b11c0fb5364db876a4464b799499285f0184a0 SHA512 ccc990923cb5b73391b09e8c7f4479998bb378b07ee12b5a83d6fbe6044f6925429590a116a944163a2d8f7f6a210b6f2302cb5976a99174e012b7646d7cef5c
DIST rust-1.67.1-powerpc-unknown-linux-gnu.tar.xz 222275832 BLAKE2B e63426d9441a601044d8f0cc8f181bafa7f47bce972518676913d506be5566654e0afe84d63ad0c3a31596231b0a1a10c96e9246fca9bd2b0438f9d72613fc9d SHA512 66fab7b5679bfe59f12dfc5b863196c2cb0b5d0f53d0bd88700586a90a6e8ad4c986fb44979b4320e74ed8b9e4c62b4ab2b3e64e44254355577fc9d1e6b688e4
@@ -142,6 +150,8 @@ DIST rust-1.68.2-mips-unknown-linux-gnu.tar.xz 194817776 BLAKE2B 23583f6a3679518
DIST rust-1.68.2-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9b57cdf81a81780f78ba6f3d13f917bacb35e01966c87cc07f08cd852a1473fec35d115c7951fd41367e465bd90ab90e7ca019e5edf61a92318d6bb2e9c76c2b SHA512 f87a10c3f2e457f8776d51a3fb80aadbf32e95e169b4c5b494d6f6f28164d970c2a82750dd352a574376b827a8ba741705fc8891b25f24744bc9e0572be30f21
DIST rust-1.68.2-mips64-unknown-linux-gnuabi64.tar.xz 193006892 BLAKE2B 672f8ff8d8da0fd50565ca96263f97b9fa6fae754a35b8eec98ac82310fb5531f76f15ad141f8f78e6f8c94c96bd849b3f47983305386264aab87e724b3ff5d3 SHA512 c007dcaf7dafba7f927b717e140cb161dea7810aa358580b543db59066ff655b600177df211f120db34267444237d2cd7e56d666d813a06507638227f0278b7d
DIST rust-1.68.2-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B f409f4a07a4c3d341a621433892c5d272896061d7b1dc585fcf3f81caec108164634720ebc40f53df82007ec3dbc7af695c34659c3f2c62241ccc12cd2fd732a SHA512 a3edacb8f7daa8578cc9461eb443918477295a04e55845451a98645575132758b8f6232cfcd18d03421b84b9d2ebee4bf52c58339b47a1cbc02435d65462404d
+DIST rust-1.68.2-mips64el-unknown-linux-gnuabi64.tar.xz 197892024 BLAKE2B 1ab3293d37fafb39f265d2000832b75b4961db19a616a567204448bbbd9c5cb1987e94f557e6c002032fc1e121efeec9cf2fd91579493acf57c24972d5184965 SHA512 fbfebd7d3ccc174397b6724b42f4554bc51149bb4774ccc333eaf1652413d972ba360bfc342b8afc402d77296fc4d429950446bcf570cfd0a96606ac672782e0
+DIST rust-1.68.2-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 5c8942be4e2fc20abcee92e1d1599daeedc3d0333216127a9c0791287dbf555d62ad1da5e69541abe4fa80deaa4195a508bd4d6228b67673c97e35586db8e82b SHA512 1ab78418a2a6bc1af4e9ac76bdbc9e6ed1baa793ab0c61b5b17b0856dfbf0085d10990e8254db42c45f635285e722f065e49ff4ceb24a601ac3cdf3ff313a269
DIST rust-1.68.2-mipsel-unknown-linux-gnu.tar.xz 200273160 BLAKE2B 49800150c3ef7dd8cabe97d0e2a6af2de45bab8d5e7f03791d1acae8caf066d6393c56344136e8cd7867ac0756606e82ab3a1390b25bba038ab940a4ba403c82 SHA512 73985bf7ff96bf13a29f84d8a1daf93e1547548697ef79a601808e5d10a31cf813d724b8e3d3872da5e719b35298563843fa1e7b69021655b898e732d95cfce5
DIST rust-1.68.2-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5090f375f6638eff5af4d2b8ed3ae4dc274378548aa8336ee0458383a8e28f566329eeb5e4b11ecb7c2b0bcd2bf974f0fb0c073712ba5dc6daec73a1f07181f2 SHA512 69089eefd8c20ccc508527225710b1b7122dc2dd887ed43d18ace4df888d0dcb7d2981eff89115d06eca5607593ce22246a4cace4139e88da0882b8d1d3b2e67
DIST rust-1.68.2-powerpc-unknown-linux-gnu.tar.xz 220703376 BLAKE2B 05e7d9bbd4359376a568b4f9cabae340edb002e96713f9c5bd6b4e12c42fd947e53c1ece1cf9dfcb004489aa4c3f72d3c8a689df3c137b8ab362e536d62f2bcd SHA512 1fd9b3a58581a10dbbd01522cf3f5c1dedea91c283aacace3b1c2eab1460cd3141d1b817c8cf60e6488872777919b6723129315add84bd6e8b98d12e53a45419
@@ -174,6 +184,8 @@ DIST rust-1.69.0-mips-unknown-linux-gnu.tar.xz 151257112 BLAKE2B 098ec6973981845
DIST rust-1.69.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f39075809e42bc83d2be8057095f4cb95bed16a63a9d10f898ba878852f2b4f25fb734a34510be506b0efafe39d450719d5f59a5f4c52bea6f6d5299993c0526 SHA512 ccf22fe8ee696b7402ec0afa9a5564d514ce423fc62220eb3429d366e5c526786d82919ce4740a9d0af61b1fccf457dc2bd4328d863820918614e8edd4c21c1c
DIST rust-1.69.0-mips64-unknown-linux-gnuabi64.tar.xz 149208900 BLAKE2B e68ebbd8ed27384097d1a847a51e7f60c5ef353b21b1c595ac7398762699117f24d43bd8f968b4f8ce48da9646f818d4252e13dcb2c68dc8ad976318a65e033f SHA512 b26304ebaf78655cf5c7966473f9d65c2c969ce61109d3fcaa852ec09de11eedb144a55feaf19695387ff82aa604aeefc20ef59f315bde56bbaa66303432cb6b
DIST rust-1.69.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 219cdecb36deabaf099c09e665fb44f44dd16a49097f4bc101c9d5201f21e6f0ba91ee4751b8d336929d7a270cbf4d58ea48827f80a3c3c74003addfe2b2974e SHA512 aa866c1caac3b35ae1d3b846db7a92dc2c826de4b3671bf7cd3c0fb21f6aba68adfeee843fb351284c3cf816dfae8faef165b12f1821b2d63efd37c149b2eeed
+DIST rust-1.69.0-mips64el-unknown-linux-gnuabi64.tar.xz 152863108 BLAKE2B f5a34e4f38720e670c0b518cfbd790fc8a49c3a118961147b1f3cbd2945f806329b1faca39d0fa64906d78a165306d7e782cfab35e718faa2a9cdda9802d95c2 SHA512 b236bf8d57e6a3df4b4f6c618a5b4df9545579fa34938f0c14d10a189b92ded98726cfa60a5a0b066e7fe6cf8a775af83c2ac44d45ec1e180ba65dd040368617
+DIST rust-1.69.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B a1e090aabcf732168139dde571fe014946c5eef8a38a9b75bcb13f23edac4e03b84a6524d49177daf5bc7ff4e916fdc4bdf4a55070263bd619602a04d1440f7a SHA512 d27667f2c16ebbd218e20ce686e7a3c3eae93e27694ee317b4c50ddcc70350d5ed038b217088ec84c9c5c5b93ae32c46981926bf9f90fd2e5c2bb32437b0d5d9
DIST rust-1.69.0-mipsel-unknown-linux-gnu.tar.xz 154656916 BLAKE2B d3c20130eecee206cca2c017f30e842b155cb4774129790347c6ae11276ff12dc31e6636a7c82e8064129d68bac275141c652a25234b157658d053162f28b4b9 SHA512 dad06c90b20d9f343a87dccfd9379c7fa8a914eccd77bb4e6f3a6f322e165db25001c13f78dee85055b7aea29b01f72f7cc1602a39ea911183ffd768c7e601da
DIST rust-1.69.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4d5b46911d51b7fd1494318552b43bfe7448566fb0870229d90f0a237a863f3638a1b1b455c17016021f5b1d94acbe7ac048e71f7a1894cdd6b318431c64a6e2 SHA512 d089842013c4054c74929a4ad4d1cf6362b32e87a4bb5cf3613b260110d7fef69209605795d97484c8fd34287297ec70d6826d19693417cc9ac56b24079fc29b
DIST rust-1.69.0-powerpc-unknown-linux-gnu.tar.xz 168723248 BLAKE2B b39871cac143d16565e777301ec17d41fc9887c7355c5c2b97c969c87910ece8531cb11ada056b6c94977ad3db81fb9304308065e07be570ecbcecd8529e64be SHA512 9211aa19c792ae12cfeb646a214761b3c2b012b33402a6b881b2d8bbf12a5da1f528b2b9adeeb42afcf18eb5161d430e9dd08ff96e3f048f5e6ae94a7abcdfbc
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index d5358fd..265bf15 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -41,7 +41,7 @@ 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 rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index b6b78cb..a3baedb 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
diff --git a/dev-lang/rust/rust-1.67.1-r1.ebuild b/dev-lang/rust/rust-1.67.1-r1.ebuild
index 5f0a5fa..72c5fa7 100644
--- a/dev-lang/rust/rust-1.67.1-r1.ebuild
+++ b/dev-lang/rust/rust-1.67.1-r1.ebuild
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index dce265f..17586be 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index 302f049..3065a01 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index 93a18a2..29201cd 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.ebuild
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-06-28 1:12 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-06-28 1:12 UTC (permalink / raw
To: gentoo-commits
commit: c618e59d7edaa9d85c0bee06655437f6e17ae421
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Jun 28 00:38:51 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Jun 28 00:38:51 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c618e59d
dev-lang/rust: merge ::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.65.0.ebuild | 2 +-
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
dev-lang/rust/rust-1.67.1-r1.ebuild | 2 +-
dev-lang/rust/rust-1.68.2.ebuild | 2 +-
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
dev-lang/rust/rust-1.70.0.ebuild | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index 7298d0d..d5358fd 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -315,7 +315,7 @@ src_prepare() {
}
src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index 075deb9..b6b78cb 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -313,7 +313,7 @@ src_prepare() {
}
src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags
diff --git a/dev-lang/rust/rust-1.67.1-r1.ebuild b/dev-lang/rust/rust-1.67.1-r1.ebuild
index 47c408f..5f0a5fa 100644
--- a/dev-lang/rust/rust-1.67.1-r1.ebuild
+++ b/dev-lang/rust/rust-1.67.1-r1.ebuild
@@ -304,7 +304,7 @@ src_prepare() {
}
src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index 189e360..dce265f 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -303,7 +303,7 @@ src_prepare() {
}
src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index d373484..302f049 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -303,7 +303,7 @@ src_prepare() {
}
src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index 7ff87e6..93a18a2 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.ebuild
@@ -301,7 +301,7 @@ src_prepare() {
}
src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-06-14 14:41 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-06-14 14:41 UTC (permalink / raw
To: gentoo-commits
commit: a9cdd1116e7720be024086708dd2c47efcc62620
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Jun 14 13:55:18 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Jun 14 13:55:18 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a9cdd111
dev-lang/rust: drop 1.68.1
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 2 -
dev-lang/rust/rust-1.68.1.ebuild | 749 ---------------------------------------
2 files changed, 751 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index ab34a95..1ec6410 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -196,8 +196,6 @@ DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac461
DIST rustc-1.66.1-src.tar.xz.asc 801 BLAKE2B 18e27c88b39eed29147854733c5533b7fffc417ff0b3bd5982174ffa2c5f6d217e2e28ced4da75863a4557800e7ad7a124a4bbb0def4c20da7ed543602185941 SHA512 4511f41ad3d098a339ea3173e3ffa692d1d3cd3ec9dd45af68e4491471f9a72a2e866f6924090eb366bdf6f856650d981eabe1cd851843a17f4a6e4f1dfbc8a9
DIST rustc-1.67.1-src.tar.xz 142758844 BLAKE2B 55b2a98592b1a2e465b7fb224607cbcb23cb13d5053b51abbd2e45428794f457b6925955c5c562f577830353e5287929b3588ee78a30036bf0ca13a3610316d9 SHA512 42d77ee93b168ae139b026138fb48d925624ff436a836aa97ee235f870e61ea11643b0cf7ad20bcafda774c6cd3855a4bc10a2e2ed1c4d82c6f15158963b304d
DIST rustc-1.67.1-src.tar.xz.asc 801 BLAKE2B eb507c6f53c592921eb31cccb17c9d6027c67fb1311726f2d25fe7d1f8a1aa051efb99d7207a5e4477df0b75898783437e653fa041ed7daa27e7a7c4263ec230 SHA512 6c962f680d74251b55f77a43d6e383be53bacff8428e0d003bda207de1fea7f716b88f16686d22a88d99518a4834bf299731855fb030477a995d5e1f3d0024f4
-DIST rustc-1.68.1-src.tar.xz 147834548 BLAKE2B 98e02c1ff3ed37cd52d1f348331ffe007583f078fbd1bc581eb32a098eee816f301cd833ecf9f806b8e0c673aa963b34d2e357c089bdb59a8a7464ab46b18307 SHA512 cf3921bc260db54b0f3afc0e6bc9fe8d560ddb81de5d2d4496746307d42a8010291f119d0cfc463996efce6ef829a0494b4eb6145e21c94fd113ff51ee010e21
-DIST rustc-1.68.1-src.tar.xz.asc 801 BLAKE2B 5e0a2d95360fb5d8bed9e759111db225315b93d3042af19bb9fc9f239cabf9f32b85f2e616913ff3ce5fc8111deeb972bc184584ca473216b7a5320a255304a6 SHA512 5330405c09077070a63c04fc1c7059219d046fbaa24997861365199e48da98be4fe2a04fdc5c54a03166097bde58b4e51bdc8296ca89974d2dcec1da279bdab2
DIST rustc-1.68.2-src.tar.xz 147835648 BLAKE2B 4b6deab818d915afe67a96f4d32a758c15a832041a77d9da5d065a903ea2718e0e7ebbc0cd1baaa436b655bdb93a62e0fb76f9e37aed595c064e0857201bb091 SHA512 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3
DIST rustc-1.68.2-src.tar.xz.asc 801 BLAKE2B 6ac2444950e5f919d09823ea3eef50364ad7b295126b090178872970f03c43ca9747779e0873138ca3a0b753eff79d2ef36d8b70c6a6050039ba9f9018571016 SHA512 86ccbb8ea89f820ba92ad9cbfb8f4bda3393e2c24d699355fd559a2339ff39bcce2a027ebd1b043f11de24b00cdac8c42d252915b36e711eb1d80f49a8007d47
DIST rustc-1.69.0-src.tar.xz 127242864 BLAKE2B 03f7f3784cb137bede0593dfc008347bb0bb25c982c058175ac2b0442c2593a5a7e2c4539c848ad4375d994c1b7900019120790f0fe12385b413eecc1647d70a SHA512 724398fc208ec18adbd8ba81a445e23d1001b746990f36b869126be8a45f1cdfa75f5b9cbdd0abbab506f91a56d3736ab247677699ebd69525245558cfc01a60
diff --git a/dev-lang/rust/rust-1.68.1.ebuild b/dev-lang/rust/rust-1.68.1.ebuild
deleted file mode 100644
index b96d6a3..0000000
--- a/dev-lang/rust/rust-1.68.1.ebuild
+++ /dev/null
@@ -1,749 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-
-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 BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 15 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
- wasm? ( sys-devel/lld:${_s} )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
-RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
-RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-"${RUST_DEP_PREV}"
- =dev-lang/rust-bin-"${RUST_DEP_PREV}"
- =dev-lang/rust-"${RUST_DEP_CURR}"
- =dev-lang/rust-bin-"${RUST_DEP_CURR}"
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- >=dev-util/cmake-3.13.4
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( sec-keys/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- system-llvm? (
- ${LLVM_DEPEND}
- llvm-libunwind? ( sys-libs/llvm-libunwind:= )
- )
- !system-llvm? (
- !llvm-libunwind? (
- elibc_musl? ( sys-libs/libunwind:= )
- )
- )
-"
-
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- sys-apps/lsb-release
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warning
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_PRESTRIPPED="
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
-"
-
-# An rmeta file is custom binary format that contains the metadata for the crate.
-# rmeta files do not support linking, since they do not contain compiled object files.
-# so we can safely silence the warning for this QA check.
-QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
-
-PATCHES=(
- "${FILESDIR}"/1.64.0-libressl.patch
- "${FILESDIR}"/1.68.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
- "${FILESDIR}"/1.67.0-doc-wasm.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 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- # this libressl version check is terrible
- sed -e 's/d397af804c0b786978867528635fa9148cd2ad0e6abd591ace21b5bd3719c38d/896afea18b1072d4c715421ff2ed7e428b57aadec44d4680dcb991a6229a1edc/' \
- -i vendor/openssl-sys/.cargo-checksum.json || die
- # fix for libressl
- sed -e 's/7d5ca02f34cffe51db3568c500c9a8a70cef879871a0f466e3344142644acf12/e9eef35f1c18dd9844960d1d315e84ad99a05ab1247f0f54e3c2eab244988256/' \
- -i vendor/libssh2-sys/.cargo-checksum.json || die
-
- default
-}
-
-src_configure() {
- filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
-
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets+=",\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools='"cargo"'
- use clippy && tools+=',"clippy"'
- use miri && tools+=',"miri"'
- use profiler && tools+=',"rust-demangler"'
- use rustfmt && tools+=',"rustfmt"'
- use rust-analyzer && tools+=',"rust-analyzer","analysis"'
- use rust-src && tools+=',"src"'
-
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
- # in case of prefix it will be already prefixed, as --print sysroot returns full path
- [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
-
- rust_target="$(rust_abi)"
-
- local cm_btype="$(usex debug DEBUG RELEASE)"
- cat <<- _EOF_ > "${S}"/config.toml
- changelog-seen = 2
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- $(if is_libcxx_linked; then
- # https://bugs.gentoo.org/732632
- echo "use-libcxx = true"
- echo "static-libstdcpp = false"
- fi)
- $(case "${rust_target}" in
- i586-*-linux-*)
- # https://github.com/rust-lang/rust/issues/93059
- echo 'cflags = "-fcf-protection=none"'
- echo 'cxxflags = "-fcf-protection=none"'
- echo 'ldflags = "-fcf-protection=none"'
- ;;
- *)
- ;;
- esac)
- [llvm.build-config]
- CMAKE_VERBOSE_MAKEFILE = "ON"
- CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
- CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
- CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
- CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
- [build]
- build-stage = 2
- test-stage = 2
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = $(toml_usex profiler)
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debug-assertions-std = $(toml_usex debug)
- debuginfo-level = $(usex debug 2 0)
- debuginfo-level-rustc = $(usex debug 2 0)
- debuginfo-level-std = $(usex debug 2 0)
- debuginfo-level-tools = $(usex debug 2 0)
- debuginfo-level-tests = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- compression-formats = ["xz"]
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- export CFLAGS_${rust_target//-/_}="${arch_cflags}"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- ar = "$(tc-getAR)"
- cc = "$(tc-getCC)"
- cxx = "$(tc-getCXX)"
- linker = "$(tc-getCC)"
- ranlib = "$(tc-getRANLIB)"
- llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- # but we patch it and set to false here as well
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
- profiler = false
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- ar = "${cross_toolchain}-ar"
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ranlib = "${cross_toolchain}-ranlib"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
- echo
- echo RUSTFLAGS="\"${RUSTFLAGS}\""
- echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
- echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
- echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
- env | grep "CARGO_TARGET_.*_RUSTFLAGS="
- env | grep "CFLAGS_.*"
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use profiler && symlinks+=( rust-demangler )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
- use rust-analyzer && symlinks+=( rust-analyzer )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use profiler; then
- echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
- if use rust-analyzer; then
- echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-
- if use dist; then
- insinto "/usr/lib/${PN}/${PV}/dist"
- doins -r "${S}/build/dist/."
- fi
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-06-09 16:23 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-06-09 16:23 UTC (permalink / raw
To: gentoo-commits
commit: 8459e0babba34682976393506974946d95599758
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Jun 9 16:22:30 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Jun 9 16:22:30 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=8459e0ba
dev-lang/rust: keyword 1.70.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.70.0.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index 703751a..7ff87e6 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-06-08 18:29 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-06-08 18:29 UTC (permalink / raw
To: gentoo-commits
commit: b9fada99b23853b619a2834e233709850695869c
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Jun 8 18:14:12 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Thu Jun 8 18:14:12 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=b9fada99
dev-lang/rust: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.65.0.ebuild | 2 +-
dev-lang/rust/rust-1.66.1.ebuild | 1 +
dev-lang/rust/rust-1.67.1.ebuild | 1 +
dev-lang/rust/rust-1.68.2.ebuild | 1 +
dev-lang/rust/rust-1.69.0-r1.ebuild | 3 ++-
dev-lang/rust/rust-1.70.0.ebuild | 3 ++-
6 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index c291423..7298d0d 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -126,7 +126,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
- rust-analyzer? ( !wasm )
+ rust-analyzer? ( !wasm rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index cb9dc09..075deb9 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -124,6 +124,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
diff --git a/dev-lang/rust/rust-1.67.1.ebuild b/dev-lang/rust/rust-1.67.1.ebuild
index e832848..a01dae1 100644
--- a/dev-lang/rust/rust-1.67.1.ebuild
+++ b/dev-lang/rust/rust-1.67.1.ebuild
@@ -124,6 +124,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
index b96d6a3..189e360 100644
--- a/dev-lang/rust/rust-1.68.2.ebuild
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -124,6 +124,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index fb64bf4..d373484 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.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 ~ppc ~ppc64 ~riscv ~sparc x86"
+ KEYWORDS="amd64 arm arm64 ~mips ~ppc ppc64 ~riscv ~sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
@@ -124,6 +124,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
diff --git a/dev-lang/rust/rust-1.70.0.ebuild b/dev-lang/rust/rust-1.70.0.ebuild
index 4224051..703751a 100644
--- a/dev-lang/rust/rust-1.70.0.ebuild
+++ b/dev-lang/rust/rust-1.70.0.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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ # KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -124,6 +124,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-06-05 0:17 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-06-05 0:17 UTC (permalink / raw
To: gentoo-commits
commit: 8b091d27be1c8c47dda14c1746e6cc8f28986313
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Jun 5 00:17:18 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Jun 5 00:17:18 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=8b091d27
dev-lang/rust: stabilize 1.69.0-r1 for amd64, arm, arm64, x86
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/rust-1.69.0-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.69.0-r1.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
index 8b3df2a..fb64bf4 100644
--- a/dev-lang/rust/rust-1.69.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.69.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 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-04-25 1:29 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-04-25 1:29 UTC (permalink / raw
To: gentoo-commits
commit: bf02b61806f155e14b489a5367c16d13619e861a
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Apr 25 00:58:12 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Apr 25 00:58:12 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=bf02b618
dev-lang/rust: add 1.69.0-r1, drop 1.69.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/{rust-1.69.0.ebuild => rust-1.69.0-r1.ebuild} | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dev-lang/rust/rust-1.69.0.ebuild b/dev-lang/rust/rust-1.69.0-r1.ebuild
similarity index 99%
rename from dev-lang/rust/rust-1.69.0.ebuild
rename to dev-lang/rust/rust-1.69.0-r1.ebuild
index 2987458..8b3df2a 100644
--- a/dev-lang/rust/rust-1.69.0.ebuild
+++ b/dev-lang/rust/rust-1.69.0-r1.ebuild
@@ -320,12 +320,13 @@ src_configure() {
fi
rust_targets="${rust_targets#,}"
- local tools='"cargo"'
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
use clippy && tools+=',"clippy"'
use miri && tools+=',"miri"'
use profiler && tools+=',"rust-demangler"'
use rustfmt && tools+=',"rustfmt"'
- use rust-analyzer && tools+=',"rust-analyzer","analysis"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
use rust-src && tools+=',"src"'
local rust_stage0_root
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-04-21 3:48 orbea
0 siblings, 0 replies; 70+ messages in thread
From: orbea @ 2023-04-21 3:48 UTC (permalink / raw
To: gentoo-commits
commit: d8bfe5988bef40f7bc54f7f21bcae519ba7b9753
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Apr 21 03:46:53 2023 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Apr 21 03:46:53 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=d8bfe598
dev-lang/rust: add 1.69.0
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-lang/rust/Manifest | 34 ++
dev-lang/rust/rust-1.69.0.ebuild | 749 +++++++++++++++++++++++++++++++++++++++
2 files changed, 783 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 67f681f..391a113 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -126,6 +126,38 @@ DIST rust-1.67.1-x86_64-unknown-linux-gnu.tar.xz 186714164 BLAKE2B 648efbb302333
DIST rust-1.67.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 669b7c4b0d5382a7d1d0fe49405f2798f67a9e745711dc2c8e7548ea6fdc8f0fefdab37d0594aec14b2745ce45e7c469e79c0cb1d86077ad9c7b6aafc2656827 SHA512 067681cb4140a29adfa5f4b141e2f3450dad34b95a1e549a6bc8d759e57da5d2ae69cc165efcdef9d83e2eee06edb6acd587d38c9b2f3d000d7a3f79daccc671
DIST rust-1.67.1-x86_64-unknown-linux-musl.tar.xz 269831452 BLAKE2B a36498528454f1bf0e1812eba005f27e3e281e4e2c117477785f5e48468c3fe316947b7e4360f573f0f4cd6f117e4102db8aeaa616be5bef09fb7518fd230b23 SHA512 9a3eb67239a88b875fe55846a2fffbbb1f2a4cc8eed18b5558f0f989d544a8ddfe0861d5b2b860a779833a1660ee622b30320ec9ef83e841724f7a32f08fda06
DIST rust-1.67.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b12d0ce1136e355ee027780dfe185ee443de402e531ecc743600aecf081990d4e998fa4a6e6f0f46a886cd806918e23c5e4ccb7cecb0324cb67189984192283f SHA512 37428f0d1d8e2ddb7ce52bce3a297a7f666789d00e7e240180c3e1f7fb5b30bf5e17593cbedebdef95c50406ee82d40ef1f75a576a1a0e02387e1a12ed977c77
+DIST rust-1.68.2-aarch64-unknown-linux-gnu.tar.xz 257441012 BLAKE2B 621615e68cfffb46552577a9e30e863518fa37f53bb8e00bc639f048d7f05910fd31473ca00242a83b3dafd96db73a19648e0b11641f26ccfaaca5ed17abb2b8 SHA512 77fabd0ff2a4e7df8142663932ca146c7f5b463cc7f1d4c2b3ca1c862c29f746a0ca77eff6d37fe582aa4c2cb2c007a1e5d0a1c0214caf1b0792b14934f693aa
+DIST rust-1.68.2-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B eeba8414c9bf414f9a6de46045f9e49ab1a6436c30fcce989aedd2c0658557336f9e919b0372f33fcf11ff3fe64ab9ede54fb9d6e6f4ae8504a6b9401a6f7933 SHA512 f2edefb84d75653d3f107349f3962983ff56cc6538c75b8b00e25e790a51e19be10848906ccb90b80bf7742fca2dfa3bfdc4ce974aae6130c7dd71905c9bbbad
+DIST rust-1.68.2-aarch64-unknown-linux-musl.tar.xz 235749524 BLAKE2B fc90040069f265d781d73f46bccff8df773830d2d178205126f7a1e67b5c22ca0d87dfeb47f46370522c758804e26fe29cdad29706045bd07404685afc2f77c3 SHA512 fceddcdb17f618c576b74590067f9cd476133e86b9c22079400de98489247aba07e12987f29c043067daf1f86e240d8990f0c02b7d58e647d75d8fe82d3229f5
+DIST rust-1.68.2-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 14e072f897ceb80afc01c9bd531f3f85c9b5dffdfe9a0d6e9a41d9c6f5177427afb0a97916385b480594eee4a787184d9d66d05863d0c6885ab1bb0e37a224c6 SHA512 05c42ebcd370782ec5eaeca05fbb5da929eb2f555a8f3e68f622d153f0076cebf7eb78151e95b02e7959b431a7cee670033a172a5eb77116c802e68c20ee622e
+DIST rust-1.68.2-arm-unknown-linux-gnueabi.tar.xz 213433720 BLAKE2B 29d1040c4f553a52b996720b37d26f76f21f7cefb8152eb50166668bf2b380c0e3202e9d6e2643846fdb957b25d4d07f50be4c41d0055c8d7f2bfcb4f5a4a5bf SHA512 851efffc3b47237f1516198c7dd6ea23d432126854707fcc5e23b7de0d8e149d34b53aafa6af7ad2bdee8d45e61c4771fdc96867635aa8ce2f76fe14e450ed2b
+DIST rust-1.68.2-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 7f36e95ed463f260db65f50e0b469789007436f4bf560573a5ca0d6e1c23c99b62a361b98c6c5fa6a7c4056007ef2427f7fd61a501f73750470626a5b70db473 SHA512 6dcea7816a2be7292bcd1ffc50bb11db9803bc5d93207be99c03089d324bb527f117106f55b215069bbb5e84806beb30073d226e2cc6d257402b073b6561ed18
+DIST rust-1.68.2-arm-unknown-linux-gnueabihf.tar.xz 214517972 BLAKE2B 76fb64798cc6e7a1c9c6334e6cef0ab18c72f2c00c0399e55f9344565c0fcd19941eabafadc46351cc4fd940fd5b0c199754621614fa72b9d6d0c1d3286b3dc0 SHA512 d66922d4d2260ecc66e8de5863b946609e7452f8c76585e7399d1c08865f273bd2a6d2037ad36fd2c02ab7c3010f1e84d252adadca2a9662d16a8f70b920c7ba
+DIST rust-1.68.2-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B ca3a22fceb130eb57a6b645fa5e9697044cbb6a09365c73a31410dd734cfe81fb79b2c2e706435e483f12436bf77dad26d22e9a92f0d8bb2e7c084a0324dc5c8 SHA512 4b630cd85b773f0105d14702fbb8e6ec83d97f73a0cd3e06fec92fcea5806f7ee44d4c83d50f181d8d87a64416f5a79eb1cbee7ffedb1934ab1716ee7812f8ce
+DIST rust-1.68.2-armv7-unknown-linux-gnueabihf.tar.xz 218111640 BLAKE2B 13a22fdc55de06c0f4172aa34fda616596cac9bf80a9da9aaed5be9ac44d559e682e3f352a72a8beebb7eee6c0d2c561575f73f28436606e84857b9ed2af48c1 SHA512 a1855a420ca87d72c50465c282236f42ad1ccffbc746f5dcd0f7abc908fcde512228fcc80fc1babaa7ba10ce9f1d841e3eaf577e892644a1260cff110e2e5327
+DIST rust-1.68.2-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e2db4662c03f7e419f190eefd1334b0d59b768d670376810246e186ce6f9041b103c72946c35d3c459b194962f06c9120d239aeb0988dbd54dee698b2bf304a2 SHA512 5a700f246674136a42884f9888b6a625578fa07d238764d8f72a0092ab1e3b0f4afcbd8e35b5a4a91389fcd181278563cbb694a60d779a272951948487c811bc
+DIST rust-1.68.2-i686-unknown-linux-gnu.tar.xz 234323888 BLAKE2B 71cda528925d6b3200c9e1c5350f276cb653c727186f1ce235f82aff9cf65f28dad01f221b46c32825222cbf59605f4011d9e4c2324bdb06d3f57cdba80391b6 SHA512 f804b8327d6811a88884d928f77325645da1de0fa2b957f3cde3658474e720015ddadb5d38229d62bb46469df4d7c54511f774289157910e07cce51bd6685059
+DIST rust-1.68.2-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B aad0ddb4ea4a9d0a886e1682a255e994ebf24e2a75c54b92a00a511e4334625acc55d4ea0556d5e3bbe82f45d8013a4631d43f81d829f592dda05667719aa0fc SHA512 549f10d92a47edb2b3fdf20f7c4567315f5910f3cb66edc5ba3f61a25d1840778ff971f275511169f748bfbbe7f485214cb172faecbd572992e4ff645a8f35e5
+DIST rust-1.68.2-mips-unknown-linux-gnu.tar.xz 194817776 BLAKE2B 23583f6a367951823c335e15df9655402cc75db4a04685ba398fee58d6bfda86ae8fbefc4af7adc363b6f2011a025086f200a9c0afe156c2fe508f717e0fbdbf SHA512 6d981882a9e07c0d7662a442869c2961251db1ed8bf222ddf3e7079479af72c188dffb1418252230ab7f1b2a9e1e11a5aa6f8b9f59b2fb4ac9f71c163b8614d6
+DIST rust-1.68.2-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9b57cdf81a81780f78ba6f3d13f917bacb35e01966c87cc07f08cd852a1473fec35d115c7951fd41367e465bd90ab90e7ca019e5edf61a92318d6bb2e9c76c2b SHA512 f87a10c3f2e457f8776d51a3fb80aadbf32e95e169b4c5b494d6f6f28164d970c2a82750dd352a574376b827a8ba741705fc8891b25f24744bc9e0572be30f21
+DIST rust-1.68.2-mips64-unknown-linux-gnuabi64.tar.xz 193006892 BLAKE2B 672f8ff8d8da0fd50565ca96263f97b9fa6fae754a35b8eec98ac82310fb5531f76f15ad141f8f78e6f8c94c96bd849b3f47983305386264aab87e724b3ff5d3 SHA512 c007dcaf7dafba7f927b717e140cb161dea7810aa358580b543db59066ff655b600177df211f120db34267444237d2cd7e56d666d813a06507638227f0278b7d
+DIST rust-1.68.2-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B f409f4a07a4c3d341a621433892c5d272896061d7b1dc585fcf3f81caec108164634720ebc40f53df82007ec3dbc7af695c34659c3f2c62241ccc12cd2fd732a SHA512 a3edacb8f7daa8578cc9461eb443918477295a04e55845451a98645575132758b8f6232cfcd18d03421b84b9d2ebee4bf52c58339b47a1cbc02435d65462404d
+DIST rust-1.68.2-mipsel-unknown-linux-gnu.tar.xz 200273160 BLAKE2B 49800150c3ef7dd8cabe97d0e2a6af2de45bab8d5e7f03791d1acae8caf066d6393c56344136e8cd7867ac0756606e82ab3a1390b25bba038ab940a4ba403c82 SHA512 73985bf7ff96bf13a29f84d8a1daf93e1547548697ef79a601808e5d10a31cf813d724b8e3d3872da5e719b35298563843fa1e7b69021655b898e732d95cfce5
+DIST rust-1.68.2-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5090f375f6638eff5af4d2b8ed3ae4dc274378548aa8336ee0458383a8e28f566329eeb5e4b11ecb7c2b0bcd2bf974f0fb0c073712ba5dc6daec73a1f07181f2 SHA512 69089eefd8c20ccc508527225710b1b7122dc2dd887ed43d18ace4df888d0dcb7d2981eff89115d06eca5607593ce22246a4cace4139e88da0882b8d1d3b2e67
+DIST rust-1.68.2-powerpc-unknown-linux-gnu.tar.xz 220703376 BLAKE2B 05e7d9bbd4359376a568b4f9cabae340edb002e96713f9c5bd6b4e12c42fd947e53c1ece1cf9dfcb004489aa4c3f72d3c8a689df3c137b8ab362e536d62f2bcd SHA512 1fd9b3a58581a10dbbd01522cf3f5c1dedea91c283aacace3b1c2eab1460cd3141d1b817c8cf60e6488872777919b6723129315add84bd6e8b98d12e53a45419
+DIST rust-1.68.2-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fee49ea534e0f48b4613ac4cb4d62687bdaf48261fbf9237a3ead0fcfbf144dd3c2f5c500465f31e1ff358494a8251fe45045ffd3305bb99e5eb7fb3da635350 SHA512 426d61a3655167de5639432ef635e69e551c514d4105df208ce10dfa27c9ac7f7bcba04302e540cbdfd8fc2953c2a9e5dd7e61c905a2c42a05382df36072afeb
+DIST rust-1.68.2-powerpc64-unknown-linux-gnu.tar.xz 219023868 BLAKE2B f81398dab67be593d968b3f9b1c3d3c3c96670e8e099d31d9d00662e966ed3269bca8fb84f4b2af6182d5ba74ab25a7adca38e11569600e91929fac381252ab8 SHA512 87db3e97fb20f72b24ef114ce79e22e600c2effd2f17b90d91a9b190203edf7c6c73f78f1eb6e6efb999b99ca2397bee1470bcfde7099c7eda6fed7fa2a93deb
+DIST rust-1.68.2-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fc7ec509b4a6d3e607aa6e437a65e61956104b5206a1c452faee393f6dcec6d4823bdb9409918e86adec15132191d0541e5c39c72b49dc4423b58caec64b8b35 SHA512 0c4902853ea0036ad73a93d239b07f771060ea2fc0b38bd71e690551214b36e3fd903d8d57c435b7d1ae867aa78016012d4c04745c0f67c63c3d0b36e560f348
+DIST rust-1.68.2-powerpc64le-unknown-linux-gnu.tar.xz 231072852 BLAKE2B e989fbd54f97605ad33af295a458bab2eeb8866d367965102d2e66cf5dba5a38e9e8c4eae784dd738c70705fa8014561087e1e526508546e7aa393afd55c4307 SHA512 810dd24af733b5493fe37ebb0af59b0fd03587d862e4b63fe9357d0acbbfb8103430a2313d07a2bef7a2c2ffcf0a4f5cf8a8b2c4a1dd1212446ff49ba4fc2a70
+DIST rust-1.68.2-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2e9becc108c2b85601530ceb07ef9103297e0fefc01c7a4302a5c23d083f679372cf7cf1328a429ab6f1b06a29fcb34eecbb33f7d8790ca5a515ecafa7672e74 SHA512 23499a386e87e6a7a9c64f2a00d36f4602fcbbc03b3561afcaa741b29bcb6ceb50a8d040dd012bd1cacec2d8899a5840419e70bee1840de5a027a5a111a64864
+DIST rust-1.68.2-riscv64gc-unknown-linux-gnu.tar.xz 207916672 BLAKE2B 81c09e028d0e68730146daf4e1b50c4cad9a5df37ca5e5f50325a86ed97e6198773b94589e6fde2856d09aadab62aacc1c6362d869968ca3c261775b4958b9f8 SHA512 b532575e7aa7f1ee32109b5beb22f184e81346773edf362a44b24363b38ca10744d96052cee82d1a98c026edb39b6195332922847f184ca3dd8d25a8a5e03fd9
+DIST rust-1.68.2-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 31bb980aa2a6b45e7a51cba0f14ed86674617f2cf8ee0583765d01502bf754f59a0cd960ad50a1e21ea8f6898e83e307d39be1eecc2b3344f5681c1908cfb436 SHA512 66c8a3efd1c579784321f24edcb4113c184516912ad490c9088d2141ac527af85acc64b6c67454661d1a991a710758cbebbfaaac7ae086b463fbdae7d1c89bb0
+DIST rust-1.68.2-s390x-unknown-linux-gnu.tar.xz 234071260 BLAKE2B dbcd38a0503d3e131a7786e11874cf0e3dbca13c5ae7c9b605caec529aae5c498722d2685557be43387e2d2b855892720b6e84021765bebdfeea4a2dbe7502f1 SHA512 00614d53a4d34b4714febfc7c4eb2f92446ba928e8bfde0de537de51474704525456b628b60634f0220278c5d403da55c793a30d744362b181cacb1a9d8fac1b
+DIST rust-1.68.2-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9eb99100e0e61ffa6f031b9f04fbcedccfbecd897e3232c8e192e52b3d5c103f8558de5e23e7eb19487eec890c0fef2c9be952edfdcd2f1a05b5b09d3a0fa82e SHA512 4d36bab880a386e6e70d23682435e1a960be3c88387ffcd955a55ce451acd3d49085b0db05230f874519aef12192eebbbbc26627807a6fa7021c89ff5d82f814
+DIST rust-1.68.2-x86_64-unknown-linux-gnu.tar.xz 185953856 BLAKE2B 11fc1f284c77261d69b2ba582843cbd15f3bde832cfa038764e68711de73c9a86f9e36f69a81606b4d5dcb0f9c0f413c88cb400e17511b980671a246ff63aa2a SHA512 7f3344591be014b86e55c21fab27587b00756aa46a366cde2149fafa36b5dfae29e126f70511b40bfad131a1d4d27c8cf82add3474b69e2c498c7380961a23e5
+DIST rust-1.68.2-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 06f3d90126dfe5dcfb8147c8529f333bf635c5c669cc0b5d45156fed85e87aaaa67d8d9c4b250f77e1f0998e77e5635d3f3056447a032eac07bf847fc532a383 SHA512 1d826f0f8ed896d54139b4ae78205aee5cee3ce6f5449d94b8edb8fc19ab589bde6720eb1644502fc45fe0bd452e2e5209de83c99f7c4285a896cfaacbfdad36
+DIST rust-1.68.2-x86_64-unknown-linux-musl.tar.xz 270073164 BLAKE2B 7d69a578e1d4a8fa75cfea6e630265f1c73cca08ed86ddc7858e7770755431dbf13ddaadcf8035fc2b7d2d7b7144a08b3e3a9fa20afcb5cfed7a31d82098fe5e SHA512 b0294141f1e51176664ae841ea55991826ccd15d0d36b03471831baa202ecb97434bf96479e167772bd62f05b80b49878f89a065a91e00026f0aabe7c02fe552
+DIST rust-1.68.2-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 7de58f292729b349fe0694c724aa88ae5bec5a313952fbf7e62a361c7fba4cdedbd99238a4a826d7b627af30ddf4aca8646f6b061f44983a52dcf2ae8d52e56a SHA512 867e0c20049352fb696b99de9d0d8c5df8da0f1ea8eb9a0446884c2d741df7434bf83303694de208e75e64cd73664b979cf117d02db804bff9b4d6de8ee43638
DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be
DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc
DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac4613b8e3f0092bc0df29c9685f4a4012c0bd1b600911c2d19bcfa8f5a84b8a3c39d4c9e062a62cd61925b59129e1cd72b9 SHA512 1944c024c603140d0a9236043a3bd1d0d211dd8d368d6d82a3a620f1ff43b29624755b0943f2b38b40a188c7eee77a840238ea757eaf435e2a3fa6a0e6b82832
@@ -136,3 +168,5 @@ DIST rustc-1.68.1-src.tar.xz 147834548 BLAKE2B 98e02c1ff3ed37cd52d1f348331ffe007
DIST rustc-1.68.1-src.tar.xz.asc 801 BLAKE2B 5e0a2d95360fb5d8bed9e759111db225315b93d3042af19bb9fc9f239cabf9f32b85f2e616913ff3ce5fc8111deeb972bc184584ca473216b7a5320a255304a6 SHA512 5330405c09077070a63c04fc1c7059219d046fbaa24997861365199e48da98be4fe2a04fdc5c54a03166097bde58b4e51bdc8296ca89974d2dcec1da279bdab2
DIST rustc-1.68.2-src.tar.xz 147835648 BLAKE2B 4b6deab818d915afe67a96f4d32a758c15a832041a77d9da5d065a903ea2718e0e7ebbc0cd1baaa436b655bdb93a62e0fb76f9e37aed595c064e0857201bb091 SHA512 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3
DIST rustc-1.68.2-src.tar.xz.asc 801 BLAKE2B 6ac2444950e5f919d09823ea3eef50364ad7b295126b090178872970f03c43ca9747779e0873138ca3a0b753eff79d2ef36d8b70c6a6050039ba9f9018571016 SHA512 86ccbb8ea89f820ba92ad9cbfb8f4bda3393e2c24d699355fd559a2339ff39bcce2a027ebd1b043f11de24b00cdac8c42d252915b36e711eb1d80f49a8007d47
+DIST rustc-1.69.0-src.tar.xz 127242864 BLAKE2B 03f7f3784cb137bede0593dfc008347bb0bb25c982c058175ac2b0442c2593a5a7e2c4539c848ad4375d994c1b7900019120790f0fe12385b413eecc1647d70a SHA512 724398fc208ec18adbd8ba81a445e23d1001b746990f36b869126be8a45f1cdfa75f5b9cbdd0abbab506f91a56d3736ab247677699ebd69525245558cfc01a60
+DIST rustc-1.69.0-src.tar.xz.asc 801 BLAKE2B 2f9b95440c35403fe663f91531cc73681c1c5d5dcbaa10d53a36d542656c097eb4a4320fc12d8df228d5dfb57dd12eb9441c3bd0ba54b7d180e23ded3d2527bb SHA512 8f4c7e6e246a676f53d77b331fe5153eedbd3d8e9f6d922fecc78c8c6fdbbef4610308c93e5af6d8e0d744e6b3ce4bf01b39e29813475a50a38240f679c25156
diff --git a/dev-lang/rust/rust-1.69.0.ebuild b/dev-lang/rust/rust-1.69.0.ebuild
new file mode 100644
index 0000000..2987458
--- /dev/null
+++ b/dev-lang/rust/rust-1.69.0.ebuild
@@ -0,0 +1,749 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
+
+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 BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 15 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.64.0-libressl.patch
+ "${FILESDIR}"/1.68.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.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 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ # this libressl version check is terrible
+ sed -e 's/d397af804c0b786978867528635fa9148cd2ad0e6abd591ace21b5bd3719c38d/896afea18b1072d4c715421ff2ed7e428b57aadec44d4680dcb991a6229a1edc/' \
+ -i vendor/openssl-sys/.cargo-checksum.json || die
+ # fix for libressl
+ sed -e 's/7d5ca02f34cffe51db3568c500c9a8a70cef879871a0f466e3344142644acf12/e9eef35f1c18dd9844960d1d315e84ad99a05ab1247f0f54e3c2eab244988256/' \
+ -i vendor/libssh2-sys/.cargo-checksum.json || die
+
+ default
+}
+
+src_configure() {
+ filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools='"cargo"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","analysis"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-04-06 21:31 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2023-04-06 21:31 UTC (permalink / raw
To: gentoo-commits
commit: 36daad952b4718b3ca076d5d14c2e8dd41b39de8
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Apr 6 15:51:24 2023 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Apr 6 21:30:43 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=36daad95
dev-lang/rust: Add 1.68.2
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/510
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 2 +
dev-lang/rust/rust-1.68.2.ebuild | 749 +++++++++++++++++++++++++++++++++++++++
2 files changed, 751 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 01d1ce5..67f681f 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -134,3 +134,5 @@ DIST rustc-1.67.1-src.tar.xz 142758844 BLAKE2B 55b2a98592b1a2e465b7fb224607cbcb2
DIST rustc-1.67.1-src.tar.xz.asc 801 BLAKE2B eb507c6f53c592921eb31cccb17c9d6027c67fb1311726f2d25fe7d1f8a1aa051efb99d7207a5e4477df0b75898783437e653fa041ed7daa27e7a7c4263ec230 SHA512 6c962f680d74251b55f77a43d6e383be53bacff8428e0d003bda207de1fea7f716b88f16686d22a88d99518a4834bf299731855fb030477a995d5e1f3d0024f4
DIST rustc-1.68.1-src.tar.xz 147834548 BLAKE2B 98e02c1ff3ed37cd52d1f348331ffe007583f078fbd1bc581eb32a098eee816f301cd833ecf9f806b8e0c673aa963b34d2e357c089bdb59a8a7464ab46b18307 SHA512 cf3921bc260db54b0f3afc0e6bc9fe8d560ddb81de5d2d4496746307d42a8010291f119d0cfc463996efce6ef829a0494b4eb6145e21c94fd113ff51ee010e21
DIST rustc-1.68.1-src.tar.xz.asc 801 BLAKE2B 5e0a2d95360fb5d8bed9e759111db225315b93d3042af19bb9fc9f239cabf9f32b85f2e616913ff3ce5fc8111deeb972bc184584ca473216b7a5320a255304a6 SHA512 5330405c09077070a63c04fc1c7059219d046fbaa24997861365199e48da98be4fe2a04fdc5c54a03166097bde58b4e51bdc8296ca89974d2dcec1da279bdab2
+DIST rustc-1.68.2-src.tar.xz 147835648 BLAKE2B 4b6deab818d915afe67a96f4d32a758c15a832041a77d9da5d065a903ea2718e0e7ebbc0cd1baaa436b655bdb93a62e0fb76f9e37aed595c064e0857201bb091 SHA512 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3
+DIST rustc-1.68.2-src.tar.xz.asc 801 BLAKE2B 6ac2444950e5f919d09823ea3eef50364ad7b295126b090178872970f03c43ca9747779e0873138ca3a0b753eff79d2ef36d8b70c6a6050039ba9f9018571016 SHA512 86ccbb8ea89f820ba92ad9cbfb8f4bda3393e2c24d699355fd559a2339ff39bcce2a027ebd1b043f11de24b00cdac8c42d252915b36e711eb1d80f49a8007d47
diff --git a/dev-lang/rust/rust-1.68.2.ebuild b/dev-lang/rust/rust-1.68.2.ebuild
new file mode 100644
index 0000000..b96d6a3
--- /dev/null
+++ b/dev-lang/rust/rust-1.68.2.ebuild
@@ -0,0 +1,749 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
+
+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 BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 15 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-util/cmake-3.13.4
+ dev-util/ninja
+ )
+ test? ( sys-devel/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.64.0-libressl.patch
+ "${FILESDIR}"/1.68.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.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 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-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ # this libressl version check is terrible
+ sed -e 's/d397af804c0b786978867528635fa9148cd2ad0e6abd591ace21b5bd3719c38d/896afea18b1072d4c715421ff2ed7e428b57aadec44d4680dcb991a6229a1edc/' \
+ -i vendor/openssl-sys/.cargo-checksum.json || die
+ # fix for libressl
+ sed -e 's/7d5ca02f34cffe51db3568c500c9a8a70cef879871a0f466e3344142644acf12/e9eef35f1c18dd9844960d1d315e84ad99a05ab1247f0f54e3c2eab244988256/' \
+ -i vendor/libssh2-sys/.cargo-checksum.json || die
+
+ default
+}
+
+src_configure() {
+ filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools='"cargo"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer","analysis"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
+ CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
+ CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
+ CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ default-linker = "$(tc-getCC)"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-03-28 18:51 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2023-03-28 18:51 UTC (permalink / raw
To: gentoo-commits
commit: 75e1bae94498000167aad8d6d9058f350689c89d
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Mar 22 02:36:15 2023 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Mar 28 18:50:53 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=75e1bae9
dev-lang/rust: Merge :::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index f526dbb..cb9dc09 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.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 ppc ppc64 ~riscv sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-01-31 23:14 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2023-01-31 23:14 UTC (permalink / raw
To: gentoo-commits
commit: 65833a2c04f207eb6713ca33f55f9a57c11c4b82
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Jan 28 17:21:11 2023 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Jan 31 23:14:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=65833a2c
dev-lang/rust: Merge ::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/492
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.66.1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index 100c1a0..f526dbb 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.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 ppc ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~mips ppc ppc64 ~riscv sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-01-17 0:52 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2023-01-17 0:52 UTC (permalink / raw
To: gentoo-commits
commit: 5950ed062850807f659f80277da274a43117689a
Author: Saki Xi <space_raccoon <AT> riseup <DOT> net>
AuthorDate: Sun Jan 15 20:45:14 2023 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Jan 17 00:49:36 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=5950ed06
dev-lang/rust Sync Python Version
Signed-off-by: Saki Xi <space_raccoon <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.65.0.ebuild | 4 ++--
dev-lang/rust/rust-1.66.1.ebuild | 7 ++-----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index 1bf38e3..c291423 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_COMPAT=( python3_{9..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
diff --git a/dev-lang/rust/rust-1.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
index 2f37402..100c1a0 100644
--- a/dev-lang/rust/rust-1.66.1.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_COMPAT=( python3_{9..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
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm ~arm64 ~mips ppc ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~mips ppc ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -121,12 +121,9 @@ RDEPEND="${DEPEND}
sys-apps/lsb-release
"
-# FIXME: https://bugs.gentoo.org/874885
-# rust-analyzer should work with wasm, but currently does not
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
- rust-analyzer? ( !wasm )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2023-01-14 23:23 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2023-01-14 23:23 UTC (permalink / raw
To: gentoo-commits
commit: 47cce477d7b0529993cfaf58294c88dcf9afbd4c
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Jan 12 03:23:11 2023 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Jan 14 23:22:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=47cce477
dev-lang/rust: Add 1.66.1 + Remove 1.66.0
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/488
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 4 ++--
dev-lang/rust/{rust-1.66.0.ebuild => rust-1.66.1.ebuild} | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 92788f0..48fbca7 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -64,5 +64,5 @@ DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz 266683288 BLAKE2B 4312a53bca3e
DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 054f1b773518a9640f3d9226510cb0b00a7f8dc4a9046c325b82d038a50c699a8bd84f71ed62790e9b96b4d65ad12ea631f6a8bc18b3bafd66db3d21137cd378 SHA512 39aa000c2a1359cfd7d2eda2b22a9b10c0fe4aa024862b7ea67bd488e06fdee6f5cc4e98db7486b84ce53f1c299bbd5391f63e25df0358184533a5fdced4ce61
DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be
DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc
-DIST rustc-1.66.0-src.tar.xz 141582844 BLAKE2B f07a71763158da3e1c4c328d5423a9353dc6b7d3fd167b6417bd1dd9ef32081d5f634be1bd946d2fabb75808759cbd67cddc75f768ba610a687a417342fff023 SHA512 df329bcabce309846e44d92a118758dfc65b63f06857226799c75568a2a018a96500fd07cd38c1927e3486d190a6f57340ee794c733bbbb69cf80a99855ced73
-DIST rustc-1.66.0-src.tar.xz.asc 801 BLAKE2B adffb348d20594e49364c14489c8479630e0d2b4431d6a63a4c5486e9d01c7994913f4fe09c21aa336d3f2b2d2f62c4504f6930b23fcad3e06e13058c15f1eb1 SHA512 c8a524e83a86bb0c3ab813f45687e92a3ef7bc57943a62c3a6ae211314d9889a8123272b1c0aa763262435f2a51fc39a98a731931727faea9d6e2a0da0facd2e
+DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac4613b8e3f0092bc0df29c9685f4a4012c0bd1b600911c2d19bcfa8f5a84b8a3c39d4c9e062a62cd61925b59129e1cd72b9 SHA512 1944c024c603140d0a9236043a3bd1d0d211dd8d368d6d82a3a620f1ff43b29624755b0943f2b38b40a188c7eee77a840238ea757eaf435e2a3fa6a0e6b82832
+DIST rustc-1.66.1-src.tar.xz.asc 801 BLAKE2B 18e27c88b39eed29147854733c5533b7fffc417ff0b3bd5982174ffa2c5f6d217e2e28ced4da75863a4557800e7ad7a124a4bbb0def4c20da7ed543602185941 SHA512 4511f41ad3d098a339ea3173e3ffa692d1d3cd3ec9dd45af68e4491471f9a72a2e866f6924090eb366bdf6f856650d981eabe1cd851843a17f4a6e4f1dfbc8a9
diff --git a/dev-lang/rust/rust-1.66.0.ebuild b/dev-lang/rust/rust-1.66.1.ebuild
similarity index 99%
rename from dev-lang/rust/rust-1.66.0.ebuild
rename to dev-lang/rust/rust-1.66.1.ebuild
index 9c75136..2f37402 100644
--- a/dev-lang/rust/rust-1.66.0.ebuild
+++ b/dev-lang/rust/rust-1.66.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips ppc ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -39,7 +39,7 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
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"
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
@@ -287,7 +287,7 @@ esetup_unwind_hack() {
src_prepare() {
# this supidity is needed because patch is too large to be in filesdir
# and if we move it to devspace - it lacks checksum for sig verification
- if [[ "${PV}" == 1.66.0 ]]; then
+ if [[ "${PV}" == 1.66.1 ]]; then
sed -i \
-e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \
-e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-12-21 20:26 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-12-21 20:26 UTC (permalink / raw
To: gentoo-commits
commit: 0f44c54e9f5a3fe6e438879861bcad381f5b1ecb
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Dec 21 15:36:27 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Wed Dec 21 20:25:38 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=0f44c54e
dev-lang/rust: Merge ::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/metadata.xml | 3 +--
dev-lang/rust/rust-1.65.0.ebuild | 13 +++----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index f64700d..e28f627 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -16,9 +16,8 @@
<flag name="nightly">Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release)</flag>
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</flag>
<flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
- <flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
- <flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (like rls)</flag>
+ <flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (language server)</flag>
<flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
<flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
<flag name="system-llvm">Use the system LLVM installation</flag>
diff --git a/dev-lang/rust/rust-1.65.0.ebuild b/dev-lang/rust/rust-1.65.0.ebuild
index b6d95fb..1bf38e3 100644
--- a/dev-lang/rust/rust-1.65.0.ebuild
+++ b/dev-lang/rust/rust-1.65.0.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 ~ppc ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
@@ -126,7 +126,6 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
- rls? ( rust-src )
rust-analyzer? ( !wasm )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
@@ -209,7 +208,6 @@ pre_build_checks() {
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
@@ -339,9 +337,8 @@ src_configure() {
use clippy && tools+=',"clippy"'
use miri && tools+=',"miri"'
use profiler && tools+=',"rust-demangler"'
- use rls && tools+=',"rls","analysis"'
use rustfmt && tools+=',"rustfmt"'
- use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-analyzer && tools+=',"rust-analyzer","analysis"'
use rust-src && tools+=',"src"'
local rust_stage0_root
@@ -666,7 +663,6 @@ src_install() {
use clippy && symlinks+=( clippy-driver cargo-clippy )
use miri && symlinks+=( miri cargo-miri )
use profiler && symlinks+=( rust-demangler )
- use rls && symlinks+=( rls )
use rustfmt && symlinks+=( rustfmt cargo-fmt )
use rust-analyzer && symlinks+=( rust-analyzer )
@@ -727,9 +723,6 @@ src_install() {
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}"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-11-15 21:18 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-11-15 21:18 UTC (permalink / raw
To: gentoo-commits
commit: ae0c05cb715af91b4f1ffbc406c1c766ed866e92
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Nov 15 02:25:04 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Nov 15 21:17:46 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ae0c05cb
dev-lang/rust: Merge ::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.64.0-r1.ebuild | 38 +++++++++++++++++--------------------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/dev-lang/rust/rust-1.64.0-r1.ebuild b/dev-lang/rust/rust-1.64.0-r1.ebuild
index 71eb093..1d11fd7 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"
@@ -232,6 +232,17 @@ 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
}
@@ -305,7 +316,7 @@ src_prepare() {
src_configure() {
filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
- local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
+ 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
@@ -343,14 +354,6 @@ src_configure() {
rust_target="$(rust_abi)"
- # https://bugs.gentoo.org/732632
- if tc-is-clang; then
- local clang_slot="$(clang-major-version)"
- if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
- use_libcxx="true"
- fi
- fi
-
local cm_btype="$(usex debug DEBUG RELEASE)"
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
@@ -363,7 +366,8 @@ src_configure() {
targets = "${LLVM_TARGETS// /;}"
experimental-targets = ""
link-shared = $(toml_usex system-llvm)
- $(if [[ ${use_libcxx} == true ]]; then
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
echo "use-libcxx = true"
echo "static-libstdcpp = false"
fi)
@@ -626,12 +630,8 @@ 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 \
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
-j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
then
failed+=( "${t}" )
eerror "rust_src_test: ${t} failed"
@@ -645,11 +645,7 @@ src_test() {
}
src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
+ 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
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-09-29 22:58 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-09-29 22:58 UTC (permalink / raw
To: gentoo-commits
commit: 02bab0badac9f0284a0584781d472a134809a95a
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Sep 28 00:44:28 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Sep 29 22:57:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=02bab0ba
dev-lang/rust: Merge ::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/455
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.62.1.ebuild | 4 ++--
dev-lang/rust/rust-1.63.0-r1.ebuild | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dev-lang/rust/rust-1.62.1.ebuild b/dev-lang/rust/rust-1.62.1.ebuild
index 990093d..3426092 100644
--- a/dev-lang/rust/rust-1.62.1.ebuild
+++ b/dev-lang/rust/rust-1.62.1.ebuild
@@ -73,7 +73,7 @@ LLVM_DEPEND+=" )
# 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.txt
+# 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="||
@@ -257,7 +257,7 @@ src_prepare() {
}
src_configure() {
- use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+ filter-flags '-flto*' # https://bugs.gentoo.org/862109
local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
index 6cc3ece..c925bff 100644
--- a/dev-lang/rust/rust-1.63.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.63.0-r1.ebuild
@@ -73,7 +73,7 @@ LLVM_DEPEND+=" )
# 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.txt
+# 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="||
@@ -287,7 +287,7 @@ src_prepare() {
}
src_configure() {
- use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+ filter-flags '-flto*' # https://bugs.gentoo.org/862109
local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-09-24 20:10 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-09-24 20:10 UTC (permalink / raw
To: gentoo-commits
commit: c8cabf61a531c0c993f4b66195421cf6755fcb34
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Sep 24 15:56:31 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Sep 24 20:10:25 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=c8cabf61
dev-lang/rust: Add 1.64.0
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 34 ++
dev-lang/rust/metadata.xml | 1 +
dev-lang/rust/rust-1.64.0.ebuild | 753 +++++++++++++++++++++++++++++++++++++++
3 files changed, 788 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index c74098e..c7502c3 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -158,6 +158,38 @@ DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607
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
+DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B ccac24e85deb6089468b763bce6cd54ec1c5ce506d10c8e84d3e8b0c9ee21946ac575a4aab5205c5a2d8328488641806a7dc1b15bd8cc48f3701630f223580f4 SHA512 9d41f34e507271e26e6ff7ce03d6a215a99971df77b246fa64b3518d70c2ec82142e96c4d0cf9641405065ec672f663316a93fe0e9183bd1e8f5af4de1ef41f1
+DIST rust-1.63.0-arm-unknown-linux-gnueabi.tar.xz 203850320 BLAKE2B 2a0f4e195d6e7ca66119b2bd45d58127b6aa305c77349c06d8ee109066ede59288ce067e222fca12f1414224a74ec9f33e7de1a18bf7b1e91e216e852e574a90 SHA512 d55ee6201bc4c3cd698396f08d4247b7578778b3c82da8ef496512e0f8cb1758009af6286230a1b26849b5f27101a242d7e04851ae41a41f7547589103f5c0ce
+DIST rust-1.63.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 26bdf2e38262d3e4b23c72f86325dd1275c08b5ccccd99c82b91a05cf800e3e6a2500bdc6d89a3582311292f6ba1ddd65b8a081b608c83adcb39faa708f8376d SHA512 0f1213cf05bbbf659103c7178f20780fa3ef807cd03417edcb901d6560411c3f96bfeeb0dcf555460675573cfb9d402fa3882d787015ecfbf83765ae9fc35325
+DIST rust-1.63.0-arm-unknown-linux-gnueabihf.tar.xz 204273564 BLAKE2B 4a3730dc3d1cc08c8a0a687328e19e7a78265eb81cc1a3312cc547bd4823951c28ab57ac87919aab346994a6f96ce9803f7429c6b1831e4fdb3a7f7f086a2a87 SHA512 d53bc819c7ca2e5fc116fec5a731d280ac701f19fd9a8707ee5e69fdc41544d3dce17f8cd61f9ad0b59a89409c9859634e5d91444a0361add69c36c3f47a379d
+DIST rust-1.63.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e71f5d6f404a408774f6246fe72596c59255ba1f1b52c4ef6fdef08da63178fefa46966370a1f4e04b95a68b119f166e01d2d2d347f9e4517908e87146a56d83 SHA512 c70a350de8d378ed8dcec42d697143e4cce18dfd176b4fbcea25e7c608ff3db51642ab1be3b13d277d7eeec5a0262aaf9c38527f7f14c02fc64f760d6438efb2
+DIST rust-1.63.0-armv7-unknown-linux-gnueabihf.tar.xz 209545116 BLAKE2B 2cb5610fc665f50505fa8b0d18b88cf79abca6a6b8503d46f76fc58b74e7d58e3b7aa1a790e7ba555b250d0f0bd48acd176ff1cf463eb7f37b34780b04b2c838 SHA512 e809ac29a9b24c82f7d950ebbad5d3c01dafba9554c55716a28e728b0218c6f8b3b7f1e31c277be3946da1a0e4228717d7a1a63db66716c19a79b2c5ac11fb92
+DIST rust-1.63.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B c6f1e717a7cb746dfe3d9b109d77bdf7cd918c2d60491d83b2d7cebf412140b9cae257df850587c16a7b1c8faa16ef029f628c6c2c7e5b6f1d088e1a03c33899 SHA512 c832521179dd7b7cda0e979bfbfe491d3a255cb47f03fe113ac1290540fdc7134ea08a2815c9ec422919579fff3db995aa0e7f72249e2d00d4790a58f1142680
+DIST rust-1.63.0-i686-unknown-linux-gnu.tar.xz 224058112 BLAKE2B 6a83fa3bd0fe2a7f0cdbf8b8c7a6662235f9690177c9ed06af7be969b08959d2c58a8689247cd61a9d9ff765e6946f2bb12b9d278a0701d4764bdf8d141dd4cf SHA512 8441267b1fb1cec3c9a2e226f6f6c5d66cdf9fa2026df272374432c501aefb515b8d21266ddee5297f8570de72c55fa5bf485c5a9790ad7687e5ad1811c72cad
+DIST rust-1.63.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c2e92bdf15c1dbfdb2715fd4b1874a270e21bedad1c84967c4bf92a2818935dfdfc48673e3b52d991ae9557378a62a5905e8f3005f1bf12f6eb93415cc47b1c SHA512 f42f5e65f76c72f7dd6bfdbc730b3c4da50d1444df2b1282334a6a3e6cb0af175536b037c6a5f1fc4000640756e57a3176315e288fe23ba56abe8a6f4c763525
+DIST rust-1.63.0-mips-unknown-linux-gnu.tar.xz 161238712 BLAKE2B a60f7b8a190fb90e123c18fafde9fbfa6e27bedc849175351ec9871ea705c2a54eae59b5597e71e20d2e63c73065717ccb56eea59ed46d12c13ae4fe8125ae5e SHA512 dc7ec2f92bdcd52af83c71b07df0f31187b8f195e9900ba0ffa3688175cdd22e81c34ef45b5e84c2cb9b47adf990de20a2c9296b46c17cc06176c19e956923cb
+DIST rust-1.63.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7803d7c07170d1a9af4e83add8f9b42caec19f5c8af4163dd541069f8b3f86087a09e4c3447c0faba19d1c2173c2411503856254b34d7c57320be250dd5b72ab SHA512 a9e80d1417353298656b99137a20478265458c95914c9d547bb57905ac9b654127fbf6e7a4292bfe74afd0aaae20730a126910383822d0c75b2da164bf60341e
+DIST rust-1.63.0-mips64-unknown-linux-gnuabi64.tar.xz 166872588 BLAKE2B 3a052d6f4196cbf55feb173e36c22cd3316abf6081d6a94dd6a7ab3a675f447471555b721e162ca15cbc485c4571b647a9257649a1d23b69b9a0ef262827b2d7 SHA512 db23d30021d6f8a5fbec50b6dac13264e3aac003ff0604185999318b47370b4476ce9e6034ab9ab5f4fba03b393898968b8c9a698f2b71bc1f58b452b030d1c4
+DIST rust-1.63.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B f30125c52883076251a22bb8a90fdd642167ebd0688ceb8e349555491824cffbc0873526b0269419fbc6421c5976aab18f5c3bbf35b997b4afc5d48b1e080c03 SHA512 d86940292aa891f7f0fc10d14b5ee386f8481448b6ed26bd8aabf21a7341c0916b08eae0e26bcd1dcc0fad1fbc0d216a767d8eba3dcc2ed47c4bb0aab107ab80
+DIST rust-1.63.0-mipsel-unknown-linux-gnu.tar.xz 165974484 BLAKE2B 4dcbcb3e6255c9266c4476e62aa9a6d31c4ba48b9a830789d9cf245002b4fec762f86fb6713507dfac8227a4e9da32347e5ce9d029d53220f8b3037e2dcf47c5 SHA512 2fb7e3bdc925abfc8efc4ee30f19bf6eb5d5afc803332059cf855eee7ba7c6a85c578701798fd1b9f9b07a4a7b091283406ca02c797fdafc9e437b0ea85de8be
+DIST rust-1.63.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c42a76a7902234490f33b520494d85c5000592cb781d97c9def132fce39f3e582cfbe6c868a7dc494ce550228ee0c4195500a17489323c22f9aecc74d4915135 SHA512 62fa9ace175d1359ae61229e6618972ff1db42b8e826113af247fccd67c4f49dd4ad4d93eefa3801a20a164332404f9fa5002c75ede2b81eb277e64d1a29396a
+DIST rust-1.63.0-powerpc-unknown-linux-gnu.tar.xz 184571616 BLAKE2B 452ee709ba25db4569e4ed20f88ea4a14c8b45c85803b065b5bc6e005473c02dc745ae531b8e0c7642dbe50880dd2f9d359520a3f0fc09628327613ed706dd38 SHA512 2dd3ab750044501e882442e54fc78fe73f36758458c6107df7afd55f8333c01a2e69bde181ca1bf3a1529a3a2bf616d4f69708081c494cc1781be5fd2a58df29
+DIST rust-1.63.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 13796a48f4ae628c2242ce4632ebdf4106899aa0713b469e4ad4457f0bad23638626bdf6de6a2f6d1d84b8408872c5a4cc97ae4fa0409458d8bec6eb43adf9a5 SHA512 813601cbe547add62345d4a9ed1a31e364310724c2bddf9f76404095b9fa1ab3c33f9480953d22136635afc8d6f7d4a9df2839f2e3d9d5f74a6594ae3d7f9537
+DIST rust-1.63.0-powerpc64-unknown-linux-gnu.tar.xz 192446060 BLAKE2B 28a6c8a94caab7d23d203e55ad1ad1b689f07ea9d4bdb0a618833b36378ea731ca85f906c8fe0de2727001471fef9b30b8f12a241d9cd257851b2b0a8a94f15b SHA512 42a39558352c1cbdf7c9e9fa1aecae160b43e1bf74ace0df844d95bd43743642be7107bbb60a574de7219da355cf64939509d4f028f32d555a90900e962df6e8
+DIST rust-1.63.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ed2a82a7a04f1d831480f7aa32ef8f0524424aec50ae8f75d2c186937b1c3e3bd953306dafa026a492b1792043ccace535f26b4911691d58b27d799585d2f024 SHA512 c740ad1bd86074b27c233167e2a66b20a9e79d2505e6e00b38a1f8053f136218dc21618968c4d709c8c2936311449187ce15d16d078832b7107303b56ba9c55e
+DIST rust-1.63.0-powerpc64le-unknown-linux-gnu.tar.xz 202613736 BLAKE2B eb0fcc0c0a615dc1d48591e9d34bdfcdac5adbe2b5953faa8e11b0147a09a56fac3161e2c0f5c4c0d399a3a9431effdc84b938f00469f262c24f06d1c0489a08 SHA512 9c9927b9c22d8561a9b45b237e64d3afc1725cace695fa6623db65731e9ec2cd56e105949d866f5feb62c6ec717852461ef0153fc9d028fbc5323ef231eba69e
+DIST rust-1.63.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B efdb321cae9af3c3ff8854b52281211c80833f30785004c70df79bb73b094a21fd63687372dd1cb192a2547fcb7d8bbc7c4ae27851695aecce71e085bad34396 SHA512 c876eedce00ef013d2af89218a6ab5108d9ab5e3a60d7afc5afacd39e5a017ab99ef12a0ff954e8861c42a3ff9bc9030077bd9801f575620e015590a82ea0f25
+DIST rust-1.63.0-riscv64gc-unknown-linux-gnu.tar.xz 195670272 BLAKE2B 487ce5fd3dfa59914264953792d8f44433d88d9ca29bb647effda24e170a55470cca35fe653f6706f78e6b0c70265d0735585b17d7108bd62b71cd84e7f1312a SHA512 b6da4a3651b205f819e002157d196b014e4ad9923f854271dd6b306d8c69dc3d619b9a3e51c56ea2d2402566fac775d42719a67952c8f3e93933594aadc67831
+DIST rust-1.63.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 822415e792104724494f29dee1a9730fc0328e00ee613c163d3cc8298fd3f85465d5c31d2c94b479271dde0721690c78056ec3828e14087a5c5b82c0dee0d4b8 SHA512 9b2d8239708baefb075470aeb37d5b62fb934d4074c745d89467d4f9efb91c10b7c999b726c4edef720b58e95e525cc72fa20d4cfbe6d0ba1352f5fca5d1e195
+DIST rust-1.63.0-s390x-unknown-linux-gnu.tar.xz 219060812 BLAKE2B 8087db6ae903fed440bddfe4a07fee35292b16fdb847155cf584dc1a7adbeb4a8f55bd17afeb015dba53c29a05bfbd3f5373b2e30018e4a56d400fdbd1cedc3f SHA512 11bed7ebd8bf977aa34ef9f9dabee8428baede670885b4f268335fe87b81e41b426e94ca60db218e82be2e6e73ec33123c77922bfee7ae9373bfd9227417214c
+DIST rust-1.63.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3f656cd12927155b4debb68e821d9db3fa880ee49c557246c34390c44ab6e2c456d8b29b1c15c933de868d0884a83b2b419501af06d4244830d59032d5ce82a5 SHA512 521f95024624200c67d556c533d307468007c01a7de37cbd65d4af949275933cfee51334338838f5e4a9136a363b65bec47bcf399ebacff7f5558ae59c1d006c
+DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a214a7b1ad2f075b162f6f49056a96a3a1153df794025d9a1456083dd3e7ab9eb3c71982982701cc1f8a93405640f8b622fde60819ee022413446f SHA512 9e538980b6a42d14b7ec08bd1a3ddecfea24e5d3068226edf212486bb5a20bfcac22f1f917a06536f6f26dcffedd65c7049870bc3d70b9c972075bcbe58eb8d9
+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 87887273 BLAKE2B 260bb89b8a72c063b3943c07e0720c8a910d73fdeee281d0711e1c7c378f76fbbe815ecad2e517efbd4ce664ed0e12b2e6bfccebf32b233c0fd1e5d9c930919c SHA512 da7a521eb335ffd655a25dc312ca7f1d5d1dea6846a651e7ae7086bd079323a3a7ff94e1c474b6b45e39f2e989b261d20dcdd8f906f7784739d97a4fa52ba97e
+DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
DIST rustc-1.59.0-src.tar.xz.asc 801 BLAKE2B 061701c4fdbde930798f9f938ca3642204ae4a2ad9396937ca7d604268813d6d68f4979f20d35abdbbfeec0bb389acd86c9d3d84256db85861f6b11e3dbef80e SHA512 1b90bc01f9d68ba1f70591c4ae707295d7727b790d170a0b757d654684e59d3c26c45b66a21f9ac762debb6867494660c73daaf10be9bd567a38be44c0009f72
DIST rustc-1.60.0-src.tar.xz 136183048 BLAKE2B 8030f32c21f81af6abc7a282aab1189cb7d680c6bce58c119a1beaad71a3eeb36a696eef46a22d366e2c41a2f9182a9a5aa527426f2c8db05278184c37297dd0 SHA512 d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3
@@ -170,3 +202,5 @@ DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b759
DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
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
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 99bf905..f64700d 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -18,6 +18,7 @@
<flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
<flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
+ <flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (like rls)</flag>
<flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
<flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
<flag name="system-llvm">Use the system LLVM installation</flag>
diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild
new file mode 100644
index 0000000..8592597
--- /dev/null
+++ b/dev-lang/rust/rust-1.64.0.ebuild
@@ -0,0 +1,753 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 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.txt
+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.62.0-libressl.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// /,}]"
+}
+
+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() {
+ use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+
+ local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
+ local chost_target="$(get_abi_CHOST ${v##*.})"
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi ${chost_target})\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local tools='"cargo"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rls && tools+=',"rls","analysis"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+
+ # https://bugs.gentoo.org/732632
+ if tc-is-clang; then
+ local clang_slot="$(clang-major-version)"
+ if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
+ use_libcxx="true"
+ fi
+ fi
+
+ 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 [[ ${use_libcxx} == true ]]; then
+ 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##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! (
+ 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 )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version sys-devel/gdb || has_version dev-util/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-09-24 20:10 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-09-24 20:10 UTC (permalink / raw
To: gentoo-commits
commit: e3edaed6c64cb77fb077606c4622eb73c313aa3e
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Sep 24 15:58:11 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Sep 24 20:10:29 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=e3edaed6
dev-lang/rust: Merge changes from ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.63.0-r1.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.63.0-r1.ebuild b/dev-lang/rust/rust-1.63.0-r1.ebuild
index 8ed366c..6cc3ece 100644
--- a/dev-lang/rust/rust-1.63.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.63.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 ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-09-23 16:00 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-09-23 16:00 UTC (permalink / raw
To: gentoo-commits
commit: 9ead4cb398dedfd44a102ee379779b4170c4da52
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Sep 21 17:16:30 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Fri Sep 23 15:59:43 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=9ead4cb3
dev-lang/rust: Merge ::gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/452
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/metadata.xml | 3 +++
dev-lang/rust/rust-1.59.0.ebuild | 2 ++
dev-lang/rust/rust-1.60.0.ebuild | 2 ++
dev-lang/rust/rust-1.61.0-r2.ebuild | 2 ++
dev-lang/rust/rust-1.62.0.ebuild | 2 ++
dev-lang/rust/rust-1.62.1.ebuild | 4 +++-
6 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 7219757..99bf905 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -23,4 +23,7 @@
<flag name="system-llvm">Use the system LLVM installation</flag>
<flag name="wasm">Build support for the wasm32-unknown-unknown target</flag>
</use>
+ <upstream>
+ <remote-id type="github">rust-lang/rust</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.59.0.ebuild b/dev-lang/rust/rust-1.59.0.ebuild
index 33eb0ea..25e1b77 100644
--- a/dev-lang/rust/rust-1.59.0.ebuild
+++ b/dev-lang/rust/rust-1.59.0.ebuild
@@ -259,6 +259,8 @@ src_prepare() {
}
src_configure() {
+ use system-llvm && 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.
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
index 75316f6..2a6ae7f 100644
--- a/dev-lang/rust/rust-1.60.0.ebuild
+++ b/dev-lang/rust/rust-1.60.0.ebuild
@@ -257,6 +257,8 @@ src_prepare() {
}
src_configure() {
+ use system-llvm && 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.
diff --git a/dev-lang/rust/rust-1.61.0-r2.ebuild b/dev-lang/rust/rust-1.61.0-r2.ebuild
index 3a148c1..3d909c0 100644
--- a/dev-lang/rust/rust-1.61.0-r2.ebuild
+++ b/dev-lang/rust/rust-1.61.0-r2.ebuild
@@ -260,6 +260,8 @@ src_prepare() {
}
src_configure() {
+ use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+
local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
# Collect rust target names to compile standard libs for all ABIs.
diff --git a/dev-lang/rust/rust-1.62.0.ebuild b/dev-lang/rust/rust-1.62.0.ebuild
index 2fc892d..f2a0e8d 100644
--- a/dev-lang/rust/rust-1.62.0.ebuild
+++ b/dev-lang/rust/rust-1.62.0.ebuild
@@ -257,6 +257,8 @@ src_prepare() {
}
src_configure() {
+ use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+
local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
# Collect rust target names to compile standard libs for all ABIs.
diff --git a/dev-lang/rust/rust-1.62.1.ebuild b/dev-lang/rust/rust-1.62.1.ebuild
index 2fc892d..990093d 100644
--- a/dev-lang/rust/rust-1.62.1.ebuild
+++ b/dev-lang/rust/rust-1.62.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv sparc x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -257,6 +257,8 @@ src_prepare() {
}
src_configure() {
+ use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
+
local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
# Collect rust target names to compile standard libs for all ABIs.
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-07-23 21:19 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-07-23 21:19 UTC (permalink / raw
To: gentoo-commits
commit: f14e4937af428cbc01088875218545294d67aad1
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Jul 23 04:24:37 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Jul 23 21:19:11 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=f14e4937
dev-lang/rust: Add 1.62.1
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/449
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 2 +
dev-lang/rust/rust-1.62.1.ebuild | 736 +++++++++++++++++++++++++++++++++++++++
2 files changed, 738 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index e0866bb..9b6c54d 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -134,3 +134,5 @@ DIST rustc-1.61.0-src.tar.xz 136696780 BLAKE2B 604299aa5c8dd7dff9802236898ca5d4f
DIST rustc-1.61.0-src.tar.xz.asc 801 BLAKE2B 46384fd77c72ecf5cd7c783655f9345e4d52718c737470548a9f3498af9cbb93c3bf618464507cd10185c39a5207fd6669c6c82841c8c82fa325001cbe659cb0 SHA512 5ea807254f0d7c207f10f1fb224101d9ae3a3c81aff16d2ba2ea4af1fe92345d1a25336b5cff0964aba9ed249e38ab9d3df41eb1217e048988093cdb46da8962
DIST rustc-1.62.0-src.tar.xz 135644992 BLAKE2B f9133310dc951361588bdc0b631c7fc9e2187dbb6a71b4631786d68c0f9d221d12cc78f509df0a08a23beb6e647f18712db176ac62623c5b621e22281adf62c2 SHA512 02872a8409b0490fa9fa7a70756cbf103643694df6b2e2aea32ad8b70032a3162c7751cd92d78291587ee0120daeb9bc1ae5ec6136c7eb6eb584d8be3032dd3d
DIST rustc-1.62.0-src.tar.xz.asc 801 BLAKE2B 1d9a6fcafdfc2f46b098403e36e401cc6b3834d4f7fffaa82f20a332f8843a0af10c814c3f585c6e062fd5e9fab3d231ab03cc0caa449acd1c8a9eea077c1932 SHA512 646a895d19847ab0cc1d2f85ce1643625a1785acda31d37ed9776257f8e4625b65e16e4b9f3210e816d4516633d963a0d7b520e35582366ee75059dcb2f1313f
+DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b75944d47ec747d9c337cc7ba9f38dfd749415c9a00acf9d9d8743874ba1c51da7915315bd25e011eeb8a2aaa8812773850 SHA512 6f7fa855acdf20525e907a6fc8c7aa8b206603e3bcbd532d3bdce165380f0019f45dba2b2b06d20b541381accf67ca0d256fbddfcb1642a2e60e1237807d5410
+DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
diff --git a/dev-lang/rust/rust-1.62.1.ebuild b/dev-lang/rust/rust-1.62.1.ebuild
new file mode 100644
index 0000000..2fc892d
--- /dev/null
+++ b/dev-lang/rust/rust-1.62.1.ebuild
@@ -0,0 +1,736 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc 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.txt
+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=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+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.61.0-gentoo-musl-target-specs.patch
+ "${FILESDIR}"/1.62.0-libressl.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// /,}]"
+}
+
+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
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ 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() {
+ local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
+
+ # 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)"
+
+ # https://bugs.gentoo.org/732632
+ if tc-is-clang; then
+ local clang_slot="$(clang-major-version)"
+ if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
+ use_libcxx="true"
+ fi
+ fi
+
+ 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 [[ ${use_libcxx} == true ]]; then
+ 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)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ 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:-}"
+ 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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-07-04 16:49 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-07-04 16:49 UTC (permalink / raw
To: gentoo-commits
commit: dcd37dd70afbc8e6c873729026f3260570959c88
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Jul 4 02:00:36 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Mon Jul 4 16:48:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=dcd37dd7
dev-lang/rust: Remove old version
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.61.0-r1.ebuild | 730 ------------------------------------
1 file changed, 730 deletions(-)
diff --git a/dev-lang/rust/rust-1.61.0-r1.ebuild b/dev-lang/rust/rust-1.61.0-r1.ebuild
deleted file mode 100644
index 724f325..0000000
--- a/dev-lang/rust/rust-1.61.0-r1.ebuild
+++ /dev/null
@@ -1,730 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc 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.txt
-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=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-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.59.0-libressl.patch
- "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.61.0-llvm_selectInterleaveCount.patch
- "${FILESDIR}"/1.61.0-llvm_addrspacecast.patch
- "${FILESDIR}"/1.61.0-miri-cow.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// /,}]"
-}
-
-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
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- 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() {
- local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
-
- # 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)"
-
- # https://bugs.gentoo.org/732632
- if tc-is-clang; then
- local clang_slot="$(clang-major-version)"
- if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
- use_libcxx="true"
- fi
- fi
-
- 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 [[ ${use_libcxx} == true ]]; then
- 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)
- [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)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- 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:-}"
- 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
-}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-07-04 16:49 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-07-04 16:49 UTC (permalink / raw
To: gentoo-commits
commit: e38073d612cc66ba8fb2120e984c21da25c90567
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Jul 4 02:01:44 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Mon Jul 4 16:48:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=e38073d6
dev-lang/rust: Merge change from ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/431
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.60.0.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
index 3a788f9..75316f6 100644
--- a/dev-lang/rust/rust-1.60.0.ebuild
+++ b/dev-lang/rust/rust-1.60.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-06-10 23:36 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-06-10 23:36 UTC (permalink / raw
To: gentoo-commits
commit: 9bb8ca8304d9e601235e2c28ae161dcb1e9d120e
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Jun 10 18:12:52 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Fri Jun 10 23:35:05 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=9bb8ca83
dev-lang/rust: Merge changes from gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/418
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.60.0.ebuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
index a1a5c44..3a788f9 100644
--- a/dev-lang/rust/rust-1.60.0.ebuild
+++ b/dev-lang/rust/rust-1.60.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-06-02 1:44 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-06-02 1:44 UTC (permalink / raw
To: gentoo-commits
commit: 74225b53bf6c9c01b7f80b4dc47f8046db125802
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Jun 1 22:36:17 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Jun 2 01:44:04 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=74225b53
dev-lang/rust: Update ebuilds
Reduces the diff with the gentoo repo.
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/414
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/metadata.xml | 13 ++++++++-----
dev-lang/rust/rust-1.59.0.ebuild | 6 +++---
dev-lang/rust/rust-1.60.0.ebuild | 19 ++++++++++++++-----
3 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 1e4ffdc..7219757 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gyakovlev@gentoo.org</email>
@@ -11,13 +11,16 @@
</maintainer>
<use>
<flag name="clippy">Install clippy, Rust code linter</flag>
- <flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly)</flag>
- <flag name="nightly">Enable nightly (UNSTABLE) features</flag>
- <flag name="parallel-compiler">Build a multi-threaded rustc</flag>
+ <flag name="dist">Install dist tarballs (used for bootstrapping)</flag>
+ <flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly, sometimes is broken)</flag>
+ <flag name="nightly">Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release)</flag>
+ <flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</flag>
+ <flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
<flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
+ <flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
<flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
- <flag name="system-llvm">Use the system LLVM install</flag>
+ <flag name="system-llvm">Use the system LLVM installation</flag>
<flag name="wasm">Build support for the wasm32-unknown-unknown target</flag>
</use>
</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.59.0.ebuild b/dev-lang/rust/rust-1.59.0.ebuild
index bb48968..33eb0ea 100644
--- a/dev-lang/rust/rust-1.59.0.ebuild
+++ b/dev-lang/rust/rust-1.59.0.ebuild
@@ -192,10 +192,10 @@ bootstrap_rust_version_check() {
}
pre_build_checks() {
- local M=4096
- # multiply requirements by 1.5 if we are doing x86-multilib
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
- M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
fi
M=$(( $(usex clippy 128 0) + ${M} ))
M=$(( $(usex miri 128 0) + ${M} ))
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
index 65daf58..a1a5c44 100644
--- a/dev-lang/rust/rust-1.60.0.ebuild
+++ b/dev-lang/rust/rust-1.60.0.ebuild
@@ -41,7 +41,7 @@ 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 miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc 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
@@ -190,10 +190,10 @@ bootstrap_rust_version_check() {
}
pre_build_checks() {
- local M=4096
- # multiply requirements by 1.5 if we are doing x86-multilib
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
- M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
fi
M=$(( $(usex clippy 128 0) + ${M} ))
M=$(( $(usex miri 128 0) + ${M} ))
@@ -280,6 +280,9 @@ src_configure() {
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
@@ -342,7 +345,7 @@ src_configure() {
tools = [${tools}]
verbose = 2
sanitizers = false
- profiler = false
+ profiler = $(toml_usex profiler)
cargo-native-static = false
[install]
prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
@@ -418,6 +421,8 @@ src_configure() {
if use wasm; then
cat <<- _EOF_ >> "${S}"/config.toml
[target.wasm32-unknown-unknown]
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
linker = "$(usex system-llvm lld rust-lld)"
_EOF_
fi
@@ -606,6 +611,7 @@ src_install() {
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 )
@@ -665,6 +671,9 @@ src_install() {
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
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-04-28 23:40 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-04-28 23:40 UTC (permalink / raw
To: gentoo-commits
commit: 4b64017f26dbd296c497b3adc52327a4399e21fb
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Apr 28 03:54:19 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Apr 28 23:40:06 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=4b64017f
dev-lang/rust: Reduce diff with gentoo.
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/395
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.58.1.ebuild | 5 +++--
dev-lang/rust/rust-1.59.0.ebuild | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dev-lang/rust/rust-1.58.1.ebuild b/dev-lang/rust/rust-1.58.1.ebuild
index fd55b17..1acdb5f 100644
--- a/dev-lang/rust/rust-1.58.1.ebuild
+++ b/dev-lang/rust/rust-1.58.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -142,8 +142,9 @@ QA_SONAME="
"
QA_PRESTRIPPED="
- usr/lib/rust/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ 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.
diff --git a/dev-lang/rust/rust-1.59.0.ebuild b/dev-lang/rust/rust-1.59.0.ebuild
index 8234b82..bb48968 100644
--- a/dev-lang/rust/rust-1.59.0.ebuild
+++ b/dev-lang/rust/rust-1.59.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-04-28 23:40 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-04-28 23:40 UTC (permalink / raw
To: gentoo-commits
commit: 72b02c8993197c9207963cde5d2a491b0d5b9dfa
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Apr 27 18:21:57 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Thu Apr 28 23:40:06 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=72b02c89
dev-lang/rust: Updated for version 1.60.0.
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 34 ++
dev-lang/rust/rust-1.60.0.ebuild | 704 +++++++++++++++++++++++++++++++++++++++
2 files changed, 738 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index c7a5acf..69aba14 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -62,7 +62,41 @@ DIST rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz 150229600 BLAKE2B 056e5a646d675
DIST rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b86d3d2cbf27594dfe55fe2ff52523a9dff08d08ddd30526172f9e07760c2f854698eb8153cb9894588d75759a3d0bb7887756d005a2c69aa9cfeec8e7dee678 SHA512 82dcb22efb94bb19f2338e9cb46e3f6da3d189fe6bff12bf1ec870197d395c2ad58bd15705aa7f3cde38e5ec0266e20eb2e45761e0f55b13261d3e6b14dce60f
DIST rust-1.58.1-x86_64-unknown-linux-musl.tar.xz 262511608 BLAKE2B f2ca664fe1ab0614f13ce9d7764eed935b107b393830ad14b64d8b05e032feeec57dd04cdc963ad3eea2cb23558beeb1975722be93412d4ff8fd3a75d2bbb896 SHA512 d064464333a64f91b8a30f267ecfe2b4dc5be6d639bc9f064efa86a54478c8de7156166236b7ff8d96bf8fc8cbbeebf7ac17d8b5dabf24d72e189dbbd8ae0819
DIST rust-1.58.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 9c58a08b4e5d609230b5aae52fe7eec2dd6a0cc0eb8c257068ac2585918aba6cbe3263a6480860d34a117d3e2ee835fc8d8b1702296369c3a4e0f660f46bd62e SHA512 6c294cbbbf22940e36278e92d5095dbfee0df741694188ef1e6df7740bbe770ffb5b2467bab12825045ebf7d6fb12eebb1ce7edbb32d0afcb114c57e814fe5d7
+DIST rust-1.59.0-aarch64-unknown-linux-gnu.tar.xz 217126920 BLAKE2B 87fd1910d76a133624ff860fd3932527b3ce3775db9e03c6d2ab9ad06534e9e63ff7d1eed0c81e3574d676c192495e0f175b2ae0fa706b722ead9a852296b3f4 SHA512 6f5b6fb325ac226bf5f308463a54f59570d9ba5efe4329d6116d79cda1f8572b2e4584d005586759ac60e1e7a10782d8ef8ebf30c980220b4780a9846895fcb0
+DIST rust-1.59.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2b75d91a060376bd0711c18b1b04f7d0c7ded0a64b0b086e7799898db7fe24ff49dc09c76695a151e54bd205aa040775c6a36d10fb21ecb2d89d23398b02dc34 SHA512 a04cb7b03e3b963002357d48ecf92d0aef20464f9da38081411832c07df0a7c9ce3755a7b89c86394933446fc18e83a55a7cc01f3739ddddb19dafcbb7b43960
+DIST rust-1.59.0-aarch64-unknown-linux-musl.tar.xz 212064268 BLAKE2B 4636001103fc058c2c14a34449846c0378c26ac4dc29588615c5216bb4759b0e92ec97be25e106a5aaaa07059f404c615272e359b0f3b1e9164437e63d863bd0 SHA512 2ec97a48cdac3fb1f7411fdf3a34aac6f64a09991d25174dff97efab0ee724d4dce2bbe29046d243a72b06d406990adf5d1f3f24286fdfb0e658326e28cf5363
+DIST rust-1.59.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 4403c9e26f21504494db6e7368cf6a1dd36fcd283dcaa2aac4efaacba107971f44aaffe032ae1cb2530bb1d29bba3e1953d80d378ca9fabf13364da27d809bbc SHA512 5c789ce4591ba8b0f09a254780e1040f5c959c3a952b89d56bf77f0a0f53be2e5f0e712878d21a060937bcda72e440e591ca206c8540635fcc180a50efef6095
+DIST rust-1.59.0-arm-unknown-linux-gnueabi.tar.xz 192892448 BLAKE2B b7d194589b9bd07c34ae681985ecc60ad03d450be9c445dff16730d8019a02e6cb1ec6b8c231f9eb42500eeb8dd6d529ff821b1b9eb64f87f11266411133e5bb SHA512 0be42a92fbbe516c0437afdf279e5bb3d43e073ec5ca3ad297f33ef5ec5e5bd150cb728c7dea5dfdcb7b1d1cf3f4122d529e8cf8abe674651a05272837769887
+DIST rust-1.59.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 844f7f3655a974821689aa326d072512a12433daa5805a842e54005b88516013b32e46c21b7813e7f5b919716e73f518195b9247c3b9e1e51e85e4f8b102b9ff SHA512 bf7b9491ff88c6d6e6f91d6b77fa50aec48cda99181aab584b37dd81a2a55564a8d769be8ce1868c02ce4dbc36e98cf7c4d651e9e7d799f907e7f9fadc27b08f
+DIST rust-1.59.0-arm-unknown-linux-gnueabihf.tar.xz 192816760 BLAKE2B 565d3ed97da64299d6c5525f3b3068ca8ced1d8d6fddbd90506a41062d66c4223928de031320aad1cb12568ccc7e952243c728e13a8a7d6a60ec8c908829e0dc SHA512 5a3693f7edf0f51ba45d8d1471c4ce75926e9cf9c4eb399c9767da116d2250121ced6f08a5c7ed136cbd144e88f3c9fccbc48f805edc82aedbdca37248c0d092
+DIST rust-1.59.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 739967abaddc05a466e4ad88316a89fafeabb3c8b50844b09a4946635f4e19b223a76675026389cdef89f0fbe369e3f5c72a0ab64f63104d2a2d5b0d12efa617 SHA512 336f8d7885dc7cc9e44a9e5df381ce1fe516fddea90666478d65aacbba2ffd2d7312b53a895b809fe0135aef8b5604b3eae7b63d7f0d37776c8c1cf6f88395f4
+DIST rust-1.59.0-armv7-unknown-linux-gnueabihf.tar.xz 199147596 BLAKE2B 767aa2429a1d1e5633e17fcdafa1a763fb6c86ce392264445be91f79f924b5f1251aae5ee01d66cc902fe991b7ed42a23345d0460862508948d37af48d49b69f SHA512 590b8252b096331b404ecf02dcc11eb12ad1a751d03791a6eb316a7b7bc546c4e933b0acf66e771d394343b636db4dfba00f467715284fa1537399e161bd2d88
+DIST rust-1.59.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 77659e1ac997fee4eb50a969e581158ea622968b6de7d02f493096b1b108bd1f32a8c89b7bf1bdfcc7f346eeb14dde31d9b791624a72966f98937398bb833e58 SHA512 a404ddb78aa0d1dc5a8724b4e5b9d46b3c25ef820d50f9039928ce39169c1f8559ed3910a127f1805d6c07671b127a2adcc111bf8af5c1ae41a6f312492ae873
+DIST rust-1.59.0-i686-unknown-linux-gnu.tar.xz 212206848 BLAKE2B 949897daa1ec6e6da986ec030fa25db019ece6a16bc2d3442dcd8255d75a97212c6c214af6755a3231370e138a72dd22155719580631e403df987e992b6de308 SHA512 b6db8bdf25e59bfb64b13abb4a1b95e186aa16e1e165a575197e37c410e64c13c2a2d098b5af3935e2b6319566447c4a05b8e8b08b30476dba9d2c7f30000508
+DIST rust-1.59.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bb0e0cc0aebab03512cb261345319a94e3c2108125a90efd169160bad0a94bb71f717d66ee6c9222d5274f82c437baf435880f38652947b1ac79ec9bd53e586f SHA512 774d622d1b7cfc28a561fc8822865727e0fca698ddca2fca006b52d2b922057619ae65d4bbb03bdb0745458a242ab8724305c5cb4fdc8886f70edfded2b4543f
+DIST rust-1.59.0-mips-unknown-linux-gnu.tar.xz 151449792 BLAKE2B 0273b6dcf35af0d85c9adb4018b8ac76bef9895f42268e9ebe086f74c95570614b1cb5927c969e6b4a8366aa7a285a19929b819bbf8977343af899a3969eba7c SHA512 9f2c9ca60cbf38ef3ac23d1df7deb86864017addb7761b94a408c096e0a67bf3666ea05f19a57f902c8cc2f3912a96c5b9b91d1c2cd5ae86596c76d30fcce08b
+DIST rust-1.59.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4a7736612612244ca535fb2056089fd9e0426410dff5c98aa44092af918d528527cc0c12a3249fa3b9a278700c7e5395c6155d28129c3c7bced7056203942fc7 SHA512 18dfd434dc628c7f11de5c5f159afea0dc37a8123f490797bc9869941676fa85920a8bc592d4cd4b505b9fb1d67e35220253d67c878b2d938211c556ae60db4e
+DIST rust-1.59.0-mips64-unknown-linux-gnuabi64.tar.xz 156962060 BLAKE2B 64c12ac24a55eaac63d9a5173ebcb1b97709280bc770f02c1ba434e57f77e56847a691f17059e421517e7d5ad60e9e3965173aff29c90abfb1b85179631301c8 SHA512 aaf0b8b2f2ee7a3584fcd9bc690f54ce32c0f6a36f2c37ca9d4a10123ddb6d4e95c9343c88dd0830aa586a5a543dbac440a6644434f8035f1c95b3f046a843fe
+DIST rust-1.59.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 2b3a3f268b6a591e6541d3cb19ca733f393cff178932d06cad8d38d4a74c9e43e9a4aaf75c78d4c8084634e7ce3c5d1cb27a6540cc5f034e940efc276c1a3d11 SHA512 020ac1f172ecf41501218c6268ca2dee37842faa7adefc4d3410531f966aef4aaf66b94cd71237467322feb90cca198fdcc8f20f29a3de8c932e747e454a5852
+DIST rust-1.59.0-mipsel-unknown-linux-gnu.tar.xz 154605640 BLAKE2B 7b3410db3f0c534012b47cd564f9c14d7a878c0c1b1079bfc2d4ea13826e097b12e5dbef2a83641a339cbcf8538a1eb8c28005c3d46e8338074ab5c15fffdaa9 SHA512 1c096bed6dcd6499ee796c64b8771696ba0cba2db1793ac681b7c65b96ccde188c84306ff90a339bf49bee10955aeb179f0915ae0613c9deeaf766956661521c
+DIST rust-1.59.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 59fb0bd7e88119d9cb71a7af46afe2e3a4f37fb687b98409e7a83e0b57840c5db3eaec8baabac6ed26989b7b1ddcda13a9d221cda75f291a814b40c722b46573 SHA512 7c6c970ff971143338a11d774d0bc2ade2fa0dff185483800a54f07161bb181648e1b700c36cc6aced25bab9a383f7259b474b83379845926cde265e705208e0
+DIST rust-1.59.0-powerpc-unknown-linux-gnu.tar.xz 170384720 BLAKE2B adc37005f83854707bfa657e5ce5a247de807bd06bde63e6f65745f376502dd36318ccaced1b6d75c3dd3558dd0bbbd7c291854337180fbb18a1647bfa521749 SHA512 046e75c9540fb493fea1cbe9b37ff10f60abe7e31134de85f0e9503b2ddaeb60a03aabf8dd7bd9f55f3d93b01b40aac7cff4f26fe01ef3e3bf5cb052b42287be
+DIST rust-1.59.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f55215329f865d3a6505fd4203170782459ab81c48b8d6bcf2c3d96ba5d4d7a9c89dfa25eb2a4897f74a168a36b7abc2363007549f7f376205a37635ffe1052e SHA512 0a886d64565227f136b3568f6ff51996a8dddc0f3121174ac1e1d53f9a58d56fc76faffe86b24e274078779521f0be03657d76790951c86efe8640510757048f
+DIST rust-1.59.0-powerpc64-unknown-linux-gnu.tar.xz 179493740 BLAKE2B 2ff97ec145bbaead0946efca8097de2a294dad0b4b9293cd768b07d37bb5f2709bbdba3a3d949f4294041b747493f931bae3adcdafb1d2ebd0a88a982e77a7ed SHA512 83f204a2d32025fa88bc627f7f2f548a19941dc8f2575dd5c912f75f556853f63cad3c3145106e264943a915d842139cf34305cfb73c6f20646a022f949e1e3a
+DIST rust-1.59.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c9bddaa104146bbc04553f2000c06ee4655583251cddd222d6b9e629d74cfd9762d3ee6de732ec1c243ba28ccbfa2ee7fbad499a46a12b5edb6a755c23d7fe02 SHA512 586b9785e8cbb6eef9a7266ac9e0cd295aac93219cde7a7c42270baab417d4d43acffedf300a43d454be3487b0f0402617e78451d2da4bdc3b2a45bae6bece0e
+DIST rust-1.59.0-powerpc64le-unknown-linux-gnu.tar.xz 189083640 BLAKE2B 209b02e4ead2cbbfe87e59d8367526b9ecdcb324898e6b8398ddd8f21f0fb89a5d68bd3bcba84bafb435a2092c2c19b81171d4631f1eadc438ff9f29f3f72af0 SHA512 443e0c509df5337ffbef7407aee5fb1260583b0a85bede2a12995bbd4b1719e2865a73d0b79e47ac96d5f53f5c79e9903a22868683a9c0251bbb7ffb09f59fb5
+DIST rust-1.59.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 68abc7aa27c59ce7f59f7a4de400ad431c568262263f17af32d8999a5b68d4ed5df067aa8f41a226277f3bccc4908fe1326eecb6142401707f90a6f73b185614 SHA512 731dd8b0f3c33cc37dc783ee07f97727e227ce1a7856f73e87a4b937f6a8ecd1d778e65f1f484faa399795d94b10623fce56d056082bcec460e15fcdea9dbfea
+DIST rust-1.59.0-riscv64gc-unknown-linux-gnu.tar.xz 182319648 BLAKE2B 4e2a86431cd0c737ef86cd2bd308c6cf42f6f908a96456de4e2ab3d42f574c56dfd73933ee0177c8d797f17c8566e66d239406360d923797fa5eb49760e698d1 SHA512 4fecc8048270026f3bf5ca63ca32a657c62282e50132cff7af168168063beb65797626ce1ffe90a929e528d8b010193b1d67cbe87782d0b30c7b4e170eba081d
+DIST rust-1.59.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 37ec085b78b9b8cb076f676168b7f26d73b593ca4d2231ded00fa3d9f74b16b1e5d99a389df594b7ac75a8f9342ea25a5efb901931662d7a9362c3c14def5e13 SHA512 29b4c934c2a773968f8acdf469b081438780a4f2d1dc460fc851587719373b2151718f4ef3af81043d4ebb39ff2dfe8f4e4612276cfa1fc1946fada57adf133f
+DIST rust-1.59.0-s390x-unknown-linux-gnu.tar.xz 186264196 BLAKE2B f1c28c8cbff8dbd476daf7a3dee443aa4d90ea3432813d247853c159f20ee2347159f734ecce4ee85e36dfa886770c841355073c2220c016feb809225f4bd50f SHA512 3e9d86c84867d1f96f4cec4e2312ae604896b4fa61b9ab5b563fafe50b4e63a1bad9ccb90770a672c7730d14dc0235b50f2ca3cbe292220eb4e48a66a8f9d924
+DIST rust-1.59.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e97d2b8e50c69311c3d7c2a4fda1f3ae6803e5f53f9a0d2787e816297ffded53ac47e8033e0d5da2d078327133b528328edc9f610483cd1c0ef384317c947f4b SHA512 9e2cc63cd784134fdee91f8603629cdb7227cf56df2a5095cc06ce38df81b6bd3ace24f319c518bbb7619c6f17fc32e9c79bf0b0f57b1db8cd81302d66435a0a
+DIST rust-1.59.0-x86_64-unknown-linux-gnu.tar.xz 151858140 BLAKE2B 80eda8c19361b286aaa6ed6178df7f93a131414f6307c87849fa902d373d072643c65642c69ef7302488e0b4ad7883ced1c589606f91edeac83843ed0f6fe124 SHA512 df080a6225275945b0c028099e19aeb0ae34ffcec952b9ce19a6116feddbb29f4f4d27ed30f2c69c108652af637329c20a0d2875d0ff98dd9f7f4902039b6740
+DIST rust-1.59.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cd4387ad25b7f000395e336cdc92916ee7260cbf98a397ce02514444c8d2b35c653012ae6a9f1d5598155c06db573e1fe1a3f0bde1693863855dc17c18b478f5 SHA512 0b6790f0aa531a8251e1a19e0adfdb16bfd39fcec40b83094c26b7169f833114cc8679e2955fcc5359b05cd67564827aa231c521f81d4c41d561e9ef44eea713
+DIST rust-1.59.0-x86_64-unknown-linux-musl.tar.xz 246630236 BLAKE2B c9fe24e92055b2e765a8d96181c7c14a0db329f98e006ea2ade285078cad64fa2ef3419d26f30339685cfbcee672bb5e263dd183c960aa0067a27a0b36fe6fbd SHA512 40a711c015fa8eb07aaa11b0698f20886928230a8441cc7523572c7c2768a52557daf5c02bdf61430dcb9a912b8eeda499794af28f269b319ca7fef848ae4cdd
+DIST rust-1.59.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 1a96c49754b8670d243d1ad43478d4df8b4f4997490fa9691e3947260d469c7dc9bab192a20fd2ee0592e15785fb059644404d77d716d86b54038d0a76feaf6e SHA512 0c67f2be31fae00a318b5a6184c60f10f80ca5275a5d9dad4459d94aef2fe65624dd7789987d506b691666ac8f7357143fa6bb8207cd5b13b28692aa909a1636
DIST rustc-1.58.1-src.tar.xz 124353160 BLAKE2B 686c7272db544ad46f7fb01b4e05f24f4e08ff959a000cadfaef5d8fc413b93f5ed839077bc9715defc7a0a179af091f65c7a5d7104b0b3153f0654c237c094b SHA512 eff3279d2e519343cea542a9ae2daab592e44f35af344e33ff43ed55fc7c824511790d1991dd36a603d12465de8c3688e7194c2b9557f288c587ffa04738c2ce
DIST rustc-1.58.1-src.tar.xz.asc 801 BLAKE2B f0b600a503b0ca777dd5d690dca7252ecc6d7d49ca4a9cc8edc0647038f727e9052a861f9868292f837d78d6b02efe9ed5efa85843262c44cf6f73254cc7c9b0 SHA512 983c1ffdc4febf8bce6efc123c76b13f233772bc0a152ffaeb7ebf8f1f7b82a6b5d653407a4d293953d6fbf62c0df4ff4d398a1133061b53ae0f85317a14380b
DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
DIST rustc-1.59.0-src.tar.xz.asc 801 BLAKE2B 061701c4fdbde930798f9f938ca3642204ae4a2ad9396937ca7d604268813d6d68f4979f20d35abdbbfeec0bb389acd86c9d3d84256db85861f6b11e3dbef80e SHA512 1b90bc01f9d68ba1f70591c4ae707295d7727b790d170a0b757d654684e59d3c26c45b66a21f9ac762debb6867494660c73daaf10be9bd567a38be44c0009f72
+DIST rustc-1.60.0-src.tar.xz 136183048 BLAKE2B 8030f32c21f81af6abc7a282aab1189cb7d680c6bce58c119a1beaad71a3eeb36a696eef46a22d366e2c41a2f9182a9a5aa527426f2c8db05278184c37297dd0 SHA512 d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3
+DIST rustc-1.60.0-src.tar.xz.asc 801 BLAKE2B 02a2c140e091ea6913a760daa93aa57ba6a7631d0b99867669ce68641d562d436f13ed1f1578713184f06c9307d46e19dfd7c8d74a516b04293bc65c02b90707 SHA512 8136d19d4f3f4c45249b59b689f01d4edf108535ffe1f813771bd244cde1c66184a0bde5a0acfed4fb01015812458204244bbb54e6f5fa86e9b1ef5e92e805e3
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
new file mode 100644
index 0000000..65daf58
--- /dev/null
+++ b/dev-lang/rust/rust-1.60.0.ebuild
@@ -0,0 +1,704 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler 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.txt
+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=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+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.59.0-libressl.patch
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.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=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 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// /,}]"
+}
+
+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
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ 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() {
+ 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 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)"
+
+ 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)
+ $(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)
+ [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 = false
+ 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)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ 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)"
+ _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:-}"
+ 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 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 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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-01-21 21:26 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-01-21 21:26 UTC (permalink / raw
To: gentoo-commits
commit: a50d79ad197ccdff17c576efdd8e1bec6549674c
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Jan 21 03:32:55 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Fri Jan 21 21:25:51 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a50d79ad
dev-lang/rust: Updated for 1.58.1
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/378
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 2 +
dev-lang/rust/rust-1.58.1.ebuild | 705 +++++++++++++++++++++++++++++++++++++++
2 files changed, 707 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index c8dda48..d82be72 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -202,3 +202,5 @@ DIST rustc-1.57.0-src.tar.xz 122681768 BLAKE2B 739fe2c34b01bb0c6beeb7717badeb2ba
DIST rustc-1.57.0-src.tar.xz.asc 801 BLAKE2B e5c2e91999d8d2bcb5be36ddc8559a59fc53445f639bd179239489f9fd2a2f00f2191cdbb2000b73866fbb332b51be090e95e348a3573676dc24e00cdbb071fa SHA512 fcf1393a1be3c585447e08078b804e7ffcddcb47d87877c13526592e317b889b15ad1786baef5d6adf020631a6773a9dd31c04779f475a528b28871920a4641f
DIST rustc-1.58.0-src.tar.xz 124348768 BLAKE2B e5a0d919a1ca1202e218cec3da93fc69cba163069b1f2b4051778a49184715579c14cd6b03baa0225b10a8f1adf758aca427c910d95dfa2e647bbf8b7d133785 SHA512 70104f4d3b474dcb9935200ef0503f29cb15f10d38ba8630e1dadbb384924dd9137fced647794699efe83ac88083e4ae5f45712f0e1c8bc0a6f8c23eecdb0aeb
DIST rustc-1.58.0-src.tar.xz.asc 801 BLAKE2B d8b3ae366d20e0a27b53973e0d215c0fd5f596116ede15ac0e729db4a92fff6c602fc3893674863040a97abaaab36b351413e87a2c6d77f823fcda5805d23daa SHA512 e4bffe84637b2708d00fae091e3eb868063a8f65da918a847ef7db3f1edd35f96068489cae77238decfc134f4456cf6e3122f993e61f1e4986d3ec7f029d7125
+DIST rustc-1.58.1-src.tar.xz 124353160 BLAKE2B 686c7272db544ad46f7fb01b4e05f24f4e08ff959a000cadfaef5d8fc413b93f5ed839077bc9715defc7a0a179af091f65c7a5d7104b0b3153f0654c237c094b SHA512 eff3279d2e519343cea542a9ae2daab592e44f35af344e33ff43ed55fc7c824511790d1991dd36a603d12465de8c3688e7194c2b9557f288c587ffa04738c2ce
+DIST rustc-1.58.1-src.tar.xz.asc 801 BLAKE2B f0b600a503b0ca777dd5d690dca7252ecc6d7d49ca4a9cc8edc0647038f727e9052a861f9868292f837d78d6b02efe9ed5efa85843262c44cf6f73254cc7c9b0 SHA512 983c1ffdc4febf8bce6efc123c76b13f233772bc0a152ffaeb7ebf8f1f7b82a6b5d653407a4d293953d6fbf62c0df4ff4d398a1133061b53ae0f85317a14380b
diff --git a/dev-lang/rust/rust-1.58.1.ebuild b/dev-lang/rust/rust-1.58.1.ebuild
new file mode 100644
index 0000000..fd55b17
--- /dev/null
+++ b/dev-lang/rust/rust-1.58.1.ebuild
@@ -0,0 +1,705 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ppc64 ~riscv ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler 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=( 13 )
+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.txt
+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=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+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/rust/${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-libressl.patch
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.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=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 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// /,}]"
+}
+
+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
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ 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() {
+ 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 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)"
+
+ 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)
+ $(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)
+ [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 = false
+ 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)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ 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)"
+ _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:-}"
+ 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 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 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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2022-01-15 19:13 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2022-01-15 19:13 UTC (permalink / raw
To: gentoo-commits
commit: 361566715a5763e94f43cc054ff18595475d218c
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Jan 15 04:25:56 2022 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Jan 15 19:12:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=36156671
dev-lang/rust: Updated for 1.58.0
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 34 ++
dev-lang/rust/rust-1.58.0.ebuild | 692 +++++++++++++++++++++++++++++++++++++++
2 files changed, 726 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index e55c548..1342d4f 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -190,6 +190,38 @@ DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz 147894784 BLAKE2B 6cbdb8a82aba4
DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e0ed39db46b40631f69fa379a04ec37ba314587a4f081aa1f3251e01b7221ee8732b668cfcc4c24c1a3950f3f8dcfd542a1a73c603cea545b812d5d3a9527055 SHA512 3e9d0b159684a496e29c9e40af11f16f5ef5cadd8bc4852018a953310e77a4e29db6c14ffcc86198908aa4998550c83cfd3f2cc42e007122d56167d664776c44
DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz 255010720 BLAKE2B 286e91cbf001de6f888bd82139e6711b32f03d45c599f26b01f60222d98c3521a1933b3b9b7f8c46fa79d481780dc8dc47e5e24985b721a6998d620b446c38b4 SHA512 fb5a914a25ef3cb39393207a75c40f1313740167062feb4cda4084e738f4e93a51624a8a9591acc18553cfd6e2e232984c8c84acc3dfd77fbe38b17085850881
DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B bb7cfc775c1c44569276e687028e9a7ffac31577310052d9c354179a541ee13b0ca00a025e994e03ab17086d0abe6dda6845ed1cb10879425439c7651bdc9269 SHA512 cb23d98cfb1b59fcccaec575145b6f38846f3f49b16a3be199b06d6198b1db13720157ca65a01f6ef76abf742507bba39776d130f0fd03aa228acf5917457f7d
+DIST rust-1.57.0-aarch64-unknown-linux-gnu.tar.xz 228665060 BLAKE2B 98fe268d060a7f19c284bf02fec148550807b6c75fad042b85f07b22c127f911e4e7e6d9738b4bef42b5a46cc888e5a0df79307cc84e39adf3ed9da3fd531188 SHA512 71d32e1ed3fc4a2eaf3594112b3b43ab82bd28b35e547542f6c1ed006175d7cf805be373a4da8b962762962dd32fe951c8ca7c0a424addad5d4e828441d5386c
+DIST rust-1.57.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fc832ff510b498a5763a26b420a6cdcf6b2b5fa8ce655f01ab23190f527cfaac144ac68378c6af3d3048440330f94b5d213d049c65ad87f0701b0555ebfa2b6f SHA512 a225f1db92c6e57b977873a3e5dbd07fa1288d2f8d79a879cc72dfc0dff66e70ce56619198cf36376b2774272c85363b8e8abf14efe8404f4cc038410c648ad3
+DIST rust-1.57.0-aarch64-unknown-linux-musl.tar.xz 224700500 BLAKE2B 2eb3122af42c499bf92b93946b20b6414d51ba895a77a8e9c53dc437a20093605b2e9f22d8f88b4fc3ca7f7b75d425a2442b36fcea54b583692c32f728f23bfc SHA512 0850861d9d2c22d76b1550e7d6b64c746c3cc24b51a68949948528bdd93621f74e6c07d23428fcdb280e884e469f2e4f2d3f9a7f81ccfa61d41265e31af3a9cb
+DIST rust-1.57.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B f594a31b48af2ee7835f89660a13e336f3cb2a01d99a5d48d280c06698d69712de190b35ddc682a9ac7bb6bad1edac9c3bde7262fc5a9732ea471984e1bb99a7 SHA512 aee3fd35c8e7c6b9ce651d940f8fbb17a2bd2a58d8b85421ecfb4a72d5c56878a5d129166896ea717c5b3e5b9c7f61376801d766af1c9a4d1a090327424e93db
+DIST rust-1.57.0-arm-unknown-linux-gnueabi.tar.xz 206890752 BLAKE2B 5d314766d333708158df7ef01d740e0cf0e71044edbdeb180f491c78a39dbf9460b62a1eb70076787e33a3199821b18734da59f892c0c251effed8e68c0eb22a SHA512 c01a6a408bf334474b2060ef70ed7c6c53e5f3a7453de74e36e59013292584a129b50530259327ae410830852173601dd9bccd1cd801d9f916d1a3e93820e481
+DIST rust-1.57.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 494d4eec9795de0150da9a7f5ba6cfbabd8da99dc65e5e02360ed4961e42cc3761f147ca8f7155badf61ec85d2898ec866aa5dde53e555ab34ead6b4d32c737e SHA512 31e9f00de8252e905d4de279860ab7eb287237d7d5330122b989ef2199fa8d209ef7a0cc71b83db82b78ea632d4d3b9c00b8f49a272dafd6e1f78f62055fdf4c
+DIST rust-1.57.0-arm-unknown-linux-gnueabihf.tar.xz 206580040 BLAKE2B 3ff02d3308cc27e2422609055a82ed36dcfb3ed2180091653d7ec21ccbb07f3685c58dc5d20f4abf4e342ce18d1d98e47c0a82180b5dccd57d09d215984e6b3d SHA512 9351db6cbc029c1051da277292bd7c3728b6ef250da20a20ee619b45938ccdcd8da1ecfec143734cc692ca3a39690f2f8cd6c332e04d0fd048943a8203eb48fc
+DIST rust-1.57.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e5495533d128a99505c7856b27eeae22f85b3f0783cc0c9d52e8e8e9fbcebee6b909fd3465a7b49d1e1da2477c1864fdd048f01f7ba684ed55133c925522aad2 SHA512 bf06cd5c1f6731b02351136c7682d05e6a7114702124768b5cde1935cae4dd1147352352ad9b8dded575b90a57a6cab7c09dbe179404da0e378e992e1a67f47f
+DIST rust-1.57.0-armv7-unknown-linux-gnueabihf.tar.xz 211614620 BLAKE2B e8c1f68d4e0846ee9425bd1747a423e1ab6161216a3cd276fd5afc13229dad33e3993d31305e3e38b4d3f6b21bb01fcdc9612d2217778a7f91915c65f1aa91d9 SHA512 667d8f6fb56408782c7a9e0c5086013d0350d6161d52ca4cd948ea39a02ebdf657dd45cb0a135ade8bc1e856c0962040969416fa1762e3bb55a03574fff3b1d1
+DIST rust-1.57.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 6bcb5e7c700a53d8420baa8747c06b291988b806aca6da447c283979f7324f31087482df5606c49d287c355e31b2952d7ed9f40713bce819ab8c02d1863413ce SHA512 164ae760f53820dddf93ce7432553d1698bcfb1af53dd6054d408db87f42b6ac2d7c71da375f8486675b2c6104fef295faff481e5167288e0df782ef74cc3006
+DIST rust-1.57.0-i686-unknown-linux-gnu.tar.xz 223062024 BLAKE2B d0e1d3aef1764403dcaa2b1d2a5ee887562f0b59b05b2f984e848da60f772c58bdd8a6073692c6b71dc741ff3d25a784c04478260104962d308529516a56cae3 SHA512 9dc7d650bbe35d3967a883e91bfd2a3dcad633c41c00a41d9ca78bc336b1e3262bbb4100a76d42169700dc3b15d4066fa065e785aed1c0a46df4736dfd00d7c6
+DIST rust-1.57.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5d6f4d31e1418124cbd10a7cdb5ecbfe3334256d238e058e5524120438cebe85af68a8dfd604dc311d38e553a559b471dc71ef2870f89ed2cf05f6291e65ac0b SHA512 4957bef14da4bfc34f19d69cc64b2e06fd329566fc941e399105eea6fe4de0de90cd50c72baeaea6490f93bc4b0af14c9591584d97d84873d9c87fe7c177c6ea
+DIST rust-1.57.0-mips-unknown-linux-gnu.tar.xz 165094616 BLAKE2B ca5965c40ad81c24ee00f895e00e26cab1a2c0322e2517e4793872707facf03430a92934b79a3d59f349bfb7513be4d1914073fc3b20300d5fd5c332bcb08224 SHA512 1fbd2aeb8e24d236f97c81a4136917cc8c705724c72567be095323a878ee18ed646fc2f4bec446a9a505fc4c88a708efa901970fdb00a67179c34cf97906a3b4
+DIST rust-1.57.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 230ccb3a534515c9ecd1ca2a3fced2e3688547a3ce42967eb06d7a04b79695eca74f1cf13583631139801a7ad60a31c7f6a1b2821dd13aceabc95386122034a0 SHA512 91313f0ed942d23bb490dffbc4b7eb9a441a09ff5925323df68a38c15aa4e3f5c1bad15c2700ccba8625fb35588135a9ba5f09c7bc5ba7d4f8486fed268a8000
+DIST rust-1.57.0-mips64-unknown-linux-gnuabi64.tar.xz 170276060 BLAKE2B 0c6defb288bdb11a8c81ab082944196c767424b8bab6997a51279c7c6ef6c1163c9715493b274420bca9d3f5e7fe7422d403a24162effc3cd880633641d23995 SHA512 339d1dc24e1227195b1fa1a72ceddf592026b4edf234141567e8b8c33c80e07aea71dd73962182783b60271829db8544e1ca6172aaf5ed5ae1cade848355508c
+DIST rust-1.57.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 3b6ebc9e8678946f57e30452a880be3bf5a5a949683e7230cbda776511fd68a7278ecfc741c823d2d1362f200af19cbc25db7d67ab4ade8561a3d9224fd0313e SHA512 0a161f676162684da557d010de4833a6ef229592b6cb9cf55938cb85d12685e28fb0e4e204688b9c9f203b34095831de06c25a4fea48a8ef17226b15a214af0f
+DIST rust-1.57.0-mipsel-unknown-linux-gnu.tar.xz 168175700 BLAKE2B d544173e64d81b5cf74f16810f0c00fab0e2b628f90a554a33596b1b3140ef5183db5123f956ff71269761915469a7d51bdb945c02217f47529ae45f1200edc5 SHA512 7963364478ca613ca8670cc71b72e8423febe3062269ea1e5e82358d54c6d5e5006f85c69ae5c746bec296bd3e97883358ab27a9aaf59703984fa4186c5e01c7
+DIST rust-1.57.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a4056c8006cc5f3d7a548b55ff85f42003d19a7323bd3829c79ba370837c1982a0ca6d15e5d2dac9a4c75251662b375c8243ba0d2682b684b6fe258b25c32fbb SHA512 3db703e462c5c2e974e039c986094ae2bcbdf5e4b2163bbca4d20062be2e54b39f04d72d3f5929886f65e79f19a041e01cb17ec73db4611c3208b51efa2b7e89
+DIST rust-1.57.0-powerpc-unknown-linux-gnu.tar.xz 183173668 BLAKE2B 8d897751ce518f0e7fac16fa67645b73337cf2aeca20ffc8ceeace6591043a1b69cae9ba8af6271ad2b7b4448a64e4b5063a2efcb2cebc72c1d0a95c576dc07a SHA512 10ca7a769b53453c503d8da2ebd5da49e016d31a92e898c4aea4129cf1225330b2e1b4ac1893860741efd9ddc9ce409ff9d9fc00536b960efc928562f2e169a3
+DIST rust-1.57.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b7cfe911745b76e8b2a7090db19a6cc973ff361b0fc23c1d3d104c08554d7818866a6832c89cd8e1dbb519de72618ab362c9e6b1971a2babd0af607c9db9b0e0 SHA512 385c022053f6e102aa9c96c49703bd441b466129bffc5fb3c233f432edf2f2adad5e9979e0b657016eec33cf4b6c7bf31131a0e831c990d071d7da758f5e03d8
+DIST rust-1.57.0-powerpc64-unknown-linux-gnu.tar.xz 193868872 BLAKE2B f60c9d320fa6ca0d3b52dc27b22efb50115a1338ce12ea1071499d3abbd60e17c4866a59495fbca725eafef3675b9ca9417c87cad0262541955d2e308eb79f2e SHA512 4b5b2d461cd093f176c1624b29d4174bf9558e8760f7be84b9f9e353e09b622d89548e5bdc91305cf76a072ed2b64f4692b1864b90c86ba7e1a7a9e5df205adb
+DIST rust-1.57.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 26ea554afaca2e453130d400d3315d0c857e4ab92d5c0cfd21035548160a3c00f801adcbc24387aa6f56bc2907e3aaa3712b4bf35abc10128e3e712b3a451043 SHA512 90ff52af04044b073855c2a91bfe2bdb8fb8397a2d59ca50e38e5e235bd3379d993917546d1dacf3c25db6ec386f967cb8c9c5c7a1b76b06fa60d50a5c066176
+DIST rust-1.57.0-powerpc64le-unknown-linux-gnu.tar.xz 203489092 BLAKE2B 5174c149bd6565ed2b709356caf940f7c051a1933a35f9801a31331358277e80d5262a73ea47d484abb2c12ad26c52bbeea5d2ee30f4c8b45e163d5fc788d848 SHA512 7e0809b66086f1c9dde14df5bd9f08757e32bb58041b74150415f798d81cb4ca01a6d69d529efe8a93026f251aa8f1711520defa8d86de64f20d9055ee1568e5
+DIST rust-1.57.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0ed205cf7d3712e3501c228ad7d116331eb3c831437040dc7d4cbfa86de80372db1b116bd2c88ef9c05c57279499dc7cb6a394c216e89a69a6b033d56e4108b0 SHA512 2a3fd37e32382c747227f35e144966bbd241d57b9e06acdb444ed0ac68cf174dd21c565448d9e7ec032d14dbf6de580ca37e6d10b66446dcbef35b0dd35a2c1d
+DIST rust-1.57.0-riscv64gc-unknown-linux-gnu.tar.xz 196918164 BLAKE2B b41e958b690a5f6f46744dd38a464a0de0b80d9b4974f1fea46bbce8b26c37b88ffeb3b42e9cd6a3006e8ad8b89a990945dcf1e814041399f6fa8831089c074f SHA512 43c11df8b6621c4e3ccbbb81c043cc3b2f8c897f5d80b03a39ec73d0d73f1a3fafa1a8a607fcf6e16204eb424ead7b9dee0ffd401c185440c4a7b80e84921f5a
+DIST rust-1.57.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c55cc1c7c3e80bdb0527fcfe9b3a0bcb7edf84bea85e842ea425b5498247aaa8ffe19f05f1a2d8c93801dbf1d5e308760e8222311914179deb01f910aae279fe SHA512 df0d218a78eda0d005bb88e18a314f326165776449f28d4cd1aa014efa0e6870bacd2580f5958250e9a00de75c7327b20b4586606a8b120a7d658641759be61e
+DIST rust-1.57.0-s390x-unknown-linux-gnu.tar.xz 198621068 BLAKE2B 92af932e06c529ef27e389d35532cb7eed482c36bcc196d6c6934a442cc180815862ad7ee92c4ed97f69963ef6cfd617cab2bc254a81ffd35d88de267fb5d084 SHA512 4cc63e93bbafcbba2122a862200bf1dd241fe84f526778e1877c14237984fdeccdd3d2b3dfe73428b1b97bd253c1ddf98f4302f40709abbdd52ec721d5ccdb6e
+DIST rust-1.57.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c088d5904ecaadcad09d21dcffcbe1856ea2165cb45fcdce31ebad6edddfeb292bb644548537219ec301c4f5e417091d879093a627ea5efb4409e1db36771431 SHA512 c1c2f43033ba1a2ed28e8c60a18cc0de1dfdc7f5361c101cb8318f0f2c3be911784e7d1cc3a61456f1b2c39a5b6df2915b9e56e20dbfdfeb959addf4dc93f01e
+DIST rust-1.57.0-x86_64-unknown-linux-gnu.tar.xz 151033748 BLAKE2B 61ecece6a8aa31a2cdf8dcf22514c19a54fcfda3a1248797a6a98e9bc42cf4f4278be21369270a6418b7c416875394055fceb49b5b1d21625e2759b97b2447e8 SHA512 54016b58fe85208c0d98e61cb52f2549bbb9731d7d631b4964663c91c91b7ea0ff4c224c3d29a770de433e6a0bcd92d2fe757563bf68e224a20c1cec6d031a7e
+DIST rust-1.57.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ea41b27fd25cc75efac73203688ee0882767fc76a2fe09b5e424c42467d3e332463c5560cc58f3b20f6e4b44289a25cfb0d36e38a7a9a7b3950ef875a59dc9ae SHA512 8b955bfce6c130e4b95054b98646f7f9b89e621256759ee1ff533df5f777312dd7adbb192ee0076c9b9baa6883a74a9def50ef598ba8c707762290d465c9a8b7
+DIST rust-1.57.0-x86_64-unknown-linux-musl.tar.xz 260333980 BLAKE2B 75342ae8637355e714d5217d78604cfa6a601d3f9bc0ed4667ff0ca57c6521567b19b9bdb10f79761e2e5fd21ca10e12f3fae0c65791118fdb0c35f8f88349f4 SHA512 204ed493528757b8e3e8df13d062c9ae74c75c3e3adc1a2efc0dfc33d2525629168a558dd32653f44a4365191bf203a4415a77152276288a8e122e6bd587394a
+DIST rust-1.57.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 506400c3ea70469cbda0e492e85d41b7f94fba790ec19d1c3491bf4a00d283f97c8fb37319ad6c4a43b22a2195c21d1b9e3c16a5b2a9a82833ff61ad49bdc793 SHA512 793369dc7a854c48a72d81446a0c8eb9d83a071af77758e0bcbb8e4d518fb87c5a23c085202b9b427a02bdd772ad9c82724b34295b851f26f384c3e801bf9a04
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24
@@ -202,3 +234,5 @@ DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929d
DIST rustc-1.56.1-src.tar.xz.asc 801 BLAKE2B 70ed1c26971e864aa6cc9b05eb52c4a140d0d0cccb3ff66d4a13e1b1dbac958c5369f76524c4702311566ed26aff635f5e3d35d9da71d96e070f5f0e978dc2ba SHA512 f997e7962ef8b283c19c97d8b898f3642f1a58c89a9cc5470cf88682263a42e2054d670c12bf93c41e81edf8324a5b51453f402a74bccb7744c7f463cf689aa8
DIST rustc-1.57.0-src.tar.xz 122681768 BLAKE2B 739fe2c34b01bb0c6beeb7717badeb2ba12f00b91831977bf0d8782d806071f8ed696e94bf51d53509ae6e5c5773544b2dcf4187e81682c2f765d0975c64ca7d SHA512 7903bcfc7c1db208da5d5991bd5b7f55dbe5917d4814274a8badf0d3b767211e81f8626c355ea93142f236abf116d5921c0b542ef309fbe84ece1ce84e5af30f
DIST rustc-1.57.0-src.tar.xz.asc 801 BLAKE2B e5c2e91999d8d2bcb5be36ddc8559a59fc53445f639bd179239489f9fd2a2f00f2191cdbb2000b73866fbb332b51be090e95e348a3573676dc24e00cdbb071fa SHA512 fcf1393a1be3c585447e08078b804e7ffcddcb47d87877c13526592e317b889b15ad1786baef5d6adf020631a6773a9dd31c04779f475a528b28871920a4641f
+DIST rustc-1.58.0-src.tar.xz 124348768 BLAKE2B e5a0d919a1ca1202e218cec3da93fc69cba163069b1f2b4051778a49184715579c14cd6b03baa0225b10a8f1adf758aca427c910d95dfa2e647bbf8b7d133785 SHA512 70104f4d3b474dcb9935200ef0503f29cb15f10d38ba8630e1dadbb384924dd9137fced647794699efe83ac88083e4ae5f45712f0e1c8bc0a6f8c23eecdb0aeb
+DIST rustc-1.58.0-src.tar.xz.asc 801 BLAKE2B d8b3ae366d20e0a27b53973e0d215c0fd5f596116ede15ac0e729db4a92fff6c602fc3893674863040a97abaaab36b351413e87a2c6d77f823fcda5805d23daa SHA512 e4bffe84637b2708d00fae091e3eb868063a8f65da918a847ef7db3f1edd35f96068489cae77238decfc134f4456cf6e3122f993e61f1e4986d3ec7f029d7125
diff --git a/dev-lang/rust/rust-1.58.0.ebuild b/dev-lang/rust/rust-1.58.0.ebuild
new file mode 100644
index 0000000..1a0b8dc
--- /dev/null
+++ b/dev-lang/rust/rust-1.58.0.ebuild
@@ -0,0 +1,692 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler 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=( 13 )
+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.txt
+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=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+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/rust/${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-libressl.patch
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.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=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 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// /,}]"
+}
+
+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
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ 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() {
+ 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 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)"
+
+ 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)
+ [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 = false
+ 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 = ["gz"]
+ _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)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ 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)"
+ _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:-}"
+ 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 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 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}"
+}
+
+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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2021-11-06 18:17 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2021-11-06 18:17 UTC (permalink / raw
To: gentoo-commits
commit: dd95a8a608afad3c00a98fcd0c88f5b031320d2e
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Nov 3 18:42:49 2021 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Nov 6 18:17:52 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=dd95a8a6
dev-lang/rust: Backport gentoo changes
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.52.1.ebuild | 9 +++++++--
dev-lang/rust/rust-1.53.0.ebuild | 9 +++++++--
dev-lang/rust/rust-1.54.0.ebuild | 5 +++++
dev-lang/rust/rust-1.55.0.ebuild | 5 +++++
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dev-lang/rust/rust-1.52.1.ebuild b/dev-lang/rust/rust-1.52.1.ebuild
index c005cd2..f1b3385 100644
--- a/dev-lang/rust/rust-1.52.1.ebuild
+++ b/dev-lang/rust/rust-1.52.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm ~arm64 ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -138,10 +138,15 @@ QA_SONAME="
usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
"
+# 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="/usr/share/openpgp-keys/rust.asc"
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.47.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild
index 9766417..86e053f 100644
--- a/dev-lang/rust/rust-1.53.0.ebuild
+++ b/dev-lang/rust/rust-1.53.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -140,10 +140,15 @@ QA_SONAME="
usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
"
+# 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="/usr/share/openpgp-keys/rust.asc"
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
PATCHES=(
"${FILESDIR}"/1.47.0-libressl.patch
diff --git a/dev-lang/rust/rust-1.54.0.ebuild b/dev-lang/rust/rust-1.54.0.ebuild
index 5295278..c269d0a 100644
--- a/dev-lang/rust/rust-1.54.0.ebuild
+++ b/dev-lang/rust/rust-1.54.0.ebuild
@@ -140,6 +140,11 @@ QA_SONAME="
usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
"
+# 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"
diff --git a/dev-lang/rust/rust-1.55.0.ebuild b/dev-lang/rust/rust-1.55.0.ebuild
index b692edd..e540318 100644
--- a/dev-lang/rust/rust-1.55.0.ebuild
+++ b/dev-lang/rust/rust-1.55.0.ebuild
@@ -140,6 +140,11 @@ QA_SONAME="
usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
"
+# 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"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2021-11-06 18:17 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2021-11-06 18:17 UTC (permalink / raw
To: gentoo-commits
commit: ccea336ed28daa4367d300befabe388e478d9086
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Nov 3 20:25:42 2021 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sat Nov 6 18:17:52 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ccea336e
dev-lang/rust: Updated for 1.56.1
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/libressl/pull/365
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 34 ++
dev-lang/rust/rust-1.56.1.ebuild | 683 +++++++++++++++++++++++++++++++++++++++
2 files changed, 717 insertions(+)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index a407b47..3a33d46 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -126,6 +126,38 @@ DIST rust-1.54.0-x86_64-unknown-linux-gnu.tar.xz 136593024 BLAKE2B 2f10b636982f3
DIST rust-1.54.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cdfb03b6a75cd86e565b0b502cbd72636b67a92f9039fb148ca19fbef3d0775616ff03420cebeffe36db3d1d1db75e7e77ac473841a399dc2a218df09598b2eb SHA512 144ec35e82194d16cbf4e56c34dc25aa83d8ec8021052cc471ec85f169b74bd9394ec52c21c898d3ac0b966fd7463cd567d729eec9152f5fb8307c87eb02877d
DIST rust-1.54.0-x86_64-unknown-linux-musl.tar.xz 267840732 BLAKE2B 32e50467c4ee88cc502ea7e3e8cda9cbd89bcb6b7fac0c84b1509abf0a5c551d43f6522d148f54e4af65e0738b1dd13bfebaaba7e863909047fd53cac03bbbac SHA512 131f4743e5990c3e1ec2b7a0d1eb107a0e5264e6ce387cf4aa6db9a1693d0fe4a42de5722072708d72d580500d566f7772513974ce5589ea07997374fbdefdb9
DIST rust-1.54.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 8b9194ce2b172cdd1fecbe064ddaa0047d30ddeafeaa903637e65775b139207c47da7eb17475ed17b1792b7c872ae71058c1f2cb7d59bd2d42a78cc590f9ec03 SHA512 2aaa42cab5272b6ee2ad0d3cd67b7dc648af68c5b9b5fd8f816688c0ebcc2cb0a24ac8c2a23dda5f17f7ba04f544625b3b03b22882c9122852bba680d8155afc
+DIST rust-1.55.0-aarch64-unknown-linux-gnu.tar.xz 233469360 BLAKE2B ac0529d771dcd22ed55cf52af12a5b55a8ee008d9dec2c09fb1aacb0c7ced78e87a6b7cd8d17a3dd81241d553b750720e48631c3a3702ee59bcac905f3a51420 SHA512 223a024701762675adb5c7c59fc54717d23f2ae4ea5984cd1cc0568d39c5207aa07a104ddad68da057f6434eecf23415ae13be2235797897d8d0f7cb5f2fc4b5
+DIST rust-1.55.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 02fec5fd64e97da4c74aa5354f557b3090c3df9c55d827c1811fbc41fe513ba00d8f854f95babafc7c9a4d2dadf50f4cbe6d3bf60cc10f12609c0957971c571b SHA512 1c2f41efb85971009a705ff3f82a45b6e3688d12b2c919c2555cc19dcc3b9575b516223a72caccb5ec3622e353fa0380ae3481a63ed2fa9b89f8e01c2771c95e
+DIST rust-1.55.0-aarch64-unknown-linux-musl.tar.xz 233248308 BLAKE2B 263506150ecb677c73a9a670952796d7df90b572ceada5fa4afd8b1478363670d802f6a26f47d0d6cbb34544edc63279dd4b08a9131e5702f4119a2236a91f6b SHA512 a74050bbeabee752d030b07f830b919467af59755b7b79f64edbbb7acf822bfbbd1d013d25091d37ce255ee9796056966d102bf5b3da475a859788af7ebbdf68
+DIST rust-1.55.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b1b43bf430d33acc9a9b5f99148f1e0b930d3e271d40834a44ca839bf00369a01bfbcc69f4851e1cc951b26d6f7eedfd6f02b6ff9ada8dac85ccda0c22b1ce36 SHA512 04d31f458c285801b0185308a56700f0bc3bc2ad8c4548a1aa91e73bf94878810dbcf483403ad5815e80e87fb1417d958dbb18e6fdf090d2fd41b90d1c8c040c
+DIST rust-1.55.0-arm-unknown-linux-gnueabi.tar.xz 210542012 BLAKE2B 91e6eb6c42f99e13aaeae97ef85cb266378a0201c64c3588335022a7218bd95c438d290a66390ed004a627a667ed6e4acded9f79fd6a7d47017457fe9955c658 SHA512 3cfd6e6968ed4b7872376da4d33f2eae0bf10d99eaf5fcf59e6d9be432f0239b03baf46b70f0146175894f2eb1ef118854d263d4ba8d18913e4f820fdd1f97e8
+DIST rust-1.55.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 0902e4acc3a70750d8c2de86c22cfefad261e2b204c63d948c7e232adece894c4f7e15d799eaa3fadcef9a63953e603f5bf1e17c6f4b601cb4d93b88d8c970bd SHA512 39db8c7421e86c79189f1e0cc5a79dfae6e7633c43749f49cff371af862c0becead4a977cb75295b06da75d64516ceef68de4f42beee6d63e1eb4fb0bf976dd5
+DIST rust-1.55.0-arm-unknown-linux-gnueabihf.tar.xz 210534624 BLAKE2B cf02334a4b0182073b5387f3d1f16b6ae0d0508fc07e81ecc7623eb21031b03c1e6ab10cb2b6fd23071c3cc0c77adcf4cbd7d34d38e81853cd0ef02368c99036 SHA512 83a888c334caeda24f365df43df0fb83f367fda477d1bd7c869c88cff5407ffc134d8bd172a037c27a34d79cb28eb2e9629f26a7cfbc0db9209e581e06ec86bf
+DIST rust-1.55.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 17911a4745c705f7a4a2849301901912161c85300305e77588180d0fa4160a7ccd9188415c97a266613f35fdfd5b0b45879814c0afef6c6c2fea2bac700d0f39 SHA512 95d0731d84b49ecec8388fbcc0cb65f0ce93956a44dc62e1628f7e51e5726de6b611ed426a5e5c586a028d8808e6bca4257a8a1354b524087d833a32c3e0a231
+DIST rust-1.55.0-armv7-unknown-linux-gnueabihf.tar.xz 216342104 BLAKE2B ea2cb2d41c0a994124c5a5893cd3764f078157cb225117d9ca8641ca8896f02724beab7561a828d1163055e4c999ecece669f77920ccce0f495f2ff1b6632368 SHA512 b06b3c36b5ca35391030f3c9d2f64725263ac987002923d9263c4c27877d91453db3191e01d40c78f439a48f83da220926a2841337d815dd333591d453f2fc0e
+DIST rust-1.55.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f35d5adf2ef48d52d22f6066a2dbf6a61543cf7e478a5d201caf1831f5cda53b7003148477fd043de98530bf3160de51f44f87d4e30be6cb7768344c6754f16e SHA512 e3cc3596e3f96d0aa6ec915690730118cea023e57b7bd9255acf80782acb865a1aa5ed3e404654d7eaa8110947f50f42b575d3df1eaef616afd2c55e8502b535
+DIST rust-1.55.0-i686-unknown-linux-gnu.tar.xz 228160060 BLAKE2B a5c37f6a25b8e09b3ca831f4f69d65d71f97bf0b0e975e7c92e8a4b2ec791f166f477b2fdce0ae6d9f539e598887a54b1e9ed0bc603da0e0c787cd2ba4b59565 SHA512 a0222c68c63ddd67afee552dd9ed636ea02fd3f26000deb7a1dc47806a1ec0b2fafaed903d4dabb0fddeb9e4026bf0da8bb2161c14db24d2883c084932e306b6
+DIST rust-1.55.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 62cc675de6155892cd6c0932d0b354cac4b3a07be58b2d6b021f7e86df058d5ecccef8e4ad9bedfd2432e84cea9720a982cbf9a50bf8a42149d8f197a27f8fb1 SHA512 21efa3b95a0344913666220f2996a8273e7d41077410b9eaafb7467976d0eca0139c780326b3e645d83db0b410e5db3a36342d89af668e65d045309f541c1c1e
+DIST rust-1.55.0-mips-unknown-linux-gnu.tar.xz 152431144 BLAKE2B b5b27cf62f92f551a39ed65c957b73ce30ef9d1d956b5ca342641bb647c4874d7e325ec5f1c22a340668315c8f50c34240d0a2044ac8e5a88608c02fdf4f7e39 SHA512 e7eb3a64ea87c211a77ac73c4cfa001849fde1f73605d4e58cab84b09c886ab1a9a850cf1dcc9e1af19fcea0ea53400529a74adab531bc0a5ae3cee70a7cc99e
+DIST rust-1.55.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 31dde6a6991040bc4772bba2577946837af84922b01c12bfa1ac9003f90f118c24d63bdcaff339b3a256f48cbfc55aac0bd1823727c35ca6424c5cf3b049d4b0 SHA512 685e6d15e79f71de45c9c2532cbbf7ded0c6b8d986c2bbb78887c43c05cc91ad5430c5f04c80d8007a3a86fe2936b29d7c8d92905cebf0ddbd152c526f324077
+DIST rust-1.55.0-mips64-unknown-linux-gnuabi64.tar.xz 159792528 BLAKE2B b762f4965771184fcf3ceaf38c7c8b62d9f4cbafe0fbc0a1e01a30ab9a5c951bff9472796c72ae1945d2a510b0efefd576f3ef0b4041eec7103cb5e5deb75e14 SHA512 74b199449c2237d71d2d8de4d8de05c82f631cda1fbf00b342707b4e99aa6aa7f89957d606c29dfeebb5990b3e6f09de5f360c484c8153cd17076bffbbfac251
+DIST rust-1.55.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 92a173654e7de569734b9c56f4f9d73d67fdad625b71db20c1f1fbbe20a12cb54a54a69bd215846101fc620b6a995d1f91dccdd59c97a5d6f2efdf59f1c40b3e SHA512 2f166793f3d814f39b11c968921fb9d95627325f588eab9d7b26b76c5824222978286cbfd2cc3b197d7a53711e74dc5da39eb422d0dfead9e2ad2638a2d3692f
+DIST rust-1.55.0-mipsel-unknown-linux-gnu.tar.xz 155530648 BLAKE2B ffdaba2d35b5a6287fa78234df4368cab5e95ee139600d2d0964398eb0eddddf0382fc5e17f721eff3c1b61feaadadfa056727e249266d4a1783dfd441316eb3 SHA512 b4de4aab16039b7119760922fc18e7a5e0d1a1cc61ba5b3b5f778ce9d1d234448c8cfb5d46ced58a5b5705c1ae1a79403b394f0c4894e6387d7a9276768b2014
+DIST rust-1.55.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bf9a712e8b3ee8e44a4a1e9bb5e70486d11a65a09134845553c8f2d201eb1f674e64a6dc50a9de7eba3c8c457a747a0c14ec8228710e2725fc4a4630dea9414d SHA512 f9f62b8d12d33446504e193df49b11507cf47f17ea63abe329505af25c29ef928505049e161bd0157f03dab5f54bd59c38382e0e2cd891e79bcb831dc4c1ddef
+DIST rust-1.55.0-powerpc-unknown-linux-gnu.tar.xz 165801508 BLAKE2B 752325711493d0caccd005a2509121992dfd3850eb87cd4100b61be08f42d0680d16098c631b15e4b94f63dc5d11f63f75e2d3d38ff7817fcf254563f80cc6af SHA512 c78fb4a5e7c59fc96f937eaee2e8ddf08be32376f45a6916aebdf046363f5ad792f67dbe1d42b699ee82b5f968671e710233f72d1677e70efaa90c9a54d36688
+DIST rust-1.55.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bdcea33c2655a29bbb154129e981229cacff826483d950f32b5df5fb9ba7728c68d25d35df796bd75a26cad20ff525e6de4a059d0c908449a68460ae83112767 SHA512 f3ba9d98da9d4eb60c0f07ac509c24281cca419b805e1efe89583c93bb050665992f63069b3a76d8cd810b5a81d28b3f732c54eba081c40e9f8e6e0d39e452ab
+DIST rust-1.55.0-powerpc64-unknown-linux-gnu.tar.xz 179595992 BLAKE2B 3ed33cd7d28f0d8f91fa0ad2e46b7e8e53afe3f0fe8b8557530aa7ddeb3489e054635b636bdedc85bf91f17ea074b286f603b83cdad1c149eec431bd0b440ab5 SHA512 367ddaee0131ae05945b0a81efb73fde479140cb8078d10ec166c0da68afc1fa2aff40a8e6246c2b4861a876b8672a8d8d126bf15d23830c6e170aa27c1d6a7b
+DIST rust-1.55.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 795eda0483df19dc9c3f4439ab01dd3a647cbcd7bdb03a6d236d699214c6d1e2b1d794515bc09b067b0c4ab789893d07ba9905821d4851c84e4b16cdc38e85b7 SHA512 e2c527769342b8c05b60065e74ab7c8b3fa05e39a78f7cdca3044fc3b3167c62911194402d2256cc98ea69a30d5ef8b726dfec76755b7211cb0e9f0131eb556a
+DIST rust-1.55.0-powerpc64le-unknown-linux-gnu.tar.xz 188758520 BLAKE2B 789d6a835f4bf3c5631e55645cb7d8b77674dfa66b49c6f5c089b2a913785aa8962ee5db90a34000958f946b0f00b648a31346aa93d509e898e6476c14d6f551 SHA512 67c98c7cc44482082daa5daa3926dc92782b373b3173181413e68d59ea07f6eee61d46f3832a3fce18bdc44dd563e2e1f85709435e04c599b299981ecd932a9f
+DIST rust-1.55.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ef25130d02f4570b433ddcd52545c7ceea9b239204a6bf138cc210f8a7fbd48922a0b8ab5a93a9f1c2b2f1d608bf525dd4f5402b03863defc8979fb84ec19760 SHA512 4a707f12d4b1c3113e0b4202fb0a7b66a04572f9c522ad6f0da0b049e1915ccdd9d3978cc03fb9a47a97639430101f3871869e99953374bfc5541d02ee0d7ff8
+DIST rust-1.55.0-riscv64gc-unknown-linux-gnu.tar.xz 182350256 BLAKE2B 1b139ae02b036719c7173d9607329a225455ac430d3911adce74ed0edd7c85e0f63a0beee563b7e26a4efe147083bcecf2dc93b5babad66303dcb7231bd83048 SHA512 c28beb76d9ae3a0727ae368845b4f62f8a087570a5464eac3b966ece6dd30d324696240a404f67c90cf005004bbfac8da31410d51469a7c34a6af3415e958acd
+DIST rust-1.55.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e04e2c6ae4c2192c558b41201aec4fede2fcb05022f2e841e9048f2891b3baad5737e27297c0479e7363f920b7a63a502fca0fa7481ffdeca5084d1fd8bd2a4d SHA512 96b6412bfe84c6b4d13a13a8bfccb28505e8070c2e5ee94bc572be84dc5a59a7c5208659d20fe0d37cf3c02ca8475e5c9c0d4f0a5b9b86aecce2a35bc91c5a11
+DIST rust-1.55.0-s390x-unknown-linux-gnu.tar.xz 187722100 BLAKE2B 030413321337cab855fdcf6ff4ffdca4cf1105e633fc4b28d049263a5fe40a0097a9e03ff4aeff80b57c761c672d96e65c9f774cd83a9aba0f95180a2eb2dac9 SHA512 7fc83c8723493864a470f32a05db9e16ecba0ff621080d8a3a257e6f42a37bfcc8d364d71aff696991dd85635f6596ffa72efdefee1620c308984536b48d212a
+DIST rust-1.55.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B fa4d8d8bb025a9010a44a9f021ba2fb443146debd9281ba520d764b49db6dd0e8b7b614d7a131f1722b29be4b80eabd3694e14f47a05d87cb3382c799ef96a88 SHA512 9ed8aefb443bc51a33e3cbca80f3ce1e65a565735672a966b73e5f4c8f7363c6d8204ab0f9387739765b70dfa8269372156500d99cc4d74ed94d1c2473c807f2
+DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz 139040728 BLAKE2B 1d7905411b55617178c88a062a1ff3048edb8020126a8c4c047aef762c4fd13b1c8c5de4c06a97477d9cfacadf6dc008c2b7b66862dc0c3fb9a8dc48f12f5ed2 SHA512 4bc304727b1e9459194a9a9ad5c8e1fe63501f01047d479585de6708365b3f59e09aade64c7f4969df204f8bbcf9de9508745d2b96bc25cb74ed093f8053a4d6
+DIST rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d454086c93147737c7c144af288394512528e4ce759dc221d7371b62724857fe16e391949b5b4dac436bdcaef8bf817f577e8d951e1f4bae098d687b4a7bdbb5 SHA512 b175e3ddefd036fce29c80c65a86565583167f7859f0941dee6718fd71baa8596f1788a6bed5d992096959e1deda98dc9c10e8cbc896114b7938a05951c29f02
+DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz 267291288 BLAKE2B b96e8fa1c8d2e55c07781db37ddd33ec7180cde29c84f5020f2ba0fbf6aa83f9db32723e191c15df765f965d1314a57d12d80e73d20deaab1333afca65bdfac7 SHA512 6fb700d5d17c084fa520b29f3012ac565eaf891705a27c7738a61bb9899bc952f679987ef3790875b5a7adae836c602b394c7e19103f30bbdf5ec82cf3e86567
+DIST rust-1.55.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5ccf03518eae6406ff66bff108b26988a6a859e5cf88ca44327f9826d880ea26d6e115fb3e63f6a40d1cb15adc25d6f1c056438466095b7223269fb0d74540fe SHA512 8d84a976d9922d28a5ddac0f47258759a4c7542df02fb9ffede4a3e98ceecc6415229f3eb676a22536ffff842c6e7ee35d50d1507f2d818301493ee3a7db9bb5
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24
@@ -134,3 +166,5 @@ DIST rustc-1.54.0-src.tar.xz 116286856 BLAKE2B 5ac47822646a0b6205f09282168b4d4dd
DIST rustc-1.54.0-src.tar.xz.asc 801 BLAKE2B 5ee9166eaa00e4ffec10fb82b18946d403bc2030c6e04de6449311cbccc2ef1b017044f451a1c19be3a0a9640c4a9a9e4bd22d28e2115509f333ae38eb25e9d4 SHA512 5ad91f43515de14114964db0348cd28c08adc6dc935f110bf339053414b8eab8a40f1074ceffa44ed2df61254f8368d867479400618c44efaa0333642ab49d07
DIST rustc-1.55.0-src.tar.xz 117197580 BLAKE2B 8d9739ce7571146aee0e07c6287de9a8c4f1a914606cd47819eb1ef118b15772ecf22d0d43d7732f03c234a013fa54a4a7f0578a3f136af518f71bf64a03305d SHA512 7522f2fa95d5af92472404ecc97d7d9e745e88c933196a83fa373ce1efff6db3c295e0e2afdbfa1ff00644554efa0c3c7f6c11f9119ecf9010cb440b3f27c2da
DIST rustc-1.55.0-src.tar.xz.asc 801 BLAKE2B 5b4ba951ed7ed56c7bd9c71df89cc1e966485d77411016ad71a811ad8e21b88295deec08f24f65afdb163e69ee0fe19288bcc64d18fe272bea51319caddb66b2 SHA512 9bc858ce26cc069cafaefe6165cb15a07e144ad6d6312bcbe115a0a51fec6e281d3e8a7977e958d7fa10e77139548d57396b1552a2802ec74b7bc6ac641e7ae4
+DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f
+DIST rustc-1.56.1-src.tar.xz.asc 801 BLAKE2B 70ed1c26971e864aa6cc9b05eb52c4a140d0d0cccb3ff66d4a13e1b1dbac958c5369f76524c4702311566ed26aff635f5e3d35d9da71d96e070f5f0e978dc2ba SHA512 f997e7962ef8b283c19c97d8b898f3642f1a58c89a9cc5470cf88682263a42e2054d670c12bf93c41e81edf8324a5b51453f402a74bccb7744c7f463cf689aa8
diff --git a/dev-lang/rust/rust-1.56.1.ebuild b/dev-lang/rust/rust-1.56.1.ebuild
new file mode 100644
index 0000000..de06aa6
--- /dev/null
+++ b/dev-lang/rust/rust-1.56.1.ebuild
@@ -0,0 +1,683 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt 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=( 13 )
+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.txt
+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? ( app-crypt/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ elibc_musl? ( sys-libs/libunwind:= )
+ system-llvm? ( ${LLVM_DEPEND} )
+"
+
+# we need to block older versions due to layout changes.
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ !<dev-lang/rust-1.47.0-r1
+ !<dev-lang/rust-bin-1.47.0-r1
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warnings
+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
+"
+
+# 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-libressl.patch
+ "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.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=4096
+ # multiply requirements by 1.5 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 15 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// /,}]"
+}
+
+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
+}
+
+src_prepare() {
+ if ! use system-bootstrap; then
+ 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() {
+ 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 rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$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)"
+
+ 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)
+ [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 = false
+ 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 = ["gz"]
+ _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}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ _EOF_
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ 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)"
+ _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}]
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ar = "${cross_toolchain}-ar"
+ _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:-}"
+ 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 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 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}"
+}
+
+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
+}
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2021-07-28 21:05 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2021-07-28 21:05 UTC (permalink / raw
To: gentoo-commits
commit: 915d49ae3de414f339223b0e789b0686d39c562a
Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Wed Jul 28 21:04:37 2021 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Wed Jul 28 21:04:37 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=915d49ae
dev-lang/rust: Stabilize 1.53.0 amd64 arm64
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 34 ++++++++++++++++++++++++++++++++++
dev-lang/rust/rust-1.53.0.ebuild | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index be0b866..800417f 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -30,5 +30,39 @@ DIST rust-1.51.0-x86_64-unknown-linux-gnu.tar.xz 147543532 BLAKE2B 44ac97f6b650e
DIST rust-1.51.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 033c41c165cf50a63479d1352a33abe94a63d9730f02016d09bf2e8a8804587d4fc802c047e7417e0befca2d5df5ca8c79a714ec1c1fb389240b6e8931fb9e9b SHA512 e314a7db9aaff445b67f828bf9a98705032071928e2102524c0c720a3b8feb292b8c6766838b92da2d213e93bf53fb780fc856b0370238fbb7e20431d2de6d5c
DIST rust-1.51.0-x86_64-unknown-linux-musl.tar.xz 233773068 BLAKE2B cc9de90b967cc81005ce5c897d3fd6dc4e3880be96ac82c41382d19a8aca0244845830db7a33eaef85b6bdef0c00ae02c0390db932fa49f76e362af2c68edb56 SHA512 d8df3c4c3de435629986e21bc6b31edfb73cba394e76cf87ee98d2936f73aef60c988d020da7ec1188f6448eacad9d5aefed073f4f88ffa2eaac54ac7e3cb3f7
DIST rust-1.51.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2e2c20fe99b33e5361b1945f54b77d5e8acad34d1be9cadfd1971b2882e38bc4403a5a67769a74fdd7ab21434784f03084780ef827e26318168bf5d531f9e9bd SHA512 42392e8283a28d58d4874dbf97caa0377f27c6599c272c715fcdefee48551004d491f0509f2894f5696a2820f11dbb333e3bf878cbdf24b0c58add4a493acecc
+DIST rust-1.52.0-aarch64-unknown-linux-gnu.tar.xz 215549836 BLAKE2B d4179cc67772cd6b92085d68f4bb9de006fca7d8470a56766ac5d94a0379ae675d18c5275ec2ed1eab71274ce4f416a77f3ce74d849a1d4118b5a7ddec205a3c SHA512 7a26e14be6b27c7084c7c85b312341ab991c2df91ea53128f14707a4c725dd03ba7df30b9e9fcef39a509ab4f5d5feb028b99d6d9ffcc059996ed29b83eb90b9
+DIST rust-1.52.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e66afc44186f48548dffcd7c6d7d92b4fbecea48bf3f7970d211844b5401a2556a138993517d049265109146a48856c7106616100ed63a5fa3f263d7023af6b6 SHA512 75ff89cd071641b01f4d483aca5997f6b3857d477b6fb40e6fdf11ff2ecdca74618cc59a9f0d1d2f942bde2d9a8738ac6f821d21d79f3ed85830ef530636a607
+DIST rust-1.52.0-aarch64-unknown-linux-musl.tar.xz 214159336 BLAKE2B 1b2afb80df6bf75d516127f07d57d12d876f12879c1d87059ab1c40ee1325ddb4e0c22f2fa185dab72f7633bce7d2ff5ed92ce4e88d4e118ac80630a061ec0c4 SHA512 9461c7272ac3e2c854e8e5f24cd57e5d648a3f923a9413eebd9f45a143d27378bc09c4d30ee7a1773a56baa31066dcc9f955b0805ce9f47d81b52e47a3a3e369
+DIST rust-1.52.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 71e8d615e921a70341b543992eef062186f72169a9763562114af8afd8ab3469a104677fe103a04a03881ec308b25fff412ba4eaac6e4ff02f29527ddefce8b8 SHA512 1033d23a2c05ec207c7fe032f5d9986d5a1d839ca54b0ea57a7a35c8c37512e9732835f2f280f436af326e948da913492f84cd6d0dfb9c397a095167f31e4c04
+DIST rust-1.52.0-arm-unknown-linux-gnueabi.tar.xz 195145936 BLAKE2B 3c2e1f947164a18b0a0e642775560c23407eb9f79ce426b6f191eab3204b78288aa404c9f5d388a0831ff124a92c4bad6927edc252ec82f0fed194b361c75256 SHA512 20fd1d03f3c9a935d0fd282fc7ea5808165b45865044ba8a8b09ee07d1410ad80401f800d1c70dab9e42b496deb58def88d8dd10de551e2a086e9cdede06385a
+DIST rust-1.52.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B d73e4062015a30339dc0210afaa6779912051968b174a21f09e518ecc74a763d01fee8a813e08dbd7103583d7496b76248755e2c382e8e645c0524982a7bc0bb SHA512 e707a9a1960db80602d6b5d827e81fd828cca30807bdf78e7adf9378526450c5ec87d4068b3c395142fc532cf7dee7782a5f077d8ef5051c79f2b86f8631c21b
+DIST rust-1.52.0-arm-unknown-linux-gnueabihf.tar.xz 195367332 BLAKE2B 72bfb4303f3e3077958cea7050dd4100619eb14fb164d33c6ce696d3b6ddbb2099cc2850dd17b961dfb40cb1b5b20ee8158f87e0fe76426e728b2dd7752870bc SHA512 6b2f4d907ebc53983cadce97a10036a6f7e333aea1e301067fccbc38dfcc6a49ad5770cb366bc2df82aee148d88edc122930355409f0926273f85b72bf4b261f
+DIST rust-1.52.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 21a835f06fb41677db5cf1a06244b2ea3caa8462330c2599e6a77d4c82054f8bd717ba790cdf06f280f62adaeb839cb1ff7cc6dbce76fac75ca4791f1d72644d SHA512 ff46a6b6b086bc785faeeaa5db2de0c79d1898651f2113a726a08d81136b687e13eb03bb635c6c43cbeae2ec897999d2867a9c925436131871a61d7f93a5bad2
+DIST rust-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz 201614124 BLAKE2B 780358a279a80aac343ed737068faea9ddc9ace4a52694a32a0df504e6864fb2da30474ead9e3419370a7c7d6465ffd957fae475d852e504390222a939294270 SHA512 100b9abdc3dc7852f880eea205056a7a6b78af39fc3b7019ebcac712d5eee3c053f0508a6dc1f9da13074ca476e9fb33514bb83098d3b41964e878c0fc6498d4
+DIST rust-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e93e9ff5068ac52bb85c42c64b528f60fac755e022b9be7680e203ad3acdee44e8cdfa00f06f4096b17106d2fe3287061c66fd411e2e6449301b0c4befd81e98 SHA512 7c8e6cc76b4d22a4b7fdd88e73e5f99fec9bb9d9cd86293a4813d25a11739e4f104f3c8c5a1113240909757b893fd88ef34a6fc7139a6d37923d241ac60c01cf
+DIST rust-1.52.0-i686-unknown-linux-gnu.tar.xz 214798144 BLAKE2B dae7a81f1bce6f24d9766621d751b090c4a560af83686f19ae4d309da5fc8f59f1a46caea03bad593018a07ff44bd078ac5e775edf4b92ad178f641a5a3f7626 SHA512 10fcf9e891ae8bc6e83b5e71c83b34773c18b024c9e9b580cfae714b4e135d313ba5434fc28c2dffa3db2e50669b3acd07e6874de0cfab89b343db92bfbdff80
+DIST rust-1.52.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 699ca61fbe0f9763b5e3040f0d2854e34d6650f55dae2e864b88aa1d0402551a372970a3b6f4758e03619dba1201fb288c49a255eb1e7ea7ea0cb7668dde9604 SHA512 fc38e23183f104ed092072666bce6e40ab44822568ea69f31d5131508c53532a5db0c7148434605df6ee216559eb5927fac1ac32c17b3a3ebc336953f98a3ae6
+DIST rust-1.52.0-mips-unknown-linux-gnu.tar.xz 155487344 BLAKE2B 8f4d1dd47830f9d691e564ccab1a265e4f2622edc93f942d7db222b06c5f855187c855823bf0f38d7c534158905ee9eab6e5455900832891fd34c2b5649f4dc3 SHA512 9395eba6b7c8ddb5a35ff6e7bcc43eddc7fd2c7604a508a30aa63c4648bc3c9fee228cfd54cef6a2604cc8b695178c9d04cd8d05664279ef0bbca886e0d74a6b
+DIST rust-1.52.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8d226ab1e1f85620463e4cb1eaf2d363906d3eb5d7bed82e24b4f84c8969c649fc899b0dc446f4160ebc273850f158322cae1553ad499dfeee4ff34eaf161e52 SHA512 ed26f86680332d82aeb3dc8592f634a56b2269f5c4fbc75223b05cbd3775d6d8b4421dbddce96cd1fbf1f84cdd585f2b779c6a3f11639c101245bfe76a0a0cfa
+DIST rust-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz 165086396 BLAKE2B 1241fce74a0583719d5e40cd48239de5fa7e121f87baf0f1e4f18106a69a3e6c6991754cf7c62492f850919ed02fd371c9e7360972d6ab4b556c243c72bcda89 SHA512 6ebda7432d5fd0d5a99c684e2dab2db0446d5d4ba1000696c14c26f5288c763dc0743af197c6fe809e2e6f90d90b12d84714ff64f195ca415760d9110c6f8b0a
+DIST rust-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 58ebdce3798c0a95a08394bd8398dce5e145848fc2a97233c69befd9b541af526324d777dec4909b7586709bdf6af8ec69cae980032dc86c650047dff057e823 SHA512 34a16221fa0e09acf88e67f7425ed6154caa8b9a1dd2eafe4cc8167204bb57cfc96824047e4e070b5e91109c45376a8873d873b329ed74df43b279f29768fa8a
+DIST rust-1.52.0-mipsel-unknown-linux-gnu.tar.xz 158692144 BLAKE2B 331afebbbc7d5c0fa5eaf182e8642f7b38c583418469a7e2b282378556db3813445b552ea89a596df56030a119e1deda1e1bbdc1983f5dacd3115e9de7c860c5 SHA512 0149304d963eeffbbb929eb6f1f24a3f1e5d43c627252bcca8df86fe894858d5d399eb5f8ddabbaf8c2768f93ee05fbaa82b1552c76dbb319614f0e93b21558e
+DIST rust-1.52.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a4b835e14bcd9f1c24cb66dd1daf4777d25681ab175b377dba37ca4bc51e0bf360df4fb6feb3e85e0c05f79be31e51d180ffea30bc0cd96f69ca455cc4b2238d SHA512 c9b33e4ca113343b08e16410b509aca98c08338e131581d223435f8d1eb1248e2abc6a0ef10cf612fd4a305d88d4fb605785d4c067520dff5b699ce00e2799bf
+DIST rust-1.52.0-powerpc-unknown-linux-gnu.tar.xz 170724484 BLAKE2B 1e58e0a338498061c0e46e65660fcf01bd8461b3fcded864ba63196d4fc29e0b56e026e4d80b7535b63bb5bc204c748165498e7cfcda3713a97aa17bd8ac65b1 SHA512 44af21d9cf5d5d654f1f9437aefb61ba5bd3f3bdc67c657fba8ab03494a7ead53b6f5be17153f1f20acf099cd90760de29008c76fd766d6facbab32bf7921523
+DIST rust-1.52.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6e42783107d1aae59f771284f15e1304595da710700a7664cc199fe7544dfb9cdfcb8c5f67e3c520a68ffb7fd7202de2f071cf92ce95b858f38e4ceb72649c4c SHA512 a68c780526a0dc3ba6c9e74258b124f4e64f52dab1dc0d1bcac5cbed752a9884caf858be2a1b9eb987b400a26b824e556bbf5280f64a4f51df0aae8c3073b9aa
+DIST rust-1.52.0-powerpc64-unknown-linux-gnu.tar.xz 184549672 BLAKE2B 2121f8d22d9348a61ba9eecb40bb13afee199450c7bba2d1852169f3b61ec193ea6979483139875c29a0a767732f5ffe12f81528c713492e0173084691b4b7d2 SHA512 7c24c9193fc4fe2109e38f140a8c240e0535171460de9965291c08003abe7c1ea89796afa7dcb2018eece4d9eed48ebf9469d1a040f06ab4f6a12807c789f7d8
+DIST rust-1.52.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7f5d881c1e1618be807ed6f65551fbec9190345f30c24b3c99c69e19cf87cda39c0fa6d0667d6e10e27444a864f9d49638f79fb8ac2d57558d745c3496ed01c7 SHA512 1b73e49173325b3ec9fea1c346f702ae33235aacd0b821d5b9a90148a26046e45fb547223a0cef6fadf03b5124a824a9b83984f3b5841cd5d3b861aa3223aa88
+DIST rust-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz 194640544 BLAKE2B aa5e59e6059bbba874c40f7570404fbcfa5108aceb04f53ae42fc8ea4e833917f3cf6e84a1dd69cc5bf9cec3bbf0b3063258ff57699d3d0769038b44f4ccdf33 SHA512 916a3338c850cf804535e25aebc0fdcf6cea8fe9e5df9fed11fbf03ae81fb8220321dc41edd7133f287dfee0dbf19730ff8b020f32322850329865db76bab95e
+DIST rust-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ee33eefaf5b2eb96ef8fc2746334489b798b95f6b10e64deeaad72c4c1b45c9e335e450d8f896eec50c1b912b8e063ecec246c1d35c97f471236a876af7d36b4 SHA512 a66796a7459316f593649ebb309394d67bcf5ac241fd488c8e480df1837818369f79a198d1e56eb0488ab50dbad8d4162392709a2115005694ca0dd16f7e42ed
+DIST rust-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz 181497380 BLAKE2B 40f978a60d7eea43b6e5eaeaff85611bfe571b3908a43aba2405b86ffb07c20043509ecd7f78546b4c6d795dbf4d06217e95c0855039f2cf92c372e0b3f959c9 SHA512 f0486885b26848bb1b910dbd6dd898b208ea0fb2f89714f0a8d59db330471447f4f4aad05ca534bbcf267c95e8eaabcb34d6ba41b576a2a8c77d80431c4212d2
+DIST rust-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 775d1ab86cce821e0dbf95aee99265322cb210745430f48c93e4f51cdbe8cf373f622f7ced8df801aeb830e74b917177cda6839c4504c09f5761d598a145364f SHA512 668f52e962c9b7b0a9efb0f2e33474bdc6cede32c3e657b19a8b374b0d8fa6516d4de42295acd541f6c07683a17f5251ec3fa52be44d573de5cfbb83780f37fb
+DIST rust-1.52.0-s390x-unknown-linux-gnu.tar.xz 194810848 BLAKE2B 72d68066f492c2eb2ed7e9061b2a67a603aa6ef8738004a1d7ec21753c3bb1466c81fd7a18f674d156b8b4e3c755d641b0acccfa726ad04ac17be3199e941938 SHA512 6a91adf7c1947b63db0bf02b4aa4a36fbbfcc5b40d9c18175e4c5efe785b8a17ff21a887476cf76f7e3d3854f2cc362b5d2dc8243493291a4d19a705276e6355
+DIST rust-1.52.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c9b51ff09e6de5d9d3cf93e0f21df52f1738aa6c1e7b93851512d9f464bec757477183c693a1740082a36564c10cd13569c129f026680506c1e1fae8192c835d SHA512 147498154e9ab97ec4e7c0037e6873f4eb5d23c53e2f53068e979815e7d4883c9a7a338048d21abf685f0fa348cc01e342f2d5a32856b11c52663910786750f3
+DIST rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz 143053436 BLAKE2B cdbbd529c5d820318530e56347426bced5addd6f20886719abfbff6e174afadd94be36b1f3e6ba878b14198641b4a53c78f33e79bdc90025696a57659753bdac SHA512 27a8db421ae62af92e2c34dcc1fdd617bf7e8de2c68205773a3037be496ccbf21f5549dd18377a9730102e7915519824231218fef9a09abe9d116441d6ce28d2
+DIST rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ec204ee0968d4114023f40dfdd8654451149b5433dbb4eec192cc68135f45ed28ae7b06eabdab417401529162c11939ee101f7eddce304111fe93e9806347902 SHA512 4ae425def112d8c38e91ded53fdd73a6c7d2043eda22ce955aaa7303ff2cd6e7e8d0cfaa0d596b29195ba449811653f91b9b65c8c96b3cc8136d060609594828
+DIST rust-1.52.0-x86_64-unknown-linux-musl.tar.xz 239422556 BLAKE2B 8bef78b335b384e6bf7a5dd4a47511aa69ce0de6f9d1ab78146cd55f37e01b358a0cb82b95dcd27d25d4a114b707155b923415f9a91e6a75ab83bca9f5f7e0e3 SHA512 30a9f45f591c3beb34deee23611b5afe0f90b7a2a1b7b813498547b3264ecb98ef1d6bdfb77468bd5364f2942d927418037eb4ffe413db520c701fdf79c89bf2
+DIST rust-1.52.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2d69f81dd47ce7387311b576a7770f2b457beebba8cd1554e5eac501025b7b54e72078b69c7cf8a61bc295298d7f277f39a070ee8d83564942149a1b42089594 SHA512 688e3eaaf2a7e7995a9b36e6856b7922b4deada31fdab198df335b316672d20bc80e5e717cee4e2fc2f51ec8abaf97880dfa5424a7b122e46b02fb7f62836378
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
+DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24
+DIST rustc-1.53.0-src.tar.xz.asc 801 BLAKE2B 75d3aa4122968f10a119f7a04df897f496588c7a1a2ddf1ea2222099c9efb0e320f5677a26c3271f86e7f500120664485f54c6025ae3c6df30d2b0fe758f5826 SHA512 e337579b9ab4febca4594c2c5d42c279b51cfc745c383be9a430204188311a25319c04c73fde34fdb2bb98a88bfd8daaddc67765834330e6c279a6e5a5648247
diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild
index 0507d44..9766417 100644
--- a/dev-lang/rust/rust-1.53.0.ebuild
+++ b/dev-lang/rust/rust-1.53.0.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+ KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2021-06-16 15:49 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2021-06-16 15:49 UTC (permalink / raw
To: gentoo-commits
commit: 1be9e66c011f4335fac6908733f6cdefab451474
Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Wed Jun 16 15:49:18 2021 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Wed Jun 16 15:49:18 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=1be9e66c
dev-lang/rust-1.52.1: stable keyword
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/Manifest | 50 +++++++++++++++++++++++++++-------------
dev-lang/rust/rust-1.52.1.ebuild | 15 +++++++++---
2 files changed, 46 insertions(+), 19 deletions(-)
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 874d227..be0b866 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,16 +1,34 @@
-DIST rust-1.50.0-aarch64-unknown-linux-gnu.tar.xz 203382140 BLAKE2B c9547661356bfb2eb328992ecbfd488114bc68c00e551cbbeb925fd1650b5a4c0ab33145c6e994184766ef5046cc2881eb0009ac9d9448208cf896317bf47c63 SHA512 e6b409afc8e85a88ecb9ff439a6eb9dcb93d5553e81549fb4f332b9e2d946dce0424319c5092e60aab9435944af70d0117d15c12d54d2059ef73c1fdf36d8273
-DIST rust-1.50.0-aarch64-unknown-linux-musl.tar.xz 204473556 BLAKE2B b47fe60f8e558a673b1c5fa47a0ebe9f73b09012b5df718baf0683536fa94d840cf0006830f6f4c36740d5e598b1c67b9d0df69a4e8d698520f05f5644cc3b69 SHA512 6a15af6a30c59325c21587689e3f99ca20a9a8ee0b19866569f2f7405d2b176ed88903776799e1ebcabbfc665b5e0f3c7878f841db6c5a75eceda57ace18185a
-DIST rust-1.50.0-arm-unknown-linux-gnueabi.tar.xz 193322872 BLAKE2B 2654e604a609f287b2722bbcac325461cc8a84d47e449470da1925f3d21a042d665e55d07f4f268e37630184998ed330b2c2e315485ebeee960c63555550c9cd SHA512 eb3aefa4ff7d2b832a847b6d4fd4427d88885cc72c3a9f97837e2516d202af39da7d523de2d1578fde20aeb76e843a84c37b4ba33f85668caa0b28d63a20968a
-DIST rust-1.50.0-arm-unknown-linux-gnueabihf.tar.xz 191287452 BLAKE2B 34958b97d034f6c643036c61d64e25aaedf1c93046ca039e39c9083a54d030d715d17a3174bd69bdad3f9bdb8b89c9b92f977b7d3c29da4eb28efe933402e86b SHA512 7b1f61fd53fbb361fc6b3ee603917f899f3cfc8062df3cadb0751e8014e1e2633f32ba198912e8bca34102543c427f2607e861b724143d60fd1f9682578be70d
-DIST rust-1.50.0-armv7-unknown-linux-gnueabihf.tar.xz 194656336 BLAKE2B d02323d9f47d380f4a06e8273b02ac3c9091257400a59b3efd1140ef22aa3bcbb71b4c5e70aaeb2cd118839a84b3513d9c85ff8020b5a1f6e68791ae5d81b8f3 SHA512 c3314436afc4ebed697bf6828b9eacbc12f96838b156241331a3b71e99e1438f8ad82e701615ea302ebfc459464479442fe653232bd319cf824027362438970d
-DIST rust-1.50.0-i686-unknown-linux-gnu.tar.xz 222946404 BLAKE2B 38801f395ab8f5aeee1cb709cd7fda6b6573476f9d763931086c76b0064ec0d5dff03415bc2f6f13419fb1a326cb44a0086dd42db99d1e14d520b33c6382e340 SHA512 bff117733d11731f56e8659265d0b47327e2af3f7c46aca494747a92b4f634dd35fa9731a1be59dd69821042f88bded253e1d7b5693ca237c9a167408ca7f898
-DIST rust-1.50.0-mips-unknown-linux-gnu.tar.xz 150524936 BLAKE2B 950424444394dd55fd81c6b850798552166d78588fcc2c4dfdd4bbc900600957eed06c4a03c83713f2f820252949f57651d69e4d2a2b78d7de42fd7e0c0404f4 SHA512 849d70b5f4b4364070c5f708e466a86afead7d82d7fde4d1ef7c8800bc1ebcafdd4e1bc69f059e393fd8fce104f2d97201f09ecb3b894676e6ff6db9c949c897
-DIST rust-1.50.0-mips64-unknown-linux-gnuabi64.tar.xz 159792596 BLAKE2B a361c13c036d7cc964ace781c34ed815946c976071d38d361110856e889174e2629ad9602dde5f6d5a704044cab670687b67643470b199ee18e95944dbccba16 SHA512 d85c2abff3249ccca63d14abfa85f5320e5d227b17faf7b4b47a5254a4b8ee3a4cf3ccb84e31f13dae7780176411e2a5d04894e2422ae5921f547cc5e07fd1b9
-DIST rust-1.50.0-mipsel-unknown-linux-gnu.tar.xz 156597932 BLAKE2B 57bf7d105f6f9d3a50904466439e88e32c99b5fd85f220ef48e82fe91b2c05c28d6783233dd3e9ba7b49e79eeeb358cd1df60369bbd927a9a867a0bdaed471c7 SHA512 019df8180520bc4fd29a258017e2477a59a30338d921f185871f64aa81d8b5499e88676d09d5887f9c6726824ae4bf50f8a9e6fae1f03e9e728f0f08ab0271c4
-DIST rust-1.50.0-powerpc-unknown-linux-gnu.tar.xz 168133824 BLAKE2B d2ce955ae8975d667c854fc1f8dab5de8b8a3ecf08e52dab57f40f5a036138b6006554f053616c7d369e054f9ba3dbc502b2fa47ff0463e077f831f75b831c4f SHA512 1411063401432b2aed58f53c7e9c87d70177cb7745753378df052676a6b0ee19bf7e56298584356b77707758ad531e5d4d59140cd6e686bd7cee53488553214a
-DIST rust-1.50.0-powerpc64-unknown-linux-gnu.tar.xz 180157804 BLAKE2B 8d3c38cdea4901f38665e66f880301c409d0de4ade5fd931c834680ee21d014fe6efb6928a417bcc747ac10ceeabccf287c0a29c009525e2d2fec92db60bad01 SHA512 d60fa7d029c52403c08722b4cdda8ebcfbbf23f57770db786007b21c8e0590577f58823b8e0b89adb38c351102b6aba0c02afa5c3582eecec5165bccb50b4944
-DIST rust-1.50.0-powerpc64le-unknown-linux-gnu.tar.xz 189754060 BLAKE2B 8579349a7d916ee701f29bd66d08a76d8433ad86020571e5484edbc8d9a984088e6942e31b18179698a199ade2fcee3b1b9aed1cc0d5a3b996e763ef2b8e0b33 SHA512 e3dc75ba7dff3a358042542afa398ec8771a23f5f699454a876ddc1f3583d399fe5350696a5da62d71ca97ea882c9ae1fcb60dc2e9fdf76bc7a9af892096371e
-DIST rust-1.50.0-s390x-unknown-linux-gnu.tar.xz 190157972 BLAKE2B 4fe8ec73293815ade006e2c383d1a6d541d87d4ebba76b3ace65793f7debfd54d3dc07cac89c43e41947f8d0b69bd0f213dbdca8173f610ca2da03bccdd55ddd SHA512 733513af2a7ef7a782a5ebfbd080071194ac47084022b54b4830de84facef9986d65525f8666a4c226e9878e43b00ebced26d6077e5fb1b7f775ac8f290fba97
-DIST rust-1.50.0-x86_64-unknown-linux-gnu.tar.xz 152873328 BLAKE2B b0bb91487186f13a7a1a49edeac28bc347c300911f574aba0e70c37e05b688176f5941c97cc4ad0ceddf32f2fbc0bdda6f8a1fdfa482aeb9682ea1fade28206e SHA512 ab49e3ecb14e4af8e48548845184e9ab3d564ab2341c1e5462b7847347c79d13324211b860988d219ccb646143bf142fb14c3ab03663b06cfe9ca275128d9fa0
-DIST rust-1.50.0-x86_64-unknown-linux-musl.tar.xz 242743828 BLAKE2B f20feb709cc07ad43f69e30a7fcefa81b5de94ee4c90cbce2616fcda8af2591a27cfa0770b71138762e21f6e07263bf3c2548bcce1b707831ab544de12ab746a SHA512 68403236e213a4f2c156b36a03ca4dd7866fdb69e87170efc76426d937dcf5cf2c5578aaf73483131b1ce7750302f9d02de1bcbc52e1283b08220d5b22be82ca
-DIST rustc-1.51.0-src.tar.xz 109596164 BLAKE2B c1ac89655adfe7db8005476d42c748cf1896f52888141229fd6dda43855dbb08c21c8e1f11398d2f1f9dd5f8d508d9158a3bda4f1b282d1b184ea4c701100837 SHA512 ded91468ddf3e6627f00e7ec3d44452aa24eb727a183c0de9d90264f593119a54300d56b09251a88260db480b48554181ae195c538996a32d68d48b6587ac0df
+DIST rust-1.51.0-aarch64-unknown-linux-gnu.tar.xz 208849064 BLAKE2B 1570536f63237ce04222f78c8c1d0592b3d0bacb62e2a1e2b87f9cd74c8d304837f9259c154e6ddfc5d0fc36c1d69aba34cb27d41346d4e7400ad1950ff19f8f SHA512 2af31290e1065a4611f34e6cc8c62ee494c222becfb21ec6707059c119069b0adf0eec23e56bad4a3cc8690b2556309ec58cbd9003a959983689cc46c7c63361
+DIST rust-1.51.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cc2cef574740ea5eb632235dca2889a7c6a6941169ac011d3a888cdefb8e5a5af5bb9ade93207ccb6adc82eb6ae1b5ed605954cea2561163c538fcbbcdb647f8 SHA512 43abb6e19c1ca905cb2d047503f4473584e06b8daecff3b6e45ac93dadc2c7f37118e3b66124180a9951b2f5eedf212174a37c661a7775600bd200eb089801f9
+DIST rust-1.51.0-aarch64-unknown-linux-musl.tar.xz 209607568 BLAKE2B 8a8d677fac5aa68be8b689bd999894f0b51910d50d86d70db4cc9b60695703dd74b68578b72d9d410d2d163aebd3fbab0993ebf79486a103ef588cb849dc2038 SHA512 d7ca480f4e07f88a49b475d2fcd132126defff21c26a665d1b444b97ce5e44404f9106bb844a5e35d4933a51c2d8a5aabc8ee42a2515c02a559c81937920be4d
+DIST rust-1.51.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 0759b58a1647b0c0a29fc295edb31e793a0688d6a4b6eb8febe4364421f53cd1f4c0555abf7c8d4fb25bd7c15c9aeaa8d520390d8d3b61c213a591ccee7b9887 SHA512 bc2135b94f9c4e7b2616d886e84a268f52404abed2b827bdca5ab8f98071801e171234f18aa27a367b5dbd0df0e207b0aac8a30be59fff807ff70f21279614e2
+DIST rust-1.51.0-arm-unknown-linux-gnueabi.tar.xz 194362256 BLAKE2B 20c1559d3b1f32c9ca6f5e9740dff0d9fd859be33ca58d59733fff1566ed0b75dd398facbcd15c8d7c862bee945198b0235973d5f683fd78f82cca52429b269c SHA512 fadb5084152b6fa148c1d584c8ba766201012c0a70bdf273f5d4b89b249d7f520997b12809a0db68c9d1d76283fee892f83b6ef687cbb025c08960ffff7e5eea
+DIST rust-1.51.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 546fad9428e7261ef78e92d6542ebcd2b1b11c54bb4dc1fbcb7ca622551e6b4fc443f16305f9f37572ff2f24e5dfab491fadf3a128e009c77aa0218b271bbe5e SHA512 580954dde6e5a89a9a16d0b93570275e81f488f0a77952cd4e3878894f9865f2a128bac2aaf0567ffc9e7cf9809808088a819bf7b0e54d8fa6224abe677d1732
+DIST rust-1.51.0-arm-unknown-linux-gnueabihf.tar.xz 193918308 BLAKE2B 6799652205422d96c95949a4afa8a321a8a4e0cd42543f321898fdba5b27bb645f9eeb50edb63a43902cc74026a786c12a22af67313bc6ac0843b1e638077d64 SHA512 cd0dba1ebdff9692aef0026d94da38ba7856b64004404b75d0d385b8f9f53eed1ddd0e900e49cda60fc5190fe305d96f6f00d0053f4409479ab991fafa90338c
+DIST rust-1.51.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 41cad50cdebc0cb4e59f6c914b30b071dd7a70b6278c03a7349eb51a9ec6976fbaeacaea96f13e8ad91a283a3de4f548cf8e352179359f5697520813bc47e274 SHA512 d74a183dba390ea053ee746575788481e3970572e61b7b55acff521c8f4a9da5a3f4e3feff5c3b26162acdc00eed1c4240a4fbdcac3fa117455ac49d8ce62985
+DIST rust-1.51.0-armv7-unknown-linux-gnueabihf.tar.xz 197028040 BLAKE2B 801526d0fc9cdfc25a63227afdfc1bf9e0e6fa0b80f6306d86b68ca16adf4996b755b6ade1a4e898bfaf25565b5b49a358a9ed364bfe5d67c308744814a843de SHA512 c602dcc7fd1343b310f5e3074bf63f2428ca7c15cdce8999fa4655de5a4bda5a13255fc12bee3d0632f6cb93220a883fb36d24061dca6795d23afa9f8fdae57f
+DIST rust-1.51.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B dd94fb91fb6dba9788b178ea74b73c0df78f496d6f57382969836ade9aacda1696f363c4cef8126426040620ef934a2f2681d89d5e3a703d9114d8d152abb6f8 SHA512 40a3f61341ec996650b6e4e8552007b822b7990b2154483a7d7a7dcbae4eb2913d4ffb5319037256ff5931ee01320d1c3ce307aa7c9fd90a782646de4edcd2e9
+DIST rust-1.51.0-i686-unknown-linux-gnu.tar.xz 213348860 BLAKE2B bd6c1d5ce9f20b961e3db8c69b022402acbdf06029e0802863292bcac89b0f88e6e6d02f625be52e8753d772aad8ac01125ff6832072b5d3d41a9ec7bf5c6a6f SHA512 05d08e44827dcba8197667deb9a7f3584465085ce1b79a38deb138849a07c716646a70f1cc2cee02b41c45ec7c3a3b7800a3fae62ebe04d6f72f017a5d722bab
+DIST rust-1.51.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c09c5ce8df8834758cf8049872142104023af24f31a2efc97ee201e6b2db56c1b7dd1baccd608ca1f3de416efd162408a01170fff9b7070cac80df32fa30012d SHA512 6aad34b773cfe0ec30f80dacb7482247515ed1e7025a322d22ce7a2b1a6dc49929f71b9c3a6bd05622b70dd8f37fde5cc809ac32c4724b98098630158dddcfdf
+DIST rust-1.51.0-mips-unknown-linux-gnu.tar.xz 155944968 BLAKE2B ab9ad78f147b439beec9e92e643cc48814666c5e8fa244981d0919237844006aa2879a4058145d0bdafe89793402e65982d9fd3f0c6253f6a1805bf3381b4caf SHA512 378cfacfc66f1e8a4aeeb3715db9d3cefb4582db8a3b8fc62f05ac50a16db302b250c1696605c17cebe75923010b361b3a9883f7567a26cdcd60fc8379d2d7b3
+DIST rust-1.51.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d072b66f210244c3cb534a040679ee5c5433703fe309a05565a91b4cc8fd50b0e09320067dc48a7255aa0561ca6029fcab3ef4b782f40097a9646c5c77727344 SHA512 c7f1789e577c89397c59e288d2351fdb08bb9626df9d2a4d15c13a1474b67f8474be27d9f8a13fb55c53f9a17e47825b84473f487fa3866a8e30e4141b26aaa6
+DIST rust-1.51.0-mips64-unknown-linux-gnuabi64.tar.xz 161859704 BLAKE2B a60484b7d009633763f10be8affc33715992f6eee5643d147078840675c900be0ff7f9bd985680836dc7d8467d7d118863cb5bed0f85bb135f0e352318946f32 SHA512 e99437a1b79e8821f6c1eaea92a8c5348e6fb4aa1a4fecbfecc950bf71fd7cd58712d336a67e00f95554bb01565f1daa1221699e142e9e673d8ce2cbb8910008
+DIST rust-1.51.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 85aca04845291448d9ec9c5b37f556e890155574982496d8967829b56b3c4caab1aa40c71e007392a05337ca917a70aa107007cf5c73c8eb8fa95bbcb6f7debf SHA512 4ebd8e0bad5c66a12bfb606f6b28aa63430af5e6344ce91d2be958f1f479fad0d5af6a53006999a321cacfea50fc623629f633f95ff747790c2702aa8dfe9c76
+DIST rust-1.51.0-mipsel-unknown-linux-gnu.tar.xz 159164156 BLAKE2B ccccc1e8abf529f9f023cd793dd78c9bfece359a770e03cfae808ac017ae0171ca0dbabb870c5ad57670a9ec562c393d2ffef3490e46423420be6a9a20cc8937 SHA512 31aecea3016e30dd610b610b86ec23f9832061abfbc55c7e43d942d4b0e8e521aecb37306bdb4a810ddcfc4e9d9a6cf057d6802d053ce9abf1cad401b6440d67
+DIST rust-1.51.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e61e17518d7d326f188b84855b771c7bc2d7f23347dfadaf0783b4fcbb7dfd233ed2262c6ffa75b55baee7e83e94b5c47d24b937e540c6a2892b20d320fcefbb SHA512 e0ffb031f600a58a2f7a76b1b26f5453e9de4d4edf6652d75d0cdd92e4495844601d56b521482e172c72b7463ab667ea65e610baa4f68c5f59333dd8f3cf1155
+DIST rust-1.51.0-powerpc-unknown-linux-gnu.tar.xz 167534676 BLAKE2B 5c74ebaf5d5e736bbfb8d963faff6d0fa5725017c738c4a5adf4b4e8c812ff8234b9e03e1a6ba2b6ab718469541e8c398e095ae22f155ccf9290e50ae0595a52 SHA512 9984e464a4e7d18042a8a2d99d26c4436a0ae2b2d281d5c8a42aedb0b78ab5e72f2392ea96e84b2f5892d772d28ee2feb89636f8d1a060a30098faa4e7f259eb
+DIST rust-1.51.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c8ee6ea39b19cb160527145aeb32206eef6665df1e2c3ce690a136ead20b8114a5806b209a926da7608ffce94e6d65910b7a282cb353345a83a8e2b589df489f SHA512 886c62e4592568ad7b966f933641236ce59a037b65a00e0bfab6d2d6bb62cf994cdd8e392dd2f51b9c958e4e3c0c3763b9dec6be5a4faf27aac5d8d0a225abe2
+DIST rust-1.51.0-powerpc64-unknown-linux-gnu.tar.xz 182726600 BLAKE2B d9051eea2d9486b6b4d858a3f6730210de5aac958853de82b3f822b3e0decd1b8a9a9b371b250ffde9ac19be4ccbe09e58c51a78b7e1fb2dd48e61c8a902e5b5 SHA512 4c1864a81d4c32bd95e0381454beae2a1d5b4cb47196821e64fc261133acfa2fa1e514dd6cdb68551559c4da2a2483edf5c6c14246adbea85c3027f88d401e06
+DIST rust-1.51.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e1fe8c5764cb11f722893c7efcfb76d5f17ee80a104ede360fedbc8cd1e2996246e0a770959398a524ae55bdfb075dedb2c2583816bd3de28034dddbf248a54c SHA512 3b7e3f15f5a2a4876175a26d7b4332d4a6847a565d5de4c2cb67c52cf26308215286777ea9d89366543ddd1ce353d6a920153549b6641ffeae8e9954470aecfc
+DIST rust-1.51.0-powerpc64le-unknown-linux-gnu.tar.xz 192084372 BLAKE2B d127c1827956c7594da5b69346168504b22726e176f03172b599e0a0fae2400e273684090f1d0fd05c33f193b3918c98ccd64c3647b0577b51431c3409083b2f SHA512 b53a741d1d75637fb31ddb0364e1f91427c3818ca145f819b906d13c32c638ae77fbaa567a6220b6bf69f38cc00d2b95615778a86f4acadd63efe2e62b1b01ef
+DIST rust-1.51.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f79f8e1ad8cb0dbc6e1cb45fab2bd19a03d1939518529841155e7a00d9a42e3eb2539ae424c68af7140399a2b37c6ff5a00c55f0467ce4acf6fd7b1ddf525a63 SHA512 785ab118197d53b5f4512cdb07e6277c9ff58b9e53610dcce1c9f928cac8a20b1fbaaa7acad8cbe4370a3fe6dda5f726e8021e8987688a9ec242f73ed8d12adb
+DIST rust-1.51.0-riscv64gc-unknown-linux-gnu.tar.xz 179131092 BLAKE2B 1d8cc335cfc434871e1916793974eabd14fa96f49ee9b0f9ae004326c405dbadccd0249ff28dddfecb9921cae4e886f4114a8221e09fd7944f2d2e96bdb12bd2 SHA512 7fb76c3ddc952b43320bf3497d890ff79aa5634df22f38958835cd1d4044bef44257af22d7473675afb42a7c2fc9ac713f210d6bfe1e61ed56d5265f58add540
+DIST rust-1.51.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b0cbee67d6bc37ccdcdf2c563667f3b3e4ec7377e5c86b627cfbbd7385425508778bd67887f46067476ffbf3b5f2719d6b5490d2fe5261db5e7f4da4bbc94be1 SHA512 fdf1ed20eec719435a557be8e6bf6766b0b56e27fa49c65b2c412875a1c76919ff6d6a4d8d14bafa8aa96eb42deca65869db6ca5d2b61a84a0af07dbeb1e9ae9
+DIST rust-1.51.0-s390x-unknown-linux-gnu.tar.xz 191632144 BLAKE2B d1690825f59e8ed1ed4855556ff36c05efbc941097744e31fd9207309087d53880d418f737aa0cb9371b973c9c3d56f05ed03533df04402242194ef13b8d608d SHA512 a72ad31c6306f939c4f963133ddc0b3fabc9e506bdff5e318f5275658b7271a675a51d208d306d94fb01739cbcf0f62f018fc7490ca6db54b301852202749d16
+DIST rust-1.51.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 355e753ddca453ca36a8c1e4f361e9655bdb54f856a642be3d4024772266ed1771a2673ab1026c64bbf7ac8d1fc30fb1924a939cc3ea290e98b137edb48bbf6a SHA512 89bf145b8e620eac99b0fe4a79ee205a04550c664bba1e22a7611ef37736cca3cb911ac89659126e0c6fa60e4dbfdf0dd54a8693e496d4c37e4f7d3f518e2740
+DIST rust-1.51.0-x86_64-unknown-linux-gnu.tar.xz 147543532 BLAKE2B 44ac97f6b650e65de257b362121091176e02fac60aa534ec83ddbc4e16eb32f7a4a7999cc28eac446f5790572552fee5c2589350cb6d159a946d90007d85c7db SHA512 9f95045119bcd5ef7be54f5b5bdc9ebc6bd6c48437d90762a1cfbc03281882f81087e1877eecae9573ba5e7cd7c11ef5fed979034c57f45b6547cbfeb11eef6d
+DIST rust-1.51.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 033c41c165cf50a63479d1352a33abe94a63d9730f02016d09bf2e8a8804587d4fc802c047e7417e0befca2d5df5ca8c79a714ec1c1fb389240b6e8931fb9e9b SHA512 e314a7db9aaff445b67f828bf9a98705032071928e2102524c0c720a3b8feb292b8c6766838b92da2d213e93bf53fb780fc856b0370238fbb7e20431d2de6d5c
+DIST rust-1.51.0-x86_64-unknown-linux-musl.tar.xz 233773068 BLAKE2B cc9de90b967cc81005ce5c897d3fd6dc4e3880be96ac82c41382d19a8aca0244845830db7a33eaef85b6bdef0c00ae02c0390db932fa49f76e362af2c68edb56 SHA512 d8df3c4c3de435629986e21bc6b31edfb73cba394e76cf87ee98d2936f73aef60c988d020da7ec1188f6448eacad9d5aefed073f4f88ffa2eaac54ac7e3cb3f7
+DIST rust-1.51.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2e2c20fe99b33e5361b1945f54b77d5e8acad34d1be9cadfd1971b2882e38bc4403a5a67769a74fdd7ab21434784f03084780ef827e26318168bf5d531f9e9bd SHA512 42392e8283a28d58d4874dbf97caa0377f27c6599c272c715fcdefee48551004d491f0509f2894f5696a2820f11dbb333e3bf878cbdf24b0c58add4a493acecc
+DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
+DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
diff --git a/dev-lang/rust/rust-1.52.1.ebuild b/dev-lang/rust/rust-1.52.1.ebuild
index a6469d8..c005cd2 100644
--- a/dev-lang/rust/rust-1.52.1.ebuild
+++ b/dev-lang/rust/rust-1.52.1.ebuild
@@ -19,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+ KEYWORDS="amd64 ~arm ~arm64 ppc64 ~riscv ~x86"
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
@@ -91,7 +91,7 @@ BDEPEND="${PYTHON_DEPS}
)
system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
!system-llvm? (
- dev-util/cmake
+ >=dev-util/cmake-3.13.4
dev-util/ninja
)
test? ( sys-devel/gdb )
@@ -280,10 +280,14 @@ src_configure() {
local rust_stage0_root
if use system-bootstrap; then
- rust_stage0_root="$(rustc --print sysroot)"
+ 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)"
@@ -445,6 +449,11 @@ src_configure() {
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"]'
^ permalink raw reply related [flat|nested] 70+ messages in thread
* [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/
@ 2021-06-16 15:49 Quentin Retornaz
0 siblings, 0 replies; 70+ messages in thread
From: Quentin Retornaz @ 2021-06-16 15:49 UTC (permalink / raw
To: gentoo-commits
commit: b5571a168920917849c0d4b6af8ea40bf3773c92
Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Wed Jun 16 15:43:35 2021 +0000
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Wed Jun 16 15:43:35 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=b5571a16
dev-lang/rust: drop old
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>
dev-lang/rust/rust-1.51.0-r2.ebuild | 649 ------------------------------------
1 file changed, 649 deletions(-)
diff --git a/dev-lang/rust/rust-1.51.0-r2.ebuild b/dev-lang/rust/rust-1.51.0-r2.ebuild
deleted file mode 100644
index 94d62b0..0000000
--- a/dev-lang/rust/rust-1.51.0-r2.ebuild
+++ /dev/null
@@ -1,649 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ppc64 x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- !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 doc miri nightly parallel-compiler rls rustfmt 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=( 11 )
-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.txt
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-$(ver_cut 1).$(($(ver_cut 2) - 1))*
- =dev-lang/rust-bin-$(ver_cut 1).$(($(ver_cut 2) - 1))*
- =dev-lang/rust-$(ver_cut 1).$(ver_cut 2)*
- =dev-lang/rust-bin-$(ver_cut 1).$(ver_cut 2)*
- )
-"
-
-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
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-# we need to block older versions due to layout changes.
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- !<dev-lang/rust-1.47.0-r1
- !<dev-lang/rust-bin-1.47.0-r1
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warnings
-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
-"
-
-# causes double bootstrap
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}"/1.47.0-libressl.patch
- "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.51.0-bootstrap-panic.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr81728.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr81741.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr82289.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr82292.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr83629.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-boostrap_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.5 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 15 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 15 10) * ${M} / 10 ))
- 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// /,}]"
-}
-
-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 && boostrap_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
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- 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() {
- 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/wasm32_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 rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- rust_stage0_root="$(rustc --print sysroot)"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
-
- rust_target="$(rust_abi)"
-
- cat <<- _EOF_ > "${S}"/config.toml
- [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)
- [build]
- 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 = false
- 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)"
- 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
- _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}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- 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)"
- _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}]
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ar = "${cross_toolchain}-ar"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _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 settings:"
- cat "${S}"/config.toml || die
-}
-
-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 dist -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 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 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}"
-}
-
-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
-}
^ permalink raw reply related [flat|nested] 70+ messages in thread
end of thread, other threads:[~2024-11-09 17:02 UTC | newest]
Thread overview: 70+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 21:14 [gentoo-commits] repo/proj/libressl:master commit in: dev-lang/rust/ orbea
-- strict thread matches above, loose matches on Subject: below --
2024-11-09 17:02 orbea
2024-11-09 17:02 orbea
2024-10-22 16:44 orbea
2024-10-18 15:17 orbea
2024-09-18 16:28 orbea
2024-09-18 16:28 orbea
2024-08-27 19:35 orbea
2024-08-14 15:40 orbea
2024-07-24 18:56 orbea
2024-05-31 0:59 orbea
2024-05-03 1:06 orbea
2024-04-22 23:44 orbea
2024-04-05 17:24 orbea
2024-04-02 18:50 orbea
2024-03-24 15:22 orbea
2024-03-24 15:22 orbea
2024-03-11 14:57 orbea
2024-03-10 8:30 orbea
2024-02-16 15:06 orbea
2024-02-16 15:06 orbea
2024-01-31 0:07 orbea
2024-01-14 15:06 orbea
2024-01-14 15:06 orbea
2023-12-23 20:16 orbea
2023-12-22 14:56 orbea
2023-12-12 19:49 orbea
2023-11-14 17:45 orbea
2023-11-05 3:44 orbea
2023-10-18 17:01 orbea
2023-10-15 22:19 orbea
2023-10-09 17:14 orbea
2023-09-29 19:19 orbea
2023-09-17 16:22 orbea
2023-09-17 16:22 orbea
2023-08-29 21:11 orbea
2023-08-06 21:40 orbea
2023-07-20 19:07 orbea
2023-06-28 1:12 orbea
2023-06-14 14:41 orbea
2023-06-09 16:23 orbea
2023-06-08 18:29 orbea
2023-06-05 0:17 orbea
2023-04-25 1:29 orbea
2023-04-21 3:48 orbea
2023-04-06 21:31 Quentin Retornaz
2023-03-28 18:51 Quentin Retornaz
2023-01-31 23:14 Quentin Retornaz
2023-01-17 0:52 Quentin Retornaz
2023-01-14 23:23 Quentin Retornaz
2022-12-21 20:26 Quentin Retornaz
2022-11-15 21:18 Quentin Retornaz
2022-09-29 22:58 Quentin Retornaz
2022-09-24 20:10 Quentin Retornaz
2022-09-24 20:10 Quentin Retornaz
2022-09-23 16:00 Quentin Retornaz
2022-07-23 21:19 Quentin Retornaz
2022-07-04 16:49 Quentin Retornaz
2022-07-04 16:49 Quentin Retornaz
2022-06-10 23:36 Quentin Retornaz
2022-06-02 1:44 Quentin Retornaz
2022-04-28 23:40 Quentin Retornaz
2022-04-28 23:40 Quentin Retornaz
2022-01-21 21:26 Quentin Retornaz
2022-01-15 19:13 Quentin Retornaz
2021-11-06 18:17 Quentin Retornaz
2021-11-06 18:17 Quentin Retornaz
2021-07-28 21:05 Quentin Retornaz
2021-06-16 15:49 Quentin Retornaz
2021-06-16 15:49 Quentin Retornaz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox