From ce7c7fa35d02aaf670eca4842cd90078b6223bee Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 4 Feb 2021 10:23:04 +0100 Subject: extra/rust: some fixes around rust-musl, nproc and architecture patching --- extra/rust/PKGBUILD | 37 +++++++++++++++++++++---------------- extra/rust/config.toml.patch | Bin 439 -> 871 bytes 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'extra/rust') diff --git a/extra/rust/PKGBUILD b/extra/rust/PKGBUILD index 207e3ca7..736d05a3 100644 --- a/extra/rust/PKGBUILD +++ b/extra/rust/PKGBUILD @@ -6,7 +6,7 @@ # see https://github.com/rust-lang/rust/issues/60294 source+=(config.toml.patch) -sha256sums+=('c6d2fe4d0fab22194029a926e7c4efe55546a3dfbc85328cabba44e44126129f') +sha256sums+=('41cb009565b592bcd73dbfbfa53e4462570c85de58b225893e8f1ff25d640a04') eval "$( declare -f prepare | \ @@ -19,7 +19,7 @@ eval "$( eval "$( declare -f build | \ sed ' - s/-j"$(nproc)"/-j1/ + s/-j "$(nproc)"/-j1/ ' )" @@ -36,33 +36,38 @@ fi # Don't move lib32 support into rust32-lib, we are on 32-bit in the end # and don't draw a symlink to 64-bit libraries (but to 32-bit instead) - -pkgname=( - $( - printf '%s\n' "${pkgname[@]}" | \ - grep -v '^lib32-rust-libs' - ) -) - -# remove 32-bit stuff (shouldn't that be removed automatically?) -makedepends=(${makedepends[@]//lib32-gcc-libs/}) +# move rust-musl though, also patch architecture for musl accordingly +eval "$( + declare -f build | \ + sed ' + /mv.*i686-unknown-linux-gnu.*/d + s/x86_64-unknown-linux-musl/i686-unknown-linux-musl/ + ' +)" eval "$( declare -f package_rust | \ sed ' - /mv.*i686-unknown-linux-gnu.*/d /ln /s/x86_64-unknown-linux-gnu/i686-unknown-linux-gnu/g ' )" eval "$( - declare -f build | \ + declare -f package_rust-musl | \ sed ' - /mv.*i686-unknown-linux-gnu.*/d - /ln /s/x86_64-unknown-linux-gnu/i686-unknown-linux-gnu/g + s/x86_64-unknown-linux-musl/i686-unknown-linux-musl/ ' )" +# remove 32-bit stuff (shouldn't that be removed automatically?) +pkgname=( + $( + printf '%s\n' "${pkgname[@]}" | \ + grep -v '^lib32-rust-libs' + ) +) +makedepends=(${makedepends[@]//lib32-gcc-libs/}) + # Enable on demand, if your previous rust is broken use previous version # from build-support (this is preferable to using rust-bin below, but # requires all intermediate versions of rust to be built diff --git a/extra/rust/config.toml.patch b/extra/rust/config.toml.patch index 3fd6f43b..1aeb55c1 100644 Binary files a/extra/rust/config.toml.patch and b/extra/rust/config.toml.patch differ -- cgit v1.2.3-54-g00ecf