diff --git a/Cargo.lock b/Cargo.lock index 61bdd97..cb79ad5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -187,7 +187,7 @@ dependencies = [ [[package]] name = "ffmpeg-sys-the-third" version = "2.1.0+ffmpeg-7.1" -source = "git+https://git.v0l.io/Kieran/ffmpeg-the-third.git#e5f8e077b04b10d5887bce4df1eb1a71738a6c66" +source = "git+https://git.v0l.io/Kieran/ffmpeg-the-third.git?rev=e5f8e077b04b10d5887bce4df1eb1a71738a6c66#e5f8e077b04b10d5887bce4df1eb1a71738a6c66" dependencies = [ "bindgen", "cc", diff --git a/Cargo.toml b/Cargo.toml index aeb4b5c..8c599d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["lib", "cdylib"] [dependencies] anyhow = "1.0.91" -ffmpeg-sys-the-third = { git = "https://git.v0l.io/Kieran/ffmpeg-the-third.git", ref = "e5f8e077b04b10d5887bce4df1eb1a71738a6c66", package = "ffmpeg-sys-the-third" } +ffmpeg-sys-the-third = { git = "https://git.v0l.io/Kieran/ffmpeg-the-third.git", rev = "e5f8e077b04b10d5887bce4df1eb1a71738a6c66", package = "ffmpeg-sys-the-third" } libc = { version = "0.2.160" } slimbox = "0.1.0" log = "0.4.22" diff --git a/build.rs b/build.rs index 902bfa8..eedefd3 100644 --- a/build.rs +++ b/build.rs @@ -4,15 +4,13 @@ fn main() { // re-export ffmpeg-sys-the-third features // https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges for (name, _value) in env::vars() { - if name.starts_with("DEP_FFMPEG_CHECK_") { + if name.starts_with("DEP_FFMPEG_") && !name.starts_with("DEP_FFMPEG_CHECK_") { + let feature_name = name["DEP_FFMPEG_".len()..name.len()].to_lowercase(); + println!(r#"cargo::rustc-check-cfg=cfg(feature, values("{feature_name}"))"#); + println!(r#"cargo::rustc-cfg=feature="{feature_name}""#); println!( - r#"cargo:rustc-check-cfg=cfg(feature, values("{}"))"#, - name["DEP_FFMPEG_CHECK_".len()..name.len()].to_lowercase() - ); - } else if name.starts_with("DEP_FFMPEG_") { - println!( - r#"cargo:rustc-cfg=feature="{}""#, - name["DEP_FFMPEG_".len()..name.len()].to_lowercase() + r#"cargo::rustc-env=DEP_FFMPEG_{}=1"#, + feature_name.to_uppercase() ); } }