From 2319d01e262b705716e19474865f555f3ca81a7d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 1 May 2017 13:50:13 +0300 Subject: Add hxx extension for headers and lib prefix for library dirs --- bpkg/manifest-utility.hxx | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 bpkg/manifest-utility.hxx (limited to 'bpkg/manifest-utility.hxx') diff --git a/bpkg/manifest-utility.hxx b/bpkg/manifest-utility.hxx new file mode 100644 index 0000000..afa93f5 --- /dev/null +++ b/bpkg/manifest-utility.hxx @@ -0,0 +1,45 @@ +// file : bpkg/manifest-utility.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_MANIFEST_UTILITY_HXX +#define BPKG_MANIFEST_UTILITY_HXX + +#include + +#include +#include + +namespace bpkg +{ + // Package naming schemes. + // + enum class package_scheme + { + none, + sys + }; + + // Extract scheme from [:]. Position the pointer right after + // the scheme end if present, otherwise leave unchanged. + // + package_scheme + parse_package_scheme (const char*&); + + // Extract name and version components from [/]. + // + string + parse_package_name (const char*); + + version + parse_package_version (const char*); + + // First use the passed location as is. If the result is relative, + // then assume this is a relative path to the repository directory + // and complete it based on the current working directory. + // + repository_location + parse_location (const char*); +} + +#endif // BPKG_MANIFEST_UTILITY_HXX -- cgit v1.1