Attempt to update to libmongoc 1.13.1

pull/54/head
Thijs Cadier 6 years ago
parent 1539d8f3b8
commit 5fa7efea10

@ -30,8 +30,8 @@ brew install openssl@1.1
Export these env vars the before you make a clean build:
```
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
```
## Logging

@ -1,6 +1,6 @@
[package]
name = "mongoc-sys"
version = "1.8.2-1"
version = "1.13.1"
description = "Sys package with installer and bindings for mongoc"
authors = ["Thijs Cadier <thijs@appsignal.com>"]
build = "build.rs"

@ -4,7 +4,6 @@ use std::env;
use std::path::Path;
use std::process::Command;
fn main() {
let mongoc_version = env!("CARGO_PKG_VERSION")
.split('-')
@ -29,38 +28,27 @@ fn main() {
mongoc_version,
mongoc_version
);
assert!(
Command::new("curl").arg("-O") // Save to disk
.arg("-L") // Follow redirects
.arg(url)
.status()
.expect("Could not run curl")
.success()
);
.expect("Could not run curl");
let archive_name = format!("mongo-c-driver-{}.tar.gz", mongoc_version);
assert!(
Command::new("tar")
.arg("xzf")
.arg(&archive_name)
.status()
.expect("Could not run tar")
.success()
);
.expect("Could not unarchive tar");
// Configure and install
let mut command = Command::new("sh");
command.arg("configure");
command.arg("--enable-ssl=openssl");
command.arg("--enable-sasl=no");
command.arg("--enable-static=yes");
command.arg("--enable-shared=no");
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));
// Configure
let mut command = Command::new("cmake");
command.arg("");
command.arg("-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF");
command.arg("-DENABLE_STATIC=ON");
command.arg("-DENABLE_BSON=ON");
command.arg("-DENABLE_SSL=openssl");
command.arg(format!("-DCMAKE_INSTALL_PREFIX:PATH={}", &out_dir));
command.current_dir(&driver_src_path);
// Enable debug symbols if configured for this profile
@ -73,23 +61,16 @@ fn main() {
command.arg(format!("--build={}", target));
}
assert!(command.status().expect("Could not run configure").success());
assert!(
command.status().expect("cmake failed");
Command::new("make")
.current_dir(&driver_src_path)
.env("CFLAGS", "-DMONGOC_TRACE")
.status()
.expect("Could not run make")
.success()
);
assert!(
.expect("Make failed");
Command::new("make")
.arg("install")
.current_dir(&driver_src_path)
.status()
.expect("Could not run make install")
.success()
);
.expect("make install failed");
}
// Output to Cargo

Loading…
Cancel
Save