Skip to content

Commit

Permalink
disable readline
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Feb 6, 2025
1 parent dc2a99c commit ea5d41d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/l/libxmake/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package("libxmake")
add_versions("v2.9.8", "e797636aadf072c9b0851dba39b121e93c739d12d78398c91f12e8ed355d6a95")

add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
add_configs("embed", {description = "Embed lua scripts.", default = false, type = "boolean", readonly = true})
add_configs("embed", {description = "Embed lua scripts.", default = false, type = "boolean"})

add_includedirs("include")
if is_plat("windows") then
Expand Down Expand Up @@ -39,11 +39,15 @@ package("libxmake")
end)

on_install("linux", "macosx", "windows", function (package)
local configs = {onlylib = true, curses = false, embed = package:config("embed")}
local configs = {
onlylib = true,
curses = false,
embed = package:config("embed")}
if package:is_plat("windows") then
configs.pdcurses = false
end
os.cd("core")
io.replace("xmake.lua", 'option("readline")', 'option("readline")\nset_default(false)', {plain = true})
io.replace("xmake.lua", 'set_warnings("all", "error")', "", {plain = true})
io.replace("src/xmake/engine.c", 'sysarch = "arm64"', 'sysarch = "arm64";', {plain = true})
io.replace("src/xmake/engine.c", 'sysarch = "arm"', 'sysarch = "arm";', {plain = true})
Expand All @@ -53,9 +57,6 @@ typedef __int8 int8_t;]], '#if defined(_MSC_VER) && (_MSC_VER < 1600)\ntypedef _
if not package:config("embed") then
os.cp("../xmake", package:installdir("share"))
end
if package:is_plat("linux", "macosx") and package:has_cfuncs("readline", {links = "readline", includes = {"stdio.h", "readline/readline.h"}}) then
package:add("syslinks", "readline")
end
end)

on_test(function (package)
Expand Down

0 comments on commit ea5d41d

Please sign in to comment.