From 0a03ba929e549ea94ca20e7579f288fc0b0d801a Mon Sep 17 00:00:00 2001 From: benny066567 <58126350+hahahahbenny@users.noreply.github.com> Date: Wed, 18 Sep 2024 00:36:27 +0800 Subject: [PATCH] add asl(Ampl Solver Library) repo (#5259) * add asl(Ampl Solver Library) repo * change the name of package --- packages/c/coin-or-asl/xmake.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 packages/c/coin-or-asl/xmake.lua diff --git a/packages/c/coin-or-asl/xmake.lua b/packages/c/coin-or-asl/xmake.lua new file mode 100644 index 000000000..db80d0735 --- /dev/null +++ b/packages/c/coin-or-asl/xmake.lua @@ -0,0 +1,32 @@ +package("coin-or-asl") + set_homepage("https://github.com/coin-or-tools/ThirdParty-ASL/") + set_description("The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.") + set_license("EPL-1.0") + + add_urls("https://github.com/coin-or-tools/ThirdParty-ASL/archive/refs/tags/releases/$(version).tar.gz", + "https://github.com/coin-or-tools/ThirdParty-ASL.git") + + add_versions("2.0.1", "92575a7d5264311a53bfec65bec006475c4b5ef3e79d8d84db798d73e8d3567f") + + if is_plat("linux") then + add_deps("autoconf", "automake", "libtool", "m4") + add_syslinks("dl") + end + + add_includedirs("include", "include/coin-or") + + on_install("linux", function (package) + os.vrunv("sh", {"./get.ASL"}) + local configs = {} + table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) + table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) + if package:is_debug() then + table.insert(configs, "--enable-debug") + end + + import("package.tools.autoconf").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("ASL_alloc", {includes = "asl/asl.h"})) + end)