Auto-update cinatra to 0.8.9 (#3572)

* Update cinatra to 0.8.9

* add patch for vs2019

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/3733/head
ruki 8 months ago committed by GitHub
parent da5fd98ed4
commit 035e4f3a91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 16
      packages/c/cinatra/patches/0.8.9/windows-move.patch
  2. 32
      packages/c/cinatra/xmake.lua

@ -0,0 +1,16 @@
diff --git a/include/cinatra/ylt/coro_io/channel.hpp b/include/cinatra/ylt/coro_io/channel.hpp
index bdaec57..ed6dab6 100644
--- a/include/cinatra/ylt/coro_io/channel.hpp
+++ b/include/cinatra/ylt/coro_io/channel.hpp
@@ -160,10 +160,7 @@ class channel {
channel(const channel& o) = delete;
channel& operator=(const channel& o) = delete;
- auto send_request(auto op, typename client_t::config& config)
- -> decltype(std::declval<client_pool_t>().send_request(std::move(op),
- std::string_view{},
- config)) {
+ auto send_request(auto op, typename client_t::config& config) {
std::shared_ptr<client_pool_t> client_pool;
if (client_pools_.size() > 1) {
client_pool = co_await std::visit(

@ -1,5 +1,4 @@
package("cinatra")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/qicosmos/cinatra")
set_description("modern c++(c++20), cross-platform, header-only, easy to use http framework")
@ -8,10 +7,16 @@ package("cinatra")
add_urls("https://github.com/qicosmos/cinatra/archive/refs/tags/v$(version).tar.gz",
"https://github.com/qicosmos/cinatra.git")
add_versions("0.8.9", "007dc38aceedf42d03a9c05dc9aa6d2f303456ae7ce1100800df7a565b83b510")
add_versions("0.8.0", "4e14d5206408eccb43b3e810d3a1fe228fbc7496ded8a16b041ed12cbcce4479")
add_patches("0.8.9", "patches/0.8.9/windows-move.patch", "c913ed0e9044ffc0ced40516245ec0d55262f8eabd30244d9911c3f0427a60f5")
add_configs("ssl", {description = "Enable SSL", default = false, type = "boolean"})
add_configs("gzip", {description = "Enable GZIP", default = false, type = "boolean"})
add_configs("sse42", {description = "Enable sse4.2 instruction set", default = false, type = "boolean"})
add_configs("avx2", {description = "Enable avx2 instruction set", default = false, type = "boolean"})
add_configs("aarch64", {description = "Enable aarch64 instruction set (only arm)", default = false, type = "boolean"})
add_deps("asio")
add_deps("async_simple", {configs = {aio = false}})
@ -26,6 +31,18 @@ package("cinatra")
package:add("deps", "zlib")
package:add("defines", "CINATRA_ENABLE_GZIP")
end
local configdeps = {
sse42 = "CINATRA_SSE",
avx2 = "CINATRA_AVX2",
aarch64 = "CINATRA_ARM_OPT"
}
for name, item in pairs(configdeps) do
if package:config(name) then
package:add("defines", item)
end
end
end)
on_install("windows", "linux", "macosx", function (package)
@ -33,16 +50,5 @@ package("cinatra")
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <cinatra.hpp>
using namespace cinatra;
void test() {
http_server server(std::thread::hardware_concurrency());
server.listen("0.0.0.0", "8080");
server.set_http_handler<GET, POST>("/", [](request& req, response& res) {
res.set_status_and_content(status_type::ok, "hello world");
});
server.run();
}
]]}, {configs = {languages = "c++20"}}))
assert(package:has_cxxincludes("cinatra.hpp", {configs = {languages = "c++20"}}))
end)

Loading…
Cancel
Save