From 3de5120d299a5e17c9c17dfd2bfc4bb4e6340941 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 20 Jun 2022 20:58:47 +0300 Subject: Add support for additional *-build package manifest values and alternative buildfile naming --- libbpkg/manifest.hxx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'libbpkg/manifest.hxx') 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 builds; std::vector 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 alt_naming; + butl::optional bootstrap_build; butl::optional root_build; + // Additional buildfiles which are potentially included by root.build. + // + std::vector buildfiles; + // The following values are only valid in the manifest list (and only for // certain repository types). // -- cgit v1.1