From: Ximin Luo Date: Thu, 5 Dec 2019 22:05:19 +0000 (+0000) Subject: Restore debian auto cross-compile patch X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=899a91a6fd139856cf122691e29d980b94ff866e;p=debcargo-conf.git Restore debian auto cross-compile patch --- diff --git a/src/pkg-config/debian/changelog b/src/pkg-config/debian/changelog index 228d78886..551def801 100644 --- a/src/pkg-config/debian/changelog +++ b/src/pkg-config/debian/changelog @@ -1,3 +1,9 @@ +rust-pkg-config (0.3.17-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium + + * Package pkg-config 0.3.17 from crates.io using debcargo 2.4.0 + + -- Ximin Luo Thu, 5 Dec 2019 22:03:57 +0000 + rust-pkg-config (0.3.17-1) unstable; urgency=medium * Package pkg-config 0.3.17 from crates.io using debcargo 2.4.0 diff --git a/src/pkg-config/debian/patches/debian-auto-cross-compile.patch b/src/pkg-config/debian/patches/debian-auto-cross-compile.patch new file mode 100644 index 000000000..6201febab --- /dev/null +++ b/src/pkg-config/debian/patches/debian-auto-cross-compile.patch @@ -0,0 +1,17 @@ +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -385,9 +385,11 @@ + } + + fn command(&self, name: &str, args: &[&str]) -> Command { +- let exe = self +- .env_var("PKG_CONFIG") +- .unwrap_or_else(|_| String::from("pkg-config")); ++ let exe = self.env_var("PKG_CONFIG").unwrap_or_else(|_| { ++ self.env_var("DEB_HOST_GNU_TYPE") ++ .map(|t| t.to_string() + "-pkg-config") ++ .unwrap_or_else(|_| String::from("pkg-config")) ++ }); + let mut cmd = Command::new(exe); + if self.is_static(name) { + cmd.arg("--static"); diff --git a/src/pkg-config/debian/patches/series b/src/pkg-config/debian/patches/series index 206beed4b..50730139b 100644 --- a/src/pkg-config/debian/patches/series +++ b/src/pkg-config/debian/patches/series @@ -1 +1,2 @@ no-special-snowflake-env.patch +debian-auto-cross-compile.patch