|
|
|
@ -1,48 +1,29 @@
|
|
|
|
|
From 274cc7067e131d0c7e1bcdc3959bc8fbd895c942 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: Igor Raits <i.gnatenko.brain@gmail.com>
|
|
|
|
|
Date: Sun, 17 May 2020 16:00:46 +0200
|
|
|
|
|
Subject: [PATCH] Make static-curl/static-ssl features a noop
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
|
|
|
|
|
---
|
|
|
|
|
build.rs | 33 ++++++++++++++++-----------------
|
|
|
|
|
1 file changed, 16 insertions(+), 17 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/build.rs b/build.rs
|
|
|
|
|
index 74b6a55..842ddb5 100644
|
|
|
|
|
index 7b66756..16eeb1f 100644
|
|
|
|
|
--- a/build.rs
|
|
|
|
|
+++ b/build.rs
|
|
|
|
|
@@ -19,24 +19,21 @@ fn main() {
|
|
|
|
|
@@ -22,22 +22,9 @@ fn main() {
|
|
|
|
|
return println!("cargo:rustc-flags=-l curl");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- // If the static-curl feature is disabled, probe for a system-wide libcurl.
|
|
|
|
|
- if !cfg!(feature = "static-curl") {
|
|
|
|
|
- // OSX and Haiku ships libcurl by default, so we just use that version
|
|
|
|
|
- // OSX ships libcurl by default, so we just use that version
|
|
|
|
|
- // so long as it has the right features enabled.
|
|
|
|
|
- if (target.contains("apple") || target.contains("haiku"))
|
|
|
|
|
- && (!cfg!(feature = "http2") || curl_config_reports_http2())
|
|
|
|
|
- {
|
|
|
|
|
+ // OSX and Haiku ships libcurl by default, so we just use that version
|
|
|
|
|
+ // so long as it has the right features enabled.
|
|
|
|
|
+ if target.contains("apple") || target.contains("haiku") {
|
|
|
|
|
+ if !cfg!(feature = "http2") || curl_config_reports_http2() {
|
|
|
|
|
return println!("cargo:rustc-flags=-l curl");
|
|
|
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
- if target.contains("apple") && (!cfg!(feature = "http2") || curl_config_reports_http2()) {
|
|
|
|
|
- return println!("cargo:rustc-flags=-l curl");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Next, fall back and try to use pkg-config if its available.
|
|
|
|
|
- if windows {
|
|
|
|
|
- if try_vcpkg() {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- } else if try_pkg_config() {
|
|
|
|
|
+ // Next, fall back and try to use pkg-config if its available.
|
|
|
|
|
+ if windows {
|
|
|
|
|
+ if try_vcpkg() {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
+ } else if try_pkg_config() {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
+ // Try to use pkg-config if its available.
|
|
|
|
|
+ if try_pkg_config() {
|
|
|
|
|
+ return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|