aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-07-11 13:35:50 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-11 13:35:50 +0300
commit7f86ee1fd487cb7fd4a1b76949951ad8e4b8b69d (patch)
tree37b16ec7a392f4ed94d2a9a1aaa63d4214f3b155 /libbpkg/manifest.hxx
parent1b192351dc0ef09423ee9a40d68bacc3137c9aec (diff)
Add support for package project manifest value
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r--libbpkg/manifest.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index 72af14c..cd81d6e 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -388,6 +388,7 @@ namespace bpkg
package_name name;
version_type version;
+ butl::optional<package_name> project;
butl::optional<priority_type> priority;
std::string summary;
std::vector<licenses> license_alternatives;
@@ -412,6 +413,9 @@ namespace bpkg
butl::optional<std::string> sha256sum;
butl::optional<std::string> fragment;
+ const package_name&
+ effective_project () const noexcept {return project ? *project : name;}
+
public:
package_manifest () = default; // VC export.
package_manifest (butl::manifest_parser&, bool ignore_unknown = false);