From 48573828840fbcd216912bacce4b1205df9f89cd Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 1 Mar 2021 11:34:07 +0800 Subject: [PATCH] update libxmake (#309) * update libxmake * fix libxmake * improve libxmake * improve libxmake --- packages/l/libxmake/xmake.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/l/libxmake/xmake.lua b/packages/l/libxmake/xmake.lua index 402a64a85..3e4d7bbec 100644 --- a/packages/l/libxmake/xmake.lua +++ b/packages/l/libxmake/xmake.lua @@ -9,8 +9,8 @@ package("libxmake") "https://gitlab.com/tboox/xmake.git") add_versions("v2.3.3", "851e01256c89cb9c86b6bd7327831b45809a3255daa234d3162b1db061ca44ae") + add_versions("v2.5.2", "682c2908b80da7703d6b0213589274d41f76d2f3bc8bfe2eac5c5f625f1109b9") - add_configs("curses", { description = "Enable curses library.", default = false, type = "boolean"}) add_configs("readline", { description = "Enable readline library.", default = false, type = "boolean"}) add_includedirs("include", "include/luajit") @@ -32,13 +32,11 @@ package("libxmake") end on_load(function (package) - if package:config("curses") then - package:add("links", "lcurses") - if package:is_plat("windows") then - package:add("links", "pdcurses") - else - package:add_deps("ncurses") - end + package:add("links", "lcurses") + if package:is_plat("windows") then + package:add("links", "pdcurses") + else + package:add("deps", "ncurses") end if package:config("readline") then package:add("links", "readline") @@ -46,9 +44,12 @@ package("libxmake") if package:debug() then package:add("defines", "__tb_debug__") end + if package:version():ge("2.5.1") then + package:add("links", "lua-cjson") + end end) - on_install("linux", "macosx", "windows", "msys", "android", function (package) + on_install("linux", "macosx", "windows", function (package) local configs = {"--onlylib=y"} if package:is_plat("windows") then table.insert(configs, "--pdcurses=" .. (package:config("curses") and "y" or "n"))