#pragma once #include "vcpkg_expected.h" #include #include namespace vcpkg { struct Triplet; struct Dependency { std::string name; std::string qualifier; }; const std::string& to_string(const Dependency& dep); struct ParseControlErrorInfo { std::string name; std::string remaining_fields_as_string; std::string valid_fields_as_string; std::error_code error; }; /// /// Port metadata (CONTROL file) /// struct SourceParagraph { static ExpectedT parse_control_file( std::unordered_map fields); SourceParagraph(); std::string name; std::string version; std::string description; std::string maintainer; std::vector depends; }; void print_error_message(const ParseControlErrorInfo& info); void print_error_message(std::vector error_info_list); std::vector filter_dependencies(const std::vector& deps, const Triplet& t); std::vector expand_qualified_dependencies(const std::vector& depends); std::vector parse_depends(const std::string& depends_string); }