23 lines
939 B
Diff

pkgconf 2.0.0 made --modversion with multiple packages [invalid][1],
so we should only specify the package name once
this patch is technically invalid, but it's way smaller and Good Enough™
[1]: https://github.com/pkgconf/pkgconf/commit/a97b75ab2c1d031982c35a4886102413e4ec8eee
diff --git a/third_party/rust/pkg-config/src/lib.rs b/third_party/rust/pkg-config/src/lib.rs
index e9395be..c01d4b4 100644
--- a/third_party/rust/pkg-config/src/lib.rs
+++ b/third_party/rust/pkg-config/src/lib.rs
@@ -499,7 +499,9 @@ impl Config {
if self.print_system_cflags {
cmd.env("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", "1");
}
- cmd.arg(name);
+ if self.min_version == Bound::Unbounded && self.max_version == Bound::Unbounded {
+ cmd.arg(name);
+ }
match self.min_version {
Bound::Included(ref version) => {
cmd.arg(&format!("{} >= {}", name, version));