Use libssh2 from system by default
authorVasudev Kamath <vasudev@copyninja.info>
Sun, 12 Aug 2018 07:15:23 +0000 (12:45 +0530)
committerXimin Luo <infinity0@debian.org>
Sun, 12 Aug 2018 07:15:23 +0000 (12:45 +0530)
Bug: https://github.com/alexcrichton/ssh2-rs/issues/88
Forwarded: not-needed
Last-Update: 2018-07-28

Gbp-Pq: Name 2003_force-use-system-libssh2.patch

vendor/libssh2-sys-0.2.8/build.rs

index 1f5ed1ac485f4e8fac5784ca3e2b64340b0d5b21..5a33c4f8b6cd25a80ccdcc46a17058d858993f25 100644 (file)
@@ -21,19 +21,20 @@ fn main() {
     // The system copy of libssh2 is not used by default because it
     // can lead to having two copies of libssl loaded at once.
     // See https://github.com/alexcrichton/ssh2-rs/pull/88
-    if env::var("LIBSSH2_SYS_USE_PKG_CONFIG").is_ok() {
-        if let Ok(lib) = pkg_config::find_library("libssh2") {
-            for path in &lib.include_paths {
-                println!("cargo:include={}", path.display());
-            }
-            return
+    // if env::var("LIBSSH2_SYS_USE_PKG_CONFIG").is_ok() {
+    if let Ok(lib) = pkg_config::find_library("libssh2") {
+        for path in &lib.include_paths {
+            println!("cargo:include={}", path.display());
         }
+        return;
     }
+    // }
 
-    if !Path::new("libssh2/.git").exists() {
-        let _ = Command::new("git").args(&["submodule", "update", "--init"])
-                                   .status();
-    }
+    // if !Path::new("libssh2/.git").exists() {
+    //     let _ = Command::new("git")
+    //         .args(&["submodule", "update", "--init"])
+    //         .status();
+    // }
 
     let mut cfg = cmake::Config::new("libssh2");