Auto-update nghttp3 to v1.7.0 (#6031)

* Update nghttp3 to v1.7.0

* sfparse: add 2024.12.15 version

* nghttp3: fix vendor version

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/6033/head
ruki 2 months ago committed by GitHub
parent 17ac65bce9
commit f46623655f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 24
      packages/n/nghttp3/xmake.lua
  2. 8
      packages/s/sfparse/xmake.lua

@ -4,8 +4,9 @@ package("nghttp3")
set_license("MIT")
add_urls("https://github.com/ngtcp2/nghttp3/archive/refs/tags/$(version).tar.gz",
"https://github.com/ngtcp2/nghttp3.git")
"https://github.com/ngtcp2/nghttp3.git", {submodules = false})
add_versions("v1.7.0", "2e6c5599995939a96b759e9f8987c69c0872ed1c219f57730685a93c1c36c9ef")
add_versions("v1.6.0", "7062b50ed7118566fc39cf9629e44de7582e77b43611f7e10d3ab192c91acb72")
add_versions("v1.5.0", "8b4f47164fab6f9c6c1e77a61942d57e26e135731c9876ba6acf973f54cf78fe")
add_versions("v1.4.0", "522c8952ccae1815f34425f0c8bc6d8a4660e72dada1b4e97b8223e4c459a84a")
@ -14,20 +15,31 @@ package("nghttp3")
add_patches(">=1.4.0", "patches/1.4.0/vendor.patch", "a6d611938c797d721a0345c5c772a1405ae0d6587ae46e16c1b73c89090a5c08")
add_patches("1.3.0", "patches/1.3.0/vendor.patch", "51ab785328270b8df854283a8c20403c09813b0586eb84702a9c20241ff14980")
add_deps("cmake", "sfparse")
add_deps("cmake")
on_load(function (package)
if package:gitref() or package:version():ge("1.7.0") then
package:add("deps", "sfparse")
else
package:add("deps", "sfparse 2024.05.12")
end
if not package:config("shared") then
package:add("defines", "NGHTTP3_STATICLIB")
end
end)
on_install(function (package)
io.replace("CMakeLists.txt", [[set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")]], "", {plain = true})
local configs = {"-DENABLE_LIB_ONLY=ON", "-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_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, {packagedeps = "sfparse"})
if not package:config("shared") then
package:add("defines", "NGHTTP3_STATICLIB")
end
end)
on_test(function (package)

@ -4,6 +4,8 @@ package("sfparse")
set_license("MIT")
set_urls("https://github.com/ngtcp2/sfparse.git", {submodules = false})
add_versions("2024.12.15", "930bdf8421f29cf0109f0f1baaafffa376973ed5")
add_versions("2024.05.12", "c669673012f9d535ec3bcf679fe911c8c75a479f")
add_includedirs("include", "include/sfparse")
@ -23,5 +25,9 @@ package("sfparse")
end)
on_test(function (package)
assert(package:has_cfuncs("sf_parser_param", {includes = "sfparse.h"}))
if package:gitref() or package:version():ge("2024.12.15") then
assert(package:has_cfuncs("sfparse_parser_init", {includes = "sfparse.h"}))
else
assert(package:has_cfuncs("sf_parser_param", {includes = "sfparse.h"}))
end
end)

Loading…
Cancel
Save