From 5e1449df0dd8beeaf9fa6663a6bba49a60fcd079 Mon Sep 17 00:00:00 2001 From: Thijs Cadier Date: Thu, 28 Sep 2017 12:42:50 +0200 Subject: [PATCH] Bump mongo c driver to 1.8.0 --- Cargo.toml | 2 +- mongoc-sys/Cargo.toml | 2 +- mongoc-sys/build.rs | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca6c5f9..c10c9a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ bson = "^0.9" [dependencies.mongoc-sys] path = "mongoc-sys" -version = "1.6.4" +version = "1.8.0" [dev-dependencies] chrono = "^0.4" diff --git a/mongoc-sys/Cargo.toml b/mongoc-sys/Cargo.toml index 50b9d0d..188d24f 100644 --- a/mongoc-sys/Cargo.toml +++ b/mongoc-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mongoc-sys" -version = "1.6.4" +version = "1.8.0" description = "Sys package with installer and bindings for mongoc" authors = ["Thijs Cadier "] build = "build.rs" diff --git a/mongoc-sys/build.rs b/mongoc-sys/build.rs index 296f226..701e205 100644 --- a/mongoc-sys/build.rs +++ b/mongoc-sys/build.rs @@ -2,10 +2,10 @@ use std::env; use std::path::Path; use std::process::Command; -static VERSION: &'static str = "1.6.3"; // Should be the same major version as in the manifest +static VERSION: &'static str = "1.8.0"; // Should be the same major version as in the manifest fn main() { - let out_dir_var = env::var("OUT_DIR").unwrap(); + let out_dir_var = env::var("OUT_DIR").expect("No out dir"); let out_dir = format!("{}/{}", out_dir_var, VERSION); let driver_src_path = format!("mongo-c-driver-{}", VERSION); @@ -21,7 +21,7 @@ fn main() { .arg("-L") // Follow redirects .arg(url) .status() - .unwrap() + .expect("Could not run curl") .success()); let archive_name = format!( @@ -31,7 +31,7 @@ fn main() { assert!(Command::new("tar").arg("xzf") .arg(&archive_name) .status() - .unwrap() + .expect("Could not run tar") .success()); // Configure and install @@ -44,6 +44,8 @@ fn main() { command.arg("--enable-shm-counters=no"); command.arg("--with-libbson=bundled"); command.arg("--with-pic=yes"); + command.arg("--with-snappy=no"); + command.arg("--with-zlib=no"); command.arg(format!("--prefix={}", &out_dir)); command.current_dir(&driver_src_path); @@ -57,18 +59,18 @@ fn main() { command.arg(format!("--build={}", target)); } - assert!(command.status().unwrap().success()); + assert!(command.status().expect("Could not run configure").success()); assert!(Command::new("make"). current_dir(&driver_src_path). env("CFLAGS", "-DMONGOC_TRACE"). status(). - unwrap(). + expect("Could not run make"). success()); assert!(Command::new("make"). arg("install"). current_dir(&driver_src_path). status(). - unwrap(). + expect("Could not run make install"). success()); }