Browse Source

Merge pull request #1119 from xq114/dev

update ncurses, util-linux
ruki 3 years ago
parent
commit
b94e5581b4
3 changed files with 31 additions and 31 deletions
  1. 7 5
      packages/n/ncurses/xmake.lua
  2. 20 24
      packages/u/util-linux/xmake.lua
  3. 4 2
      packages/z/z3/xmake.lua

+ 7 - 5
packages/n/ncurses/xmake.lua

@@ -3,13 +3,14 @@ package("ncurses")
     set_homepage("https://www.gnu.org/software/ncurses/")
     set_description("A free software emulation of curses.")
 
-    add_urls("ftp://ftp.invisible-island.net/ncurses/ncurses-$(version).tar.gz",
-             "https://invisible-mirror.net/archives/ncurses/ncurses-$(version).tar.gz",
-             "ftp://ftp.gnu.org/gnu/ncurses/ncurses-$(version).tar.gz")
+    add_urls("https://ftpmirror.gnu.org/ncurses/ncurses-$(version).tar.gz",
+             "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-$(version).tar.gz",
+             "https://invisible-mirror.net/archives/ncurses/ncurses-$(version).tar.gz")
     add_versions("6.1", "aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17")
     add_versions("6.2", "30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d")
+    add_versions("6.3", "97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059")
 
-    add_configs("widec", { description = "Compile with wide-char/UTF-8 code.", default = true, type = "boolean"})
+    add_configs("widec", {description = "Compile with wide-char/UTF-8 code.", default = true, type = "boolean"})
 
     on_load(function (package)
         if package:config("widec") then
@@ -23,13 +24,14 @@ package("ncurses")
 
     on_install("linux", "macosx", "bsd", function (package)
         local configs = {"--without-manpages", "--enable-sigwinch", "--with-gpm=no"}
+        table.insert(configs, "--with-debug=" .. (package:debug() and "yes" or "no"))
         if package:config("widec") then
             table.insert(configs, "--enable-widec")
         end
         if package:config("shared") then
             table.insert(configs, "--with-shared")
         end
-        import("package.tools.autoconf").install(package, configs)
+        import("package.tools.autoconf").install(package, configs, {arflags = {"-curvU"}})
     end)
 
     on_test(function (package)

+ 20 - 24
packages/u/util-linux/xmake.lua

@@ -13,31 +13,28 @@ package("util-linux")
 
     if is_plat("macosx") then
         add_extsources("brew::util-linux")
-    else
-        add_deps("ncurses", "zlib")
-    end
-
-    if is_plat("linux") then
+    elseif is_plat("linux") then
         add_extsources("apt::util-linux", "pacman::util-linux")
+        add_deps("ncurses", "zlib")
     end
 
-    add_configs("ipcs",               { description = "Enable ipcs.", default = false, type = "boolean"})
-    add_configs("ipcrm",              { description = "Enable ipcrm.", default = false, type = "boolean"})
-    add_configs("wall",               { description = "Enable wall.", default = false, type = "boolean"})
-    add_configs("libuuid",            { description = "Enable libuuid.", default = false, type = "boolean"})
-    add_configs("libmount",           { description = "Enable libmount.", default = false, type = "boolean"})
-    add_configs("libsmartcols",       { description = "Enable libsmartcols.", default = false, type = "boolean"})
-    add_configs("use-tty-group",      { description = "Enable use-tty-group.", default = false, type = "boolean"})
-    add_configs("kill",               { description = "Enable kill.", default = false, type = "boolean"})
-    add_configs("cal",                { description = "Enable cal.", default = false, type = "boolean"})
-    add_configs("systemd",            { description = "Enable systemd.", default = false, type = "boolean"})
-    add_configs("chfn-chsh",          { description = "Enable chfn-chsh.", default = false, type = "boolean"})
-    add_configs("login",              { description = "Enable login.", default = false, type = "boolean"})
-    add_configs("su",                 { description = "Enable su.", default = false, type = "boolean"})
-    add_configs("mount",              { description = "Enable mount.", default = false, type = "boolean"})
-    add_configs("runuser",            { description = "Enable runuser.", default = false, type = "boolean"})
-    add_configs("makeinstall-chown",  { description = "Enable makeinstall-chown.", default = false, type = "boolean"})
-    add_configs("makeinstall-setuid", { description = "Enable makeinstall-setuid.", default = false, type = "boolean"})
+    add_configs("ipcs",               {description = "Enable ipcs.", default = false, type = "boolean"})
+    add_configs("ipcrm",              {description = "Enable ipcrm.", default = false, type = "boolean"})
+    add_configs("wall",               {description = "Enable wall.", default = false, type = "boolean"})
+    add_configs("libuuid",            {description = "Enable libuuid.", default = false, type = "boolean"})
+    add_configs("libmount",           {description = "Enable libmount.", default = false, type = "boolean"})
+    add_configs("libsmartcols",       {description = "Enable libsmartcols.", default = false, type = "boolean"})
+    add_configs("use-tty-group",      {description = "Enable use-tty-group.", default = false, type = "boolean"})
+    add_configs("kill",               {description = "Enable kill.", default = false, type = "boolean"})
+    add_configs("cal",                {description = "Enable cal.", default = false, type = "boolean"})
+    add_configs("systemd",            {description = "Enable systemd.", default = false, type = "boolean"})
+    add_configs("chfn-chsh",          {description = "Enable chfn-chsh.", default = false, type = "boolean"})
+    add_configs("login",              {description = "Enable login.", default = false, type = "boolean"})
+    add_configs("su",                 {description = "Enable su.", default = false, type = "boolean"})
+    add_configs("mount",              {description = "Enable mount.", default = false, type = "boolean"})
+    add_configs("runuser",            {description = "Enable runuser.", default = false, type = "boolean"})
+    add_configs("makeinstall-chown",  {description = "Enable makeinstall-chown.", default = false, type = "boolean"})
+    add_configs("makeinstall-setuid", {description = "Enable makeinstall-setuid.", default = false, type = "boolean"})
 
     on_load(function (package)
         package:addenv("PATH", "bin")
@@ -48,7 +45,7 @@ package("util-linux")
                          "--disable-silent-rules",
                          "--without-python",
                          "--without-systemd",
-                         "--with-bashcompletiondir=" .. package:installdir("share/bash-completion")}
+                         "--with-bashcompletiondir=" .. path.join(package:installdir("share"), "bash-completion")}
         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:debug() then
@@ -68,4 +65,3 @@ package("util-linux")
         end
         import("package.tools.autoconf").install(package, configs)
     end)
-

+ 4 - 2
packages/z/z3/xmake.lua

@@ -74,7 +74,9 @@ package("z3")
     end)
 
     on_test(function (package)
-        os.vrun("z3 -version")
-        os.vrun("python3 -c \"import z3\"")
+        if package:is_plat(os.host()) and package:is_arch(os.arch()) then
+            os.vrun("z3 -version")
+            os.vrun("python3 -c \"import z3\"")
+        end
         assert(package:has_cfuncs("Z3_mk_config", {includes = "z3.h"}))
     end)