diff --git a/mingw-w64-rust/PKGBUILD b/mingw-w64-rust/PKGBUILD index e345a3b97cd5e..4b86514e9f143 100644 --- a/mingw-w64-rust/PKGBUILD +++ b/mingw-w64-rust/PKGBUILD @@ -47,6 +47,10 @@ source=("${rust_dist_server}/${_realname}c-${pkgver}-src.tar.gz"{,.asc} "${embed_manifest_url}" "https://github.com/rust-lang/compiler-builtins/commit/d8ab794ed61e2c7c0750f57332a680d5aa8db48c.patch" "https://github.com/rust-lang/compiler-builtins/commit/3f47913bc6414bab4254d49f9f6e7238fecace69.patch" + "https://github.com/rust-lang/rust/commit/f7b2e37f7232540d9f2b2dc6e33597fbb74f4f63.patch" + "https://github.com/rust-lang/rust/commit/eac0b3a1d1b8d1db8fa95c50e118de5b9471e5af.patch" + "https://github.com/rust-lang/backtrace-rs/commit/adc9f5ca6205a7bde95b5f1a3f029e590ce6c694.patch" + "https://github.com/rust-lang/backtrace-rs/commit/e15130618237eb3e2d4b622549f9647b4c1d9ca3.patch" "0001-rustc-llvm-fix-libs.patch" "0005-win32-config.patch" "0007-clang-subsystem.patch" @@ -60,6 +64,10 @@ sha256sums=('ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9' '24ef6d949c0b5b1940c1d6a7aad78d86012152fb8845a1644bc939350d7b75e2' '0426bc2a82f56ddabc0646100891bc61b9a57f4b7aec9f45aff40d7ba081db4f' 'b888615732b1c9b0d4e8459cc9bd7ffb8afbf13bab840c2d345dc1492a63c9c3' + '05a5bbd1c5ec5fdb66a712a3939b75fae1285309d2ea570d1b14c641927bad8d' + 'd9a1ac6343c3d5428691701aba2489858cca069510da319ceca9c7bf7ed0ca0d' + '8b6a5f1ede0a73f4aa5cf9c4b0e48f4db9885717dfc2c953d190a17e13ae5bbb' + '084e950c0441dd649624692250ee6e771d796467e85feac5b6cd6aee2a862ce2' '7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0' '7d1c4e49524b835a8eadc961b39f5594b12a522a1e24368999be2c7e85399e4e' '46b63be79e4f2d5da2b183ed963429bce22966227bf24a73b158d23875841b11' @@ -92,6 +100,14 @@ apply_patch_with_msg() { patch -Nbp1 -i "${srcdir}/${_patch}" done } + +apply_patch_with_msg_no_backup() { + for _patch in "$@" + do + msg2 "Applying ${_patch}" + patch -Np1 -i "${srcdir}/${_patch}" + done +} # =========================================== # prepare() { @@ -127,6 +143,22 @@ prepare() { # still needs to patch .cargo-checksums.json apply_patch_with_msg \ 0013-backport-compiler-builtins.patch + + # patch tests + # tidy complains about *.orig files so do not generate backups + apply_patch_with_msg_no_backup \ + f7b2e37f7232540d9f2b2dc6e33597fbb74f4f63.patch + + if [[ $MSYSTEM == MINGW* ]]; then + apply_patch_with_msg \ + eac0b3a1d1b8d1db8fa95c50e118de5b9471e5af.patch + fi + if [[ $MINGW_PACKAGE_PREFIX == *-aarch64 ]]; then + (cd library/backtrace && \ + apply_patch_with_msg \ + adc9f5ca6205a7bde95b5f1a3f029e590ce6c694.patch \ + e15130618237eb3e2d4b622549f9647b4c1d9ca3.patch) + fi } build() {