From 1b0b09390c1e9e4422e39f8caae5982fc5ba303a Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 9 Feb 2022 10:37:48 +0800 Subject: [PATCH] add libdivide (#991) * add libdivide * Update xmake.lua --- packages/l/libdivide/xmake.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/l/libdivide/xmake.lua diff --git a/packages/l/libdivide/xmake.lua b/packages/l/libdivide/xmake.lua new file mode 100644 index 000000000..3948d6f02 --- /dev/null +++ b/packages/l/libdivide/xmake.lua @@ -0,0 +1,17 @@ +package("libdivide") + set_kind("library", {headeronly = true}) + set_homepage("http://libdivide.com") + set_description("Official git repository for libdivide: optimized integer division") + + add_urls("https://github.com/ridiculousfish/libdivide/archive/refs/tags/$(version).tar.gz", + "https://github.com/ridiculousfish/libdivide.git") + add_versions("5.0", "01ffdf90bc475e42170741d381eb9cfb631d9d7ddac7337368bcd80df8c98356") + + on_install(function (package) + os.cp("*.h", package:installdir("include")) + os.cp("*.hpp", package:installdir("include")) + end) + + on_test(function (package) + assert(package:has_cfuncs("libdivide_s16_gen(0)", {includes = "libdivide.h"})) + end)