فهرست منبع

disable readline (#6297)

ruki 8 ماه پیش
والد
کامیت
ae51a60324
1فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 6 5
      packages/l/libxmake/xmake.lua

+ 6 - 5
packages/l/libxmake/xmake.lua

@@ -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
@@ -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})
@@ -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)