Przeglądaj źródła

base64-terrakuh: add new package (#7346)

* base64: new package

* rename to `base64-terrakuh`
Saikari 1 miesiąc temu
rodzic
commit
e7fc49309f
1 zmienionych plików z 23 dodań i 0 usunięć
  1. 23 0
      packages/b/base64-terrakuh/xmake.lua

+ 23 - 0
packages/b/base64-terrakuh/xmake.lua

@@ -0,0 +1,23 @@
+package("base64-terrakuh")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://terrakuh.github.io/base64/classbase64.html")
+    set_description("Simple, open source, header-only base64 encoder")
+    set_license("Unlicense")
+
+    add_urls("https://github.com/terrakuh/base64/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/terrakuh/base64.git")
+
+    add_versions("v1.0", "91bb16e7fc4571d6967bf85dc1c3c29679eade52c91b5d022f26f346ac8b592d")
+
+    on_install(function (package)
+        os.cp("base64.hpp", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <base64.hpp>
+            void test() {
+                std::string encoded = base64::encode("hello, world");
+            }
+        ]]}, {configs = {languages = "c++11"}}))
+    end)