[M6] resolver: pkg-config probe + codegen for PkgConfig

This commit is contained in:
2026-05-15 13:03:03 +00:00
parent 4f9b6f1827
commit 6c4933f282
9 changed files with 319 additions and 9 deletions

View File

@@ -15,6 +15,16 @@ struct Recipe {
std::vector<std::string> targets; // post-substitution
std::string source; // 'curated' | 'manual' | etc.
// When set, the dep is consumed via PkgConfig instead of a normal
// find_package. Codegen emits
// find_package(PkgConfig REQUIRED)
// pkg_check_modules(<UPPER> REQUIRED IMPORTED_TARGET <pkg_config_module>)
// and the recipe's `targets` list holds the synthesized
// PkgConfig::<UPPER> entries. `find_package` for these recipes is
// the literal string "PkgConfig REQUIRED" — kept consistent so
// overlay rows don't need a sentinel.
std::optional<std::string> pkg_config_module;
bool operator==(const Recipe&) const = default;
};
@@ -29,6 +39,7 @@ struct OverlayRow {
std::vector<std::string> targets;
std::string source;
std::int64_t verified_at = 0;
std::optional<std::string> pkg_config_module;
};
// RAII wrapper for an open sqlite3 connection used by the overlay database.