add libxslt (#663)

* add libxslt

* update boost

* improve libxslt

* fix libxslt

* restrict libxslt platforms

* fix boost
pull/665/head
Hoildkv 3 years ago committed by GitHub
parent 58069ac266
commit 838dc380a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/b/boost/xmake.lua
  2. 2
      packages/l/libxml2/xmake.lua
  3. 63
      packages/l/libxslt/xmake.lua
  4. 3
      packages/v/vulkan-hpp/xmake.lua

@ -9,6 +9,7 @@ package("boost")
add_urls("https://github.com/xmake-mirror/boost/releases/download/boost-$(version).tar.bz2", {version = function (version)
return version .. "/boost_" .. (version:gsub("%.", "_"))
end})
add_versions("1.77.0", "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854")
add_versions("1.76.0", "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41")
add_versions("1.75.0", "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb")
add_versions("1.74.0", "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1")
@ -120,7 +121,7 @@ package("boost")
"-d2",
"-j4",
"--hash",
"--layout=tagged-1.66",
"--layout=tagged",
"--user-config=user-config.jam",
"-sNO_LZMA=1",
"-sNO_ZSTD=1",

@ -18,7 +18,7 @@ package("libxml2")
add_includedirs("include/libxml2")
if is_plat("windows") then
add_syslinks("wsock32", "ws2_32")
add_syslinks("ws2_32")
else
add_links("xml2")
end

@ -0,0 +1,63 @@
package("libxslt")
set_homepage("http://xmlsoft.org/XSLT/")
set_description("Libxslt is the XSLT C library developed for the GNOME project.")
set_license("MIT")
add_urls("http://xmlsoft.org/sources/libxslt-$(version).tar.gz")
add_versions("1.1.34", "98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f")
add_configs("iconv", {description = "Enable libiconv support.", default = false, type = "boolean"})
on_load("windows", "macosx", "linux", function (package)
if package:is_plat("windows") and not package:config("shared") then
package:add("defines", "LIBXSLT_STATIC")
end
package:add("deps", "libxml2", {configs = {iconv = package:config("iconv")}})
end)
on_install("windows", function (package)
io.replace("libxslt/xsltconfig.h.in", "@WITH_PROFILER@", "0", {plain = true})
os.cd("win32")
local args = {"configure.js", "compiler=msvc", "iconv=no"}
table.insert(args, "cruntime=/" .. package:config("vs_runtime"))
table.insert(args, "debug=" .. (package:debug() and "yes" or "no"))
local cflags = "/DLIBXML_STATIC \"/I$(INCPREFIX)\" \"/I" .. package:dep("libxml2"):installdir("include", "libxml2") .. "\""
local ldflags = "ws2_32.lib \"/LIBPATH:$(LIBPREFIX)\" \"/LIBPATH:" .. package:dep("libxml2"):installdir("lib") .. "\""
io.replace("Makefile.msvc", "libxml2.lib", "libxml2_a.lib", {plain = true})
io.replace("Makefile.msvc", "/I$(INCPREFIX)", cflags, {plain = true})
io.replace("Makefile.msvc", "/LIBPATH:$(LIBPREFIX)", ldflags, {plain = true})
table.insert(args, "prefix=" .. package:installdir())
os.vrunv("cscript", args)
import("package.tools.nmake").install(package, {"/f", "Makefile.msvc"})
if package:config("shared") then
os.tryrm(path.join(package:installdir("lib"), "libxslt_a.lib"))
os.tryrm(path.join(package:installdir("lib"), "libexslt_a.lib"))
else
os.tryrm(path.join(package:installdir("lib"), "libxslt.lib"))
os.tryrm(path.join(package:installdir("lib"), "libexslt.lib"))
os.tryrm(path.join(package:installdir("bin"), "libxslt.dll"))
os.tryrm(path.join(package:installdir("bin"), "libexslt.dll"))
end
package:addenv("PATH", "bin")
end)
on_install("macosx", "linux", function (package)
local configs = {}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
table.insert(configs, "--enable-static=no")
else
table.insert(configs, "--enable-shared=no")
table.insert(configs, "--enable-static=yes")
end
if package:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
import("package.tools.autoconf").install(package, configs)
package:addenv("PATH", "bin")
end)
on_test(function (package)
assert(package:has_cfuncs("xsltInit", {includes = {"libxslt/xslt.h"}}))
end)

@ -5,7 +5,8 @@ package("vulkan-hpp")
set_license("Apache-2.0")
add_urls("https://github.com/KhronosGroup/Vulkan-Hpp.git")
add_versions("v1.2.180", "1ef8f08176b0b19a9dc8f917a773bcf9681058d1d15226508e8677961ca6ed1e")
add_versions("v1.2.180", "bfa6d4765212505c8241a44b97dc5a9ce3aa2969")
add_versions("v1.2.189", "58ff1da4c03f5f124eb835f41a9dd8fe3c2e8087")
add_deps("cmake")

Loading…
Cancel
Save