From 310fc518410d9f918e862a0097151bb9fd6da4f6 Mon Sep 17 00:00:00 2001 From: star9029 Date: Mon, 18 Mar 2024 21:47:10 +0800 Subject: [PATCH] ruapu: add package --- packages/r/ruapu/xmake.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/r/ruapu/xmake.lua diff --git a/packages/r/ruapu/xmake.lua b/packages/r/ruapu/xmake.lua new file mode 100644 index 00000000000..526f14b72fa --- /dev/null +++ b/packages/r/ruapu/xmake.lua @@ -0,0 +1,18 @@ +package("ruapu") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/nihui/ruapu") + set_description("Detect CPU features with single-file") + set_license("MIT") + + add_urls("https://github.com/nihui/ruapu/archive/refs/tags/$(version).tar.gz", + "https://github.com/nihui/ruapu.git") + + add_versions("0.1.0", "65fd826ed1772717d4cee70b6620277df0328408612f7643658a0064f1a163ff") + + on_install(function (package) + os.cp("ruapu.h", package:installdir("include")) + end) + + on_test(function (package) + assert(package:has_cfuncs("ruapu_init", {includes = "ruapu.h", defines = "RUAPU_IMPLEMENTATION"})) + end)