From 5fabdc5c2f2cca2e82b9d58577a5e835823893c9 Mon Sep 17 00:00:00 2001 From: gibix Date: Thu, 23 Aug 2018 16:52:46 +0200 Subject: [PATCH] Update dependencies * Update to the current bindgen * workaround broken max_align_t codegen See https://github.com/rust-lang-nursery/rust-bindgen/issues/550 --- aom-sys/Cargo.toml | 12 ++++++------ aom-sys/build.rs | 4 +++- aom-sys/src/lib.rs | 8 ++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/aom-sys/Cargo.toml b/aom-sys/Cargo.toml index d0ff258..a1379c7 100644 --- a/aom-sys/Cargo.toml +++ b/aom-sys/Cargo.toml @@ -8,15 +8,15 @@ repository = "https://github.com/rust-av/aom-rs" build = "build.rs" +[package.metadata.pkg-config] +aom = "0.1.0" + [features] build = ["cmake"] [build-dependencies] -bindgen = "0.30" -metadeps = "1.1" -cmake = { version = "0.1.29", optional = true } - -[package.metadata.pkg-config] -aom = "0.1.0" +bindgen = "0.38.0" +metadeps = "1.1.2" +cmake = { version = "0.1.33", optional = true } [dependencies] diff --git a/aom-sys/build.rs b/aom-sys/build.rs index 3cd4086..e14bfab 100644 --- a/aom-sys/build.rs +++ b/aom-sys/build.rs @@ -67,7 +67,9 @@ fn main() { let headers = libs.get("aom").unwrap().include_paths.clone(); // let buildver = libs.get("vpx").unwrap().version.split(".").nth(1).unwrap(); - let mut builder = common_builder().header("data/aom.h"); + let mut builder = common_builder() + .header("data/aom.h") + .blacklist_type("max_align_t"); // https://github.com/rust-lang-nursery/rust-bindgen/issues/550 for header in headers { builder = builder.clang_arg("-I").clang_arg(header.to_str().unwrap()); diff --git a/aom-sys/src/lib.rs b/aom-sys/src/lib.rs index fc0e192..3a23e6a 100644 --- a/aom-sys/src/lib.rs +++ b/aom-sys/src/lib.rs @@ -26,7 +26,7 @@ mod tests { let mut raw = unsafe { mem::uninitialized() }; let mut ctx = unsafe { mem::uninitialized() }; - let ret = unsafe { aom_img_alloc(&mut raw, aom_img_fmt::AOM_IMG_FMT_I420, w, h, align) }; + let ret = unsafe { aom_img_alloc(&mut raw, aom_img_fmt_AOM_IMG_FMT_I420, w, h, align) }; if ret.is_null() { panic!("Image allocation failed"); } @@ -36,7 +36,7 @@ mod tests { let mut cfg = unsafe { mem::uninitialized() }; let mut ret = unsafe { aom_codec_enc_config_default(aom_codec_av1_cx(), &mut cfg, 0) }; - if ret != aom_codec_err_t::AOM_CODEC_OK { + if ret != aom_codec_err_t_AOM_CODEC_OK { panic!("Default Configuration failed"); } @@ -56,7 +56,7 @@ mod tests { ) }; - if ret != aom_codec_err_t::AOM_CODEC_OK { + if ret != aom_codec_err_t_AOM_CODEC_OK { panic!("Codec Init failed"); } @@ -74,7 +74,7 @@ mod tests { 1, flags as i64, ); - if ret != aom_codec_err_t::AOM_CODEC_OK { + if ret != aom_codec_err_t_AOM_CODEC_OK { panic!("Encode failed {:?}", ret); }