Files
MINGW-packages/mingw-w64-rust/0003-link-with-system-curl.patch
2018-10-29 09:50:37 +03:00

30 lines
1.0 KiB
Diff

--- rustc-1.29.2-src/src/vendor/curl-sys/build.rs.orig 2018-10-28 19:42:18.586068900 +0300
+++ rustc-1.29.2-src/src/vendor/curl-sys/build.rs 2018-10-28 19:52:34.084273400 +0300
@@ -11,6 +11,7 @@
fn main() {
let target = env::var("TARGET").unwrap();
let windows = target.contains("windows");
+ let win_msvc = target.contains("msvc");
// OSX and Haiku ships libcurl by default, so we just use that version
// unconditionally.
@@ -19,7 +20,7 @@
}
// Next, fall back and try to use pkg-config if its available.
- if windows {
+ if win_msvc {
if try_vcpkg() {
return
}
@@ -320,7 +321,8 @@
// Not all system builds of libcurl have http2 features enabled, so if we've
// got a http2-requested build then we may fall back to a build from source.
if cfg!(feature = "http2") {
- let output = Command::new("curl-config")
+ let output = Command::new("sh")
+ .arg("curl-config")
.arg("--features")
.output();
let output = match output {