|
@@ -3,10 +3,14 @@ package("nghttp3")
|
|
|
set_description("HTTP/3 library written in C")
|
|
|
set_license("MIT")
|
|
|
|
|
|
- add_urls("https://github.com/ngtcp2/nghttp3.git")
|
|
|
- add_versions("2022.02.08", "98402fb68fffc0ab1b211a5f07c1425dfd42d217")
|
|
|
+ add_urls("https://github.com/ngtcp2/nghttp3/archive/refs/tags/$(version).tar.gz",
|
|
|
+ "https://github.com/ngtcp2/nghttp3.git")
|
|
|
|
|
|
- add_deps("cmake")
|
|
|
+ add_versions("v1.3.0", "a83c6a4f589ae777a5f967652969d99b3399a85971340b8de9bed79119a11f88")
|
|
|
+
|
|
|
+ add_patches("v1.3.0", "patches/vendor.patch", "51ab785328270b8df854283a8c20403c09813b0586eb84702a9c20241ff14980")
|
|
|
+
|
|
|
+ add_deps("cmake", "sfparse")
|
|
|
|
|
|
on_load("windows", function (package)
|
|
|
if not package:config("shared") then
|
|
@@ -15,14 +19,14 @@ package("nghttp3")
|
|
|
end)
|
|
|
|
|
|
on_install("windows", "macosx", "linux", function (package)
|
|
|
- local configs = {"-DENABLE_LIB_ONLY=ON"}
|
|
|
+ local configs = {"-DENABLE_LIB_ONLY=ON", "-DBUILD_TESTING=OFF"}
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
table.insert(configs, "-DENABLE_SHARED_LIB=" .. (package:config("shared") and "ON" or "OFF"))
|
|
|
table.insert(configs, "-DENABLE_STATIC_LIB=" .. (package:config("shared") and "OFF" or "ON"))
|
|
|
if package:is_plat("windows") then
|
|
|
table.insert(configs, "-DENABLE_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
|
|
|
end
|
|
|
- import("package.tools.cmake").install(package, configs)
|
|
|
+ import("package.tools.cmake").install(package, configs, {packagedeps = "sfparse"})
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|