|
|
|
@ -4,8 +4,9 @@ package("libuv") |
|
|
|
|
set_description("A multi-platform support library with a focus on asynchronous I/O.") |
|
|
|
|
set_license("MIT") |
|
|
|
|
|
|
|
|
|
set_urls("https://github.com/libuv/libuv/archive/$(version).zip", |
|
|
|
|
set_urls("https://github.com/libuv/libuv/archive/refs/tags/$(version).zip", |
|
|
|
|
"https://github.com/libuv/libuv.git") |
|
|
|
|
add_versions("v1.46.0", "45953dc9b64db7f4f47561f9e4543b762c52adfe7c9b6f8e9efbc3b4dd7d3081") |
|
|
|
|
add_versions("v1.44.1", "d233a9c522a9f4afec47b0d12f302d93d114a9e3ea104150e65f55fd931518e6") |
|
|
|
|
add_versions("v1.42.0", "031130768b25ae18c4b9d4a94ba7734e2072b11c6fce3e554612c516c3241402") |
|
|
|
|
add_versions("v1.41.0", "cb89a8b9f686c5ccf7ed09a9e0ece151a73ebebc17af3813159c335b02181794") |
|
|
|
@ -32,15 +33,20 @@ package("libuv") |
|
|
|
|
elseif is_plat("linux") then |
|
|
|
|
add_syslinks("pthread", "dl") |
|
|
|
|
elseif is_plat("windows", "mingw") then |
|
|
|
|
add_syslinks("advapi32", "iphlpapi", "psapi", "user32", "userenv", "ws2_32", "kernel32", "gdi32", "winspool", "shell32", "ole32", "oleaut32", "uuid", "comdlg32") |
|
|
|
|
add_syslinks("advapi32", "iphlpapi", "psapi", "user32", "userenv", "ws2_32", "shell32", "ole32", "uuid", "dbghelp") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
on_load("windows", function (package) |
|
|
|
|
package:add("links", "uv" .. (package:config("shared") and "" or "_a")) |
|
|
|
|
local version = package:version() |
|
|
|
|
if version:ge("1.45") then |
|
|
|
|
package:add("links", package:config("shared") and "uv" or "libuv") |
|
|
|
|
else |
|
|
|
|
package:add("links", package:config("shared") and "uv" or "uv_a") |
|
|
|
|
end |
|
|
|
|
if package:config("shared") then |
|
|
|
|
package:add("defines", "USING_UV_SHARED") |
|
|
|
|
end |
|
|
|
|
if package:version():ge("1.40") and package:version():lt("1.44") then |
|
|
|
|
if version:ge("1.40") and version:lt("1.44") then |
|
|
|
|
package:add("linkdirs", path.join("lib", package:debug() and "Debug" or "Release")) |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
@ -48,6 +54,7 @@ package("libuv") |
|
|
|
|
on_install("windows", function (package) |
|
|
|
|
local configs = {"-DLIBUV_BUILD_TESTS=OFF", "-DLIBUV_BUILD_BENCH=OFF"} |
|
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
|
|
|
|
table.insert(configs, "-DLIBUV_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) |
|
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
|
if package:version():lt("1.40") then |
|
|
|
|
os.cp("include", package:installdir()) |
|
|
|
|