From 5771e2468f263e31019c6656fb48705e59342b52 Mon Sep 17 00:00:00 2001 From: yszhou2019 <59953951+yszhou2019@users.noreply.github.com> Date: Tue, 21 Jun 2022 10:57:29 +0800 Subject: [PATCH] Wolfssl (#1282) * add package: zycore-c * zycore add v1.1.0 * add package wolfssl * add llog for android * complement format --- packages/w/wolfssl/xmake.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/w/wolfssl/xmake.lua diff --git a/packages/w/wolfssl/xmake.lua b/packages/w/wolfssl/xmake.lua new file mode 100644 index 000000000..97aa227b3 --- /dev/null +++ b/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)