From 219450aa238e40d8a8fbc6120f920ba292dbfc96 Mon Sep 17 00:00:00 2001 From: Artem Dzhemesiuk Date: Thu, 16 Mar 2023 03:19:23 +0100 Subject: [PATCH] add base-n (#1918) --- packages/b/base-n/xmake.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/b/base-n/xmake.lua diff --git a/packages/b/base-n/xmake.lua b/packages/b/base-n/xmake.lua new file mode 100644 index 000000000..93c6a3515 --- /dev/null +++ b/packages/b/base-n/xmake.lua @@ -0,0 +1,27 @@ +package("base-n") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/azawadzki/base-n") + set_description("A small, single-header library which provides standard Base16, Base32, Base64, and custom Base-N encoding support.") + set_license("MIT") + + add_urls("https://github.com/azawadzki/base-n.git") + add_versions("2020.05.28", "7573e77c0b9b0e8a5fb63d96dbde212c921993b4") + + on_install(function (package) + os.cp("include/basen.hpp", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + #include + #include + + void test () { + std::string in = "test"; + std::string encoded; + bn::encode_b64(in.begin(), in.end(), back_inserter(encoded)); + std::cout << encoded << std::endl; + } + ]]}, {configs = {languages = "c++11"}, includes = "basen.hpp"})) + end)