* update abseil

* update vcglib

* fix path too long

* add poco
pull/518/head
Hoildkv 4 years ago committed by GitHub
parent c450ab9350
commit 49fb60a4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/a/abseil/xmake.lua
  2. 16
      packages/e/expat/xmake.lua
  3. 61
      packages/p/poco/xmake.lua
  4. 1
      packages/v/vcglib/xmake.lua

@ -7,6 +7,7 @@ package("abseil")
"https://github.com/abseil/abseil-cpp.git")
add_versions("20200225.1", "0db0d26f43ba6806a8a3338da3e646bb581f0ca5359b3a201d8fb8e4752fd5f8")
add_versions("20210324.1", "441db7c09a0565376ecacf0085b2d4c2bbedde6115d7773551bc116212c2a8d6")
add_versions("20210324.2", "59b862f50e710277f8ede96f083a5bb8d7c9595376146838b9580be90374ee1f")
add_deps("cmake")
@ -14,7 +15,7 @@ package("abseil")
local configs = {"-DCMAKE_CXX_STANDARD=17"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
import("package.tools.cmake").install(package, configs, {buildir = os.tmpdir()})
end)
on_test(function (package)

@ -10,9 +10,7 @@ package("expat")
add_versions("2.2.10", "b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5")
add_versions("2.2.6", "17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2")
if is_plat("windows") or is_plat("mingw") then
add_deps("cmake")
end
add_deps("cmake")
on_load("windows", function (package)
if not package:config("shared") then
@ -20,7 +18,7 @@ package("expat")
end
end)
on_install("windows", "mingw", function (package)
on_install("windows", "linux", "macosx", "mingw", function (package)
local configs = {"-DEXPAT_BUILD_EXAMPLES=OFF", "-DEXPAT_BUILD_TESTS=OFF", "-DEXPAT_BUILD_DOCS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DEXPAT_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
@ -30,16 +28,6 @@ package("expat")
import("package.tools.cmake").install(package, configs)
end)
on_install("linux", "macosx", function (package)
local configs = {"--without-examples", "--without-tests", "--without-docbook"}
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:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("XML_ParserCreate(NULL)", {includes = "expat.h"}))
end)

@ -0,0 +1,61 @@
package("poco")
set_homepage("https://pocoproject.org/")
set_description("The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.")
set_license("BSL-1.0")
add_urls("https://github.com/pocoproject/poco/archive/refs/tags/poco-$(version)-release.tar.gz",
"https://github.com/pocoproject/poco.git")
add_versions("1.11.0", "8a7bfd0883ee95e223058edce8364c7d61026ac1882e29643822ce9b753f3602")
if is_plat("windows") then
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
end
add_configs("mysql", {description = "Enable mysql support.", default = false, type = "boolean"})
add_configs("postgresql", {description = "Enable postgresql support.", default = false, type = "boolean"})
add_configs("odbc", {description = "Enable odbc support.", default = is_plat("windows"), type = "boolean"})
add_deps("cmake")
add_deps("openssl", "pcre", "sqlite3", "expat", "zlib")
add_defines("POCO_NO_AUTOMATIC_LIBS")
on_load("windows", "linux", "macosx", function (package)
if package:config("postgresql") then
package:add("deps", "postgresql")
end
if package:config("mysql") then
package:add("deps", "mysql")
end
end)
on_install("windows", "linux", "macosx", function (package)
io.replace("XML/CMakeLists.txt", "EXPAT REQUIRED", "EXPAT CONFIG REQUIRED")
io.replace("XML/CMakeLists.txt", "EXPAT::EXPAT", "expat::expat")
io.replace("XML/CMakeLists.txt", "PUBLIC POCO_UNBUNDLED", "PUBLIC POCO_UNBUNDLED XML_DTD XML_NS")
io.replace("Foundation/CMakeLists.txt", "PUBLIC POCO_UNBUNDLED", "PUBLIC POCO_UNBUNDLED PCRE_STATIC")
local configs = {"-DPOCO_UNBUNDLED=ON", "-DENABLE_TESTS=OFF", "-DENABLE_PDF=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") and not package:config("shared") then
table.insert(configs, "-DPOCO_MT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
end
if package:is_plat("windows") then
local vs_sdkver = get_config("vs_sdkver")
if vs_sdkver then
local build_ver = string.match(vs_sdkver, "%d+%.%d+%.(%d+)%.?%d*")
assert(tonumber(build_ver) >= 18362, "poco requires Windows SDK to be at least 10.0.18362.0")
table.insert(configs, "-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=" .. vs_sdkver)
table.insert(configs, "-DCMAKE_SYSTEM_VERSION=" .. vs_sdkver)
end
end
for _, lib in ipairs({"mysql", "postgresql", "odbc"}) do
table.insert(configs, "-DENABLE_DATA_" .. lib:upper() .. "=" .. (package:config(lib) and "ON" or "OFF"))
end
-- warning: only works on windows sdk 10.0.18362.0 and later
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cxxtypes("Poco::BasicEvent<int>", {configs = {languages = "c++14"}, includes = "Poco/BasicEvent.h"}))
end)

@ -6,6 +6,7 @@ package("vcglib")
add_urls("https://github.com/cnr-isti-vclab/vcglib/archive/refs/tags/$(version).tar.gz")
add_versions("2020.12", "731c57435e39c4b958a1d766cadd9865d9db35e36410708f2da7818e9fa5f786")
add_versions("2021.07", "384bb4bb86b4114391cbc0fb8990f218473a656d06f2214bcc3725dac193db1c")
add_deps("eigen")
on_install("windows", "macosx", "linux", function (package)

Loading…
Cancel
Save