Ver Fonte

Wolfssl (#1282)

* add package: zycore-c

* zycore add v1.1.0

* add package wolfssl

* add llog for android

* complement format
yszhou2019 há 3 anos atrás
pai
commit
5771e2468f
1 ficheiros alterados com 25 adições e 0 exclusões
  1. 25 0
      packages/w/wolfssl/xmake.lua

+ 25 - 0
packages/w/wolfssl/xmake.lua

@@ -0,0 +1,25 @@
+package("wolfssl")
+    set_homepage("https://www.wolfssl.com")
+    set_description("The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud.  wolfSSL supports up to TLS 1.3!")
+    set_license("GPL-2.0")
+
+    add_urls("https://github.com/wolfSSL/wolfssl/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/wolfSSL/wolfssl.git")
+    add_versions("v5.3.0-stable", "1a3bb310dc01d3e73d9ad91b6ea8249d081016f8eef4ae8f21d3421f91ef1de9")
+
+    add_deps("cmake")
+
+    on_install(function (package)
+        local configs = {}
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+        local ldflags
+        if package:is_plat("android") then
+            ldflags = "-llog"
+        end
+        import("package.tools.cmake").install(package, configs, {ldflags = ldflags})
+    end)
+
+    on_test(function (package)
+        assert(package:has_cincludes("wolfssl/ssl.h"))
+    end)