commit
bb1b256900
558 changed files with 10144 additions and 1454 deletions
@ -0,0 +1,17 @@ |
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
add_requires("minizip-ng") |
||||
add_packages("minizip-ng") |
||||
|
||||
target("11zip") |
||||
set_kind("$(kind)") |
||||
set_languages("c++17") |
||||
add_files("src/*.cpp") |
||||
remove_files("src/elzip_fs_fallback.cpp") |
||||
add_includedirs("include", "include/elzip") |
||||
|
||||
add_headerfiles("include/(**.hpp)") |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all", {export_classes = true}) |
||||
end |
@ -0,0 +1,28 @@ |
||||
package("11zip") |
||||
set_homepage("https://github.com/Sygmei/11Zip") |
||||
set_description("Dead simple zipping / unzipping C++ Lib") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/Sygmei/11Zip/archive/516e161d5c96aa8f2603fb30b10b7770a87332c2.tar.gz", |
||||
"https://github.com/Sygmei/11Zip.git") |
||||
|
||||
add_versions("2023.05.10", "9e4052571c73ecd8e328fa9e8399f606604baa3373103d2e7dddb75019330ee0") |
||||
|
||||
add_includedirs("include", "include/elzip") |
||||
|
||||
add_deps("minizip-ng") |
||||
|
||||
on_install("macosx", "android", "linux", "windows", "mingw", function (package) |
||||
io.replace("src/unzipper.cpp", "unzLocateFile(zipFile_, filename.data(), nullptr)", "unzLocateFile(zipFile_, filename.data(), 0)", {plain = true}) |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
std::string zipname; |
||||
elz::extractZip(zipname); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = "elzip/elzip.hpp"})) |
||||
end) |
@ -0,0 +1,27 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index af78061..8aba951 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -39,13 +39,15 @@ function(add_security_flags target)
|
||||
target_compile_options( ${target} PRIVATE -fstack-protector-strong)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
- target_compile_options( ${target} PRIVATE /GS /DynamicBase)
|
||||
- if(BUILD_WITH_STATIC_CRT)
|
||||
- target_compile_options( ${target} PRIVATE "/MT")
|
||||
- endif()
|
||||
- if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
|
||||
- # These options for 32 bit builds only
|
||||
- target_compile_options( ${target} PRIVATE /SAFESEH /NXCOMPAT )
|
||||
+ if (MSVC)
|
||||
+ target_compile_options( ${target} PRIVATE /GS /DynamicBase)
|
||||
+ if(BUILD_WITH_STATIC_CRT)
|
||||
+ target_compile_options( ${target} PRIVATE "/MT")
|
||||
+ endif()
|
||||
+ if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
|
||||
+ # These options for 32 bit builds only
|
||||
+ target_compile_options( ${target} PRIVATE /SAFESEH /NXCOMPAT )
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
@ -0,0 +1,30 @@ |
||||
package("ade") |
||||
set_homepage("https://github.com/opencv/ade") |
||||
set_description("ADE Framework is a graph construction, manipulation, and processing framework.") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/opencv/ade/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/opencv/ade.git") |
||||
|
||||
add_versions("v0.1.2d", "edefba61a33d6cd4b78a9976cb3309c95212610a81ba6dade09882d1794198ff") |
||||
add_versions("v0.1.2", "ac2e6a4acbe6e0b0942418687ec37c6cd55dcaec5112c7ca09abefe6ee539499") |
||||
|
||||
add_patches("0.1.2", "patches/0.1.2/cmake-mingw.patch", "59ac0ed938b82090e97de6dee358ba683b371908c3063b4d10146999a30eaaaa") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
local configs = {} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
table.insert(configs, "-DBUILD_WITH_STATIC_CRT=" .. (package:has_runtime("MT") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
ade::Graph x; |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "ade/graph.hpp"})) |
||||
end) |
@ -0,0 +1,27 @@ |
||||
package("algo_plus") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://csrt-ntua.github.io/AlgoPlus") |
||||
set_description("AlgoPlus is a C++17 library for complex data structures and algorithms") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/CSRT-NTUA/AlgoPlus.git") |
||||
add_versions("2024.07.02", "1287dfc5bf666bace15af9c14d03e807b71efa82") |
||||
|
||||
add_deps("nlohmann_json") |
||||
|
||||
on_install(function (package) |
||||
for _, file in ipairs(os.files("src/**.h")) do |
||||
io.replace(file, "../../../../third_party/json.hpp", "nlohmann/json.hpp", {plain = true}) |
||||
end |
||||
os.cp("src/*", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
std::vector<std::vector<double> > data; |
||||
int CLUSTERS; |
||||
kmeans a(data, CLUSTERS); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = {"machine_learning/clustering/kmeans/kmeans.h"}})) |
||||
end) |
@ -0,0 +1,51 @@ |
||||
package("antlr4-runtime") |
||||
set_homepage("http://antlr.org") |
||||
set_description("ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/antlr/antlr4/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/antlr/antlr4.git") |
||||
|
||||
add_versions("4.13.2", "9f18272a9b32b622835a3365f850dd1063d60f5045fb1e12ce475ae6e18a35bb") |
||||
add_versions("4.13.1", "da20d487524d7f0a8b13f73a8dc326de7fc2e5775f5a49693c0a4e59c6b1410c") |
||||
|
||||
if is_plat("mingw") and is_subhost("msys") then |
||||
add_extsources("pacman::antlr4-runtime-cpp") |
||||
elseif is_plat("linux") then |
||||
add_extsources("pacman::antlr4-runtime", "apt::libantlr4-runtime-dev") |
||||
elseif is_plat("macosx") then |
||||
add_extsources("brew::antlr4-cpp-runtime") |
||||
end |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("m", "pthread") |
||||
elseif is_plat("macosx") then |
||||
add_frameworks("CoreFoundation") |
||||
end |
||||
|
||||
add_includedirs("include", "include/antlr4-runtime") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
local configs = {"-DANTLR_BUILD_CPP_TESTS=OFF", "-DANTLR4_INSTALL=ON"} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DANTLR_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) |
||||
table.insert(configs, "-DANTLR_BUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON")) |
||||
|
||||
os.cd("runtime/Cpp") |
||||
io.replace("CMakeLists.txt", [[set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")]], "", {plain = true}) |
||||
io.replace("CMakeLists.txt", [[set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")]], "", {plain = true}) |
||||
import("package.tools.cmake").install(package, configs) |
||||
if not package:config("shared") then |
||||
package:add("defines", "ANTLR4CPP_STATIC") |
||||
end |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
antlr4::ANTLRInputStream x; |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = "antlr4-runtime/antlr4-runtime.h"})) |
||||
end) |
@ -0,0 +1,43 @@ |
||||
package("aom") |
||||
set_homepage("https://aomedia.googlesource.com/aom") |
||||
set_description("AV1 Codec Library") |
||||
set_license("BSD-2-Clause") |
||||
|
||||
add_urls("https://storage.googleapis.com/aom-releases/libaom-$(version).tar.gz", |
||||
"https://aomedia.googlesource.com/aom.git") |
||||
|
||||
add_versions("3.9.1", "dba99fc1c28aaade28dda59821166b2fa91c06162d1bc99fde0ddaad7cecc50e") |
||||
|
||||
add_configs("tools", {description = "Build tools", default = false, type = "boolean"}) |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("pthread", "m") |
||||
end |
||||
|
||||
add_deps("cmake", "nasm") |
||||
if is_plat("windows") or (is_plat("mingw") and is_host("windows")) then |
||||
add_deps("strawberry-perl") |
||||
end |
||||
|
||||
on_install("!wasm and (!windows or windows|!arm64)", function (package) |
||||
local configs = { |
||||
"-DENABLE_EXAMPLES=OFF", |
||||
"-DENABLE_TESTS=OFF", |
||||
"-DENABLE_DOCS=OFF", |
||||
"-DCONFIG_LIBYUV=0", |
||||
"-DCONFIG_WEBM_IO=0", |
||||
} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
if package:is_plat("windows") and package:is_arch("arm.*") then |
||||
table.insert(configs, "-DCMAKE_SYSTEM_NAME=Windows") |
||||
table.insert(configs, "-DCMAKE_SYSTEM_PROCESSOR=" .. package:arch()) |
||||
end |
||||
|
||||
table.insert(configs, "-DENABLE_TOOLS=" .. (package:config("tools") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aom_codec_version_str", {includes = "aom/aom_codec.h"})) |
||||
end) |
@ -0,0 +1,31 @@ |
||||
package("argz") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/stephenberry/argz") |
||||
set_description("A light weight C++ in memory argument parser") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/stephenberry/argz/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/stephenberry/argz.git") |
||||
|
||||
add_versions("v0.2.1", "1a9d85ef7e4722f81ce426c2cf8ceaa0a10cc42e7762cdf2465ae6484ece9c7e") |
||||
|
||||
add_includedirs("include/argz") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
if package:has_tool("cxx", "cl") then |
||||
package:add("cxxflags", "/Zc:preprocessor", "/GL", "/permissive-", "/Zc:lambda") |
||||
end |
||||
io.replace("CMakeLists.txt", "include(cmake/dev-mode.cmake)", "", {plain = true}) |
||||
import("package.tools.cmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
constexpr std::string_view version = "1.2.3"; |
||||
argz::about about{ "My program description", version }; |
||||
} |
||||
]]}, {configs = {languages = "c++20"}, includes = {"argz/argz.hpp"}})) |
||||
end) |
@ -0,0 +1,22 @@ |
||||
From 34bb2c023d60d22e4b1a31750d9b649d7729209e Mon Sep 17 00:00:00 2001
|
||||
From: xpxz <97490782+heheda123123@users.noreply.github.com>
|
||||
Date: Wed, 19 Jun 2024 14:08:48 +0800
|
||||
Subject: [PATCH] remove const in set_to_text_limit
|
||||
|
||||
---
|
||||
include/asio2/http/detail/flex_body.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/asio2/http/detail/flex_body.hpp b/include/asio2/http/detail/flex_body.hpp
|
||||
index 491f5b8a..18e682db 100644
|
||||
--- a/include/asio2/http/detail/flex_body.hpp
|
||||
+++ b/include/asio2/http/detail/flex_body.hpp
|
||||
@@ -136,7 +136,7 @@ class basic_flex_body<TextBody, FileBody>::value_type
|
||||
inline bool is_text() const noexcept { return !is_file(); }
|
||||
inline bool is_file() const noexcept { return file_.is_open(); }
|
||||
|
||||
- inline void set_to_text_limit(std::uint64_t v) const noexcept
|
||||
+ inline void set_to_text_limit(std::uint64_t v) noexcept
|
||||
{
|
||||
this->to_text_limit_ = v;
|
||||
}
|
@ -0,0 +1,60 @@ |
||||
package("aws-lc") |
||||
set_homepage("https://github.com/aws/aws-lc") |
||||
set_description("AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project.") |
||||
|
||||
add_urls("https://github.com/aws/aws-lc/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/aws/aws-lc.git") |
||||
|
||||
add_versions("v1.32.0", "67fbb78659055c2289c9068bb4ca1c0f1b6ca27700c7f6d34c6bc2f27cd46314") |
||||
|
||||
add_configs("jitter", {description = "Enable FIPS entropy source: CPU Jitter", default = false, type = "boolean"}) |
||||
add_configs("go", {description = "Enable go", default = false, type = "boolean"}) |
||||
add_configs("perl", {description = "Enable perl", default = false, type = "boolean"}) |
||||
add_configs("tools", {description = "Build tools", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake") |
||||
if is_plat("windows", "mingw") or is_host("windows") then |
||||
add_deps("nasm") |
||||
end |
||||
|
||||
add_links("ssl", "crypto") |
||||
|
||||
if is_plat("windows", "mingw") then |
||||
add_syslinks("ws2_32") |
||||
elseif is_plat("linux", "bsd") then |
||||
add_syslinks("pthread", "dl", "m") |
||||
end |
||||
|
||||
on_load(function (package) |
||||
if package:config("go") then |
||||
package:add("deps", "go") |
||||
end |
||||
if package:config("perl") and package:is_plat() and (not package:is_precompiled()) then |
||||
package:add("deps", "strawberry-perl") |
||||
end |
||||
end) |
||||
|
||||
on_install("!cross and windows|!arm64", function (package) |
||||
if package:config("shared") and package:is_plat("windows") then |
||||
package:add("defines", "BORINGSSL_SHARED_LIBRARY") |
||||
end |
||||
|
||||
local configs = { |
||||
"-DBUILD_TESTING=OFF", |
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include", |
||||
"-DBUILD_LIBSSL=ON", |
||||
} |
||||
|
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
|
||||
table.insert(configs, "-DENABLE_FIPS_ENTROPY_CPU_JITTER=" .. (package:config("jitter") and "ON" or "OFF")) |
||||
table.insert(configs, "-DDISABLE_GO=" .. (package:config("go") and "OFF" or "ON")) |
||||
table.insert(configs, "-DDISABLE_PERL=" .. (package:config("perl") and "OFF" or "ON")) |
||||
table.insert(configs, "-DBUILD_TOOL=" .. (package:config("tools") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("SSL_new", {includes = "openssl/ssl.h"})) |
||||
end) |
@ -0,0 +1,37 @@ |
||||
option("opencl", {default = false}) |
||||
option("tools", {default = false}) |
||||
|
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
set_languages("c++11") |
||||
add_rules("utils.install.cmake_importfiles") |
||||
|
||||
if has_config("opencl") then |
||||
add_requires("opencl") |
||||
add_packages("opencl") |
||||
add_defines("BASISU_SUPPORT_OPENCL") |
||||
end |
||||
|
||||
add_requires("zstd") |
||||
add_packages("zstd") |
||||
add_defines("BASISD_SUPPORT_KTX2_ZSTD") |
||||
|
||||
target("basisu") |
||||
set_kind("$(kind)") |
||||
add_files("encoder/*.cpp", "transcoder/*.cpp") |
||||
add_headerfiles("(encoder/*.h)", "(transcoder/*.h)", "(transcoder/*.inc)", {prefixdir = "basisu"}) |
||||
|
||||
add_vectorexts("all") |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all", {export_classes = true}) |
||||
elseif is_plat("linux", "bsd") then |
||||
add_syslinks("m", "pthread") |
||||
end |
||||
|
||||
if has_config("tools") then |
||||
target("basisu_tool") |
||||
set_kind("binary") |
||||
add_files("basisu_tool.cpp") |
||||
add_deps("basisu") |
||||
end |
@ -0,0 +1,43 @@ |
||||
package("basisu") |
||||
set_homepage("https://github.com/BinomialLLC/basis_universal") |
||||
set_description("Basis Universal GPU Texture Codec") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/BinomialLLC/basis_universal/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/BinomialLLC/basis_universal.git") |
||||
|
||||
add_versions("1.16.4", "e5740fd623a2f8472c9700b9447a8725a6f27d65b0b47c3e3926a60db41b8a64") |
||||
|
||||
add_configs("opencl", {description = "Enable opencl", default = false, type = "boolean"}) |
||||
add_configs("tools", {description = "Build tools", default = false, type = "boolean"}) |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("m", "pthread") |
||||
end |
||||
|
||||
add_deps("zstd") |
||||
|
||||
on_load(function (package) |
||||
if package:config("opencl") then |
||||
package:add("deps", "opencl") |
||||
end |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
io.replace("encoder/basisu_comp.cpp", "../zstd/zstd.h", "zstd.h", {plain = true}) |
||||
|
||||
local configs = { |
||||
opencl = package:config("opencl"), |
||||
tools = package:config("tools"), |
||||
} |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
basist::basisu_transcoder_init(); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "basisu/transcoder/basisu_transcoder.h"})) |
||||
end) |
@ -0,0 +1,54 @@ |
||||
option("openmp", {default = false}) |
||||
option("sse", {default = false}) |
||||
option("neno", {default = false}) |
||||
|
||||
if has_config("openmp") then |
||||
add_requires("openmp") |
||||
add_packages("openmp") |
||||
end |
||||
|
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
target("blake2") |
||||
set_kind("$(kind)") |
||||
add_headerfiles("ref/blake2.h") |
||||
add_files("src/blake2bp.c", "src/blake2sp.c") |
||||
|
||||
if has_config("sse") then |
||||
add_files( |
||||
"sse/blake2b.c", |
||||
"sse/blake2bp.c", |
||||
"sse/blake2s.c", |
||||
"sse/blake2sp.c", |
||||
"sse/blake2xb.c", |
||||
"sse/blake2xs.c" |
||||
) |
||||
add_vectorexts("all") |
||||
elseif has_config("neno") then |
||||
add_files( |
||||
"neon/blake2b-neon.c", |
||||
"neon/blake2bp.c", |
||||
"neon/blake2s-neon", |
||||
"neon/blake2xb.c", |
||||
"neon/blake2sp.c", |
||||
"neon/blake2xs.c" |
||||
) |
||||
add_vectorexts("all") |
||||
else |
||||
add_files( |
||||
"ref/blake2bp-ref.c", |
||||
"ref/blake2b-ref.c", |
||||
"ref/blake2sp-refon", |
||||
"ref/blake2s-ref.c", |
||||
"ref/blake2xb-ref.c", |
||||
"ref/blake2xs-ref.c" |
||||
) |
||||
end |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all") |
||||
end |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("m") |
||||
end |
@ -0,0 +1,37 @@ |
||||
package("blake2") |
||||
set_homepage("https://blake2.net") |
||||
set_description("BLAKE2 official implementations") |
||||
set_license("CC0-1.0") |
||||
|
||||
add_urls("https://github.com/BLAKE2/BLAKE2/archive/ed1974ea83433eba7b2d95c5dcd9ac33cb847913.tar.gz", |
||||
"https://github.com/BLAKE2/BLAKE2.git") |
||||
|
||||
add_versions("2023.02.12", "e1d1194cde9fec0f150961cca8f3d9bdf7c5a5cbe020d1cdfb962b4887793124") |
||||
|
||||
add_configs("openmp", {description = "Enable Openmp", default = false, type = "boolean"}) |
||||
add_configs("sse", {description = "Enable SSE", default = false, type = "boolean"}) |
||||
add_configs("neno", {description = "Enable neno", default = false, type = "boolean"}) |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("m") |
||||
end |
||||
|
||||
on_load(function (package) |
||||
if package:config("openmp") then |
||||
package:add("deps", "openmp") |
||||
end |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
local configs = { |
||||
openmp = package:config("openmp"), |
||||
sse = package:config("sse"), |
||||
neno = package:config("neno"), |
||||
} |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("blake2", {includes = "blake2.h"})) |
||||
end) |
@ -0,0 +1,29 @@ |
||||
add_rules("mode.release", "mode.debug") |
||||
|
||||
target("blake3") |
||||
set_kind("$(kind)") |
||||
add_files("c/blake3.c", "c/blake3_dispatch.c", "c/blake3_portable.c") |
||||
add_headerfiles("c/blake3.h") |
||||
|
||||
if is_arch("x86_64", "x64") then |
||||
if is_subhost("msys", "cygwin") then |
||||
add_files("c/*x86-64_windows_gnu.S") |
||||
elseif is_plat("windows") then |
||||
add_files("c/*x86-64_windows_msvc.asm") |
||||
else |
||||
add_files("c/*x86-64_unix.S") |
||||
end |
||||
elseif is_arch("x86", "i386") then |
||||
add_files("c/blake3_portable.c") |
||||
add_files("c/blake3_sse2.c") |
||||
add_files("c/blake3_sse41.c") |
||||
add_files("c/blake3_avx2.c") |
||||
add_files("c/blake3_avx512.c") |
||||
elseif is_arch("arm64", "arm64-v8a") then |
||||
add_files("c/blake3_neon.c") |
||||
add_defines("BLAKE3_USE_NEON=1") |
||||
end |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all") |
||||
end |
@ -0,0 +1,22 @@ |
||||
diff --git a/tools/build/src/tools/msvc.jam b/tools/build/src/tools/msvc.jam
|
||||
index 54a6ced..bac3932 100644
|
||||
--- a/tools/build/src/tools/msvc.jam
|
||||
+++ b/tools/build/src/tools/msvc.jam
|
||||
@@ -1137,7 +1137,7 @@ local rule generate-setup-cmd ( version : command : parent : options * : cpu : g
|
||||
}
|
||||
else
|
||||
{
|
||||
- if [ MATCH "(14.3)" : $(version) ]
|
||||
+ if [ MATCH "(14.[34])" : $(version) ]
|
||||
{
|
||||
if $(.debug-configuration)
|
||||
{
|
||||
@@ -1316,7 +1316,7 @@ local rule configure-really ( version ? : options * )
|
||||
# version from the path.
|
||||
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
|
||||
# 9.0express as 9.0 here.
|
||||
- if [ MATCH "(MSVC\\\\14.3)" : $(command) ]
|
||||
+ if [ MATCH "(MSVC\\\\14.[34])" : $(command) ]
|
||||
{
|
||||
version = 14.3 ;
|
||||
}
|
@ -0,0 +1,334 @@ |
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 1845638..76f632c 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -314,8 +314,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__includecl_HEADERS_DIST) $(am__includeclc_HEADERS_DIST) \
|
||||
$(am__includecldwc_HEADERS_DIST) \
|
||||
$(am__includeclh_HEADERS_DIST) $(am__includeclm_HEADERS_DIST) \
|
||||
- $(includegbc_HEADERS) $(am__includelss_HEADERS_DIST) \
|
||||
- $(includep_HEADERS) $(am__DIST_COMMON)
|
||||
+ $(includegbc_HEADERS) $(includep_HEADERS) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
@@ -340,7 +339,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
|
||||
"$(DESTDIR)$(includecldir)" "$(DESTDIR)$(includeclcdir)" \
|
||||
"$(DESTDIR)$(includecldwcdir)" "$(DESTDIR)$(includeclhdir)" \
|
||||
"$(DESTDIR)$(includeclmdir)" "$(DESTDIR)$(includegbcdir)" \
|
||||
- "$(DESTDIR)$(includelssdir)" "$(DESTDIR)$(includepdir)"
|
||||
+ "$(DESTDIR)$(includepdir)"
|
||||
@DISABLE_PROCESSOR_FALSE@am__EXEEXT_5 = src/common/test_assembler_unittest$(EXEEXT) \
|
||||
@DISABLE_PROCESSOR_FALSE@ src/common/dwarf/dwarf2reader_lineinfo_unittest$(EXEEXT) \
|
||||
@DISABLE_PROCESSOR_FALSE@ src/common/dwarf/dwarf2reader_splitfunctions_unittest$(EXEEXT) \
|
||||
@@ -1926,12 +1925,10 @@ am__includeclh_HEADERS_DIST = \
|
||||
$(top_srcdir)/src/client/linux/handler/*.h
|
||||
am__includeclm_HEADERS_DIST = \
|
||||
$(top_srcdir)/src/client/linux/minidump_writer/*.h
|
||||
-am__includelss_HEADERS_DIST = $(top_srcdir)/src/third_party/lss/*.h
|
||||
HEADERS = $(includec_HEADERS) $(includecl_HEADERS) \
|
||||
$(includeclc_HEADERS) $(includecldwc_HEADERS) \
|
||||
$(includeclh_HEADERS) $(includeclm_HEADERS) \
|
||||
- $(includegbc_HEADERS) $(includelss_HEADERS) \
|
||||
- $(includep_HEADERS)
|
||||
+ $(includegbc_HEADERS) $(includep_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
@@ -9914,8 +9911,7 @@ install-data-am: install-dist_docDATA install-includecHEADERS \
|
||||
install-includeclHEADERS install-includeclcHEADERS \
|
||||
install-includecldwcHEADERS install-includeclhHEADERS \
|
||||
install-includeclmHEADERS install-includegbcHEADERS \
|
||||
- install-includelssHEADERS install-includepHEADERS \
|
||||
- install-pkgconfigDATA
|
||||
+ install-includepHEADERS install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
@@ -10274,8 +10270,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \
|
||||
uninstall-includecHEADERS uninstall-includeclHEADERS \
|
||||
uninstall-includeclcHEADERS uninstall-includecldwcHEADERS \
|
||||
uninstall-includeclhHEADERS uninstall-includeclmHEADERS \
|
||||
- uninstall-includegbcHEADERS uninstall-includelssHEADERS \
|
||||
- uninstall-includepHEADERS uninstall-libLIBRARIES \
|
||||
+ uninstall-includegbcHEADERS uninstall-includepHEADERS uninstall-libLIBRARIES \
|
||||
uninstall-libexecPROGRAMS uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
@@ -10297,7 +10292,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \
|
||||
install-includeclHEADERS install-includeclcHEADERS \
|
||||
install-includecldwcHEADERS install-includeclhHEADERS \
|
||||
install-includeclmHEADERS install-includegbcHEADERS \
|
||||
- install-includelssHEADERS install-includepHEADERS install-info \
|
||||
+ install-includepHEADERS install-info \
|
||||
install-info-am install-libLIBRARIES install-libexecPROGRAMS \
|
||||
install-man install-pdf install-pdf-am install-pkgconfigDATA \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
@@ -10309,7 +10304,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \
|
||||
uninstall-includecHEADERS uninstall-includeclHEADERS \
|
||||
uninstall-includeclcHEADERS uninstall-includecldwcHEADERS \
|
||||
uninstall-includeclhHEADERS uninstall-includeclmHEADERS \
|
||||
- uninstall-includegbcHEADERS uninstall-includelssHEADERS \
|
||||
+ uninstall-includegbcHEADERS \
|
||||
uninstall-includepHEADERS uninstall-libLIBRARIES \
|
||||
uninstall-libexecPROGRAMS uninstall-pkgconfigDATA
|
||||
|
||||
diff --git a/src/client/linux/crash_generation/crash_generation_client.cc b/src/client/linux/crash_generation/crash_generation_client.cc
|
||||
index 020c614..85320eb 100644
|
||||
--- a/src/client/linux/crash_generation/crash_generation_client.cc
|
||||
+++ b/src/client/linux/crash_generation/crash_generation_client.cc
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "common/linux/eintr_wrapper.h"
|
||||
#include "common/linux/ignore_ret.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
|
||||
index 9e23c11..6afbf63 100644
|
||||
--- a/src/client/linux/handler/exception_handler.cc
|
||||
+++ b/src/client/linux/handler/exception_handler.cc
|
||||
@@ -98,7 +98,7 @@
|
||||
#include "client/linux/minidump_writer/linux_dumper.h"
|
||||
#include "client/linux/minidump_writer/minidump_writer.h"
|
||||
#include "common/linux/eintr_wrapper.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#include "linux/sched.h"
|
||||
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc
|
||||
index b2d8d46..5d4204a 100644
|
||||
--- a/src/client/linux/handler/exception_handler_unittest.cc
|
||||
+++ b/src/client/linux/handler/exception_handler_unittest.cc
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
#include "common/tests/auto_tempdir.h"
|
||||
#include "common/using_std_string.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
#include "google_breakpad/processor/minidump.h"
|
||||
|
||||
using namespace google_breakpad;
|
||||
diff --git a/src/client/linux/log/log.cc b/src/client/linux/log/log.cc
|
||||
index 2a48d7f..2d49581 100644
|
||||
--- a/src/client/linux/log/log.cc
|
||||
+++ b/src/client/linux/log/log.cc
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <android/log.h>
|
||||
#include <dlfcn.h>
|
||||
#else
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
#endif
|
||||
|
||||
namespace logger {
|
||||
diff --git a/src/client/linux/minidump_writer/cpu_set.h b/src/client/linux/minidump_writer/cpu_set.h
|
||||
index 70c1c75..9e198c0 100644
|
||||
--- a/src/client/linux/minidump_writer/cpu_set.h
|
||||
+++ b/src/client/linux/minidump_writer/cpu_set.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/client/linux/minidump_writer/directory_reader.h b/src/client/linux/minidump_writer/directory_reader.h
|
||||
index 62bba87..30daa74 100644
|
||||
--- a/src/client/linux/minidump_writer/directory_reader.h
|
||||
+++ b/src/client/linux/minidump_writer/directory_reader.h
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/client/linux/minidump_writer/line_reader.h b/src/client/linux/minidump_writer/line_reader.h
|
||||
index d54a67d..999f3e3 100644
|
||||
--- a/src/client/linux/minidump_writer/line_reader.h
|
||||
+++ b/src/client/linux/minidump_writer/line_reader.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/client/linux/minidump_writer/linux_dumper.cc b/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
index 85922a9..d78dce3 100644
|
||||
--- a/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
+++ b/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "common/linux/memory_mapped_file.h"
|
||||
#include "common/linux/safe_readlink.h"
|
||||
#include "google_breakpad/common/minidump_exception_linux.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
using google_breakpad::elf::FileID;
|
||||
|
||||
diff --git a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
index 5a135fd..e66dc46 100644
|
||||
--- a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
+++ b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/scoped_ptr.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
#if defined(__ARM_EABI__)
|
||||
#define TID_PTR_REGISTER "r3"
|
||||
diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
index 2adc39e..7572315 100644
|
||||
--- a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
+++ b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
@@ -60,7 +60,7 @@
|
||||
#include "client/linux/minidump_writer/directory_reader.h"
|
||||
#include "client/linux/minidump_writer/line_reader.h"
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
// Suspends a thread by attaching to it.
|
||||
static bool SuspendThread(pid_t pid) {
|
||||
diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
index a95dd25..ce0d07f 100644
|
||||
--- a/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
+++ b/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
@@ -82,7 +82,7 @@
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
#include "common/minidump_type_helper.h"
|
||||
#include "google_breakpad/common/minidump_format.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace {
|
||||
|
||||
diff --git a/src/client/linux/minidump_writer/proc_cpuinfo_reader.h b/src/client/linux/minidump_writer/proc_cpuinfo_reader.h
|
||||
index 5ae16df..4278341 100644
|
||||
--- a/src/client/linux/minidump_writer/proc_cpuinfo_reader.h
|
||||
+++ b/src/client/linux/minidump_writer/proc_cpuinfo_reader.h
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "client/linux/minidump_writer/line_reader.h"
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc
|
||||
index c00af36..c05f2e9 100644
|
||||
--- a/src/client/minidump_file_writer.cc
|
||||
+++ b/src/client/minidump_file_writer.cc
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
#include "common/string_conversion.h"
|
||||
#if defined(__linux__) && __linux__
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
diff --git a/src/common/linux/file_id.cc b/src/common/linux/file_id.cc
|
||||
index d8fcbd8..ef13264 100644
|
||||
--- a/src/common/linux/file_id.cc
|
||||
+++ b/src/common/linux/file_id.cc
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "common/linux/linux_libc_support.h"
|
||||
#include "common/linux/memory_mapped_file.h"
|
||||
#include "common/using_std_string.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
namespace elf {
|
||||
diff --git a/src/common/linux/memory_mapped_file.cc b/src/common/linux/memory_mapped_file.cc
|
||||
index a7b96eb..042915c 100644
|
||||
--- a/src/common/linux/memory_mapped_file.cc
|
||||
+++ b/src/common/linux/memory_mapped_file.cc
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/memory_range.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/common/linux/safe_readlink.cc b/src/common/linux/safe_readlink.cc
|
||||
index a42b01a..7093951 100644
|
||||
--- a/src/common/linux/safe_readlink.cc
|
||||
+++ b/src/common/linux/safe_readlink.cc
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
diff --git a/src/common/memory_allocator.h b/src/common/memory_allocator.h
|
||||
index 1c99913..37a3471 100644
|
||||
--- a/src/common/memory_allocator.h
|
||||
+++ b/src/common/memory_allocator.h
|
||||
@@ -46,7 +46,7 @@
|
||||
#define sys_munmap munmap
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#else
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
#endif
|
||||
|
||||
namespace google_breakpad {
|
||||
diff --git a/src/common/module.cc b/src/common/module.cc
|
||||
index 0eb5aad..b6f5da7 100644
|
||||
--- a/src/common/module.cc
|
||||
+++ b/src/common/module.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+#include <algorithm>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
diff --git a/src/processor/testdata/linux_test_app.cc b/src/processor/testdata/linux_test_app.cc
|
||||
index b0bbb66..38dffb5 100644
|
||||
--- a/src/processor/testdata/linux_test_app.cc
|
||||
+++ b/src/processor/testdata/linux_test_app.cc
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "client/linux/handler/exception_handler.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
|
||||
namespace {
|
||||
|
||||
diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc
|
||||
index 3e310bc..e2f02a4 100644
|
||||
--- a/src/tools/linux/md2core/minidump-2-core.cc
|
||||
+++ b/src/tools/linux/md2core/minidump-2-core.cc
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "common/using_std_string.h"
|
||||
#include "google_breakpad/common/breakpad_types.h"
|
||||
#include "google_breakpad/common/minidump_format.h"
|
||||
-#include "third_party/lss/linux_syscall_support.h"
|
||||
+#include "lss//linux_syscall_support.h"
|
||||
#include "tools/linux/md2core/minidump_memory_range.h"
|
||||
|
||||
#if ULONG_MAX == 0xffffffffffffffff
|
@ -0,0 +1,28 @@ |
||||
package("bredis") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/basiliscos/cpp-bredis") |
||||
set_description("Boost::ASIO low-level redis client (connector)") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/basiliscos/cpp-bredis/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/basiliscos/cpp-bredis.git") |
||||
|
||||
add_versions("v0.12", "c5a6aa58835d5ef8cd97c4ae7e677f6237ef4ee01ae4a609293e2351c01db6cc") |
||||
|
||||
add_deps("boost") |
||||
|
||||
if is_plat("windows", "mingw") then |
||||
add_syslinks("ws2_32") |
||||
end |
||||
|
||||
on_install("macosx", "linux", "windows", "bsd", "mingw", "cross", function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
bredis::bredis_category x; |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "bredis/Connection.hpp"})) |
||||
end) |
@ -1,24 +1,31 @@ |
||||
package("brynet") |
||||
|
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/IronsDu/brynet") |
||||
set_description("Header Only Cross platform high performance TCP network library using C++ 11") |
||||
set_description("A Header-Only cross-platform C++ TCP network library") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/IronsDu/brynet/archive/337c9f375800b46da77116687a61c00ce534b60f.tar.gz", |
||||
"https://github.com/IronsDu/brynet") |
||||
|
||||
set_urls("https://github.com/IronsDu/brynet/archive/v$(version).zip") |
||||
add_urls("https://github.com/IronsDu/brynet.git") |
||||
add_versions("1.0.9", "a264a6aaf3ec9fd5aa4029a8857be813be203ee7b93997b0c1c5c5e2c5f89a2a") |
||||
add_versions("2024.06.03", "d35271b8f635959c6507c3bba24ff1ee121c6f27db177564012e54654e813ab8") |
||||
|
||||
if is_plat("windows") then |
||||
add_syslinks("ws2_32") |
||||
end |
||||
add_configs("openssl", {description = "Enable openssl", default = false, type = "boolean"}) |
||||
|
||||
on_load(function (package) |
||||
if package:config("openssl") then |
||||
package:add("deps", "openssl") |
||||
package:add("defines", "BRYNET_USE_OPENSSL") |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "linux", "android", "cross", function (package) |
||||
on_install("!wasm", function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test(int argc, char** argv) { |
||||
auto service = brynet::net::TcpService::Create(); |
||||
void test() { |
||||
auto service = brynet::net::IOThreadTcpService::Create(); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = "brynet/net/TcpService.hpp"})) |
||||
end) |
||||
|
@ -0,0 +1,34 @@ |
||||
package("bytepack") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/farukeryilmaz/bytepack") |
||||
set_description("C++ Binary Serialization Made Easy: Header-only, configurable endianness, cross-platform, no IDL, no exceptions, and no macros") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/farukeryilmaz/bytepack/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/farukeryilmaz/bytepack.git") |
||||
|
||||
add_versions("v0.1.0", "7761cf51736d4e1a65ca69323182930967846eaed04adddfd316f59a5c2eb244") |
||||
|
||||
on_check(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <algorithm> |
||||
#include <string> |
||||
void test() { |
||||
std::string s{"xmake"}; |
||||
std::ranges::reverse(s.begin(), s.end()); |
||||
} |
||||
]]}, {configs = {languages = "c++20"}}), "package(bytepack) Require at least C++20.") |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <bytepack/bytepack.hpp> |
||||
void test() { |
||||
bytepack::binary_stream serializationStream(64); |
||||
} |
||||
]]}, {configs = {languages = "c++20"}})) |
||||
end) |
@ -0,0 +1,135 @@ |
||||
diff --git a/src/lib/thirdparty/apple/dnsinfo.h b/src/lib/thirdparty/apple/dnsinfo.h
|
||||
new file mode 100644
|
||||
index 0000000..e6a9ed1
|
||||
--- /dev/null
|
||||
+++ b/src/lib/thirdparty/apple/dnsinfo.h
|
||||
@@ -0,0 +1,128 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2004-2006, 2008, 2009, 2011-2013, 2015-2018 Apple Inc. All rights reserved.
|
||||
+ *
|
||||
+ * @APPLE_LICENSE_HEADER_START@
|
||||
+ *
|
||||
+ * This file contains Original Code and/or Modifications of Original Code
|
||||
+ * as defined in and that are subject to the Apple Public Source License
|
||||
+ * Version 2.0 (the 'License'). You may not use this file except in
|
||||
+ * compliance with the License. Please obtain a copy of the License at
|
||||
+ * http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
+ * file.
|
||||
+ *
|
||||
+ * The Original Code and all software distributed under the License are
|
||||
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
+ * Please see the License for the specific language governing rights and
|
||||
+ * limitations under the License.
|
||||
+ *
|
||||
+ * @APPLE_LICENSE_HEADER_END@
|
||||
+ */
|
||||
+
|
||||
+#ifndef __DNSINFO_H__
|
||||
+#define __DNSINFO_H__
|
||||
+
|
||||
+/*
|
||||
+ * These routines provide access to the systems DNS configuration
|
||||
+ */
|
||||
+
|
||||
+#include <os/availability.h>
|
||||
+#include <sys/cdefs.h>
|
||||
+#include <stdint.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
+
|
||||
+#define DNSINFO_VERSION 20170629
|
||||
+
|
||||
+#define DEFAULT_SEARCH_ORDER 200000 /* search order for the "default" resolver domain name */
|
||||
+
|
||||
+#define DNS_PTR(type, name) \
|
||||
+ union { \
|
||||
+ type name; \
|
||||
+ uint64_t _ ## name ## _p; \
|
||||
+ }
|
||||
+
|
||||
+#define DNS_VAR(type, name) \
|
||||
+ type name
|
||||
+
|
||||
+
|
||||
+#pragma pack(4)
|
||||
+typedef struct {
|
||||
+ struct in_addr address;
|
||||
+ struct in_addr mask;
|
||||
+} dns_sortaddr_t;
|
||||
+#pragma pack()
|
||||
+
|
||||
+
|
||||
+#pragma pack(4)
|
||||
+typedef struct {
|
||||
+ DNS_PTR(char *, domain); /* domain */
|
||||
+ DNS_VAR(int32_t, n_nameserver); /* # nameserver */
|
||||
+ DNS_PTR(struct sockaddr **, nameserver);
|
||||
+ DNS_VAR(uint16_t, port); /* port (in host byte order) */
|
||||
+ DNS_VAR(int32_t, n_search); /* # search */
|
||||
+ DNS_PTR(char **, search);
|
||||
+ DNS_VAR(int32_t, n_sortaddr); /* # sortaddr */
|
||||
+ DNS_PTR(dns_sortaddr_t **, sortaddr);
|
||||
+ DNS_PTR(char *, options); /* options */
|
||||
+ DNS_VAR(uint32_t, timeout); /* timeout */
|
||||
+ DNS_VAR(uint32_t, search_order); /* search_order */
|
||||
+ DNS_VAR(uint32_t, if_index);
|
||||
+ DNS_VAR(uint32_t, flags);
|
||||
+ DNS_VAR(uint32_t, reach_flags); /* SCNetworkReachabilityFlags */
|
||||
+ DNS_VAR(uint32_t, service_identifier);
|
||||
+ DNS_PTR(char *, cid); /* configuration identifer */
|
||||
+ DNS_PTR(char *, if_name); /* if_index interface name */
|
||||
+} dns_resolver_t;
|
||||
+#pragma pack()
|
||||
+
|
||||
+
|
||||
+#define DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS 0x0002 /* always requesting for A dns records in queries */
|
||||
+#define DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS 0x0004 /* always requesting for AAAA dns records in queries */
|
||||
+
|
||||
+#define DNS_RESOLVER_FLAGS_REQUEST_ALL_RECORDS \
|
||||
+ (DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS | DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS)
|
||||
+
|
||||
+#define DNS_RESOLVER_FLAGS_SCOPED 0x1000 /* configuration is for scoped questions */
|
||||
+#define DNS_RESOLVER_FLAGS_SERVICE_SPECIFIC 0x2000 /* configuration is service-specific */
|
||||
+#define DNS_RESOLVER_FLAGS_SUPPLEMENTAL 0x4000 /* supplemental match configuration */
|
||||
+
|
||||
+
|
||||
+#pragma pack(4)
|
||||
+typedef struct {
|
||||
+ DNS_VAR(int32_t, n_resolver); /* resolver configurations */
|
||||
+ DNS_PTR(dns_resolver_t **, resolver);
|
||||
+ DNS_VAR(int32_t, n_scoped_resolver); /* "scoped" resolver configurations */
|
||||
+ DNS_PTR(dns_resolver_t **, scoped_resolver);
|
||||
+ DNS_VAR(uint64_t, generation);
|
||||
+ DNS_VAR(int32_t, n_service_specific_resolver);
|
||||
+ DNS_PTR(dns_resolver_t **, service_specific_resolver);
|
||||
+ DNS_VAR(uint32_t, version);
|
||||
+} dns_config_t;
|
||||
+#pragma pack()
|
||||
+
|
||||
+
|
||||
+__BEGIN_DECLS
|
||||
+
|
||||
+/*
|
||||
+ * DNS configuration access APIs
|
||||
+ */
|
||||
+const char *
|
||||
+dns_configuration_notify_key (void) API_AVAILABLE(macos(10.4), ios(2.0));
|
||||
+
|
||||
+dns_config_t *
|
||||
+dns_configuration_copy (void) API_AVAILABLE(macos(10.4), ios(2.0));
|
||||
+
|
||||
+void
|
||||
+dns_configuration_free (dns_config_t *config) API_AVAILABLE(macos(10.4), ios(2.0));
|
||||
+
|
||||
+void
|
||||
+_dns_configuration_ack (dns_config_t *config,
|
||||
+ const char *bundle_id) API_AVAILABLE(macos(10.8), ios(6.0));
|
||||
+
|
||||
+__END_DECLS
|
||||
+
|
||||
+#endif /* __DNSINFO_H__ */
|
||||
\ No newline at end of file
|
@ -0,0 +1,29 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ea146a8..31373e5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -69,14 +69,12 @@ set(C4CORE_SRC_FILES
|
||||
c4/windows_push.hpp
|
||||
c4/c4core.natvis
|
||||
#
|
||||
- c4/ext/debugbreak/debugbreak.h
|
||||
c4/ext/rng/rng.hpp
|
||||
c4/ext/sg14/inplace_function.h
|
||||
)
|
||||
if(C4CORE_WITH_FASTFLOAT)
|
||||
list(APPEND C4CORE_SRC_FILES
|
||||
c4/ext/fast_float.hpp
|
||||
- c4/ext/fast_float_all.h
|
||||
)
|
||||
endif()
|
||||
set(C4CORE_AMALGAMATED ${C4CORE_SRC_DIR}/../src_singleheader/c4/c4core_all.hpp)
|
||||
@@ -97,6 +95,9 @@ c4_add_library(c4core
|
||||
)
|
||||
if(NOT C4CORE_WITH_FASTFLOAT)
|
||||
target_compile_definitions(c4core PUBLIC -DC4CORE_NO_FAST_FLOAT)
|
||||
+else()
|
||||
+ find_package(FastFloat REQUIRED CONFIG)
|
||||
+ target_link_libraries(c4core PUBLIC "FastFloat::fast_float")
|
||||
endif()
|
||||
if(C4CORE_NO_DEBUG_BREAK)
|
||||
target_compile_definitions(c4core PUBLIC -DC4_NO_DEBUG_BREAK)
|
@ -0,0 +1,57 @@ |
||||
package("c4core") |
||||
set_homepage("https://github.com/biojppm/c4core") |
||||
set_description("C++ utilities") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/biojppm/c4core/releases/download/v$(version)/c4core-$(version)-src.zip", |
||||
"https://github.com/biojppm/c4core.git") |
||||
|
||||
add_versions("0.2.2", "5a9508385daa5b2608ed007784d76586af21c5367411efe9ae26d5b4aea03305") |
||||
add_versions("0.2.1", "81ff1c0d15e24da6d76fdd1b6fdd903fa23d0df7c82e564f993147a4dac88773") |
||||
|
||||
add_configs("fast_float", {description = "use fastfloat to parse floats", default = false, type = "boolean"}) |
||||
add_configs("debugbreak", {description = "use debug break in debug builds", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_load(function (package) |
||||
if package:config("fast_float") then |
||||
package:add("deps", "fast_float") |
||||
else |
||||
package:add("defines", "C4CORE_NO_FAST_FLOAT") |
||||
end |
||||
if package:config("debugbreak") then |
||||
package:add("deps", "debugbreak") |
||||
else |
||||
package:add("defines", "C4_NO_DEBUG_BREAK") |
||||
end |
||||
|
||||
if package:config("fast_float") or package:config("debugbreak") then |
||||
package:add("patches", ">=0.2.1", "patches/0.2.1/cmake-deps.patch", "92c0c6510cc3b8cbd10b575b5b9d0defa2a19d19f24c1618a73d4f4636da4c9b") |
||||
end |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
if package:config("fast_float") then |
||||
io.replace("src/c4/ext/fast_float.hpp", "c4/ext/fast_float_all.h", "fast_float/fast_float.h", {plain = true}) |
||||
end |
||||
if package:config("debugbreak") then |
||||
io.replace("src/c4/error.hpp", "c4/ext/debugbreak/debugbreak.h", "debugbreak.h", {plain = true}) |
||||
end |
||||
|
||||
local configs = {} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
table.insert(configs, "-DC4CORE_WITH_FASTFLOAT=" .. (package:config("fast_float") and "ON" or "OFF")) |
||||
table.insert(configs, "-DC4CORE_NO_DEBUG_BREAK=" .. (package:config("debugbreak") and "OFF" or "ON")) |
||||
import("package.tools.cmake").install(package, configs, {packagedeps = "debugbreak"}) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
double value; |
||||
c4::from_chars("52.4354", &value); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "c4/charconv.hpp"})) |
||||
end) |
@ -0,0 +1,33 @@ |
||||
package("cdt") |
||||
set_homepage("https://artem-ogre.github.io/CDT/") |
||||
set_description("Constrained Delaunay Triangulation (C++)") |
||||
set_license("MPL-2.0") |
||||
|
||||
add_urls("https://github.com/artem-ogre/CDT/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/artem-ogre/CDT.git") |
||||
|
||||
add_versions("1.4.1", "86df99eb5f02a73eeb8c6ea45765eed0d7f206e8d4d9f6479f77e3c590ae5bb3") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
os.cd("CDT") |
||||
local configs = {"-DCDT_USE_AS_COMPILED_LIBRARY=ON"} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <CDT.h> |
||||
using namespace CDT; |
||||
void test() { |
||||
auto cdt = Triangulation<double>{}; |
||||
cdt.insertVertices({ |
||||
{0.0, 1e38}, |
||||
{1.0, 1e38}, |
||||
}); |
||||
} |
||||
]]}, {configs = {languages = "cxx17"}})) |
||||
end) |
@ -0,0 +1,113 @@ |
||||
package("centurion") |
||||
set_kind("library", { headeronly = true }) |
||||
set_homepage("https://github.com/albin-johansson/centurion") |
||||
set_description("A modern C++ wrapper library for SDL2 in order to improve type-safety, memory safety and overall ease-of-use.") |
||||
set_license("MIT") |
||||
|
||||
set_urls("https://github.com/albin-johansson/centurion/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/albin-johansson/centurion.git") |
||||
|
||||
add_versions("v7.3.0", "ad8b7c27074939fa46380a878e82c2b0365d1c4ad31b4a71bfcd5ce3ac0198e6") |
||||
|
||||
add_configs("pragma_once", { description = "Use #pragma once in centurion.hpp", default = true, type = "boolean" }) |
||||
add_configs("debug_macros", { description = "Include debug-only logging macros, such as CENTURION_LOG_INFO", default = true, type = "boolean" }) |
||||
|
||||
add_configs("sdl_image", { description = "Enable library components that rely on the SDL_image library", default = true, type = "boolean" }) |
||||
add_configs("sdl_mixer", { description = "Enable library components that rely on the SDL_mixer library", default = true, type = "boolean" }) |
||||
add_configs("sdl_ttf", { description = "Enable library components that rely on the SDL_ttf library", default = true, type = "boolean" }) |
||||
|
||||
add_configs("vulkan", { description = "Enable library components related to Vulkan", default = true, type = "boolean" }) |
||||
add_configs("opengl", { description = "Enable library components related to OpenGL", default = true, type = "boolean" }) |
||||
|
||||
if is_plat("wasm") then |
||||
add_configs("shared", { description = "Build shared library.", default = false, type = "boolean", readonly = true }) |
||||
end |
||||
|
||||
add_includedirs("include", "include/SDL2") |
||||
|
||||
on_load(function (package) |
||||
if package:config("shared") then |
||||
package:add("deps", "libsdl", { configs = { shared = true } }) |
||||
else |
||||
package:add("deps", "libsdl") |
||||
end |
||||
|
||||
if not package:config("pragma_once") then |
||||
package:add("defines", "CENTURION_NO_PRAGMA_ONCE") |
||||
end |
||||
if not package:config("debug_macros") then |
||||
package:add("defines", "CENTURION_NO_DEBUG_LOG_MACROS") |
||||
end |
||||
|
||||
if package:config("sdl_image") then |
||||
if package:config("shared") then |
||||
package:add("deps", "libsdl_image", { configs = { shared = true } }) |
||||
else |
||||
package:add("deps", "libsdl_image") |
||||
end |
||||
else |
||||
package:add("defines", "CENTURION_NO_SDL_IMAGE") |
||||
end |
||||
if package:config("sdl_mixer") then |
||||
if package:config("shared") then |
||||
package:add("deps", "libsdl_mixer", { configs = { shared = true } }) |
||||
else |
||||
package:add("deps", "libsdl_mixer") |
||||
end |
||||
else |
||||
package:add("defines", "CENTURION_NO_SDL_MIXER") |
||||
end |
||||
if package:config("sdl_ttf") then |
||||
if package:config("shared") then |
||||
package:add("deps", "libsdl_ttf", { configs = { shared = true } }) |
||||
else |
||||
package:add("deps", "libsdl_ttf") |
||||
end |
||||
else |
||||
package:add("defines", "CENTURION_NO_SDL_TTF") |
||||
end |
||||
|
||||
if not package:config("vulkan") then |
||||
package:add("defines", "CENTURION_NO_VULKAN") |
||||
end |
||||
if not package:config("opengl") then |
||||
package:add("defines", "CENTURION_NO_OPENGL") |
||||
end |
||||
end) |
||||
|
||||
on_install("!wasm", function (package) |
||||
os.cp("src/*", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({ test = [[ |
||||
int main() { |
||||
const cen::sdl sdl; |
||||
cen::window window { "Centurion" }; |
||||
cen::renderer renderer = window.make_renderer(); |
||||
window.show(); |
||||
window.hide(); |
||||
} |
||||
]] }, { configs = { languages = "c++17", defines = "SDL_MAIN_HANDLED" }, includes = "centurion.hpp" })) |
||||
if package:config("sdl_image") then |
||||
assert(package:check_cxxsnippets({ test = [[ |
||||
int main() { |
||||
const cen::img img; |
||||
} |
||||
]] }, { configs = { languages = "c++17", defines = "SDL_MAIN_HANDLED" }, includes = "centurion.hpp" })) |
||||
end |
||||
if package:config("sdl_mixer") then |
||||
assert(package:check_cxxsnippets({ test = [[ |
||||
int main() { |
||||
const cen::mix mix; |
||||
} |
||||
]] }, { configs = { languages = "c++17", defines = "SDL_MAIN_HANDLED" }, includes = "centurion.hpp" })) |
||||
end |
||||
if package:config("sdl_ttf") then |
||||
assert(package:check_cxxsnippets({ test = [[ |
||||
int main() { |
||||
const cen::ttf ttf; |
||||
} |
||||
]] }, { configs = { languages = "c++17", defines = "SDL_MAIN_HANDLED" }, includes = "centurion.hpp" })) |
||||
end |
||||
end) |
@ -0,0 +1,31 @@ |
||||
package("charls") |
||||
set_homepage("https://github.com/team-charls/charls") |
||||
set_description("CharLS, a C++ JPEG-LS library implementation") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/team-charls/charls/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/team-charls/charls.git") |
||||
|
||||
add_versions("2.4.2", "d1c2c35664976f1e43fec7764d72755e6a50a80f38eca70fcc7553cad4fe19d9") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
local configs = { |
||||
"-DCHARLS_BUILD_TESTS=OFF", |
||||
"-DCHARLS_BUILD_AFL_FUZZ_TEST=OFF", |
||||
"-DCHARLS_BUILD_LIBFUZZER_FUZZ_TEST=OFF", |
||||
"-DCHARLS_BUILD_SAMPLES=OFF", |
||||
"-DCHARLS_INSTALL=ON", |
||||
} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
if not package:config("shared") then |
||||
package:add("defines", "CHARLS_STATIC") |
||||
end |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("charls_jpegls_encoder_create", {includes = "charls/charls.h"})) |
||||
end) |
@ -0,0 +1,21 @@ |
||||
package("cmdparser") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/FlorianRappl/CmdParser") |
||||
set_description("A simple and lightweight command line parser using C++11.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/FlorianRappl/CmdParser.git") |
||||
|
||||
add_versions("2024.02.13", "0c28173f7914c0e47ff12b48f556baa8a5dd0721") |
||||
|
||||
on_install(function (package) |
||||
os.cp("cmdparser.hpp", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test(int argc, char** argv) { |
||||
cli::Parser parser(argc, argv); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = {"cmdparser.hpp"}})) |
||||
end) |
@ -0,0 +1,22 @@ |
||||
package("commata") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://furfurylic.github.io/commata/CommataSpecification.xml") |
||||
set_description("Just another header-only C++17 CSV parser") |
||||
set_license("Unlicense") |
||||
|
||||
add_urls("https://github.com/furfurylic/commata/archive/refs/tags/$(version)-rc.2.zip", |
||||
"https://github.com/furfurylic/commata.git") |
||||
add_versions("v1.0.0", "5f9ef542d10d5d04d296e609ae8931e09a157761c86630d71b2f397c6a205a75") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
using commata::stored_table; |
||||
void test() { |
||||
stored_table table; |
||||
} |
||||
]]}, {configs = {languages = "c++17"}, includes = "commata/stored_table.hpp"})) |
||||
end) |
@ -0,0 +1,29 @@ |
||||
package("cpp-async") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/microsoft/cpp-async") |
||||
set_description("Support types and functions for C++20 coroutines") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/microsoft/cpp-async/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/microsoft/cpp-async.git") |
||||
|
||||
add_versions("v1.1.0", "168681dfd999b7546d623f20d18072ce280502cf0bf3a829c2aec58741062a23") |
||||
|
||||
on_check(function (package) |
||||
assert(package:has_cxxincludes("coroutine", {configs = {languages = "c++20"}}), "package(cpp-async) Require at least C++20.") |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
os.cp("include/async", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <async/task.h> |
||||
#include <coroutine> |
||||
inline async::task<void> do_async() |
||||
{ |
||||
co_return; |
||||
} |
||||
]]}, {configs = {languages = "c++20"}})) |
||||
end) |
@ -0,0 +1,23 @@ |
||||
package("cpp-channel") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/andreiavrammsd/cpp-channel") |
||||
set_description("Thread-safe container for sharing data between threads") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/$(version).zip", |
||||
"https://github.com/andreiavrammsd/cpp-channel.git") |
||||
|
||||
add_versions("v0.8.3", "095102dd7be6a2087206fc22ec2e32b4eb687f25f8d57d36355290ffb203e4d7") |
||||
add_versions("v0.8.2", "36f234c40d59b90356d37b558a8918a86b128030ad5d42d8c6a627cfe81c8624") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
msd::channel<int> chan; |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "msd/channel.hpp"})) |
||||
end) |
@ -0,0 +1,49 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6d3c761..0689164 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -48,7 +48,7 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
# Generate header file for build
|
||||
-if(WIN32)
|
||||
+if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
set(DLL_VARIABLE "__declspec(dllexport)")
|
||||
elseif(HAVE_VISIBILITY)
|
||||
set(DLL_VARIABLE "__attribute__((__visibility__(\"default\")))")
|
||||
@@ -59,7 +59,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/cppp/reiconv.hpp.in" "${outp
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/windows/libcppp-reiconv.rc.in" "${CMAKE_BINARY_DIR}/windows/libcppp-reiconv.rc")
|
||||
|
||||
# Generate header file for install
|
||||
-if(WIN32)
|
||||
+if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
set(DLL_VARIABLE "__declspec(dllimport)")
|
||||
else()
|
||||
set(DLL_VARIABLE "")
|
||||
@@ -83,7 +83,7 @@ cppp_build_library(${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/lib/iconv.cpp" T
|
||||
|
||||
# Include test suite.
|
||||
include("tests/tests.cmake")
|
||||
-
|
||||
+if (NOT BUILD_SHARED_LIBS)
|
||||
# Install
|
||||
# Static
|
||||
# PERMISSIONS 0644
|
||||
@@ -94,7 +94,7 @@ install(TARGETS libcppp-reiconv.static
|
||||
ARCHIVE DESTINATION "${install_staticdir}"
|
||||
RUNTIME DESTINATION "${install_bindir}"
|
||||
INCLUDES DESTINATION "${install_includedir}" )
|
||||
-
|
||||
+else()
|
||||
# Shared
|
||||
# PERMISSIONS 0755
|
||||
install(TARGETS libcppp-reiconv.shared
|
||||
@@ -105,7 +105,7 @@ install(TARGETS libcppp-reiconv.shared
|
||||
ARCHIVE DESTINATION "${install_staticdir}"
|
||||
RUNTIME DESTINATION "${install_bindir}"
|
||||
INCLUDES DESTINATION "${install_includedir}" )
|
||||
-
|
||||
+endif()
|
||||
# Includes
|
||||
# install includes
|
||||
# PERMISSIONS 0644
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue