|
@@ -84,7 +84,7 @@ package("libcurl")
|
|
for name, opt in pairs(configopts) do
|
|
for name, opt in pairs(configopts) do
|
|
table.insert(configs, "-D" .. opt .. "=" .. (package:config(name) and "ON" or "OFF"))
|
|
table.insert(configs, "-D" .. opt .. "=" .. (package:config(name) and "ON" or "OFF"))
|
|
end
|
|
end
|
|
- if 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
|
|
import("package.tools.cmake").install(package, configs)
|
|
import("package.tools.cmake").install(package, configs)
|
|
@@ -107,10 +107,10 @@ package("libcurl")
|
|
if package:config("pic") ~= false then
|
|
if package:config("pic") ~= false then
|
|
table.insert(configs, "--with-pic")
|
|
table.insert(configs, "--with-pic")
|
|
end
|
|
end
|
|
- if 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 is_plat("mingw") then
|
|
|
|
|
|
+ if package:is_plat("mingw") then
|
|
table.insert(configs, "--with-schannel")
|
|
table.insert(configs, "--with-schannel")
|
|
end
|
|
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
|
|
@@ -118,6 +118,13 @@ package("libcurl")
|
|
end
|
|
end
|
|
table.insert(configs, package:config("cares") and "--enable-ares" or "--disable-ares")
|
|
table.insert(configs, package:config("cares") and "--enable-ares" or "--disable-ares")
|
|
table.insert(configs, package:config("openldap") and "--enable-ldap" or "--disable-ldap")
|
|
table.insert(configs, package:config("openldap") and "--enable-ldap" or "--disable-ldap")
|
|
|
|
+ if package:is_plat("macosx") then
|
|
|
|
+ local cares = package:dep("c-ares")
|
|
|
|
+ if cares and not cares:config("shared") then
|
|
|
|
+ -- we need fix missing `-lresolv` when checking c-ares
|
|
|
|
+ io.replace("./configure", "PKGCONFIG --libs-only-l libcares", "PKGCONFIG --libs-only-l --static libcares", {plain = true})
|
|
|
|
+ end
|
|
|
|
+ end
|
|
import("package.tools.autoconf").install(package, configs)
|
|
import("package.tools.autoconf").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|