From dffc33c0a78286c201436ac1f96119075d52ed8e Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 24 Apr 2024 15:45:50 +0200 Subject: [PATCH] New package: rust-cross-1.77.1 --- srcpkgs/rust-cross/files | 1 + srcpkgs/rust-cross/patches | 1 + srcpkgs/rust-cross/template | 99 +++++++++++++++++++++++++++++++++++++ srcpkgs/rust-cross/update | 2 + srcpkgs/rust/template | 1 + 5 files changed, 104 insertions(+) create mode 120000 srcpkgs/rust-cross/files create mode 120000 srcpkgs/rust-cross/patches create mode 100644 srcpkgs/rust-cross/template create mode 100644 srcpkgs/rust-cross/update diff --git a/srcpkgs/rust-cross/files b/srcpkgs/rust-cross/files new file mode 120000 index 00000000000000..b3b24547ab1d88 --- /dev/null +++ b/srcpkgs/rust-cross/files @@ -0,0 +1 @@ +../rust/files \ No newline at end of file diff --git a/srcpkgs/rust-cross/patches b/srcpkgs/rust-cross/patches new file mode 120000 index 00000000000000..64eb6b97150039 --- /dev/null +++ b/srcpkgs/rust-cross/patches @@ -0,0 +1 @@ +../rust/patches \ No newline at end of file diff --git a/srcpkgs/rust-cross/template b/srcpkgs/rust-cross/template new file mode 100644 index 00000000000000..02b907ee2f50e9 --- /dev/null +++ b/srcpkgs/rust-cross/template @@ -0,0 +1,99 @@ +# Template file for 'rust-cross' +# +# Permission to use rust and cargo trademark is granted. +# See: https://github.com/rust-lang/core-team/issues/4 +# +# Update in lockstep with rust! +# Thanks to @seppel3210@chaos.social for helping me figure this out. +pkgname=rust-cross +version=1.77.1 +revision=1 +hostmakedepends="cargo cmake curl llvm17-devel ninja pkg-config python3 rust tar" +makedepends="llvm17-devel" +depends="rust" +short_desc="Rust no_std targets for cross-compilation" +maintainer="Leah Neukirchen " +license="MIT, Apache-2.0" +homepage="https://www.rust-lang.org/" +distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" +checksum=ee106e4c569f52dba3b5b282b105820f86bd8f6b3d09c06b8dce82fb1bb3a4a1 +lib32disabled=yes +make_check=no # CBA for now +python_version=3 # needed for python files in rust-src +nocross=yes # for now +nostrip=yes # cross-archs + +# we need this because cargo verifies checksums of all files in vendor +# crates when it builds and gives us no way to override or update the +# file sanely... so just clear out the file list +_clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json +} + +post_patch() { + rm -rf src/llvm-project + + # clear out all the checksum nonsense of patched vendor crates + _clear_vendor_checksums libc + _clear_vendor_checksums typenum + _clear_vendor_checksums cc + _clear_vendor_checksums taarget-lexicon + + _clear_vendor_checksums tikv-jemallocator +} + +do_configure() { + cat >config.toml <