Skip to content

Commit

Permalink
Use system-deps to check for dav1d < 1.3
Browse files Browse the repository at this point in the history
Otherwise if we check for it ourselves the internal build of dav1d will
not be usable.

Fixes #85
  • Loading branch information
sdroege authored and lu-zero committed Oct 31, 2023
1 parent 2d1b382 commit 50b0690
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
7 changes: 3 additions & 4 deletions dav1d-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ edition = "2021"
build = "build.rs"

[build-dependencies]
system-deps = "6.0"
pkg-config = "0.3"
system-deps = "6.2"

[dependencies]
libc = "0.2"
Expand All @@ -21,7 +20,7 @@ v1_1 = []

[package.metadata.system-deps.dav1d]
name = "dav1d"
version = "1.0.0"
version = ">= 1.0.0, < 1.3"

[package.metadata.system-deps.dav1d.v1_1]
version = "1.1.0"
version = ">= 1.1.0, < 1.3"
9 changes: 2 additions & 7 deletions dav1d-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod build {

pub fn build_from_src(
lib: &str,
version: &str,
_version: &str,
) -> Result<system_deps::Library, system_deps::BuildInternalClosureError> {
let build_dir = "build";
let release_dir = "release";
Expand Down Expand Up @@ -67,7 +67,7 @@ mod build {
runner!("meson", "install", "-C", build_path.to_str().unwrap());

let pkg_dir = build_path.join("meson-private");
system_deps::Library::from_internal_pkg_config(&pkg_dir, lib, version)
system_deps::Library::from_internal_pkg_config(&pkg_dir, lib, TAG)
}
}

Expand All @@ -76,9 +76,4 @@ fn main() {
.add_build_internal("dav1d", build::build_from_src)
.probe()
.unwrap();

pkg_config::Config::new()
.range_version("1.0.0"..="1.2.1")
.probe("dav1d")
.unwrap();
}

0 comments on commit 50b0690

Please sign in to comment.