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