From 19cdc2df56abc9da581c968515e97ac6bb0e011f Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 19 Dec 2024 14:28:29 -0500 Subject: [PATCH 1/4] Use `pkgconf` instead of `pkg-config` for brew builds Signed-off-by: Rui Chen --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index db693fa..df580c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -286,7 +286,7 @@ impl fmt::Display for Error { let crate_name = std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "sys".to_owned()); let instructions = if cfg!(target_os = "macos") || cfg!(target_os = "ios") { - "Try `brew install pkg-config` if you have Homebrew.\n" + "Try `brew install pkgconf` if you have Homebrew.\n" } else if cfg!(unix) { "Try `apt install pkg-config`, or `yum install pkg-config`,\n\ or `pkg install pkg-config`, or `apk add pkgconfig` \ From 3c2aa27c9660c42ee1c415254092732c4eb09222 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 20 Dec 2024 12:25:28 -0500 Subject: [PATCH 2/4] remove iOS target from pkg-config installation instructions as Homebrew does not support it Signed-off-by: Rui Chen --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index df580c8..ecdc803 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -285,7 +285,7 @@ impl fmt::Display for Error { io::ErrorKind::NotFound => { let crate_name = std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "sys".to_owned()); - let instructions = if cfg!(target_os = "macos") || cfg!(target_os = "ios") { + let instructions = if cfg!(target_os = "macos") { "Try `brew install pkgconf` if you have Homebrew.\n" } else if cfg!(unix) { "Try `apt install pkg-config`, or `yum install pkg-config`,\n\ From 15a342ff0447ba05d60c9acde541873b687cdcbf Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 2 Jan 2025 10:44:46 -0500 Subject: [PATCH 3/4] add pr feedback Co-authored-by: Nirbheek Chauhan --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index ecdc803..1c82c13 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -287,6 +287,8 @@ impl fmt::Display for Error { std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "sys".to_owned()); let instructions = if cfg!(target_os = "macos") { "Try `brew install pkgconf` if you have Homebrew.\n" + } else if cfg!(target_os = "ios") { + "" // iOS cross-compilation requires a custom setup, no easy fix } else if cfg!(unix) { "Try `apt install pkg-config`, or `yum install pkg-config`,\n\ or `pkg install pkg-config`, or `apk add pkgconfig` \ From 90743f8ab3f93799a8ac6cfd00b08e6500b19193 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Thu, 2 Jan 2025 10:44:58 -0500 Subject: [PATCH 4/4] support linuxbrew Co-authored-by: Amyspark --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1c82c13..d092f45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -290,7 +290,7 @@ impl fmt::Display for Error { } else if cfg!(target_os = "ios") { "" // iOS cross-compilation requires a custom setup, no easy fix } else if cfg!(unix) { - "Try `apt install pkg-config`, or `yum install pkg-config`,\n\ + "Try `apt install pkg-config`, or `yum install pkg-config`, or `brew install pkgconf`\n\ or `pkg install pkg-config`, or `apk add pkgconfig` \ depending on your distribution.\n" } else {