Skip to content

Commit

Permalink
tiny-aes-c: add package (#5238)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Sep 15, 2024
1 parent d5382a3 commit 092f2de
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/t/tiny-aes-c/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package("tiny-aes-c")
set_homepage("https://github.com/kokke/tiny-AES-c")
set_description("Small portable AES128/192/256 in C")
set_license("Unlicense")

add_urls("https://github.com/kokke/tiny-AES-c.git")

add_versions("2021.12.22", "f06ac37fc31dfdaca2e0d9bec83f90d5663c319b")

on_install(function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("tiny-aes-c")
set_kind("$(kind)")
add_files("aes.c")
add_headerfiles("aes.h", "aes.hpp")
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all")
end
]])
import("package.tools.xmake").install(package)
end)

on_test(function (package)
assert(package:has_cfuncs("AES_init_ctx", {includes = "aes.h"}))
end)

0 comments on commit 092f2de

Please sign in to comment.