Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use system-deps to check for dav1d < 1.3 #86

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably would be a good idea to extend further system-deps to accomodate source tags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you could the version requirements passed in so you can theoretically build a different version or build it differently or so

) -> 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();
}