From 359066385a953bfd4629433c313489f491542dc0 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 10 May 2019 22:35:52 +0800 Subject: [PATCH] improve libxml2 --- PKGLIST.md | 22 +++++++++++----------- packages/j/json-c/xmake.lua | 8 ++++---- packages/l/libxml2/xmake.lua | 27 ++++++++++++++++++--------- packages/p/pcre/xmake.lua | 4 +++- packages/p/pcre2/xmake.lua | 4 +++- 5 files changed, 39 insertions(+), 26 deletions(-) diff --git a/PKGLIST.md b/PKGLIST.md index d6216088d..38cf4b4d3 100755 --- a/PKGLIST.md +++ b/PKGLIST.md @@ -4,17 +4,17 @@ |-----|-------|-----|--------|------|-------| |autoconf|bzip2|doctest|cjson|autoconf|cjson|| |automake|cairo|nlohmann_json|doctest|automake|doctest|| -|bzip2|cmake|tbox|libcurl|bzip2|libjpeg|| -|cairo|doctest|zlib|libev|cairo|libpng|| -|cjson|expat||libffi|cjson|libuv|| -|cmake(x86_64)|freeglut||libjpeg|cmake|lua|| -|doctest|freetype||libpng|doctest|nlohmann_json|| -|expat|glew||libuv|expat|tbox|| -|ffmpeg|go||nlohmann_json|ffmpeg|zlib|| -|fontconfig|libcurl||tbox|fontconfig||| -|freeglut|libjpeg||zlib|freetype||| -|freetype|libpng|||glew||| -|glew|libsdl|||go||| +|bzip2|cmake|tbox|json-c|bzip2|json-c|| +|cairo|doctest|zlib|libcurl|cairo|libjpeg|| +|cjson|expat||libev|cjson|libpng|| +|cmake(x86_64)|freeglut||libffi|cmake|libuv|| +|doctest|freetype||libjpeg|doctest|libxml2|| +|expat|glew||libpng|expat|lua|| +|ffmpeg|go||libuv|ffmpeg|nlohmann_json|| +|fontconfig|libcurl||libxml2|fontconfig|tbox|| +|freeglut|libjpeg||nlohmann_json|freetype|zlib|| +|freetype|libpng||tbox|glew||| +|glew|libsdl||zlib|go||| |go|libuv|||gperf||| |gperf|lua|||json-c||| |json-c|luajit|||libcurl||| diff --git a/packages/j/json-c/xmake.lua b/packages/j/json-c/xmake.lua index cf260be53..f4cecd706 100644 --- a/packages/j/json-c/xmake.lua +++ b/packages/j/json-c/xmake.lua @@ -3,9 +3,9 @@ package("json-c") set_homepage("https://github.com/json-c/json-c/wiki") set_description("JSON parser for C") - set_urls("https://github.com/json-c/json-c/archive/json-c-$(version)-20180305.zip") + set_urls("https://github.com/json-c/json-c/archive/json-c-$(version).zip") - add_versions("0.13.1", "8a244527eb4f697362f713f7d6dca3f6f9b5335e18fe7b705130ae62e599e864") + add_versions("0.13.1-20180305", "8a244527eb4f697362f713f7d6dca3f6f9b5335e18fe7b705130ae62e599e864") if is_plat("windows") and winos.version():gt("winxp") then add_deps("cmake") @@ -15,8 +15,8 @@ package("json-c") end) end - on_install("linux", "macosx", function (package) - local configs = {"--disable-dependency-tracking", "--disable-silent-rules"} + on_install("linux", "macosx", "iphoneos", "android", function (package) + local configs = {"--disable-dependency-tracking", "--disable-silent-rules", "--enable-shared=no"} import("package.tools.autoconf").install(package, configs) end) diff --git a/packages/l/libxml2/xmake.lua b/packages/l/libxml2/xmake.lua index e9f69bd8d..1ab08dc84 100644 --- a/packages/l/libxml2/xmake.lua +++ b/packages/l/libxml2/xmake.lua @@ -3,14 +3,11 @@ package("libxml2") set_homepage("http://xmlsoft.org/") set_description("The XML C parser and toolkit of Gnome.") - set_urls("https://github.com/GNOME/libxml2/archive/$(version).zip", {excludes = {"*/result/*", "*/test/*"}}) + set_urls("http://xmlsoft.org/sources/libxml2-$(version).tar.gz", + "https://ftp.osuosl.org/pub/blfs/conglomeration/libxml2/libxml2-$(version).tar.gz") + add_urls("https://gitlab.gnome.org/GNOME/libxml2.git") - add_versions("v2.9.8", "c87793e45e66a7aa19200f861873f75195065de786a21c1b469bdb7bfc1230fb") - add_versions("v2.9.7", "31dd4c0e10fa625b47e27fd6a5295d246c883f214da947b9a4a9e13733905ed9") - - if is_plat("macosx", "linux") then - add_deps("autoconf", "automake", "libtool", "pkg-config") - end + add_versions("2.9.9", "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871") add_includedirs("include/libxml2") if is_plat("windows") then @@ -20,6 +17,12 @@ package("libxml2") add_links("xml2") end + on_load("macosx", "linux", "iphoneos", "android", function (package) + if package:gitref() then + package:add("deps", "autoconf", "automake", "libtool", "pkg-config") + end + end) + if is_plat("windows") and winos.version():gt("winxp") then on_install("windows", function (package) os.cd("win32") @@ -29,8 +32,14 @@ package("libxml2") end) end - on_install("macosx", "linux", function (package) - import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--without-python", "--without-lzma"}) + on_install("macosx", "linux", "iphoneos", "android", function (package) + local configs = {"--disable-dependency-tracking", + "--without-python", + "--without-lzma", + "--without-zlib", + "--without-iconv", + "--enable-shared=no"} + import("package.tools.autoconf").install(package, configs) end) on_test(function (package) diff --git a/packages/p/pcre/xmake.lua b/packages/p/pcre/xmake.lua index fb3f7ebbd..dbe8dbef8 100644 --- a/packages/p/pcre/xmake.lua +++ b/packages/p/pcre/xmake.lua @@ -43,7 +43,9 @@ package("pcre") on_install("macosx", "linux", function (package) local configs = {} if package:config("shared") then - table.insert(configs, "--enable-shared") + table.insert(configs, "--enable-shared=yes") + else + table.insert(configs, "--enable-shared=no") end if package:config("jit") then table.insert(configs, "--enable-jit") diff --git a/packages/p/pcre2/xmake.lua b/packages/p/pcre2/xmake.lua index 6732e2d9a..49a88e20f 100644 --- a/packages/p/pcre2/xmake.lua +++ b/packages/p/pcre2/xmake.lua @@ -47,7 +47,9 @@ package("pcre2") on_install("macosx", "linux", function (package) local configs = {} if package:config("shared") then - table.insert(configs, "--enable-shared") + table.insert(configs, "--enable-shared=yes") + else + table.insert(configs, "--enable-shared=no") end if package:config("jit") then table.insert(configs, "--enable-jit")