|
@@ -65,7 +65,7 @@ package("libcurl")
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
|
|
|
|
- on_install("windows", "mingw@windows", function (package)
|
|
|
|
|
|
+ on_install("windows", "mingw", function (package)
|
|
local configs = {"-DBUILD_TESTING=OFF", "-DENABLE_MANUAL=OFF"}
|
|
local configs = {"-DBUILD_TESTING=OFF", "-DENABLE_MANUAL=OFF"}
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
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"))
|
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
|
|
@@ -87,10 +87,13 @@ package("libcurl")
|
|
if package:is_plat("windows") then
|
|
if package:is_plat("windows") then
|
|
table.insert(configs, "-DCURL_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
|
|
table.insert(configs, "-DCURL_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
|
|
end
|
|
end
|
|
|
|
+ if package:is_plat("mingw") and version:le("7.85.0") then
|
|
|
|
+ io.replace("src/CMakeLists.txt", 'COMMAND ${CMAKE_COMMAND} -E echo "/* built-in manual is disabled, blank function */" > tool_hugehelp.c', "", {plain = true})
|
|
|
|
+ end
|
|
import("package.tools.cmake").install(package, configs)
|
|
import("package.tools.cmake").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|
|
- on_install("macosx", "linux", "iphoneos", "mingw@macosx", "cross", function (package)
|
|
|
|
|
|
+ on_install("macosx", "linux", "iphoneos", "cross", function (package)
|
|
local configs = {"--disable-silent-rules",
|
|
local configs = {"--disable-silent-rules",
|
|
"--disable-dependency-tracking",
|
|
"--disable-dependency-tracking",
|
|
"--without-hyper",
|
|
"--without-hyper",
|
|
@@ -104,15 +107,9 @@ package("libcurl")
|
|
if package:debug() then
|
|
if package:debug() then
|
|
table.insert(configs, "--enable-debug")
|
|
table.insert(configs, "--enable-debug")
|
|
end
|
|
end
|
|
- if package:config("pic") ~= false then
|
|
|
|
- table.insert(configs, "--with-pic")
|
|
|
|
- end
|
|
|
|
if package:is_plat("macosx", "iphoneos") then
|
|
if package:is_plat("macosx", "iphoneos") then
|
|
table.insert(configs, (package:version():ge("7.77") and "--with-secure-transport" or "--with-darwinssl"))
|
|
table.insert(configs, (package:version():ge("7.77") and "--with-secure-transport" or "--with-darwinssl"))
|
|
end
|
|
end
|
|
- if package:is_plat("mingw") then
|
|
|
|
- table.insert(configs, "--with-schannel")
|
|
|
|
- end
|
|
|
|
for _, name in ipairs({"openssl", "mbedtls", "zlib", "brotli", "zstd", "libssh2", "libidn2", "libpsl", "nghttp2"}) do
|
|
for _, name in ipairs({"openssl", "mbedtls", "zlib", "brotli", "zstd", "libssh2", "libidn2", "libpsl", "nghttp2"}) do
|
|
table.insert(configs, package:config(name) and "--with-" .. name or "--without-" .. name)
|
|
table.insert(configs, package:config(name) and "--with-" .. name or "--without-" .. name)
|
|
end
|
|
end
|