aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-02-22 11:14:20 -0800
committerSteven Fackler <[email protected]>2015-02-22 11:14:20 -0800
commitebd906293376ee8ed3b7ddafa4573d2a9222d8b7 (patch)
tree347b5ea8752fe844fea6dfca9fd6f859a5f2a88c
parentRemove old attributes (diff)
downloadrust-openssl-ebd906293376ee8ed3b7ddafa4573d2a9222d8b7.tar.xz
rust-openssl-ebd906293376ee8ed3b7ddafa4573d2a9222d8b7.zip
Use new path API in buildscript
-rw-r--r--openssl-sys/Cargo.toml4
-rw-r--r--openssl-sys/build.rs11
2 files changed, 8 insertions, 7 deletions
diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml
index 55318726..3b6dc5fb 100644
--- a/openssl-sys/Cargo.toml
+++ b/openssl-sys/Cargo.toml
@@ -18,8 +18,8 @@ sslv2 = []
aes_xts = []
[build-dependencies]
-pkg-config = "0.2.1"
-gcc = "0.2"
+pkg-config = "0.3"
+gcc = "0.3"
[target.le32-unknown-nacl.dependencies]
libressl-pnacl-sys = "2.1.0"
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs
index 17a07e52..ce807dd2 100644
--- a/openssl-sys/build.rs
+++ b/openssl-sys/build.rs
@@ -1,9 +1,10 @@
-#![feature(env, old_path)]
+#![feature(env, path)]
extern crate "pkg-config" as pkg_config;
extern crate gcc;
use std::env;
+use std::path::PathBuf;
fn main() {
let lib_dir = env::var("OPENSSL_LIB_DIR").ok();
@@ -11,7 +12,7 @@ fn main() {
if lib_dir.is_none() && include_dir.is_none() {
if let Ok(info) = pkg_config::find_library("openssl") {
- build_old_openssl_shim(info.include_paths);
+ build_old_openssl_shim(&info.include_paths);
return;
}
}
@@ -37,13 +38,13 @@ fn main() {
let mut include_dirs = vec![];
if let Some(include_dir) = include_dir {
- include_dirs.push(Path::new(include_dir));
+ include_dirs.push(PathBuf::new(&include_dir));
}
- build_old_openssl_shim(include_dirs);
+ build_old_openssl_shim(&include_dirs);
}
-fn build_old_openssl_shim(include_paths: Vec<Path>) {
+fn build_old_openssl_shim(include_paths: &[PathBuf]) {
let mut config = gcc::Config::new();
for path in include_paths {