From 723a15c5390d0c5eb42f2082fcedb7262e7bc856 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 22 Mar 2023 13:18:24 +0300 Subject: Add package_manifest::effective_type_sub_options() --- libbpkg/manifest.ixx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libbpkg/manifest.ixx') diff --git a/libbpkg/manifest.ixx b/libbpkg/manifest.ixx index d6eb4a6..589d00f 100644 --- a/libbpkg/manifest.ixx +++ b/libbpkg/manifest.ixx @@ -242,7 +242,11 @@ namespace bpkg effective_type (const butl::optional& t, const package_name& n) { if (t) - return *t == "exe" || *t == "lib" ? *t : "other"; + { + std::string tp (*t, 0, t->find (',')); + butl::trim (tp); + return tp == "exe" || tp == "lib" ? tp : "other"; + } const std::string& s (n.string ()); return s.size () > 3 && s.compare (0, 3, "lib") == 0 ? "lib" : "exe"; @@ -254,6 +258,12 @@ namespace bpkg return effective_type (type, name); } + inline strings package_manifest:: + effective_type_sub_options () const + { + return effective_type_sub_options (type); + } + inline butl::small_vector package_manifest:: effective_languages (const butl::small_vector& ls, const package_name& n) -- cgit v1.1