]> git.proxmox.com Git - debcargo-conf.git/commitdiff
Restore debian auto cross-compile patch
authorXimin Luo <infinity0@debian.org>
Thu, 5 Dec 2019 22:05:19 +0000 (22:05 +0000)
committerXimin Luo <infinity0@debian.org>
Thu, 5 Dec 2019 22:05:19 +0000 (22:05 +0000)
src/pkg-config/debian/changelog
src/pkg-config/debian/patches/debian-auto-cross-compile.patch [new file with mode: 0644]
src/pkg-config/debian/patches/series

index 228d78886061b7bef9080399bd15463fd9a6c468..551def801b97cc249048edf7ec80ed4b6d193ba1 100644 (file)
@@ -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 <infinity0@debian.org>  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 (file)
index 0000000..6201feb
--- /dev/null
@@ -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");
index 206beed4b6b3e0cda42f9dd02c136909dff9eec8..50730139b34a284ea8ecca95414c88b3616788f6 100644 (file)
@@ -1 +1,2 @@
 no-special-snowflake-env.patch
+debian-auto-cross-compile.patch