2016-09-19 11:50:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <unordered_map>
|
2017-04-28 08:56:06 +08:00
|
|
|
#include <vector>
|
2016-09-19 11:50:08 +08:00
|
|
|
|
|
|
|
namespace vcpkg
|
|
|
|
{
|
2017-04-04 06:02:45 +08:00
|
|
|
struct Triplet;
|
2016-11-05 16:02:15 +08:00
|
|
|
|
2017-04-04 06:12:42 +08:00
|
|
|
struct Dependency
|
2016-11-05 16:02:15 +08:00
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
std::string qualifier;
|
|
|
|
};
|
|
|
|
|
2017-04-13 13:48:52 +08:00
|
|
|
const std::string& to_string(const Dependency& dep);
|
2016-11-05 16:02:15 +08:00
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
struct SourceParagraph
|
|
|
|
{
|
|
|
|
SourceParagraph();
|
|
|
|
|
2016-11-03 11:26:52 +08:00
|
|
|
explicit SourceParagraph(std::unordered_map<std::string, std::string> fields);
|
2016-09-19 11:50:08 +08:00
|
|
|
|
|
|
|
std::string name;
|
|
|
|
std::string version;
|
|
|
|
std::string description;
|
|
|
|
std::string maintainer;
|
2017-04-04 06:12:42 +08:00
|
|
|
std::vector<Dependency> depends;
|
2016-09-19 11:50:08 +08:00
|
|
|
};
|
2016-11-05 16:02:15 +08:00
|
|
|
|
2017-04-04 06:12:42 +08:00
|
|
|
std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t);
|
2016-11-05 16:02:15 +08:00
|
|
|
|
2017-04-04 06:12:42 +08:00
|
|
|
std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
|
2016-11-05 16:02:15 +08:00
|
|
|
std::vector<std::string> parse_depends(const std::string& depends_string);
|
2016-09-19 11:50:08 +08:00
|
|
|
}
|