Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/rust/PKGBUILD38
-rw-r--r--extra/rust/rustc-1.42.0-src-typenum-U1024.patch20
-rwxr-xr-xextra/rust/watcher.sh27
3 files changed, 39 insertions, 46 deletions
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
--- /dev/null
+++ b/extra/rust/rustc-1.42.0-src-typenum-U1024.patch
@@ -0,0 +1,20 @@
+diff -rauN rustc-1.42.0-src/vendor/typenum/build/main.rs rustc-1.42.0-src-typenum-U1024-patch/vendor/typenum/build/main.rs
+--- rustc-1.42.0-src/vendor/typenum/build/main.rs 2020-03-10 01:00:21.000000000 +0100
++++ rustc-1.42.0-src-typenum-U1024-patch/vendor/typenum/build/main.rs 2020-04-19 15:10:49.182384427 +0200
+@@ -77,7 +77,7 @@
+ fn main() {
+ let highest: u64 = 1024;
+
+- let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
++ let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
+ let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
+ let uints = (0..(highest + 1))
+ .chain((first2..64).map(|i| 2u64.pow(i)))
+diff -rauN rustc-1.42.0-src/vendor/typenum/.cargo-checksum.json rustc-1.42.0-src-typenum-U1024-patch/vendor/typenum/.cargo-checksum.json
+--- rustc-1.42.0-src/vendor/typenum/.cargo-checksum.json 2020-03-10 01:00:21.000000000 +0100
++++ rustc-1.42.0-src-typenum-U1024-patch/vendor/typenum/.cargo-checksum.json 2020-04-19 15:11:32.195746987 +0200
+@@ -1 +1 @@
+-{"files":{"CHANGELOG.md":"caf37574d41c38570e892c4fed38cbc2fd22794ec512949c1f0faad1d866fced","Cargo.toml":"58822547c70a09449e6a069e6c197423a9e471d993ebf4ea20101e042781edf7","LICENSE":"a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f","README.md":"7a19a1fb2f219fbc270535e0fee2caa96968b976cd74d33d12e2f2ef436d0895","build/main.rs":"44d33ee79a76a90a769096547ba4c7a5d3822afffeed025dfbcc5bb755227d52","build/op.rs":"a393b6818384a50688db8cb923891f86ccce39a9dccbf7c684efb9bef83b4acf","build/tests.rs":"a04fd3185ea8b19c36cb939178e5fedf16b4b36c2df0a2e79593339d998bd1ce","src/array.rs":"7243dbe44f3818c852c67bd0c3af14d57473fb9c3efda2c0d98251b3fe8b4d57","src/bit.rs":"023f9f6768331ac17de72b6248c6a9d6a7b856842f56067c9c1e04b729ed9e04","src/int.rs":"de4c49717a7a40572e579fad2380f29698c5571844ff1462e368531072dba55e","src/lib.rs":"2a58ff8553851eb6b9d7fa70315d688431dd0573f8491e53cfe799a092347b96","src/marker_traits.rs":"abf73f3930b5129d01aaa64c51275c4ca4ce0ef8961f7a9e744ee731d6308200","src/operator_aliases.rs":"43eb6a29dc0387ec329df5d9af0b4479a1301b3a9b2304c3b7b7d8c03e01ff5d","src/private.rs":"48c572aa27bd444062eadb4bd3f5ca38c1e6efb66bc074f38555499b33f0dcaf","src/type_operators.rs":"df9ef3ae2a69d56258db41f8166342a65f6e4085581709140719d1b7e3916bb9","src/uint.rs":"df4fdad3110a7e08fdc21e49f7e82fd525d6a78fcf904a766729aa47c0200727","tests/test.rs":"1e559fadf0af1a38d7049caef26e3a162c58ea5e024aa637299376d776986549"},"package":"612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"}
+\ No newline at end of file
++{"files":{"CHANGELOG.md":"caf37574d41c38570e892c4fed38cbc2fd22794ec512949c1f0faad1d866fced","Cargo.toml":"58822547c70a09449e6a069e6c197423a9e471d993ebf4ea20101e042781edf7","LICENSE":"a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f","README.md":"7a19a1fb2f219fbc270535e0fee2caa96968b976cd74d33d12e2f2ef436d0895","build/main.rs":"38a90c85068bb6bba1d21e9d5976e693b9b868ed0c16b26986332d2ca1c01047","build/op.rs":"a393b6818384a50688db8cb923891f86ccce39a9dccbf7c684efb9bef83b4acf","build/tests.rs":"a04fd3185ea8b19c36cb939178e5fedf16b4b36c2df0a2e79593339d998bd1ce","src/array.rs":"7243dbe44f3818c852c67bd0c3af14d57473fb9c3efda2c0d98251b3fe8b4d57","src/bit.rs":"023f9f6768331ac17de72b6248c6a9d6a7b856842f56067c9c1e04b729ed9e04","src/int.rs":"de4c49717a7a40572e579fad2380f29698c5571844ff1462e368531072dba55e","src/lib.rs":"2a58ff8553851eb6b9d7fa70315d688431dd0573f8491e53cfe799a092347b96","src/marker_traits.rs":"abf73f3930b5129d01aaa64c51275c4ca4ce0ef8961f7a9e744ee731d6308200","src/operator_aliases.rs":"43eb6a29dc0387ec329df5d9af0b4479a1301b3a9b2304c3b7b7d8c03e01ff5d","src/private.rs":"48c572aa27bd444062eadb4bd3f5ca38c1e6efb66bc074f38555499b33f0dcaf","src/type_operators.rs":"df9ef3ae2a69d56258db41f8166342a65f6e4085581709140719d1b7e3916bb9","src/uint.rs":"df4fdad3110a7e08fdc21e49f7e82fd525d6a78fcf904a766729aa47c0200727","tests/test.rs":"1e559fadf0af1a38d7049caef26e3a162c58ea5e024aa637299376d776986549"},"package":"612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"}
+\ No newline at end of file
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"