From 5ae21ee05ad6d21c780fd64c85b80abe712bde26 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 19 Apr 2020 17:38:09 +0200 Subject: extra/rust: boostrapping rust 1.42 from rust141 --- extra/rust/PKGBUILD | 38 ++++++++++++------------ extra/rust/rustc-1.42.0-src-typenum-U1024.patch | Bin 0 -> 4069 bytes extra/rust/watcher.sh | 27 ----------------- 3 files changed, 19 insertions(+), 46 deletions(-) create mode 100644 extra/rust/rustc-1.42.0-src-typenum-U1024.patch delete mode 100755 extra/rust/watcher.sh (limited to 'extra') diff --git a/extra/rust/PKGBUILD b/extra/rust/PKGBUILD index 6067e978..2df3a3eb 100644 --- a/extra/rust/PKGBUILD +++ b/extra/rust/PKGBUILD @@ -60,30 +60,30 @@ eval "$( ' )" -# watch for files changing which need patching during the x.py craziness! -# currently this is duplicate U1024 and P1024 types (this is currently needed -# for i686 and 1.38.0) -source+=('watcher.sh') -sha256sums+=('c91b55a428ef463fc1529724da0c7f3930bd9d4b32b4596a14be77cc3f1e0594') - +# work around P1024, U1024 typenum bug for old rust releases (bundled +# typenum version contains a buggy version) if [ "${CARCH}" = "i686" ]; then - makedepends+=('inotify-tools' 'procps-ng') - + source+=('rustc-1.42.0-src-typenum-U1024.patch') + sha256sums+=('716e5fad9b8bda690856d36f33359da26a4c258bb5e8ffd635898697177dc4de') eval "$( - declare -f build | \ + declare -f prepare | \ sed ' - /\.\/x.py/ i \ - chmod u+x "$srcdir/watcher.sh" \ - "$srcdir/watcher.sh" "$srcdir" & \ - _kill_pid=$! \ - sleep 10 - /\.\/x.py/ a \ - kill $_kill_pid || true + /}/ i \ + patch -Np1 < "$srcdir/rustc-1.42.0-src-typenum-U1024.patch" ' )" + fi -# Enable on demand, if your previous rust is broken, see also build-support and AUR -# for rust-bin. +# Enable on demand, if your previous rust is broken use previous version +# from build-support makedepends=(${makedepends[@]//rust/}) -makedepends+=('rust-bin') +makedepends+=('rust141') + +# rust 1.41 is built against llvm 9.0, so force that in as a make dependency +makedepends+=('llvm9-libs') + +# LLVM download location changed (also upstream) +source[2]="https://github.com/llvm/llvm-project/releases/download/llvmorg-$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz" +source[3]="https://github.com/llvm/llvm-project/releases/download/llvmorg-$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz.sig" +sha256sums[2]="6a7da64d3a0a7320577b68b9ca4933bdcab676e898b759850e827333c3282c75" diff --git a/extra/rust/rustc-1.42.0-src-typenum-U1024.patch b/extra/rust/rustc-1.42.0-src-typenum-U1024.patch new file mode 100644 index 00000000..ea23980b Binary files /dev/null and b/extra/rust/rustc-1.42.0-src-typenum-U1024.patch differ diff --git a/extra/rust/watcher.sh b/extra/rust/watcher.sh deleted file mode 100755 index 98228b5d..00000000 --- a/extra/rust/watcher.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -term() { - echo "--> Got SIGTERM" - echo "--> killing inotifywait with PID $inotifywait" - kill -TERM "$inotifywait" - sleep 10 - kill -9 "$inotifywait" -} - -srcdir="$1" - -trap term SIGTERM - -inotifywait -mr -e close_write --format %w%f $srcdir | while read -r FILE; do - case "$FILE" in - *consts.rs) - echo "--> patching $FILE" - sed -i '/pub type U1024/d;/pub type P1024/d' $FILE - echo "--> finished patching $FILE" - ;; - esac -done & -inotifywait=$(ps -ef | grep inotifywait | grep -v grep | tr -s ' ' | cut -d ' ' -f2) -echo "--> waiting for inotifywait $inotifywait" -wait "$inotifywait" -echo "--> watcher terminated" -- cgit v1.2.3-54-g00ecf