parent
cfd62321fd
commit
1ad5bf006a
@ -0,0 +1,62 @@
|
||||
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
|
||||
--- a/build.rs
|
||||
+++ b/build.rs
|
||||
@@ -19,28 +19,27 @@ 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
|
||||
- // 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");
|
||||
- }
|
||||
+ // 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");
|
||||
}
|
||||
+ }
|
||||
|
||||
- // Next, fall back and try to use pkg-config if its available.
|
||||
- if windows {
|
||||
- if try_vcpkg() {
|
||||
- return;
|
||||
- }
|
||||
- } else {
|
||||
- if try_pkg_config() {
|
||||
- return;
|
||||
- }
|
||||
+ // Next, fall back and try to use pkg-config if its available.
|
||||
+ if windows {
|
||||
+ if try_vcpkg() {
|
||||
+ return;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if try_pkg_config() {
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
+ std::process::exit(1);
|
||||
+
|
||||
if !Path::new("curl/.git").exists() {
|
||||
let _ = Command::new("git")
|
||||
.args(&["submodule", "update", "--init"])
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- curl-sys-0.4.18/lib.rs.orig 2019-04-17 18:46:52.000000000 -0700
|
||||
+++ curl-sys-0.4.18/lib.rs 2019-05-09 12:05:12.694980681 -0700
|
||||
@@ -2,8 +2,6 @@
|
||||
#![doc(html_root_url = "https://docs.rs/curl-sys/0.3")]
|
||||
|
||||
extern crate libc;
|
||||
-#[cfg(link_libnghttp2)]
|
||||
-extern crate libnghttp2_sys;
|
||||
#[cfg(link_libz)]
|
||||
extern crate libz_sys;
|
||||
#[cfg(feature = "mesalink")]
|
Loading…
Reference in new issue