diff --git a/packages/l/libimobiledevice-glue/xmake.lua b/packages/l/libimobiledevice-glue/xmake.lua index e9859db84..fea9a1590 100644 --- a/packages/l/libimobiledevice-glue/xmake.lua +++ b/packages/l/libimobiledevice-glue/xmake.lua @@ -6,9 +6,17 @@ package("libimobiledevice-glue") add_urls("https://github.com/libimobiledevice/libimobiledevice-glue.git") add_versions("2021.11.24", "106cea58ae2d92fc755705a79e1753b3750edd15") - add_deps("libplist") - on_install("macosx", "linux", function (package) + add_deps("autoconf", "automake", "libplist") + + if is_plat("windows", "mingw") then + add_syslinks("ws2_32", "iphlpapi") + end + + on_install("macosx", "linux", "mingw@macosx", function (package) local configs = {} + if package:is_plat("linux") and package:config("pic") ~= false then + table.insert(configs, "--with-pic") + end table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) table.insert(configs, "--enable-debug=" .. (package:config("debug") and "yes" or "no")) diff --git a/packages/l/libplist/xmake.lua b/packages/l/libplist/xmake.lua index e91bcad01..c8126f1b0 100644 --- a/packages/l/libplist/xmake.lua +++ b/packages/l/libplist/xmake.lua @@ -24,6 +24,7 @@ package("libplist") if package:is_plat("linux") and package:config("pic") ~= false then cxflags = "-fPIC" end + io.replace("src/plist.c", "void thread_once", "static void thread_once") import("package.tools.autoconf").install(package, configs, {cxflags = cxflags}) end) diff --git a/packages/l/libusbmuxd/xmake.lua b/packages/l/libusbmuxd/xmake.lua index 3e385ed77..1690e47e6 100644 --- a/packages/l/libusbmuxd/xmake.lua +++ b/packages/l/libusbmuxd/xmake.lua @@ -4,22 +4,14 @@ package("libusbmuxd") set_description("A client library to multiplex connections from and to iOS devices") set_license("LGPL-2.1") - add_urls("https://github.com/libimobiledevice/libusbmuxd/archive/refs/tags/$(version).tar.gz", - "https://github.com/libimobiledevice/libusbmuxd.git") - add_versions("2.0.2", "8ae3e1d9340177f8f3a785be276435869363de79f491d05d8a84a59efc8a8fdc") + add_urls("https://github.com/libimobiledevice/libusbmuxd.git") + add_versions("2021.09.13", "2ec5354a6ff2ba5e2740eabe7402186f29294f79") + add_deps("libimobiledevice-glue") if is_plat("windows", "mingw") then add_syslinks("ws2_32") end - on_load(function (package) - if package:is_plat("mingw") and package:config("shared") then - package:add("deps", "libplist", {configs = {shared = true}}) - else - package:add("deps", "libplist") - end - end) - on_install("macosx", "linux", "mingw@macosx", function (package) local configs = {} table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) @@ -27,19 +19,8 @@ package("libusbmuxd") if package:is_plat("linux") and package:config("pic") ~= false then table.insert(configs, "--with-pic") end - local cflags - if package:is_plat("mingw") then - -- disable ifaddrs for mingw - cflags = {"-DWIN32", "-D_WIN32_WINNT=0x0600"} - io.replace("common/socket.c", "AF_INET6", "AF_INET6_") - end - -- disable tools io.replace("tools/Makefile.am", "bin_PROGRAMS = iproxy inetcat", "bin_PROGRAMS =") - -- fix multiple definition with libplist - io.replace("common/thread.c", " thread_once(", " thread_once_(", {plain = true}) - io.replace("common/thread.h", " thread_once(", " thread_once_(", {plain = true}) - io.replace("src/libusbmuxd.c", "\tthread_once(", " thread_once_(", {plain = true}) - import("package.tools.autoconf").install(package, configs, {cflags = cflags}) + import("package.tools.autoconf").install(package, configs) end) on_test(function (package)