Codebase list rust-libslirp / 8b06908
pkg-config: refresh patches Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Fabian Grünbichler 1 year, 7 months ago
2 changed file(s) with 23 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
0 --- a/src/lib.rs
1 +++ b/src/lib.rs
2 @@ -414,7 +414,11 @@
0 Index: pkg-config/src/lib.rs
1 ===================================================================
2 --- pkg-config.orig/src/lib.rs
3 +++ pkg-config/src/lib.rs
4 @@ -454,7 +454,11 @@ impl Config {
35 fn command(&self, name: &str, args: &[&str]) -> Command {
46 let exe = self
57 .targetted_env_var("PKG_CONFIG")
0 --- a/src/lib.rs
1 +++ b/src/lib.rs
0 Index: pkg-config/src/lib.rs
1 ===================================================================
2 --- pkg-config.orig/src/lib.rs
3 +++ pkg-config/src/lib.rs
24 @@ -12,13 +12,6 @@
35 //! * `FOO_NO_PKG_CONFIG` - if set, this will disable running `pkg-config` when
46 //! probing for the library named `foo`.
1315 //! There are also a number of environment variables which can configure how a
1416 //! library is linked to (dynamically vs statically). These variables control
1517 //! whether the `--static` flag is passed. Note that this behavior can be
16 @@ -110,11 +103,8 @@
18 @@ -111,11 +104,8 @@ pub enum Error {
1719 /// Contains the name of the responsible environment variable.
1820 EnvNoPkgConfig(String),
1921
2729 CrossCompilation,
2830
2931 /// Failed to run `pkg-config`.
30 @@ -145,14 +135,6 @@
32 @@ -155,14 +145,6 @@ impl fmt::Display for Error {
3133 fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
3234 match *self {
3335 Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name),
4244 Error::Command {
4345 ref command,
4446 ref cause,
45 @@ -205,7 +187,7 @@
46 }
47 Ok(())
47 @@ -219,7 +201,7 @@ impl fmt::Display for Error {
48 )?;
49 format_output(output, f)
4850 }
4951 - Error::__Nonexhaustive => panic!(),
5052 + Error::CrossCompilation | Error::__Nonexhaustive => panic!(),
5153 }
5254 }
5355 }
54 @@ -371,6 +353,8 @@
56 @@ -411,6 +393,8 @@ impl Config {
5557 if host == target {
5658 return true;
5759 }
6062
6163 // pkg-config may not be aware of cross-compilation, and require
6264 // a wrapper script that sets up platform-specific prefixes.
63 --- a/tests/test.rs
64 +++ b/tests/test.rs
65 @@ -34,7 +34,6 @@
65 Index: pkg-config/tests/test.rs
66 ===================================================================
67 --- pkg-config.orig/tests/test.rs
68 +++ pkg-config/tests/test.rs
69 @@ -34,7 +34,6 @@ fn find(name: &str) -> Result<pkg_config
6670 pkg_config::probe_library(name)
6771 }
6872
7074 fn cross_disabled() {
7175 let _g = LOCK.lock();
7276 reset();
73 @@ -46,7 +45,6 @@
77 @@ -46,7 +45,6 @@ fn cross_disabled() {
7478 }
7579 }
7680
7882 fn cross_enabled() {
7983 let _g = LOCK.lock();
8084 reset();
81 @@ -66,7 +64,6 @@
85 @@ -66,7 +64,6 @@ fn cross_enabled_if_customized() {
8286 find("foo").unwrap();
8387 }
8488
8690 fn cross_disabled_if_customized() {
8791 let _g = LOCK.lock();
8892 reset();
89 @@ -74,10 +71,10 @@
93 @@ -74,10 +71,10 @@ fn cross_disabled_if_customized() {
9094 env::set_var("HOST", "bar");
9195 env::set_var("PKG_CONFIG_ALLOW_CROSS", "0");
9296 env::set_var("PKG_CONFIG_SYSROOT_DIR", "/tmp/cross-test");