git: 94d5f5d859e7 - main - x11/xwayland-satellite: switch to upstream fix

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 24 May 2024 14:13:38 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=94d5f5d859e7d6af4bd7c08ee31aeba71b876c3c

commit 94d5f5d859e7d6af4bd7c08ee31aeba71b876c3c
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-05-24 14:08:44 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-05-24 14:12:55 +0000

    x11/xwayland-satellite: switch to upstream fix
---
 x11/xwayland-satellite/Makefile               |  3 ---
 x11/xwayland-satellite/files/patch-xcb-cursor | 32 +++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/x11/xwayland-satellite/Makefile b/x11/xwayland-satellite/Makefile
index f52c5fb421c3..b10c8efd66e9 100644
--- a/x11/xwayland-satellite/Makefile
+++ b/x11/xwayland-satellite/Makefile
@@ -19,9 +19,6 @@ USE_XORG=	xcb
 GH_ACCOUNT=	Supreeeme
 PLIST_FILES=	bin/${PORTNAME}
 
-# https://github.com/juliuskreutz/xcb-util-cursor-rs/issues/1
-CARGO_ENV+=	CPATH="${LOCALBASE}/include"
-
 post-patch:
 	@${REINPLACE_CMD} -e 's,"llvm-config,"${LLVM_CONFIG},' \
 		${WRKSRC_crate_clang-sys}/build/common.rs \
diff --git a/x11/xwayland-satellite/files/patch-xcb-cursor b/x11/xwayland-satellite/files/patch-xcb-cursor
new file mode 100644
index 000000000000..db0c2a37c248
--- /dev/null
+++ b/x11/xwayland-satellite/files/patch-xcb-cursor
@@ -0,0 +1,32 @@
+https://github.com/juliuskreutz/xcb-util-cursor-rs/commit/c79704ec2aba
+
+--- cargo-crates/xcb-util-cursor-sys-0.1.3/Cargo.toml.orig	1970-01-01 00:00:01 UTC
++++ cargo-crates/xcb-util-cursor-sys-0.1.3/Cargo.toml
+@@ -29,3 +29,6 @@ version = "0.64.0"
+ 
+ [build-dependencies.bindgen]
+ version = "0.64.0"
++
++[build-dependencies.pkg-config]
++version = "0.3.30"
+--- cargo-crates/xcb-util-cursor-sys-0.1.3/build.rs.orig	1970-01-01 00:00:01 UTC
++++ cargo-crates/xcb-util-cursor-sys-0.1.3/build.rs
+@@ -4,9 +4,18 @@ fn main() {
+     println!("cargo:rustc-link-lib=xcb-cursor");
+     println!("cargo:rerun-if-changed=wrapper.h");
+ 
++    let library = pkg_config::probe_library("xcb-cursor")
++        .expect("Error using pkg-config to find xcb-cursor library");
++
+     let bindings = bindgen::Builder::default()
+         .header("wrapper.h")
+         .parse_callbacks(Box::new(bindgen::CargoCallbacks))
++        .clang_args(
++            library
++                .include_paths
++                .iter()
++                .map(|path| format!("-I{}", path.to_string_lossy())),
++        )
+         .allowlist_function("xcb_cursor_.*")
+         .allowlist_type("xcb_cursor_.*")
+         .generate()