Skip to content

Commit 8f40048

Browse files
committed
libxml2
1 parent 38eb60e commit 8f40048

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

packages/l/libxml2/configs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local libxml2_configs = {
44
html = {"Add the HTML support", true },
55
http = {"Add the HTTP support", false},
66
iconv = {"Add ICONV support", true },
7-
icu = {"Add ICU support", true },
7+
icu = {"Add ICU support", false},
88
iso8859x = {"Add ISO8859X support if no iconv", true },
99
legacy = {"Add deprecated APIs for compatibility", false},
1010
lzma = {"Use liblzma", true },

packages/l/libxml2/xmake.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ package("libxml2")
4848
end
4949

5050
on_load(function (package)
51+
if true then --package:is_plat("windows", "mingw", "macosx", "linux")
52+
package:config_set("lzma", true)
53+
end
54+
if not package:is_plat("wasm", "iphoneos") then
55+
package:config_set("icu", true)
56+
end
5157
if package:config("all") then
5258
for name, _ in pairs(import("configs").get_libxml2_configs()) do
5359
if name ~= "python" then
@@ -74,10 +80,10 @@ package("libxml2")
7480
end
7581

7682
if package:config("iconv") then
77-
package:add("deps", "libiconv")
83+
package:add("deps", "libiconv", {configs = {shared = package:config("shared")}})
7884
end
7985
if package:config("icu") then
80-
package:add("deps", "icu4c")
86+
package:add("deps", "icu4c", {configs = {shared = package:config("shared")}})
8187
end
8288
if package:config("lzma") then
8389
package:add("deps", "xz")

packages/x/xz/xmake.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ package("xz")
1616
end
1717
end)
1818

19-
on_install("windows", "mingw@windows,msys", function (package)
19+
if on_check then
20+
on_check(function (package)
21+
if package:is_plat("wasm") and package:config("shared") then
22+
raise("package(xz): shared library is not supported on wasm")
23+
end
24+
end)
25+
end
26+
27+
on_install("windows", "mingw", function (package)
2028
io.writefile("xmake.lua", [[
2129
add_rules("mode.release", "mode.debug")
2230
target("lzma")
@@ -51,7 +59,7 @@ package("xz")
5159
import("package.tools.xmake").install(package)
5260
end)
5361

54-
on_install("macosx", "linux", "mingw@linux,macosx", function (package)
62+
on_install("!windows and !mingw", function (package)
5563
local configs = {"--disable-dependency-tracking", "--disable-silent-rules"}
5664
if package:debug() then
5765
table.insert(configs, "--enable-debug")

0 commit comments

Comments
 (0)