diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:01 +0000 |
commit | c29d7c1ba10d6debd11f9d8aad5d069a6491e60e (patch) | |
tree | a2ad46eb513b315f0efd8170af5eb08870165757 /debian/patches/d-0001-pkg-config-no-special-snowflake.patch | |
parent | Merging upstream version 1.76.0+dfsg1. (diff) | |
download | rustc-c29d7c1ba10d6debd11f9d8aad5d069a6491e60e.tar.xz rustc-c29d7c1ba10d6debd11f9d8aad5d069a6491e60e.zip |
Adding debian version 1.76.0+dfsg1-1.debian/1.76.0+dfsg1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/d-0001-pkg-config-no-special-snowflake.patch')
-rw-r--r-- | debian/patches/d-0001-pkg-config-no-special-snowflake.patch | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch b/debian/patches/d-0001-pkg-config-no-special-snowflake.patch deleted file mode 100644 index bae687742..000000000 --- a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Sat, 2 Oct 2021 01:08:00 +0100 -Subject: d-0001-pkg-config-no-special-snowflake - ---- - vendor/pkg-config/src/lib.rs | 25 ++++++++++--------------- - vendor/pkg-config/tests/test.rs | 2 -- - 2 files changed, 10 insertions(+), 17 deletions(-) - -diff --git a/vendor/pkg-config/src/lib.rs b/vendor/pkg-config/src/lib.rs -index 3653032..553ac75 100644 ---- a/vendor/pkg-config/src/lib.rs -+++ b/vendor/pkg-config/src/lib.rs -@@ -117,11 +117,8 @@ pub enum Error { - /// Contains the name of the responsible environment variable. - EnvNoPkgConfig(String), - -- /// Detected cross compilation without a custom sysroot. -- /// -- /// Ignore the error with `PKG_CONFIG_ALLOW_CROSS=1`, -- /// which may let `pkg-config` select libraries -- /// for the host's architecture instead of the target's. -+ /// Cross compilation detected. Kept for compatibility; -+ /// the Debian package never emits this. - CrossCompilation, - - /// Failed to run `pkg-config`. -@@ -161,14 +158,6 @@ impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - match *self { - Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name), -- Error::CrossCompilation => f.write_str( -- "pkg-config has not been configured to support cross-compilation.\n\ -- \n\ -- Install a sysroot for the target platform and configure it via\n\ -- PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\n\ -- cross-compiling wrapper for pkg-config and set it via\n\ -- PKG_CONFIG environment variable.", -- ), - Error::Command { - ref command, - ref cause, -@@ -226,7 +215,7 @@ impl fmt::Display for Error { - )?; - format_output(output, f) - } -- Error::__Nonexhaustive => panic!(), -+ Error::CrossCompilation | Error::__Nonexhaustive => panic!(), - } - } - } -@@ -420,6 +409,8 @@ impl Config { - if host == target { - return true; - } -+ // always enable PKG_CONFIG_ALLOW_CROSS override in Debian -+ return true; - - // pkg-config may not be aware of cross-compilation, and require - // a wrapper script that sets up platform-specific prefixes. -@@ -477,7 +468,11 @@ impl Config { - } - - fn run(&self, name: &str, args: &[&str]) -> Result<Vec<u8>, Error> { -- let pkg_config_exe = self.targetted_env_var("PKG_CONFIG"); -+ let pkg_config_exe = self.targetted_env_var("PKG_CONFIG") -+ .or_else(|| { -+ self.env_var_os("DEB_HOST_GNU_TYPE") -+ .map(|mut t| { t.push(OsString::from("-pkgconf")); t }) -+ }); - let fallback_exe = if pkg_config_exe.is_none() { - Some(OsString::from("pkgconf")) - } else { -diff --git a/vendor/pkg-config/tests/test.rs b/vendor/pkg-config/tests/test.rs -index 0f37c72..f70e8b7 100644 ---- a/vendor/pkg-config/tests/test.rs -+++ b/vendor/pkg-config/tests/test.rs -@@ -31,7 +31,6 @@ fn find(name: &str) -> Result<pkg_config::Library, Error> { - pkg_config::probe_library(name) - } - --#[test] - fn cross_disabled() { - let _g = LOCK.lock(); - reset(); -@@ -43,7 +42,6 @@ fn cross_disabled() { - } - } - --#[test] - fn cross_enabled() { - let _g = LOCK.lock(); - reset(); |