|
| 1 | +--- vendor/openssl-src/src/lib.rs.orig 2018-12-08 18:57:16 UTC |
| 2 | ++++ vendor/openssl-src/src/lib.rs |
| 3 | +@@ -51,6 +51,13 @@ impl Build { |
| 4 | + self |
| 5 | + } |
| 6 | + |
| 7 | ++ fn cmd_make(&self) -> Command { |
| 8 | ++ match &self.host.as_ref().expect("HOST dir not set")[..] { |
| 9 | ++ "x86_64-unknown-dragonfly" => Command::new("gmake"), |
| 10 | ++ _ => Command::new("make"), |
| 11 | ++ } |
| 12 | ++ } |
| 13 | ++ |
| 14 | + pub fn build(&mut self) -> Artifacts { |
| 15 | + let target = &self.target.as_ref().expect("TARGET dir not set")[..]; |
| 16 | + let host = &self.host.as_ref().expect("HOST dir not set")[..]; |
| 17 | +@@ -161,6 +168,7 @@ impl Build { |
| 18 | + "x86_64-pc-windows-gnu" => "mingw64", |
| 19 | + "x86_64-pc-windows-msvc" => "VC-WIN64A", |
| 20 | + "x86_64-unknown-freebsd" => "BSD-x86_64", |
| 21 | ++ "x86_64-unknown-dragonfly" => "BSD-x86_64", |
| 22 | + "x86_64-unknown-linux-gnu" => "linux-x86_64", |
| 23 | + "x86_64-unknown-linux-musl" => "linux-x86_64", |
| 24 | + "x86_64-unknown-netbsd" => "BSD-x86_64", |
| 25 | +@@ -264,11 +272,11 @@ impl Build { |
| 26 | + install.arg("install_sw").current_dir(&inner_dir); |
| 27 | + self.run_command(install, "installing OpenSSL"); |
| 28 | + } else { |
| 29 | +- let mut depend = Command::new("make"); |
| 30 | ++ let mut depend = self.cmd_make(); |
| 31 | + depend.arg("depend").current_dir(&inner_dir); |
| 32 | + self.run_command(depend, "building OpenSSL dependencies"); |
| 33 | + |
| 34 | +- let mut build = Command::new("make"); |
| 35 | ++ let mut build = self.cmd_make(); |
| 36 | + build.current_dir(&inner_dir); |
| 37 | + if !cfg!(windows) { |
| 38 | + if let Some(s) = env::var_os("CARGO_MAKEFLAGS") { |
| 39 | +@@ -277,7 +285,7 @@ impl Build { |
| 40 | + } |
| 41 | + self.run_command(build, "building OpenSSL"); |
| 42 | + |
| 43 | +- let mut install = Command::new("make"); |
| 44 | ++ let mut install = self.cmd_make(); |
| 45 | + install.arg("install_sw").current_dir(&inner_dir); |
| 46 | + self.run_command(install, "installing OpenSSL"); |
| 47 | + } |
0 commit comments