diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-06-20 20:58:47 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-06-23 12:26:48 +0300 |
commit | 3de5120d299a5e17c9c17dfd2bfc4bb4e6340941 (patch) | |
tree | 9929ec4d27f38fb4a653ee2b586b502e9c719331 /libbpkg/manifest.hxx | |
parent | 9c476d4b12ba91677716fdcadfc14a5fc9859d5d (diff) |
Add support for additional *-build package manifest values and alternative buildfile naming
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r-- | libbpkg/manifest.hxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index 09d64d1..a3415cc 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -1054,6 +1054,29 @@ namespace bpkg string () const; }; + // Package's buildfile path and content. + // + struct buildfile + { + // The path is relative to the package's build/ subdirectory with the + // extension stripped. + // + // For example, for the build/config/common.build file the path will be + // config/common. + // + // Note that the actual file path depends on the project's buildfile + // naming scheme and for the config/common example above the actual path + // can also be build2/config/common.build2. + // + butl::path path; + std::string content; + + buildfile () = default; + buildfile (butl::path p, std::string c) + : path (std::move (p)), + content (std::move (c)) {} + }; + class LIBBPKG_EXPORT package_manifest { public: @@ -1090,9 +1113,19 @@ namespace bpkg butl::small_vector<build_class_expr, 1> builds; std::vector<build_constraint> build_constraints; + // If true, then this package use the alternative buildfile naming scheme + // (build2/, .build2). In the manifest serialization this is encoded as + // either *-build or *-build2 value names. + // + butl::optional<bool> alt_naming; + butl::optional<std::string> bootstrap_build; butl::optional<std::string> root_build; + // Additional buildfiles which are potentially included by root.build. + // + std::vector<buildfile> buildfiles; + // The following values are only valid in the manifest list (and only for // certain repository types). // |