summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHMH2022-05-20 17:10:23 +0200
committerHMH2022-05-20 17:10:23 +0200
commitc3e3cd34d8b70832f3866c4c8e7eff82752d76eb (patch)
treea015fc7ac1a0369aa998ed4fac0001ddbee623db
parent68a5d67963cb2c7daffa29878bcdaafb48857436 (diff)
downloadaur-c3e3cd34d8b70832f3866c4c8e7eff82752d76eb.tar.gz
Fix linking issues on newer rust versions.
-rw-r--r--PKGBUILD17
-rw-r--r--linking.patch31
2 files changed, 42 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6f9f2ac6fa43..911104a03a60 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,17 +2,22 @@
pkgname=weylus
pkgver=0.11.4
-pkgrel=1
+pkgrel=2
pkgdesc="Use your tablet as graphic tablet/touch screen on your computer."
-arch=('x86_64')
+arch=("x86_64")
url="https://github.com/H-M-H/Weylus"
-license=('AGPL3')
-conflicts=('weylus-bin')
-source=("$pkgname-$pkgver.zip::https://github.com/H-M-H/Weylus/archive/v$pkgver.zip")
-sha256sums=('9cc838e6406ea763c448e64775c42a8faf62a43e63a14facfbdbe0704336e4f8')
+license=("AGPL3")
+conflicts=("weylus-bin")
+source=("$pkgname-$pkgver.zip::https://github.com/H-M-H/Weylus/archive/v$pkgver.zip" "linking.patch")
+sha256sums=("9cc838e6406ea763c448e64775c42a8faf62a43e63a14facfbdbe0704336e4f8" "SKIP")
makedepends=(rust typescript gcc libx11 pkg-config git make cmake)
+prepare() {
+ cd "Weylus-$pkgver"
+ git apply < ../linking.patch
+}
+
build() {
cd "Weylus-$pkgver"
cargo build --release --features="ffmpeg-system"
diff --git a/linking.patch b/linking.patch
new file mode 100644
index 000000000000..e20a2561b289
--- /dev/null
+++ b/linking.patch
@@ -0,0 +1,31 @@
+--- a/build.rs
++++ b/build.rs
+@@ -66,13 +66,6 @@ fn main() {
+ }
+ }
+
+- println!("cargo:rerun-if-changed=lib/error.h");
+- println!("cargo:rerun-if-changed=lib/error.c");
+- println!("cargo:rerun-if-changed=lib/log.h");
+- println!("cargo:rerun-if-changed=lib/log.c");
+- cc::Build::new().file("lib/error.c").compile("error");
+- cc::Build::new().file("lib/log.c").compile("log");
+-
+ println!("cargo:rerun-if-changed=lib/encode_video.c");
+ let mut cc_video = cc::Build::new();
+ cc_video.file("lib/encode_video.c");
+@@ -90,6 +83,14 @@ fn main() {
+ cc_video.define("HAS_MEDIAFOUNDATION", None);
+ }
+ cc_video.compile("video");
++
++ println!("cargo:rerun-if-changed=lib/error.h");
++ println!("cargo:rerun-if-changed=lib/error.c");
++ println!("cargo:rerun-if-changed=lib/log.h");
++ println!("cargo:rerun-if-changed=lib/log.c");
++ cc::Build::new().file("lib/error.c").compile("error");
++ cc::Build::new().file("lib/log.c").compile("log");
++
+ let ffmpeg_link_kind =
+ // https://github.com/rust-lang/rust/pull/72785
+ // https://users.rust-lang.org/t/linking-on-windows-without-wholearchive/49846/3