Merge branch 'dev' into suitesparse-add-extsources

suitesparse-add-extsources
star9029 3 months ago
commit bb1b256900
  1. 19
      .github/workflows/android.yml
  2. 15
      .github/workflows/android_windows.yml
  3. 2
      .github/workflows/deploy.yml
  4. 4
      .github/workflows/fedora.yml
  5. 2
      .github/workflows/mingw_msys2.yml
  6. 4
      .github/workflows/ubuntu_clang.yml
  7. 17
      packages/1/11zip/port/xmake.lua
  8. 28
      packages/1/11zip/xmake.lua
  9. 24
      packages/a/abseil/xmake.lua
  10. 2
      packages/a/actor-framework/xmake.lua
  11. 24
      packages/a/ada/xmake.lua
  12. 27
      packages/a/ade/patches/0.1.2/cmake-mingw.patch
  13. 30
      packages/a/ade/xmake.lua
  14. 27
      packages/a/algo_plus/xmake.lua
  15. 51
      packages/a/antlr4-runtime/xmake.lua
  16. 43
      packages/a/aom/xmake.lua
  17. 38
      packages/a/aqt/xmake.lua
  18. 1
      packages/a/arduinojson/xmake.lua
  19. 1
      packages/a/argparse/xmake.lua
  20. 31
      packages/a/argz/xmake.lua
  21. 22
      packages/a/asio2/patches/2.9/remove-const.patch
  22. 11
      packages/a/asio2/xmake.lua
  23. 14
      packages/a/asmjit/xmake.lua
  24. 4
      packages/a/asmtk/xmake.lua
  25. 1
      packages/a/assimp/xmake.lua
  26. 5
      packages/a/astc-encoder/xmake.lua
  27. 4
      packages/a/async_simple/xmake.lua
  28. 1
      packages/a/atomic_queue/xmake.lua
  29. 1
      packages/a/aws-c-auth/xmake.lua
  30. 3
      packages/a/aws-c-cal/xmake.lua
  31. 7
      packages/a/aws-c-common/xmake.lua
  32. 1
      packages/a/aws-c-event-stream/xmake.lua
  33. 2
      packages/a/aws-c-http/xmake.lua
  34. 5
      packages/a/aws-c-io/xmake.lua
  35. 1
      packages/a/aws-c-s3/xmake.lua
  36. 4
      packages/a/aws-c-sdkutils/xmake.lua
  37. 5
      packages/a/aws-crt-cpp/xmake.lua
  38. 60
      packages/a/aws-lc/xmake.lua
  39. 1
      packages/b/b2/xmake.lua
  40. 84
      packages/b/backward-cpp/xmake.lua
  41. 37
      packages/b/basisu/port/xmake.lua
  42. 43
      packages/b/basisu/xmake.lua
  43. 35
      packages/b/bdwgc/xmake.lua
  44. 1
      packages/b/benchmark/xmake.lua
  45. 28
      packages/b/bgfx/xmake.lua
  46. 25
      packages/b/binutils/xmake.lua
  47. 54
      packages/b/blake2/port/xmake.lua
  48. 37
      packages/b/blake2/xmake.lua
  49. 29
      packages/b/blake3/port/xmake.lua
  50. 47
      packages/b/blake3/xmake.lua
  51. 45
      packages/b/blend2d/xmake.lua
  52. 1
      packages/b/blosc/xmake.lua
  53. 22
      packages/b/boost/patches/1.85.0/fix-v144.patch
  54. 233
      packages/b/boost/xmake.lua
  55. 1
      packages/b/boost_ut/xmake.lua
  56. 1
      packages/b/botan/xmake.lua
  57. 334
      packages/b/breakpad/patches/v2023.06.01/linux_syscall_support.patch
  58. 16
      packages/b/breakpad/xmake.lua
  59. 28
      packages/b/bredis/xmake.lua
  60. 4
      packages/b/brpc/xmake.lua
  61. 29
      packages/b/brynet/xmake.lua
  62. 29
      packages/b/bvh/xmake.lua
  63. 34
      packages/b/bytepack/xmake.lua
  64. 135
      packages/c/c-ares/patches/1.29.0/macosx-header.patch
  65. 42
      packages/c/c-ares/xmake.lua
  66. 2
      packages/c/c-blosc2/xmake.lua
  67. 29
      packages/c/c4core/patches/0.2.1/cmake-deps.patch
  68. 57
      packages/c/c4core/xmake.lua
  69. 1
      packages/c/cargs/xmake.lua
  70. 17
      packages/c/catch2/xmake.lua
  71. 33
      packages/c/cdt/xmake.lua
  72. 113
      packages/c/centurion/xmake.lua
  73. 22
      packages/c/ceres-solver/xmake.lua
  74. 1
      packages/c/cgetopt/xmake.lua
  75. 1
      packages/c/cgif/xmake.lua
  76. 1
      packages/c/cgltf/xmake.lua
  77. 1
      packages/c/cgraph/xmake.lua
  78. 31
      packages/c/charls/xmake.lua
  79. 4
      packages/c/chipmunk2d/xmake.lua
  80. 3
      packages/c/cimg/xmake.lua
  81. 2
      packages/c/cimgui/xmake.lua
  82. 9
      packages/c/cinatra/xmake.lua
  83. 1
      packages/c/cli/xmake.lua
  84. 1
      packages/c/clove-unit/xmake.lua
  85. 14
      packages/c/cmake/xmake.lua
  86. 1
      packages/c/cmark/xmake.lua
  87. 21
      packages/c/cmdparser/xmake.lua
  88. 8
      packages/c/cminpack/xmake.lua
  89. 22
      packages/c/commata/xmake.lua
  90. 22
      packages/c/cosmocc/xmake.lua
  91. 29
      packages/c/cpp-async/xmake.lua
  92. 23
      packages/c/cpp-channel/xmake.lua
  93. 1
      packages/c/cpp-dump/xmake.lua
  94. 57
      packages/c/cpp-httplib/xmake.lua
  95. 1
      packages/c/cpp-lazy/xmake.lua
  96. 1
      packages/c/cpp-sort/xmake.lua
  97. 7
      packages/c/cppcheck/xmake.lua
  98. 27
      packages/c/cppfront/xmake.lua
  99. 49
      packages/c/cppp-reiconv/patches/2.1.0/cmake.patch
  100. 38
      packages/c/cppp-reiconv/xmake.lua
  101. Some files were not shown because too many files have changed in this diff Show More

@ -12,27 +12,27 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [armeabi-v7a, arm64-v8a]
ndk: ["r22", "r26b"]
ndk_sdkver: ["29", "21"]
ndk: ["r22", "r27"]
ndk_sdkver: ["21", "30"]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Android-${{ matrix.arch }}-${{ matrix.ndk }}-${{ matrix.ndk_sdkver }}
cancel-in-progress: true
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Android-${{ matrix.arch }}-${{ matrix.ndk }}-${{ matrix.ndk_sdkver }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: 'android'
actions-cache-folder: ".xmake-cache"
actions-cache-key: "android"
- name: Prepare
run: |
if test ${{ matrix.ndk }} = "r26b"; then
wget -q https://dl.google.com/android/repository/android-ndk-r26b-linux.zip
unzip -q -o ./android-ndk-r26b-linux.zip
if test ${{ matrix.ndk }} = "r27"; then
wget -q https://dl.google.com/android/repository/android-ndk-r27-linux.zip
unzip -q -o ./android-ndk-r27-linux.zip
else
wget -q https://dl.google.com/android/repository/android-ndk-r22-linux-x86_64.zip
unzip -q -o ./android-ndk-r22-linux-x86_64.zip
@ -41,4 +41,3 @@ jobs:
- name: Tests
run: |
xmake l ./scripts/test.lua -D -p android --ndk=`pwd`/android-ndk-${{ matrix.ndk }} --ndk_sdkver=${{ matrix.ndk_sdkver }} -a ${{ matrix.arch }}

@ -12,12 +12,12 @@ jobs:
fail-fast: false
matrix:
arch: [armeabi-v7a, arm64-v8a]
ndk: ["r22", "r26c"]
ndk_sdkver: ["29"]
ndk: ["r22", "r27"]
ndk_sdkver: ["30"]
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Android-Windows-${{ matrix.arch }}-${{ matrix.ndk }}-${{ matrix.ndk_sdkver }}
cancel-in-progress: true
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Android-Windows-${{ matrix.arch }}-${{ matrix.ndk }}-${{ matrix.ndk_sdkver }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
- uses: xmake-io/github-action-setup-xmake@v1
@ -33,9 +33,9 @@ jobs:
- name: Prepare
run: |
if ("${{ matrix.ndk }}" -eq "r26c") {
curl -fsSL "https://dl.google.com/android/repository/android-ndk-r26c-windows.zip" -o android-ndk-r26c-windows.zip
Expand-Archive ./android-ndk-r26c-windows.zip -DestinationPath ./ndk
if ("${{ matrix.ndk }}" -eq "r27") {
curl -fsSL "https://dl.google.com/android/repository/android-ndk-r27-windows.zip" -o android-ndk-r27-windows.zip
Expand-Archive ./android-ndk-r27-windows.zip -DestinationPath ./ndk
} else {
curl -fsSL "https://dl.google.com/android/repository/android-ndk-r22-windows-x86_64.zip" -o android-ndk-r22-windows-x86_64.zip
Expand-Archive ./android-ndk-r22-windows-x86_64.zip -DestinationPath ./ndk
@ -55,4 +55,3 @@ jobs:
Set-Item -Path Env:Path -Value ($Env:XMAKE_PROGRAM_DIR + ";" + $Env:Path)
xmake --version
xmake l ./scripts/test.lua -D -p android --ndk=D:/a/xmake-repo/xmake-repo/ndk/android-ndk-${{ matrix.ndk }} --ndk_sdkver=${{ matrix.ndk_sdkver }} -a ${{ matrix.arch }}

@ -3,7 +3,7 @@ name: Deploy
on:
push:
branches:
- master
- dev
jobs:
build:

@ -41,6 +41,4 @@ jobs:
env:
XMAKE_ROOT: y
run: |
xmake l ./scripts/test.lua -D -k ${{ matrix.kind }} -j1
xmake l ./scripts/test.lua -D -k ${{ matrix.kind }} -j4

@ -27,7 +27,7 @@ jobs:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: git base-devel unzip p7zip mingw-w64-${{ matrix.arch }}-toolchain
install: git base-devel unzip p7zip mingw-w64-${{ matrix.arch }}-toolchain mingw-w64-${{ matrix.arch }}-gcc-fortran
update: true
- name: Prepare

@ -36,8 +36,8 @@ jobs:
# https://apt.llvm.org/
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17 all
sudo ./llvm.sh 20 all
- name: Tests
run: |
xmake l ./scripts/test.lua -D --toolchain=clang-17 -k ${{ matrix.kind }}
xmake l ./scripts/test.lua -D --toolchain=clang-20 -k ${{ matrix.kind }}

@ -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)

@ -1,11 +1,11 @@
package("abseil")
set_homepage("https://abseil.io")
set_description("C++ Common Libraries")
set_license("Apache-2.0")
add_urls("https://github.com/abseil/abseil-cpp/archive/$(version).tar.gz",
"https://github.com/abseil/abseil-cpp.git")
add_versions("20200225.1", "0db0d26f43ba6806a8a3338da3e646bb581f0ca5359b3a201d8fb8e4752fd5f8")
add_versions("20210324.1", "441db7c09a0565376ecacf0085b2d4c2bbedde6115d7773551bc116212c2a8d6")
add_versions("20210324.2", "59b862f50e710277f8ede96f083a5bb8d7c9595376146838b9580be90374ee1f")
@ -15,12 +15,18 @@ package("abseil")
add_versions("20230802.1", "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed")
add_versions("20240116.1", "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a")
add_versions("20240116.2", "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc")
add_versions("20240722.0", "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3")
add_patches("20240116.1", "https://github.com/abseil/abseil-cpp/commit/3335e58f198e899a500b744163f9b883035a5217.patch", "f83278086b42bc997846d2b931a266678f96e2727fce6ffd98b2b58ce75fa0a3")
add_patches("20240116.2", "https://github.com/abseil/abseil-cpp/commit/3335e58f198e899a500b744163f9b883035a5217.patch", "f83278086b42bc997846d2b931a266678f96e2727fce6ffd98b2b58ce75fa0a3")
add_deps("cmake")
add_configs("cxx_standard", {description = "Select c++ standard to build.", default = "17", type = "string", values = {"14", "17", "20"}})
if is_plat("macosx") then
if is_plat("linux") then
add_syslinks("pthread")
elseif is_plat("macosx") then
add_frameworks("CoreFoundation")
end
@ -30,11 +36,13 @@ package("abseil")
end
end)
on_install("macosx", "linux", "windows", "mingw", "cross", function (package)
on_install(function (package)
if package:version() and package:version():eq("20230802.1") and package:is_plat("mingw") then
io.replace(path.join("absl", "synchronization", "internal", "pthread_waiter.h"), "#ifndef _WIN32", "#if !defined(_WIN32) && !defined(__MINGW32__)", {plain = true})
io.replace(path.join("absl", "synchronization", "internal", "win32_waiter.h"), "#if defined(_WIN32) && _WIN32_WINNT >= _WIN32_WINNT_VISTA", "#if defined(_WIN32) && !defined(__MINGW32__) && _WIN32_WINNT >= _WIN32_WINNT_VISTA", {plain = true})
end
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})
local configs = {"-DCMAKE_CXX_STANDARD=" .. package:config("cxx_standard"), "-DABSL_ENABLE_INSTALL=ON", "-DABSL_PROPAGATE_CXX_STD=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"))
@ -74,11 +82,11 @@ package("abseil")
#include <string>
#include <vector>
void test() {
std::vector<std::string> v = {"foo", "bar", "baz"};
std::string s = absl::StrJoin(v, "-");
int result = 0;
auto a = absl::SimpleAtoi("123", &result);
std::cout << "Joined string: " << s << "\\n";
std::vector<std::string> v = {"foo", "bar", "baz"};
std::string s = absl::StrJoin(v, "-");
int result = 0;
auto a = absl::SimpleAtoi("123", &result);
std::cout << "Joined string: " << s << "\\n";
}
]]}, {configs = {languages = "cxx17"}}))
end)

@ -6,6 +6,8 @@ package("actor-framework")
add_urls("https://github.com/actor-framework/actor-framework/archive/refs/tags/$(version).tar.gz",
"https://github.com/actor-framework/actor-framework.git")
add_versions("1.0.1", "635bdd6e3b70886f1d9aa75c48e5bdb4084afae1f159bbfe5ea91f99b0460f6b")
add_versions("1.0.0", "602018239d23a1805d35ebda704fd5c969a0693fc513fcf7459063b628459e5b")
add_versions("0.19.6", "48dc4c4abf5ab5a7c6f84b9259cc8be1b02c601d31893647ab44e143cdc4b6d5")
add_versions("0.19.2", "aa3fcc494424e0e20b177125458a6a6ed39c751a3d3d5193054e88bdf8a146d2")

@ -3,25 +3,27 @@ package("ada")
set_description("WHATWG-compliant and fast URL parser written in modern C++")
set_license("Apache-2.0")
set_urls("https://github.com/ada-url/ada/archive/refs/tags/v$(version).tar.gz",
set_urls("https://github.com/ada-url/ada/archive/refs/tags/$(version).tar.gz",
"https://github.com/ada-url/ada.git")
add_versions("2.7.8", "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75")
add_versions("2.7.7", "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554")
add_versions("2.7.6", "e2822783913c50b9f5c0f20b5259130a7bdc36e87aba1cc38a5de461fe45288f")
add_versions("2.3.1", "298992ec0958979090566c7835ea60c14f5330d6372ee092ef6eee1d2e6ac079")
add_versions("2.4.0", "14624f1dfd966fee85272688064714172ff70e6e304a1e1850f352a07e4c6dc7")
add_versions("2.4.1", "e9359937e7aeb8e5889515c0a9e22cd5da50e9b053038eb092135a0e64888fe7")
add_deps("cmake")
add_versions("v2.9.0", "8b992f0ce9134cb4eafb74b164d2ce2cb3af1900902162713b0e0c5ab0b6acd8")
add_versions("v2.8.0", "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139")
add_versions("v2.7.8", "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75")
add_versions("v2.7.7", "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554")
add_versions("v2.7.6", "e2822783913c50b9f5c0f20b5259130a7bdc36e87aba1cc38a5de461fe45288f")
add_versions("v2.3.1", "298992ec0958979090566c7835ea60c14f5330d6372ee092ef6eee1d2e6ac079")
add_versions("v2.4.0", "14624f1dfd966fee85272688064714172ff70e6e304a1e1850f352a07e4c6dc7")
add_versions("v2.4.1", "e9359937e7aeb8e5889515c0a9e22cd5da50e9b053038eb092135a0e64888fe7")
if is_plat("macosx") then
add_extsources("brew::ada-url")
end
on_install("windows", "linux", "macosx", "bsd", "mingw", "msys", "android", "iphoneos", "cross", function (package)
add_deps("cmake")
on_install(function (package)
local configs = {"-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, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
io.replace("CMakeLists.txt", "add_subdirectory(singleheader)", "", {plain = true})
io.replace("CMakeLists.txt", "add_subdirectory(tools)", "", {plain = true})

@ -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)

@ -4,24 +4,31 @@ package("aqt")
set_description("aqt: Another (unofficial) Qt CLI Installer on multi-platforms")
set_license("MIT")
add_configs("shared", {description = "Download shared binaries.", default = true, type = "boolean", readonly = true})
if is_host("windows") and (os.arch() == "x64" or os.arch() == "x86") then
add_configs("shared", {description = "Download shared binaries.", default = true, type = "boolean", readonly = true})
add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
add_configs("runtimes", {description = "Set compiler runtimes.", default = "MD", readonly = true})
if os.arch() == "x86" then
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x86_signed.exe", { alias = "signed" })
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x86.exe", { alias = "regular" })
add_versions("signed:3.1.6", "dc675b64caceaacaf2d2bd711fb7a005ab2bcf7f6a28702e52408965f65718ec")
add_versions("regular:3.1.6", "093b536fab2e3726a792cdb60292313c0c8950b8aa9b56ccdeff7adb1146f964")
add_versions("regular:3.0.2", "aac5d8949eed3f231bfc589736afe0f88372dc590182c8b3a2bed7c78952b944")
add_versions("regular:2.0.6", "b980985cfeb1cefef1d2ebab91ae4e648873a27fae8831deff8144661480c56a")
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x86.exe")
add_versions("3.1.17", "d3abbd3378907f2e3ebf3af3387590245bb04175e1a720d04463b047732e1cd2")
add_versions("3.1.6", "093b536fab2e3726a792cdb60292313c0c8950b8aa9b56ccdeff7adb1146f964")
add_versions("3.0.2", "aac5d8949eed3f231bfc589736afe0f88372dc590182c8b3a2bed7c78952b944")
add_versions("2.0.6", "b980985cfeb1cefef1d2ebab91ae4e648873a27fae8831deff8144661480c56a")
else
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x64.exe")
add_versions("3.1.17", "02acc10c6317a2a9f76464d5c26b129b836531f81938b2b222498c495d69fcdb")
add_versions("3.1.6", "4f7e3fbc2d155f903ed9597b7929201681ffb7628e97765511cc7efa8a60f3e6")
add_versions("3.0.2", "96e46eca0d18a899db00a26facd20c799f2400645aef6445d49f4bd0aeab0a3f")
add_versions("2.0.6", "b0ad07fe8fd2c094425449f3053598959e467833dadf509da948571259510078")
end
elseif is_host("macosx") and (os.arch() == "arm64" or os.arch() == "x86_64") then
if os.arch() == "arm64" then
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt-macos")
add_versions("3.1.17", "cb51decbc12500d2e3e4b743dd4abb86a91fd9f25a916cafe54572963acf0690")
else
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x64_signed.exe", { alias = "signed" })
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x64.exe", { alias = "regular" })
add_versions("signed:3.1.6", "ca988c2aedaed379d1672e95ed38f91be5e803a5f2947b25c29e8b28fb2bd5c8")
add_versions("regular:3.1.6", "4f7e3fbc2d155f903ed9597b7929201681ffb7628e97765511cc7efa8a60f3e6")
add_versions("regular:3.0.2", "96e46eca0d18a899db00a26facd20c799f2400645aef6445d49f4bd0aeab0a3f")
add_versions("regular:2.0.6", "b0ad07fe8fd2c094425449f3053598959e467833dadf509da948571259510078")
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt-macos")
add_versions("3.1.17", "cb51decbc12500d2e3e4b743dd4abb86a91fd9f25a916cafe54572963acf0690")
end
else
add_deps("7z")
@ -31,6 +38,9 @@ package("aqt")
on_install("@macosx", "@linux", "@windows", "@msys", function (package)
if is_host("windows") and (os.arch() == "x64" or os.arch() == "x86") then
os.cp(package:originfile(), path.join(package:installdir("bin"), "aqt.exe"))
elseif is_host("macosx") and (os.arch() == "arm64" or os.arch() == "x86_64") then
os.cp(package:originfile(), path.join(package:installdir("bin"), "aqt"))
os.vrunv("chmod", {"+x", path.join(package:installdir("bin"), "aqt")})
else
-- ensurepip has been dropped in recent releases
try {function () os.vrunv("python3", {"-m", "ensurepip"}) end}

@ -7,6 +7,7 @@ package("arduinojson")
add_urls("https://github.com/bblanchon/ArduinoJson/archive/refs/tags/$(version).tar.gz",
"https://github.com/bblanchon/ArduinoJson.git")
add_versions("v7.1.0", "74bc745527a274bcab85c6498de77da749627113c4921ccbcaf83daa7ac35dee")
add_versions("v7.0.4", "98ca14d98e9f1e8978ce5ad3ca0eeda3d22419d17586c60f299f369078929917")
add_versions("v7.0.3", "6da2d069e0caa0c829444912ee13e78bdf9cc600be632428a164c92e69528000")
add_versions("v6.21.4", "9551af9282372f6e64cf4009fc43be7f2df6eb96fe9c0aab44d4eed217d09747")

@ -6,6 +6,7 @@ package("argparse")
add_urls("https://github.com/p-ranav/argparse/archive/refs/tags/v$(version).zip",
"https://github.com/p-ranav/argparse.git")
add_versions("3.1", "3e5a59ab7688dcd1f918bc92051a10564113d4f36c3bbed3ef596c25e519a062")
add_versions("3.0", "674e724c2702f0bfef1619161815257a407e1babce30d908327729fba6ce4124")
add_versions("2.6", "ce4e58d527b83679bdcc4adfa852af7ec9df16b76c11637823ef642cb02d2618")
add_versions("2.7", "58cf098fd195895aeb9b9120d96f1e310994b2f44d72934c438ec91bf2191f46")

@ -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;
}

@ -1,17 +1,20 @@
package("asio2")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/zhllxt/asio2")
set_description("Header only c++ network library, based on asio, support tcp,udp,http,websocket,rpc,ssl,icmp,serial_port.")
set_license("BSL-1.0")
add_urls("https://github.com/zhllxt/asio2.git")
add_versions("2023.05.09", "ac8c79964d79020091e38fcbb4ae9dccccb3b03c")
add_urls("https://github.com/zhllxt/asio2/archive/refs/tags/$(version).zip",
"https://github.com/zhllxt/asio2.git")
add_versions("v2.9", "3ce0b41300954ffc13948bd51af6430e324b1c28e26d2eb5a83e775cf38c12b4")
add_patches("2.9", "patches/2.9/remove-const.patch", "6326f333ab2d0484c23bb3cd9cfd5a565030b5525d083677565a693f5f8803b6")
add_deps("asio", "cereal", "fmt", "openssl3")
add_deps("spdlog", { configs = { header_only = false, fmt_external = true } })
on_install("windows", "linux", "macosx", "mingw", "bsd", function (package)
on_install("windows", "linux", "macosx", "mingw", "bsd", "cross", function (package)
os.cp(path.join("include", "*"), package:installdir("include"))
end)

@ -1,25 +1,25 @@
package("asmjit")
set_homepage("https://asmjit.com/")
set_description("AsmJit is a lightweight library for machine code generation written in C++ language.")
set_license("zlib")
add_urls("https://github.com/asmjit/asmjit.git")
add_versions("2024.05.21", "55c5d6cef59619fb81014531b32f434a793cfb18")
add_versions("2024.03.09", "268bce7952883dec5015ae539906e9e9d7fb65a0")
add_versions("2022.01.18", "9a92d2f97260749f6f29dc93e53c743448f0137a")
add_versions("2021.06.27", "d02235b83434943b52a6d7c57118205c5082de08")
add_deps("cmake")
if is_plat("linux") then
add_syslinks("rt")
if is_plat("linux", "bsd") then
add_syslinks("pthread", "rt", "m")
end
on_load("windows", "macosx", "linux", function (package)
add_deps("cmake")
on_install("!iphoneos", function (package)
if not package:config("shared") then
package:add("defines", "ASMJIT_STATIC")
end
end)
on_install("windows", "macosx", "linux", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DASMJIT_STATIC=" .. (package:config("shared") and "OFF" or "ON"))

@ -4,11 +4,11 @@ package("asmtk")
set_license("zlib")
set_urls("https://github.com/asmjit/asmtk.git")
add_versions("2023.6.14", "6e25b8983fbd8bf455c01ed7c5dd40c99b789565")
add_versions("2023.07.18", "e2752c85d39da4b0c5c729737a6faa25286b8e0c")
add_deps("asmjit")
on_install("windows", "linux", "macosx", function (package)
on_install("!iphoneos", function (package)
if not package:config("shared") then
package:add("defines", "ASMTK_STATIC")
end

@ -5,6 +5,7 @@ package("assimp")
set_urls("https://github.com/assimp/assimp/archive/refs/tags/$(version).zip",
"https://github.com/assimp/assimp.git")
add_versions("v5.4.2", "03e38d123f6bf19a48658d197fd09c9a69db88c076b56a476ab2da9f5eb87dcc")
add_versions("v5.4.1", "08837ee7c50b98ca72d2c9e66510ca6640681db8800aa2d3b1fcd61ccc615113")
add_versions("v5.4.0", "0f3698e9ba0110df0b636dbdd95706e7e28d443ff3dbaf5828926c23bfff778d")
add_versions("v5.3.1", "f4020735fe4601de9d85cb335115568cce0e027a65e546dd8895081696d624bd")

@ -6,6 +6,7 @@ package("astc-encoder")
add_urls("https://github.com/ARM-software/astc-encoder/archive/refs/tags/$(version).tar.gz",
"https://github.com/ARM-software/astc-encoder.git")
add_versions("4.8.0", "6c12f4656be21a69cbacd9f2c817283405decb514072dc1dcf51fd9a0b659852")
add_versions("4.7.0", "a57c81f79055aa7c9f8c82ac5464284e3df9bba682895dee09fa35bd1fdbab93")
add_versions("4.6.1", "a73c7afadb2caba00339a8f715079d43f9b7e75cf57463477e5ac36ef7defd26")
@ -25,6 +26,8 @@ package("astc-encoder")
add_deps("cmake")
on_install("windows|x64", "windows|x86", "mingw|x86_64", "linux", function (package)
io.replace("Source/cmake_core.cmake", "-Werror", "", {plain = true})
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DASTCENC_SHAREDLIB=" .. (package:config("shared") and "ON" or "OFF"))
@ -63,7 +66,7 @@ package("astc-encoder")
astcenc_error status = astcenc_context_alloc(config, 1, &context);
}
]]}, {configs = {languages = "c++14"}}))
if package:config("cli") then
if package:config("cli") and (not package:is_cross()) then
os.vrun("astcenc -help")
end
end)

@ -16,6 +16,10 @@ package("async_simple")
add_deps("cmake")
on_load("windows", function (package)
package:set("kind", "library", {headeronly = true})
end)
on_install("windows", "linux", "macosx", function (package)
if package:version():le("1.3") then
io.replace("async_simple/CMakeLists.txt",

@ -6,6 +6,7 @@ package("atomic_queue")
add_urls("https://github.com/max0x7ba/atomic_queue/archive/refs/tags/$(version).tar.gz",
"https://github.com/max0x7ba/atomic_queue.git")
add_versions("v1.6.4", "e9c3ae4b850dc6503ee484748701f06f3737ad177c5cb31030f74e3fef40e282")
add_versions("v1.5", "599b76a0222e7b54118d6f0fb686845c9d323107f2de76b3f68292b057e5a99f")
add_versions("v1.6.3", "0ad6e0203d90367f6a4e496449dfd9ad65b80168fadafef4eac08820c6bda79c")

@ -6,6 +6,7 @@ package("aws-c-auth")
add_urls("https://github.com/awslabs/aws-c-auth/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-auth.git")
add_versions("v0.7.25", "8f7993f8fad2992ca19c00123ea16e72c4d13acbeeb6333061034a299274f081")
add_versions("v0.7.22", "f249a12a6ac319e929c005fb7efd5534c83d3af3a3a53722626ff60a494054bb")
add_versions("v0.7.18", "c705199655066f1f874bc3758683f32e288024196a22f28360d336231e45406f")
add_versions("v0.7.17", "8fe380255a71a2d5c9acd4979c135f9842135ce6385010ea562bc0b532bf5b84")

@ -6,6 +6,9 @@ package("aws-c-cal")
add_urls("https://github.com/awslabs/aws-c-cal/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-cal.git")
add_versions("v0.7.2", "265938e3f1d2baa6a555ec6b0a27c74d3f505cbe7c96f7539ada42d5a848dee9")
add_versions("v0.7.1", "2fbdc04d72d1f3af28b80fe3917f03f20c0a62bc22b6c7b3450486ee9cbe77f6")
add_versions("v0.6.15", "67dda8049a59bbb70cdb166f46f741bc3a8443c86009a1ae4cb7842964a76e0d")
add_versions("v0.6.14", "2326304b15bec45b212f6b738020c21afa41f9da295936687e103f9f2efb7b5e")
add_versions("v0.6.12", "1ec1bc9a50df8d620f226480b420ec69d4fefd3792fb4e877aa7e350c2b174dc")
add_versions("v0.6.11", "e1b0af88c14300e125e86ee010d4c731292851fff16cfb67eb6ba6036df2d648")

@ -6,6 +6,10 @@ package("aws-c-common")
add_urls("https://github.com/awslabs/aws-c-common/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-common.git")
add_versions("v0.9.27", "0c0eecbd7aa04f85b1bdddf6342789bc8052737c6e9aa2ca35e26caed41d06ba")
add_versions("v0.9.25", "443f3268387715e6e2c417a87114a6b42873aeeebc793d3f6f631323e7c48a80")
add_versions("v0.9.24", "715a15399fe6dce2971c222ecabea4276e42ba3465a63c175724fc0c80d7a888")
add_versions("v0.9.23", "adf838daf6a60aa31268522105b03262d745f529bc981d3ac665424133d6f91b")
add_versions("v0.9.19", "196430fda1bca2c77df7d9199232956d371a92f49ee48fd6c29ff969410ca0ed")
add_versions("v0.9.17", "82f1a88494c5563892f0e048f0f56acfe7e10e5aa3fe9267b956dbabcc043440")
add_versions("v0.9.15", "8f36c7a6a5d2e17365759d15591f800d3e76dcaa34a226389b92647cbd92393a")
@ -13,7 +17,6 @@ package("aws-c-common")
add_versions("v0.9.13", "6d2044fc58e5d7611610976602f3fc2173676726b00eed026526962c599ece1d")
add_versions("v0.9.3", "389eaac7f64d7d5a91ca3decad6810429eb5a65bbba54798b9beffcb4d1d1ed6")
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"})
if is_plat("wasm") then
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
end
@ -28,7 +31,7 @@ package("aws-c-common")
add_deps("cmake")
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "android", "iphoneos", "cross", "wasm", function (package)
on_install("!mingw or mingw|!i386", function (package)
local configs = {"-DBUILD_TESTING=OFF"}
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"))

@ -6,6 +6,7 @@ package("aws-c-event-stream")
add_urls("https://github.com/awslabs/aws-c-event-stream/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-event-stream.git")
add_versions("v0.4.3", "d7d82c38bae68d2287ac59972a76b2b6159e7a3d7c9b7edb1357495aa4d0c0de")
add_versions("v0.4.2", "c98b8fa05c2ca10aacfce7327b92a84669c2da95ccb8e7d7b3e3285fcec8beee")
add_versions("v0.4.1", "f8915fba57c86148f8df4c303ca6f31de6c23375de554ba8d6f9aef2a980e93e")
add_versions("v0.3.2", "3134b35a45e9f9d974c2b78ee44fd2ea0aebc04df80236b80692aa63bee2092e")

@ -6,6 +6,8 @@ package("aws-c-http")
add_urls("https://github.com/awslabs/aws-c-http/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-http.git")
add_versions("v0.8.7", "173ed7634c87485c2defbd9a96a246a79ec3f3659b28b235ac38e6e92d67392a")
add_versions("v0.8.2", "a76ba75e59e1ac169df3ec00c0d1c453db1a4db85ee8acd3282a85ee63d6b31c")
add_versions("v0.8.1", "83fb47e2d7956469bb328f16dea96663e96f8f20dc60dc4e9676b82804588530")
add_versions("v0.7.12", "0f92f295c96e10aa9c1e66ac73c038ee9d9c61e1be7551e721ee0dab9c89fc6f")

@ -6,6 +6,11 @@ package("aws-c-io")
add_urls("https://github.com/awslabs/aws-c-io/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-io.git")
add_versions("v0.14.18", "44e9dee181ed7d867d1cc2944f4b4669259b569fc56bdd6dd4c7c30440fc4bf8")
add_versions("v0.14.16", "bf78ab5dbeeaec2f55cb035e18c49ce8ba4e2ea7519e8b94e18ccd8851e39f4d")
add_versions("v0.14.14", "c62400e83232e6d7c04bacebf02d552f6699d90735d9b8b6ee5fae879735c458")
add_versions("v0.14.13", "1c228b1ed327e3a8518b89702ac0d93265cf50788038091e187c697cace7fa5a")
add_versions("v0.14.9", "3a3b7236f70209ac12b5bafa7dd81b75cc68b691a0aa0686d6d3b7e4bbe5fbc9")
add_versions("v0.14.8", "d50e21fdbd5170a4071fe067ef4ce297b02cb058ad47e118305e25f6e07d9cf0")
add_versions("v0.14.7", "ecf1f660d7d43913aa8a416be6a2027101ce87c3b241344342d608335b4df7d4")
add_versions("v0.14.6", "bb3af305af748185b1c7b17afa343e54f2d494ccff397402f1b17041b0967865")

@ -6,6 +6,7 @@ package("aws-c-s3")
add_urls("https://github.com/awslabs/aws-c-s3/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-s3.git")
add_versions("v0.6.0", "0a29dbb13ea003de3fd0d08a61fa705b1c753db4b35de9c464641432000f13ec")
add_versions("v0.5.9", "7a337195b295406658d163b6dac64ff81f7556291b8a8e79e58ebaa2d55178ee")
add_versions("v0.5.7", "2f2eab9bf90a319030fd3525953dc7ac00c8dc8c0d33e3f0338f2a3b554d3b6a")
add_versions("v0.3.17", "72fd93a2f9a7d9f205d66890da249944b86f9528216dc0321be153bf19b2ecd5")

@ -6,18 +6,18 @@ package("aws-c-sdkutils")
add_urls("https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-sdkutils.git")
add_versions("v0.1.19", "66bd7a8679703386aec1539407aaed0942a78032fe340ab44e810a3cf6d7e505")
add_versions("v0.1.16", "4a818563d7c6636b5b245f5d22d4d7c804fa33fc4ea6976e9c296d272f4966d3")
add_versions("v0.1.15", "15fa30b8b0a357128388f2f40ab0ba3df63742fd333cc2f89cb91a9169f03bdc")
add_versions("v0.1.12", "c876c3ce2918f1181c24829f599c8f06e29733f0bd6556d4c4fb523390561316")
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"})
if is_plat("wasm") then
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
end
add_deps("cmake", "aws-c-common")
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "android", "iphoneos", "cross", "wasm", function (package)
on_install("!mingw or mingw|!i386", function (package)
local aws_cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake")
local aws_c_common_configdir = package:dep("aws-c-common"):installdir("lib", "aws-c-common", "cmake")
if is_host("windows") then

@ -6,6 +6,11 @@ package("aws-crt-cpp")
add_urls("https://github.com/awslabs/aws-crt-cpp/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-crt-cpp.git")
add_versions("v0.27.5", "cc69252ee132f5cc76b1fcf1ebec574e88f7080b05caa8125aab5684b26a37b9")
add_versions("v0.27.4", "0554776a4cbbea016075f4a28698ff22818c5b948296171e1f76d0a787576f83")
add_versions("v0.27.2", "e17c82d7cc3b5e6e4300bc7e4794306e292b5281d212ead536000a8b5f5f1be4")
add_versions("v0.27.0", "e7601c8c5e6391013b6ad164d2dd7b970bf5dbb3693b9cc80c424bd6f42b79c8")
add_versions("v0.26.11", "23acb2b14019182dd73fe6779ec266ee4d8937f19a99803da6407937fa22db7d")
add_versions("v0.26.9", "5b5760d34fbbfcc971f561296e828de4c788750472fd9bd3ac20068a083620f2")
add_versions("v0.26.8", "36ced4fb54c8eb7325b4576134e01f93bfaca2709565b5ad036d198d703e4c8f")
add_versions("v0.26.4", "486113a556614b7b824e1aefec365a2261154fe06321b85601aefe2f65bd0706")

@ -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)

@ -6,6 +6,7 @@ package("b2")
set_license("BSL-1.0")
add_urls("https://github.com/bfgroup/b2/releases/download/$(version)/b2-$(version).zip")
add_versions("5.2.1", "493102f1dd3f50f2892ce61ee91bd362720ab3fd38fa2ea6912bb2c09da9faa3")
add_versions("5.1.0", "2bf9618a0baa132d22fdfebf6b40436329172e3ca4b7b8a33e06ed97cd603dad")
add_versions("5.0.1", "5d3b98c63ed4d0f6114f660bd4eca5df32afa332310878b35c0d0faa04a3b6dd")
add_versions("5.0.0", "d5f280f466b80b694ccb9696413375522d16e6f811918daeb44a917d5bd6c7b5")

@ -1,43 +1,95 @@
package("backward-cpp")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/bombela/backward-cpp")
set_description("Backward is a beautiful stack trace pretty printer for C++.")
set_license("MIT")
add_configs("bfd", {description = "Get stack trace with details about your sources by using libbfd from binutils.", default = false, type = "boolean"})
add_urls("https://github.com/bombela/backward-cpp/archive/refs/tags/$(version).zip",
"https://github.com/bombela/backward-cpp.git")
add_versions("v1.6", "9b07e12656ab9af8779a84e06865233b9e30fadbb063bf94dd81d318081db8c2")
add_configs("stack_walking", {description = "Choose stack walking library to use.", default = nil, type = "string", values = {"unwind", "libunwind", "backtrace"}})
add_configs("stack_details", {description = "Choose stack details library to use.", default = nil, type = "string", values = {"dw", "bfd", "dwarf", "backtrace_symbol"}})
if is_plat("mingw") then
add_patches("v1.6", path.join(os.scriptdir(), "patches", "v1.6", "link_to_imagehlp.patch"), "0a135b6d68970ff6609a3eb4deb2b10c317eee15ba980eb178b93402a97c957c")
add_patches("v1.6", "patches/v1.6/link_to_imagehlp.patch", "0a135b6d68970ff6609a3eb4deb2b10c317eee15ba980eb178b93402a97c957c")
if is_arch("i386") then
add_patches("v1.6", path.join(os.scriptdir(), "patches", "v1.6", "fix_32bit_ssize_t_typedef.patch"), "fb372fe5934984aecb00b3153f737f63a542ff9359d159a9bcb79c5d54963b42")
add_patches("v1.6", "patches/v1.6/fix_32bit_ssize_t_typedef.patch", "fb372fe5934984aecb00b3153f737f63a542ff9359d159a9bcb79c5d54963b42")
end
end
if is_plat("windows", "mingw") then
add_syslinks("psapi", "dbghelp")
elseif is_plat("linux", "bsd", "android") then
add_syslinks("dl", "m")
end
add_deps("cmake")
on_load("linux", "mingw@msys", "macos", function (package)
if package:config("bfd") then
package:add("deps", "binutils")
on_load(function (package)
local stack_walking = package:config("stack_walking")
if stack_walking == "libunwind" then
package:add("deps", "libunwind")
end
end)
on_install("linux", "mingw", "macosx", "windows|!arm*", function (package)
if package:config("bfd") and package:is_plat("linux", "mingw@msys", "macos") then
local stack_details = package:config("stack_details")
if stack_details == "dwarf" then
package:add("deps", "libdwarf", "libelf")
elseif stack_details == "dw" then
package:add("deps", "elfutils")
elseif stack_details == "bfd" then
package:add("deps", "binutils")
package:add("syslinks", "bfd")
package:add("defines", "BACKWARD_HAS_BFD=1")
end
local configs = {"-DBACKWARD_TESTS=OFF"}
package:add("defines", "BACKWARD_HAS_UNWIND=" .. (stack_walking == "unwind" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_LIBUNWIND=" .. (stack_walking == "libunwind" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_BACKTRACE=" .. (stack_walking == "backtrace" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_BACKTRACE_SYMBOL=" .. (stack_details == "backtrace_symbol" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_DW=" .. (stack_details == "dw" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_BFD=" .. (stack_details == "bfd" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_DWARF=" .. (stack_details == "dwarf" and "1" or "0"))
package:add("defines", "BACKWARD_HAS_PDB_SYMBOL=" .. (is_plat("windows") and "1" or "0"))
end)
on_install("(!windows or windows|!arm64) and !android and !bsd and !wasm and !cross", function (package)
local configs = {"-DBACKWARD_TESTS=OFF", "-DSTACK_DETAILS_AUTO_DETECT=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBACKWARD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
if package:config("shared") then
table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON")
end
end
local stack_walking = package:config("stack_walking")
local stack_details = package:config("stack_details")
table.insert(configs, "-DSTACK_WALKING_UNWIND=" .. ((stack_walking == "unwind") and "ON" or "OFF"))
table.insert(configs, "-DSTACK_WALKING_LIBUNWIND=" .. ((stack_walking == "libunwind") and "ON" or "OFF"))
table.insert(configs, "-DSTACK_WALKING_BACKTRACE=" .. ((stack_walking == "backtrace") and "ON" or "OFF"))
table.insert(configs, "-DSTACK_DETAILS_BACKTRACE_SYMBOL=" .. ((stack_walking == "backtrace_symbol") and "ON" or "OFF"))
table.insert(configs, "-DSTACK_DETAILS_DW=" .. ((stack_walking == "dw") and "ON" or "OFF"))
table.insert(configs, "-DSTACK_DETAILS_BFD=" .. ((stack_walking == "bfd") and "ON" or "OFF"))
table.insert(configs, "-DSTACK_DETAILS_DWARF=" .. ((stack_walking == "dwarf") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
os.mv(package:installdir("include/*.hpp"), package:installdir("include/backward"))
io.replace("backward.hpp", [[#pragma comment(lib, "psapi.lib")]], "", {plain = true})
io.replace("backward.hpp", [[#pragma comment(lib, "dbghelp.lib")]], "", {plain = true})
os.cp(package:installdir("include/*.hpp"), package:installdir("include/backward"))
os.cp(package:installdir("include/*.hpp"), package:installdir("lib/backward"))
end)
on_test(function (package)
assert(package:has_cxxtypes("backward::SignalHandling", {configs = {languages = "c++11"}, includes = "backward/backward.hpp"}))
assert(package:check_cxxsnippets({test = [[
void test() {
backward::Printer printer;
backward::StackTrace st;
}
]]}, {configs = {languages = "c++11"}, includes = "backward.hpp"}))
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)

@ -2,29 +2,36 @@ package("bdwgc")
set_homepage("https://www.hboehm.info/gc/")
set_description("The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)")
add_urls("https://github.com/ivmai/bdwgc/-/archive/$(version).tar.gz",
add_urls("https://github.com/ivmai/bdwgc/archive/refs/tags/$(version).tar.gz",
"https://github.com/ivmai/bdwgc.git")
add_versions("v8.2.6", "3bfc2b1dd385bfb46d2dab029211a66249a309795b6893f4e00554904999e40a")
add_versions("v8.2.4", "18e63ab1428bd52e691da107a6a56651c161210b11fbe22e2aa3c31f7fa00ca5")
add_deps("cmake")
add_deps("libatomic_ops")
on_install("macosx", "linux", "android", "iphoneos", function (package)
local configs = {}
if on_check then
on_check("android", function (package)
if package:is_arch("armeabi-v7a") then
local ndk = package:toolchain("ndk")
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) > 21, "package(bdwgc/armeabi-v7a): need ndk api level > 21")
end
end)
end
on_install("!wasm", function (package)
local configs = {"-Denable_docs=OFF", "-Dwith_libatomic_ops=ON"}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs, {packagedeps = "libatomic_ops"})
if package:is_plat("windows", "mingw", "cygwin") then
package:add("defines", (package:config("shared") and "GC_DLL" or "GC_NOT_DLL"))
end
end)
on_test(function (package)
assert(package:has_cfuncs({test=[[
void test() {
GC_INIT();
int *ptr = GC_MALLOC(sizeof(int));
*ptr = 42;
printf("Value: %d\n", *ptr);
return 0;
}
]]}),{configs = {includes = "gc.h"}})
assert(package:has_cfuncs("GC_init", {includes = "gc/gc.h"}))
end)

@ -18,6 +18,7 @@ package("benchmark")
add_versions("1.8.0", "ea2e94c24ddf6594d15c711c06ccd4486434d9cf3eca954e2af8a20c88f9f172")
add_versions("1.8.3", "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce")
add_versions("1.8.4", "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45")
add_versions("1.8.5", "d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a")
if is_plat("mingw") and is_subhost("msys") then
add_extsources("pacman::benchmark")

@ -8,13 +8,16 @@ package("bgfx")
add_versions("7816", "5ecddbf4d51e2dda2a56ae8cafef4810e3a45d87")
add_versions("8203", "484a5f0c25b53584a6b7fce0702a6bb580072d81")
add_versions("8674", "f42134876038027667ef7e47c9a612dca1051ef2")
add_versions("8752", "61c770b0f5f57cf10547107974099e604358bf69")
add_resources("7816", "bx", "https://github.com/bkaradzic/bx.git", "51f25ba638b9cb35eb2ac078f842a4bed0746d56")
add_resources("8203", "bx", "https://github.com/bkaradzic/bx.git", "b9501348c596b68e5e655a8308df5c55f61ecd80")
add_resources("8674", "bx", "https://github.com/bkaradzic/bx.git", "67dfdf34f642a4a807b75eb600f82f4f04027963")
add_resources("8752", "bx", "https://github.com/bkaradzic/bx.git", "0ec634e8fdf8c810f9911c686a8158088ae25379")
add_resources("7816", "bimg", "https://github.com/bkaradzic/bimg.git", "8355d36befc90c1db82fca8e54f38bfb7eeb3530")
add_resources("8203", "bimg", "https://github.com/bkaradzic/bimg.git", "663f724186e26caf46494e389ed82409106205fb")
add_resources("8674", "bimg", "https://github.com/bkaradzic/bimg.git", "964a5b85483cdf59a30dc006e9bd8bbdde6cb2be")
add_resources("8752", "bimg", "https://github.com/bkaradzic/bimg.git", "61a7e9ebe7e33c821cf80b0542dcf23088446f5b")
if is_plat("windows") then
add_syslinks("user32", "gdi32", "psapi")
@ -22,6 +25,8 @@ package("bgfx")
add_cxxflags("/Zc:__cplusplus")
elseif is_plat("macosx") then
add_frameworks("Metal", "QuartzCore", "Cocoa", "IOKit")
elseif is_plat("iphoneos") then
add_frameworks("OpenGLES", "CoreGraphics", "Metal", "QuartzCore", "UIKit")
elseif is_plat("linux") then
add_deps("libx11")
add_syslinks("GL", "pthread", "dl")
@ -29,7 +34,7 @@ package("bgfx")
add_deps("genie")
on_load("windows", "macosx", "linux", function (package)
on_load("windows", "macosx", "linux", "iphoneos", function (package)
local suffix = package:debug() and "Debug" or "Release"
for _, lib in ipairs({"bgfx", "bimg", "bx"}) do
package:add("links", lib .. suffix)
@ -37,12 +42,14 @@ package("bgfx")
package:add("defines", "BX_CONFIG_DEBUG=" .. (package:debug() and "1" or "0"))
end)
on_install("windows|native", "macosx", "linux", function (package)
on_install("windows|native", "macosx", "linux", "iphoneos", function (package)
local bxdir = package:resourcefile("bx")
local bimgdir = package:resourcefile("bimg")
local genie = is_host("windows") and "genie.exe" or "genie"
local args = {"--with-tools"}
local args = {}
if is_plat("windows|native", "macosx", "linux") then
args = {"--with-tools"}
end
if package:config("shared") then
table.insert(args, "--with-shared-lib")
end
@ -85,6 +92,12 @@ package("bgfx")
configs = {"-C",
".build/projects/gmake-" .. target,
"config=" .. mode:lower()}
elseif package:is_plat("iphoneos") then
target = "ios-arm64"
table.insert(args, "--gcc=" .. target)
configs = {"-C",
".build/projects/gmake-" .. target,
"config=" .. mode:lower()}
elseif package:is_plat("linux") then
table.insert(args, "--gcc=linux-gcc")
target = "linux" .. (package:is_arch("x86_64") and "64" or "32") .. "_gcc"
@ -92,15 +105,16 @@ package("bgfx")
".build/projects/gmake-linux",
"config=" .. mode:lower() .. (package:is_arch("x86_64") and "64" or "32")}
end
table.insert(args, "gmake")
table.insert(args, "gmake")
table.insert(args, "-j" .. os.cpuinfo("ncpu"))
local envs = make.buildenvs(package)
envs.BX_DIR = bxdir
envs.BIMG_DIR = bimgdir
os.vrunv(genie, args, {envs = envs})
make.build(package, configs)
if package:is_plat("macosx") then
if package:is_plat("macosx", "iphoneos") then
os.trycp(".build/" .. target .. "/bin/*.a|*example*", package:installdir("lib"))
os.trycp(".build/" .. target .. "/bin/*.dylib", package:installdir("lib"))
os.trycp(".build/" .. target .. "/bin/*|*.*", package:installdir("bin"))
@ -118,5 +132,5 @@ package("bgfx")
void test() {
bgfx::init();
}
]]}, {configs = {languages = "c++14"}, includes = "bgfx/bgfx.h"}))
]]}, {configs = {languages = "c++17"}, includes = "bgfx/bgfx.h"}))
end)

@ -19,6 +19,31 @@ package("binutils")
add_extsources("brew::binutils")
end
on_fetch("@linux", "@macosx", "@msys", function (package, opt)
if opt.system then
if package:is_binary() then
local tools = {"ld", "ranlib", "objcopy"}
for _, tool in ipairs(tools) do
if not package:find_tool(tool) then
return
end
end
return {}
elseif package:is_library() then
local libs = {"bfd", "ctf", "opcodes"}
local result
for _, lib in ipairs(libs) do
local libinfo = package:find_package("system::" .. lib)
if libinfo then
result = result or {links = {}}
table.insert(result.links, libinfo.links)
end
end
return result
end
end
end)
add_deps("bison")
on_install("@linux", "@macosx", "@msys", function (package)

@ -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

@ -5,49 +5,22 @@ package("blake3")
add_urls("https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/$(version).tar.gz",
"https://github.com/BLAKE3-team/BLAKE3.git")
add_versions("1.5.3", "ec9114480857334858e73b727199c573bfdbed6138a83be573f076d37e671fc1")
add_versions("1.5.2", "1bc38cd3cc501458054c3bb473e5e00338d6175121424040079025ea305ddef3")
add_versions("1.5.1", "822cd37f70152e5985433d2c50c8f6b2ec83aaf11aa31be9fe71486a91744f37")
add_versions("1.5.0", "f506140bc3af41d3432a4ce18b3b83b08eaa240e94ef161eb72b2e57cdc94c69")
add_versions("1.3.3", "27d2bc4ee5945ba75434859521042c949463ee7514ff17aaef328e23ef83fec0")
add_versions("1.3.1", "112becf0983b5c83efff07f20b458f2dbcdbd768fd46502e7ddd831b83550109")
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "mingw|x86_64", "android", "iphoneos", "cross", function (package)
local configs = {}
io.writefile("xmake.lua", [[
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")
if is_kind("shared") then
add_rules("utils.symbols.export_all")
end
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 package:config("shared") then
configs.kind = "shared"
end
if on_check then
on_check("mingw", function (package)
assert(package:is_arch("x86_64"), "package(blake3/mingw): Only suport x86_64 arch")
end)
end
on_install(function (package)
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
import("package.tools.xmake").install(package, configs)
end)

@ -3,29 +3,54 @@ package("blend2d")
set_description("2D Vector Graphics Engine Powered by a JIT Compiler")
set_license("zlib")
add_urls("https://github.com/blend2d/blend2d.git")
add_versions("2022.05.12", "84987c5f76c1b8f271e8556a4b87bcab78094c70")
set_urls("https://blend2d.com/download/blend2d-$(version).tar.gz",
"https://github.com/blend2d/blend2d.git")
add_versions("0.11.1", "f46d61b6aa477fea1a353a41f5906d4e861817ae059ed22fc6ecdd50ff859dd2")
add_configs("jit", {description = "Enable JIT compiler support", default = true, type = "boolean"})
add_deps("cmake")
add_deps("asmjit")
if is_plat("linux") then
if is_plat("linux", "bsd") then
add_syslinks("pthread")
end
on_check("windows", function (package)
import("core.tool.toolchain")
local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
if msvc and package:is_arch("arm.*") then
local vs = msvc:config("vs")
assert(vs and tonumber(vs) >= 2022, "package(blend2d/arm): need vs >= 2022")
end
end)
on_load(function (package)
package:add("deps", "asmjit", {configs = {shared = package:config("shared")}})
if package:config("jit") then
package:add("deps", "asmjit")
end
if not package:config("shared") then
package:add("defines", "BL_STATIC")
end
end)
on_install("windows", "macosx", "linux", function (package)
local configs = {"-DBLEND2D_TEST=OFF", "-DBLEND2D_NO_STDCXX=0"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
on_install("!iphoneos", function (package)
local configs = {}
if package:config("jit") then
table.insert(configs, "-DBLEND2D_EXTERNAL_ASMJIT=TRUE")
table.insert(configs, "-DBLEND2D_NO_JIT=OFF")
else
table.insert(configs, "-DBLEND2D_NO_JIT=ON")
end
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBLEND2D_STATIC=" .. (package:config("shared") and "FALSE" or "TRUE"))
io.replace("CMakeLists.txt", 'include("${ASMJIT_DIR}/CMakeLists.txt")', "", {plain = true})
import("package.tools.cmake").install(package, configs, {packagedeps = "asmjit"})
local cxflags
if package:is_plat("windows") and package:is_arch("arm.*") then
cxflags = "-D__ARM_NEON"
end
import("package.tools.cmake").install(package, configs, {cxflags = cxflags})
end)
on_test(function (package)

@ -6,6 +6,7 @@ package("blosc")
add_urls("https://github.com/Blosc/c-blosc/archive/refs/tags/$(version).tar.gz",
"https://github.com/Blosc/c-blosc.git")
add_versions("v1.21.6", "9fcd60301aae28f97f1301b735f966cc19e7c49b6b4321b839b4579a0c156f38")
add_versions("v1.21.5", "32e61961bbf81ffea6ff30e9d70fca36c86178afd3e3cfa13376adec8c687509")
add_versions("v1.21.4", "e72bd03827b8564bbb3dc3ea0d0e689b4863871ce3861d946f2efd7a186ecf3e")
add_versions("v1.21.1", "f387149eab24efa01c308e4cba0f59f64ccae57292ec9c794002232f7903b55b")

@ -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 ;
}

@ -1,5 +1,4 @@
package("boost")
set_homepage("https://www.boost.org/")
set_description("Collection of portable C++ source libraries.")
set_license("BSL-1.0")
@ -10,6 +9,7 @@ package("boost")
return version .. "/boost_" .. (version:gsub("%.", "_"))
end})
add_versions("1.86.0", "2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26")
add_versions("1.85.0", "f4a7d3f81b8a0f65067b769ea84135fd7b72896f4f59c7f405086c8c0dc61434")
add_versions("1.84.0", "4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95")
add_versions("1.83.0", "0c6049764e80aa32754acd7d4f179fd5551d8172a83b71532ae093e7384e98da")
@ -42,46 +42,55 @@ package("boost")
end
add_configs("pyver", {description = "python version x.y, etc. 3.10", default = "3.10"})
local libnames = {"fiber",
"coroutine",
"context",
"regex",
"system",
local libnames = {"atomic",
"charconv",
"chrono",
"cobalt",
"container",
"context",
"contract",
"coroutine",
"date_time",
"exception",
"timer",
"atomic",
"fiber",
"filesystem",
"graph",
"serialization",
"random",
"wave",
"date_time",
"locale",
"iostreams",
"program_options",
"test",
"chrono",
"contract",
"graph_parallel",
"headers",
"iostreams",
"json",
"locale",
"log",
"thread",
"filesystem",
"math",
"mpi",
"nowide",
"program_options",
"python",
"random",
"regex",
"serialization",
"stacktrace",
"type_erasure"}
"system",
"test",
"thread",
"timer",
"type_erasure",
"url",
"wave"}
add_configs("all", { description = "Enable all library modules support.", default = false, type = "boolean"})
add_configs("multi", { description = "Enable multi-thread support.", default = true, type = "boolean"})
for _, libname in ipairs(libnames) do
add_configs(libname, { description = "Enable " .. libname .. " library.", default = (libname == "filesystem"), type = "boolean"})
end
add_configs("zstd", {description = "enable zstd for iostreams", default = false, type = "boolean"})
add_configs("lzma", {description = "enable lzma for iostreams", default = false, type = "boolean"})
add_configs("zlib", {description = "enable zlib for iostreams", default = false, type = "boolean"})
add_configs("bzip2", {description = "enable bzip2 for iostreams", default = false, type = "boolean"})
on_load(function (package)
function get_linkname(package, libname)
local function get_linkname(package, libname)
local linkname
if package:is_plat("windows") then
linkname = (package:config("shared") and "boost_" or "libboost_") .. libname
@ -95,16 +104,15 @@ package("boost")
linkname = linkname .. "-mt"
end
if package:is_plat("windows") then
local vs_runtime = package:config("vs_runtime")
if package:config("shared") then
if package:debug() then
linkname = linkname .. "-gd"
end
elseif vs_runtime == "MT" then
linkname = linkname .. "-s"
elseif vs_runtime == "MTd" then
elseif package:config("asan") or package:has_runtime("MTd") then
linkname = linkname .. "-sgd"
elseif vs_runtime == "MDd" then
elseif package:has_runtime("MT") then
linkname = linkname .. "-s"
elseif package:config("asan") or package:has_runtime("MDd") then
linkname = linkname .. "-gd"
end
else
@ -114,10 +122,11 @@ package("boost")
end
return linkname
end
-- we need the fixed link order
local sublibs = {log = {"log_setup", "log"},
python = {"python", "numpy"},
stacktrace = {"stacktrace_backtrace", "stacktrace_basic"}}
python = {"python", "numpy"},
stacktrace = {"stacktrace_backtrace", "stacktrace_basic"}}
for _, libname in ipairs(libnames) do
local libs = sublibs[libname]
if libs then
@ -139,12 +148,35 @@ package("boost")
end
package:add("deps", "python " .. package:config("pyver") .. ".x", {configs = {headeronly = true}})
end
if package:config("zstd") then
package:add("deps", "zstd")
end
if package:config("lzma") then
package:add("deps", "xz")
end
if package:config("zlib") then
package:add("deps", "zlib")
end
if package:config("bzip2") then
package:add("deps", "bzip2")
end
if package:is_plat("windows") and package:version():le("1.85.0") then
local vs_toolset = package:toolchain("msvc"):config("vs_toolset")
if vs_toolset then
local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
local minor = vs_toolset_ver:minor()
if minor and minor >= 40 then
package:add("patches", "<=1.85.0", "patches/1.85.0/fix-v144.patch", "1ba99cb2e2f03a4ba489a32596c62e1310b6c73ba4d19afa8796bcf180c84422")
end
end
end
end)
on_install("macosx", "linux", "windows", "bsd", "mingw", "cross", function (package)
import("core.base.option")
function get_compiler(package, toolchain)
local function get_compiler(package, toolchain)
local cxx = package:build_getenv("cxx")
if package:is_plat("macosx") then
-- we uses ld/clang++ for link stdc++ for shared libraries
@ -233,6 +265,9 @@ package("boost")
if package:has_tool("cxx", "clang_cl") then
build_toolset = "clang-win"
build_toolchain = package:toolchain("clang-cl")
elseif package:has_tool("cxx", "clang") then
build_toolset = "clang-win"
build_toolchain = package:toolchain("clang") or package:toolchain("llvm")
elseif package:has_tool("cxx", "cl") then
build_toolset = "msvc"
build_toolchain = package:toolchain("msvc")
@ -242,9 +277,42 @@ package("boost")
end
end
local function config_deppath(file, depname, rule)
local dep = package:dep(depname)
local info = dep:fetch({external = false})
if info then
local includedirs = table.wrap(info.sysincludedirs or info.includedirs)
for i, dir in ipairs(includedirs) do
includedirs[i] = path.unix(dir)
end
local linkdirs = table.wrap(info.linkdirs)
for i, dir in ipairs(linkdirs) do
linkdirs[i] = path.unix(dir)
end
local links = table.wrap(info.links)
local usingstr = format("\nusing %s : %s : <include>%s <search>%s <name>%s ;",
rule, dep:version(),
table.concat(includedirs, ";"),
table.concat(linkdirs, ";"),
table.concat(links, ";"))
file:write(usingstr)
end
end
local file = io.open("user-config.jam", "w")
if file then
file:write(get_compiler(package, build_toolchain))
if package:config("lzma") then
config_deppath(file, "xz", "lzma")
end
if package:config("zstd") then
config_deppath(file, "zstd", "zstd")
end
if package:config("zlib") then
config_deppath(file, "zlib", "zlib")
end
if package:config("bzip2") then
config_deppath(file, "bzip2", "bzip2")
end
file:close()
end
os.vrun("./b2 headers")
@ -260,8 +328,6 @@ package("boost")
"-q", -- quit on first error
"--layout=tagged-1.66", -- prevent -x64 suffix in case cmake can't find it
"--user-config=user-config.jam",
"-sNO_LZMA=1",
"-sNO_ZSTD=1",
"install",
"threading=" .. (package:config("multi") and "multi" or "single"),
"debug-symbols=" .. (package:debug() and "on" or "off"),
@ -270,6 +336,24 @@ package("boost")
"runtime-debugging=" .. (package:is_debug() and "on" or "off")
}
local cxxflags = {}
if package:config("lzma") then
if package:is_plat("windows") and not package:dep("xz"):config("shared") then
table.insert(cxxflags, "-DLZMA_API_STATIC")
end
else
table.insert(argv, "-sNO_LZMA=1")
end
if not package:config("zstd") then
table.insert(argv, "-sNO_ZSTD=1")
end
if not package:config("zlib") then
table.insert(argv, "-sNO_ZLIB=1")
end
if not package:config("bzip2") then
table.insert(argv, "-sNO_BZIP2=1")
end
if package:config("lto") then
table.insert(argv, "lto=on")
end
@ -281,26 +365,29 @@ package("boost")
else
table.insert(argv, "address-model=32")
end
local cxxflags
local linkflags
local linkflags = {}
table.join2(cxxflags, table.wrap(package:config("cxflags")))
table.join2(cxxflags, table.wrap(package:config("cxxflags")))
if package:is_plat("windows") then
local vs_runtime = package:config("vs_runtime")
if package:config("shared") then
table.insert(argv, "runtime-link=shared")
elseif vs_runtime and vs_runtime:startswith("MT") then
elseif package:has_runtime("MT", "MTd") then
table.insert(argv, "runtime-link=static")
else
table.insert(argv, "runtime-link=shared")
end
table.insert(argv, "toolset=" .. build_toolset)
cxxflags = "-std:c++14"
table.insert(cxxflags, "-std:c++14")
elseif package:is_plat("mingw") then
table.insert(argv, "toolset=gcc")
elseif package:is_plat("macosx") then
table.insert(argv, "toolset=darwin")
-- fix macosx arm64 build issue https://github.com/microsoft/vcpkg/pull/18529
cxxflags = "-std=c++14 -arch " .. package:arch()
table.insert(cxxflags, "-std=c++14")
table.insert(cxxflags, "-arch")
table.insert(cxxflags, package:arch())
local xcode = package:toolchain("xcode") or import("core.tool.toolchain").load("xcode", {plat = package:plat(), arch = package:arch()})
if xcode:check() then
local xcode_dir = xcode:config("xcode")
@ -308,30 +395,35 @@ package("boost")
local target_minver = xcode:config("target_minver")
if xcode_dir and xcode_sdkver then
local xcode_sdkdir = xcode_dir .. "/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX" .. xcode_sdkver .. ".sdk"
cxxflags = cxxflags .. " -isysroot " .. xcode_sdkdir
table.insert(cxxflags, "-isysroot")
table.insert(cxxflags, xcode_sdkdir)
end
if target_minver then
cxxflags = cxxflags .. " -mmacosx-version-min=" .. target_minver
table.insert(cxxflags, "-mmacosx-version-min=" .. target_minver)
end
end
else
cxxflags = "-std=c++14"
table.insert(cxxflags, "-std=c++14")
if package:config("pic") ~= false then
cxxflags = cxxflags .. " -fPIC"
table.insert(cxxflags, "-fPIC")
end
end
if package.has_runtime and package:has_runtime("c++_shared", "c++_static") then
cxxflags = (cxxflags or "") .. " -stdlib=libc++"
linkflags = (linkflags or "") .. " -stdlib=libc++"
table.insert(cxxflags, "-stdlib=libc++")
table.insert(linkflags, "-stdlib=libc++")
if package:has_runtime("c++_static") then
linkflags = linkflags .. " -static-libstdc++"
table.insert(linkflags, "-static-libstdc++")
end
end
if package:config("asan") then
table.insert(cxxflags, "-fsanitize=address")
table.insert(linkflags, "-fsanitize=address")
end
if cxxflags then
table.insert(argv, "cxxflags=" .. cxxflags)
table.insert(argv, "cxxflags=" .. table.concat(cxxflags, " "))
end
if linkflags then
table.insert(argv, "linkflags=" .. linkflags)
table.insert(argv, "linkflags=" .. table.concat(linkflags, " "))
end
for _, libname in ipairs(libnames) do
if package:config("all") or package:config(libname) then
@ -342,7 +434,6 @@ package("boost")
if package:is_plat("linux") then
table.insert(argv, "pch=off")
end
local ok = os.execv("./b2", argv, {envs = runenvs, try = true, stdout = "boost-log.txt"})
if ok ~= 0 then
raise("boost build failed, please check log in " .. path.join(os.curdir(), "boost-log.txt"))
@ -361,6 +452,14 @@ package("boost")
}
]]}, {configs = {languages = "c++14"}}))
assert(package:check_cxxsnippets({test = [[
#include <boost/unordered_map.hpp>
static void test() {
boost::unordered_map<std::string, int> map;
map["2"] = 2;
}
]]}, {configs = {languages = "c++14"}}))
if package:config("date_time") then
assert(package:check_cxxsnippets({test = [[
#include <boost/date_time/gregorian/gregorian.hpp>
@ -369,4 +468,42 @@ package("boost")
}
]]}, {configs = {languages = "c++14"}}))
end
if package:config("filesystem") then
assert(package:check_cxxsnippets({test = [[
#include <boost/filesystem.hpp>
#include <iostream>
static void test() {
boost::filesystem::path path("/path/to/directory");
if (boost::filesystem::exists(path)) {
std::cout << "Directory exists" << std::endl;
} else {
std::cout << "Directory does not exist" << std::endl;
}
}
]]}, {configs = {languages = "c++14"}}))
end
if package:config("iostreams") then
if package:config("zstd") then
assert(package:check_cxxsnippets({test = [[
#include <boost/iostreams/filter/zstd.hpp>
#include <boost/iostreams/filtering_stream.hpp>
static void test() {
boost::iostreams::filtering_ostream out;
out.push(boost::iostreams::zstd_compressor());
}
]]}, {configs = {languages = "c++14"}}))
end
if package:config("lzma") then
assert(package:check_cxxsnippets({test = [[
#include <boost/iostreams/filter/lzma.hpp>
#include <boost/iostreams/filtering_stream.hpp>
static void test() {
boost::iostreams::filtering_ostream out;
out.push(boost::iostreams::lzma_compressor());
}
]]}, {configs = {languages = "c++14"}}))
end
end
end)

@ -6,6 +6,7 @@ package("boost_ut")
add_urls("https://github.com/boost-ext/ut/archive/refs/tags/$(version).tar.gz")
add_urls("https://github.com/boost-ext/ut.git")
add_versions("v2.1.0", "1c9c35c039ad3a9795a278447db6da0a4ec1a1d223bf7d64687ad28f673b7ae8")
add_versions("v1.1.9", "1a666513157905aa0e53a13fac602b5673dcafb04a869100a85cd3f000c2ed0d")
add_versions("v2.0.1", "1e43be17045a881c95cedc843d72fe9c1e53239b02ed179c1e39e041ebcd7dad")

@ -6,6 +6,7 @@ package("botan")
set_urls("https://github.com/randombit/botan/archive/refs/tags/$(version).tar.gz",
"https://github.com/randombit/botan.git")
add_versions("3.5.0", "7d91d3349e6029e1a6929a50ab587f9fd4e29a9af3f3d698553451365564001f")
add_versions("3.4.0", "6ef2a16a0527b1cfc9648a644877f7b95c4d07e8ef237273b030c623418c5e5b")
add_configs("tools", {description = "Build tools.", default = false, type = "boolean"})

@ -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

@ -6,6 +6,7 @@ package("breakpad")
"https://github.com/google/breakpad.git",
"https://chromium.googlesource.com/breakpad/breakpad.git")
add_versions("v2023.06.01", "81555be3595e25e8be0fe6dd34e9490beba224296e0a8a858341e7bced67674d")
add_versions("v2023.01.27", "f187e8c203bd506689ce4b32596ba821e1e2f034a83b8e07c2c635db4de3cc0b")
if is_plat("windows") then
@ -19,8 +20,12 @@ package("breakpad")
if is_plat("windows") then
add_syslinks("wininet", "dbghelp", "imagehlp")
elseif is_plat("linux") then
add_deps("autoconf", "automake", "m4", "libtool", "linux-syscall-support")
add_includedirs("include", "include/breakpad")
add_syslinks("pthread")
add_patches("v2023.06.01", path.join(os.scriptdir(), "patches", "v2023.06.01", "linux_syscall_support.patch"), "7e4c3b3e643d861155c956548a592f2a6bb54e13107cadb7cc0b0700dc1b2ae4")
elseif is_plat("macosx") then
add_deps("autoconf", "automake", "m4", "libtool")
add_frameworks("CoreFoundation")
end
@ -33,6 +38,15 @@ package("breakpad")
import("package.tools.xmake").install(package, configs)
end)
on_install("linux", function (package)
io.replace("configure", "WARN_CXXFLAGS \" -Werror\"", "WARN_CXXFLAGS ", {plain = true})
local configs = {"--disable-dependency-tracking", "CXXFLAGS=-std=gnu++17"}
if package:is_debug() then
table.insert(configs, "CXXFLAGS=-g")
end
import("package.tools.autoconf").install(package, configs, {packagedeps = "linux-syscall-support"})
end)
on_test(function (package)
local plat
local snippets
@ -63,5 +77,5 @@ package("breakpad")
end
local header = "client/" .. plat .. "/handler/exception_handler.h"
assert(package:check_cxxsnippets({test = snippets}, {configs = {languages = "c++11"}, includes = header}))
assert(package:check_cxxsnippets({test = snippets}, {configs = {languages = "c++17"}, includes = header}))
end)

@ -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,10 +1,11 @@
package("brpc")
set_homepage("https://github.com/apache/incubator-brpc")
set_homepage("https://brpc.apache.org")
set_description("brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc.")
set_license("Apache-2.0")
add_urls("https://github.com/apache/brpc/archive/refs/tags/$(version).tar.gz")
add_versions("1.10.0", "fe4eb10b4ca1a59e0f71086552b2d8897afd66df93b53c18ad83f6a93717cc2d")
add_versions("1.8.0", "13ffb2f1f57c679379a20367c744b3e597614a793ec036cd7580aae90798019d")
add_versions("1.7.0", "48668cbc943edd1b72551e99c58516249d15767b46ea13a843eb8df1d3d1bc42")
add_versions("1.6.1", "d9eb93683b0e4cb583aacdf2357c3e3e613fbf797c4fafd0eae1d09d5ea50964")
@ -12,6 +13,7 @@ package("brpc")
add_versions("1.5.0", "5ce178e3070ecdf9576a8917e3f65d96085f437bfbf9f1d09d46bca1375938cf")
add_versions("1.3.0", "b9d638b76725552ed11178c650d7fc95e30f252db7972a93dc309a0698c7d2b8")
add_patches("1.10.0", path.join(os.scriptdir(), "patches", "1.8.0", "cmake.patch"), "315889dcca66331932a8ce90bbdc5f71e336ca39d625ff85a589ee2bf10155ee")
add_patches("1.8.0", path.join(os.scriptdir(), "patches", "1.8.0", "cmake.patch"), "315889dcca66331932a8ce90bbdc5f71e336ca39d625ff85a589ee2bf10155ee")
add_patches("1.7.0", path.join(os.scriptdir(), "patches", "1.7.0", "cmake.patch"), "801920d6fcd20f3da68c1846dc22d26d2d320e48b06b6b5bd38bbed11e5ebd2c")
add_patches("1.6.1", path.join(os.scriptdir(), "patches", "1.6.1", "cmake.patch"), "046e590994ad302127d4cb7b1b2d8231db5f7c30c3948a0172d0dca9bef1da0b")

@ -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)

@ -1,18 +1,39 @@
package("bvh")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/madmann91/bvh")
set_description("A modern C++ BVH construction and traversal library")
set_license("MIT")
add_urls("https://github.com/madmann91/bvh.git")
add_versions("2023.6.30", "578b1e8035743d0a97fcac802de81622c54f28e3")
add_versions("2024.7.8", "77a08cac234bae46abbb5e78c73e8f3c158051d0")
on_install(function (package)
if not package:is_plat("cross") then
package:add("cxxflags", "-march=native")
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
add_configs("c_api", {description = "Builds the C API library wrapper", default = true, type = "boolean"})
if is_plat("bsd") then
add_syslinks("pthread")
end
on_load(function (package)
if not package:config("c_api") then
package:set("kind", "library", {headeronly = true})
end
end)
on_install(function (package)
os.cp("src/bvh", package:installdir("include"))
if package:config("c_api") then
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
set_languages("c++20")
target("bvh_c")
set_kind("shared")
add_defines("BVH_BUILD_API")
add_files("src/bvh/v2/c_api/bvh.cpp")
add_includedirs("src")
]])
import("package.tools.xmake").install(package)
end
end)
on_test(function (package)

@ -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

@ -1,12 +1,23 @@
package("c-ares")
set_homepage("https://c-ares.org/")
set_description("A C library for asynchronous DNS requests")
set_license("MIT")
add_urls("https://c-ares.org/download/c-ares-$(version).tar.gz")
add_urls("https://github.com/c-ares/c-ares/releases/download/cares-$(version).tar.gz", {version = function (version)
return version:gsub("%.", "_") .. "/c-ares-" .. version
add_urls("https://github.com/c-ares/c-ares/releases/download/$(version).tar.gz", {version = function (version)
if version:ge("1.30.0") then
return "v" .. version .. "/c-ares-" .. version
else
return "cares-" .. version:gsub("%.", "_") .. "/c-ares-" .. version
end
end})
add_versions("1.33.0", "3e41df2f172041eb4ecb754a464c11ccc5046b2a1c8b1d6a40dac45d3a3b2346")
add_versions("1.32.3", "5f02cc809aac3f6cc5edc1fac6c4423fd5616d7406ce47b904c24adf0ff2cd0f")
add_versions("1.32.2", "072ff6b30b9682d965b87eb9b77851dc1cd8e6d8090f6821a56bd8fa89595061")
add_versions("1.31.0", "0167a33dba96ca8de29f3f598b1e6cabe531799269fd63d0153aa0e6f5efeabd")
add_versions("1.30.0", "4fea312112021bcef081203b1ea020109842feb58cd8a36a3d3f7e0d8bc1138c")
add_versions("1.29.0", "0b89fa425b825c4c7bc708494f374ae69340e4d1fdc64523bdbb2750bfc02ea7")
add_versions("1.28.1", "675a69fc54ddbf42e6830bc671eeb6cd89eeca43828eb413243fd2c0a760809d")
add_versions("1.27.0", "0a72be66959955c43e2af2fbd03418e82a2bd5464604ec9a62147e37aceb420b")
add_versions("1.16.1", "d08312d0ecc3bd48eee0a4cc0d2137c9f194e0a28de2028928c0f6cae85f86ce")
@ -17,12 +28,11 @@ package("c-ares")
add_versions("1.18.1", "1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf")
add_versions("1.19.0", "bfceba37e23fd531293829002cac0401ef49a6dc55923f7f92236585b7ad1dd3")
add_patches("1.18.1",
path.join(os.scriptdir(), "patches", "1.18.1", "guard-imported-lib.patch" ),
"3cb03453af9e1477cfe926b1c03b2e3fbb8200a72888b590439e69e2d4253609")
add_patches("1.18.1",
path.join(os.scriptdir(), "patches", "1.18.1", "skip-docs.patch" ),
"bbe389b4aab052c2e6845e87d1f56a8366bf18c944f5e5e6f05a2cf105dbe680")
add_patches("1.29.0", "patches/1.29.0/macosx-header.patch", "389c12e54d82f0e8d5dc38dc15bbade12592509627680498774159a0cb32faf2")
add_patches("1.18.1", "patches/1.18.1/guard-imported-lib.patch", "3cb03453af9e1477cfe926b1c03b2e3fbb8200a72888b590439e69e2d4253609")
add_patches("1.18.1", "patches/1.18.1/skip-docs.patch", "bbe389b4aab052c2e6845e87d1f56a8366bf18c944f5e5e6f05a2cf105dbe680")
add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
if is_plat("macosx") then
add_syslinks("resolv")
@ -30,12 +40,14 @@ package("c-ares")
add_deps("cmake")
on_install("linux", "macosx", "windows", function (package)
local configs = {"-DCARES_BUILD_TESTS=OFF", "-DCARES_BUILD_TOOLS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DCARES_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCARES_STATIC=" .. (package:config("shared") and "OFF" or "ON"))
if not package:config("shared") then
on_install(function (package)
local shared = package:config("shared")
local configs = {"-DCARES_BUILD_TESTS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DCARES_SHARED=" .. (shared and "ON" or "OFF"))
table.insert(configs, "-DCARES_STATIC=" .. (shared and "OFF" or "ON"))
table.insert(configs, "-DCARES_BUILD_TOOLS=" .. (package:config("tools") and "ON" or "OFF"))
if not shared then
package:add("defines", "CARES_STATICLIB")
end
import("package.tools.cmake").install(package, configs)

@ -6,6 +6,8 @@ package("c-blosc2")
add_urls("https://github.com/Blosc/c-blosc2/archive/refs/tags/$(version).tar.gz",
"https://github.com/Blosc/c-blosc2.git")
add_versions("v2.15.1", "6cf32fcfc615542b9ba35e021635c8ab9fd3d328fd99d5bf04b7eebc80f1fae2")
add_versions("v2.15.0", "1e7d9d099963ad0123ddd76b2b715b5aa1ea4b95c491d3a11508e487ebab7307")
add_versions("v2.14.4", "b5533c79aacc9ac152c80760ed1295a6608938780c3e1eecd7e53ea72ad986b0")
add_versions("v2.14.3", "2b94c2014ba455e8136e16bf0738ec64c246fcc1a77122d824257caf64aaf441")
add_versions("v2.13.2", "f2adcd9615f138d1bb16dc27feadab1bb1eab01d77e5e2323d14ad4ca8c3ca21")

@ -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)

@ -5,6 +5,7 @@ package("cargs")
add_urls("https://github.com/likle/cargs/archive/refs/tags/$(version).tar.gz",
"https://github.com/likle/cargs.git")
add_versions("v1.2.0", "0b33379e3d3c8cb3e22f33d3e1a260adcd366970868bc9b7c47237f24188ff25")
add_versions("v1.1.0", "87e7da5b539f574d48529870cb0620ef5a244a5ee2eac73cc7559dedc04128ca")
add_versions("v1.0.3", "ddba25bd35e9c6c75bc706c126001b8ce8e084d40ef37050e6aa6963e836eb8b")

@ -5,6 +5,7 @@ package("catch2")
add_urls("https://github.com/catchorg/Catch2/archive/refs/tags/$(version).zip",
"https://github.com/catchorg/Catch2.git")
add_versions("v3.7.0", "75b04c94471a70680f10f5d0d985bd1a96b8941d040d6a7bfd43f6c6b1de9daf")
add_versions("v3.6.0", "aa0ebf551ffbf098ec1e253b5fee234c30b4ee54a31b1be63cb1a7735d3cf391")
add_versions("v3.5.4", "190a236fe0772ac4f5eebfdebfc18f92eeecfd270c55a1e5095ae4f10be2343f")
add_versions("v3.5.3", "2de1868288b26a19c2aebfc3fe53a748ec3ec5fc32cc742dfccaf6c685a0dc07")
@ -58,13 +59,6 @@ package("catch2")
link = link.."d"
end
component:add("links", link)
if package:is_plat("windows") then
if package:has_tool("cxx", "cl") then
component:add("ldflags", "-subsystem:console")
elseif package:has_tool("cxx", "clang", "clangxx") then
component:add("ldflags", "-Wl,/subsystem:console")
end
end
end)
on_component("lib", function (package, component)
@ -76,6 +70,15 @@ package("catch2")
end)
on_install(function (package)
if package:is_plat("windows") then
local main_component = package:component("main")
if package:has_tool("cxx", "cl") then
main_component:add("ldflags", "-subsystem:console")
elseif package:has_tool("cxx", "clang", "clangxx") then
main_component:add("ldflags", "-Wl,/subsystem:console")
end
end
if package:version():ge("3.0") then
local configs = {"-DCATCH_INSTALL_DOCS=OFF", "-DCATCH_BUILD_TESTING=OFF", "-DCATCH_BUILD_EXAMPLES=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))

@ -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)

@ -1,5 +1,4 @@
package("ceres-solver")
set_homepage("http://ceres-solver.org/")
set_description("Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems.")
set_license("BSD-3-Clause")
@ -11,25 +10,38 @@ package("ceres-solver")
add_patches("2.1.0", "patches/2.1.0/int64.patch", "1df14f30abf1a942204b408c780eabbeac0859ba5a6db3459b55c47479583c57")
add_configs("blas", {description = "Choose BLAS library to use.", default = "openblas", type = "string", values = {"mkl", "openblas"}})
add_configs("blas", {description = "Choose BLAS library to use.", default = "openblas", type = "string", values = {"mkl", "openblas"}})
add_configs("suitesparse", {description = "Enable SuiteSparse.", default = true, type = "boolean"})
add_configs("cuda", {description = "Enable CUDA support.", default = false, type = "boolean"})
add_deps("cmake", "eigen", "glog", "gflags")
on_load("windows", "linux", "macosx", function (package)
on_load(function (package)
if package:config("suitesparse") then
package:add("deps", "suitesparse", {configs = {blas = package:config("blas")}})
package:add("deps", "openmp")
end
if package:config("cuda") then
package:add("deps", "cuda")
end
end)
on_install("windows|x64", "windows|x86", "linux", "macosx", function (package)
local configs = {"-DBUILD_TESTING=OFF", "-DBUILD_DOCUMENTATION=OFF", "-DBUILD_EXAMPLES=OFF", "-DBUILD_BENCHMARKS=OFF", "-DCXSPARSE=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
local configs = {
"-DBUILD_TESTING=OFF",
"-DBUILD_DOCUMENTATION=OFF",
"-DBUILD_EXAMPLES=OFF",
"-DBUILD_BENCHMARKS=OFF",
"-DCXSPARSE=OFF"
}
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") then
table.insert(configs, "-DMSVC_USE_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
end
table.insert(configs, "-DSUITESPARSE=" .. (package:config("suitesparse") and "ON" or "OFF"))
table.insert(configs, "-DUSE_CUDA=" .. (package:config("cuda") and "ON" or "OFF"))
if package:config("suitesparse") then
import("package.tools.cmake").install(package, configs, {packagedeps = {"openmp", "libomp"}})
else

@ -2,6 +2,7 @@ package("cgetopt")
set_homepage("https://github.com/xq114/cgetopt/")
set_description("A GNU getopt() implementation written in pure C.")
set_license("zlib")
add_urls("https://github.com/xq114/cgetopt/archive/v$(version).tar.gz")
add_versions("1.0", "c93fe91041752f4231e07894d24354ee079317e40c30897bd664766ef4872279")

@ -6,6 +6,7 @@ package("cgif")
add_urls("https://github.com/dloebl/cgif/archive/refs/tags/$(version).tar.gz",
"https://github.com/dloebl/cgif.git")
add_versions("v0.4.1", "8666f9c5f8123d1c22137a6dd714502a330377fb74e2007621926fe4258529d5")
add_versions("v0.4.0", "130ff8a604f047449e81ddddf818bd0e03826b5f468e989b02726b16b7d4742e")
if is_plat("linux") then

@ -6,6 +6,7 @@ package("cgltf")
add_urls("https://github.com/jkuhlmann/cgltf/archive/refs/tags/$(version).tar.gz",
"https://github.com/jkuhlmann/cgltf.git")
add_versions("v1.14", "2f3c97a6b989943f50e7d7f228688f6558fe37b1411c13a350e3560d061707d8")
add_versions("v1.13", "053d5320097334767486c6e33d01dd1b1c6224eac82aac2d720f4ec456d8c50b")
on_install(function (package)

@ -7,6 +7,7 @@ package("cgraph")
add_urls("https://github.com/ChunelFeng/CGraph/archive/refs/tags/$(version).tar.gz",
"https://github.com/ChunelFeng/CGraph.git")
add_versions("v2.6.0", "1b055ee86f0340f2c35b4ed40c4a3b4cc05081b115b0fb634d778671018648f2")
add_versions("v2.5.4", "fd5a53dc0d7e3fc11050ccc13fac987196ad42184a4e244b9d5e5d698b1cb101")
if is_plat("windows") then

@ -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)

@ -22,7 +22,7 @@ package("chipmunk2d")
add_deps("cmake")
if is_plat("linux") then
if is_plat("linux", "bsd") then
add_syslinks("pthread", "m")
elseif is_plat("android") then
add_syslinks("log", "m")
@ -42,7 +42,7 @@ package("chipmunk2d")
end
end)
on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", "wasm", function (package)
on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", "wasm", "bsd",function (package)
local configs = {"-DBUILD_DEMOS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
if package:config("shared") then

@ -8,6 +8,9 @@ package("cimg")
return version:gsub("%v", "v.")
end})
add_urls("https://github.com/greyclab/cimg.git")
add_versions("v3.4.0", "987bddc3a98ec684c2ffc7968881adb2626f5b09c90e6102947b3c4acd0de931")
add_versions("v3.3.6", "7bb6621c38458152f3d1cae3f020e4ca6a314076cb7b4b5d6bbf324ad3d0ab88")
add_versions("v3.2.6", "1fcca9a7a453aa278660c10d54c6db9b4c614b6a29250adeb231e95a0be209e7")
if is_plat("windows") then

@ -23,7 +23,7 @@ package("cimgui")
add_defines("IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1")
add_deps("luajit")
add_deps("luajit", {private = true})
on_load(function (package)
if package:config("sdl2") then

@ -4,13 +4,14 @@ package("cinatra")
set_description("modern c++(c++20), cross-platform, header-only, easy to use http framework")
set_license("MIT")
add_urls("https://github.com/qicosmos/cinatra/archive/refs/tags/v$(version).tar.gz",
add_urls("https://github.com/qicosmos/cinatra/archive/refs/tags/$(version).tar.gz",
"https://github.com/qicosmos/cinatra.git")
add_versions("0.8.9", "007dc38aceedf42d03a9c05dc9aa6d2f303456ae7ce1100800df7a565b83b510")
add_versions("0.8.0", "4e14d5206408eccb43b3e810d3a1fe228fbc7496ded8a16b041ed12cbcce4479")
add_versions("0.9.1", "d1a8018e41caabbda2c380175b632e3c9c10b519727f6b998eda4e3f4ede84bd")
add_versions("v0.8.9", "007dc38aceedf42d03a9c05dc9aa6d2f303456ae7ce1100800df7a565b83b510")
add_versions("v0.8.0", "4e14d5206408eccb43b3e810d3a1fe228fbc7496ded8a16b041ed12cbcce4479")
add_patches("0.8.9", "patches/0.8.9/windows-move.patch", "c913ed0e9044ffc0ced40516245ec0d55262f8eabd30244d9911c3f0427a60f5")
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"})

@ -2,6 +2,7 @@ package("cli")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/daniele77/cli")
set_description("A library for interactive command line interfaces in modern C++")
set_license("BSL-1.0")
add_urls("https://github.com/daniele77/cli/archive/refs/tags/$(version).tar.gz",
"https://github.com/daniele77/cli.git")

@ -7,6 +7,7 @@ package("clove-unit")
add_urls("https://github.com/fdefelici/clove-unit/archive/refs/tags/$(version).tar.gz",
"https://github.com/fdefelici/clove-unit.git")
add_versions("v2.4.5", "e4db72612adf00d7c7c9512cb9990768f5f3e62a72039929b78ba17d5a6f4308")
add_versions("v2.4.4", "25e611e1d4286c73d9cce7bbc99f83e00629551602351fec1edcbb669243e047")
on_install(function (package)

@ -21,6 +21,8 @@ package("cmake")
add_versions("3.28.1", "0e0942bb5ed7ee1aeda0c00b3cb7738f2590865f1d69fe1d5212cbc26fc040a5")
add_versions("3.28.3", "d9e2c22fec920a4d1f6b0d0683c035d799475c179c91e41e1a7fbfab610a0305")
add_versions("3.29.2", "0d670b59dddd064d24cf8c386abf3590bda2642bb169e11534cf1e3d1ae3a76a")
add_versions("3.30.1", "51e12618829b811bba6f033ee8f39f6192da1b6abb20d82a7899d5134e879a4c")
add_versions("3.30.2", "c6fdda745f9ce69bca048e91955c7d043ba905d6388a62e0ff52b681ac17183c")
elseif is_host("linux") then
if os.arch():find("arm64.*") then
add_urls("https://cmake.org/files/v$(version)-aarch64.tar.gz", {version = function (version)
@ -34,6 +36,8 @@ package("cmake")
add_versions("3.28.1", "e84d88e46ed8c85fbe259bcd4ca07df7a928df87e84013e0da34d91b01a25d71")
add_versions("3.28.3", "bbf023139f944cefe731d944f2864d8ea3ea0c4f9310b46ac72b3cb4e314b023")
add_versions("3.29.2", "ca883c6dc3ce9eebd833804f0f940ecbbff603520cfd169ee58916dbbc23c2b8")
add_versions("3.30.1", "ad234996f8750f11d7bd0d17b03f55c434816adf1f1671aab9e8bab21a43286a")
add_versions("3.30.2", "d18f50f01b001303d21f53c6c16ff12ee3aa45df5da1899c2fe95be7426aa026")
else
add_urls("https://cmake.org/files/v$(version)-x86_64.tar.gz", {version = function (version)
return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version .. (version:ge("3.20") and "-linux" or "-Linux")
@ -52,6 +56,8 @@ package("cmake")
add_versions("3.28.1", "f76398c24362ad87bad1a3d6f1e8f4377632b5b1c360c4ba1fd7cd205fd9d8d4")
add_versions("3.28.3", "804d231460ab3c8b556a42d2660af4ac7a0e21c98a7f8ee3318a74b4a9a187a6")
add_versions("3.29.2", "0416c70cf88e8f92efcbfe292e181bc09ead7d70e29ab37b697522c01121eab5")
add_versions("3.30.1", "ac31f077ef3378641fa25a3cb980d21b2f083982d3149a8f2eb9154f2b53696b")
add_versions("3.30.2", "cdd7fb352605cee3ae53b0e18b5929b642900e33d6b0173e19f6d4f2067ebf16")
end
elseif is_host("windows") then
if os.arch() == "x64" then
@ -72,6 +78,8 @@ package("cmake")
add_versions("3.28.1", "671332249bc7cc7424523d6c2b5edd3e3de90a43b8b82e8782f42da4fe4c562d")
add_versions("3.28.3", "cac7916f7e1e73a25de857704c94fd5b72ba9fe2f055356b5602d2f960e50e5b")
add_versions("3.29.2", "86b5de51f60a0e9d62be4d8ca76ea467d154083d356fcc9af1409606be341cd8")
add_versions("3.30.1", "cf7788ff9d92812da194847d4ec874fc576f34079987d0f20c96cd09e2a16220")
add_versions("3.30.2", "48bf4b3dc2d668c578e0884cac7878e146b036ca6b5ce4f8b5572f861b004c25")
elseif os.arch() == "x86" then
add_urls("https://cmake.org/files/v$(version).zip", {excludes = {"*/doc/*"}, version = function (version)
return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version .. (version:ge("3.20") and "-windows-i386" or "-win32-x86")
@ -90,6 +98,8 @@ package("cmake")
add_versions("3.28.1", "e9591cfdb1d394eee84acdecf880cbd91cf0707dfd0d58bf3796b88475f46cb9")
add_versions("3.28.3", "411812b6b29ac793faf69bdbd36c612f72659363c5491b9f0a478915db3fc58c")
add_versions("3.29.2", "e51b281c9dfd1498834729b33bf49fc668ad1dadbc2eaba7b693d0f7d748450d")
add_versions("3.30.1", "f5fb1d93b82e9a5fbd5853d4b17a130605f0b4ed13a655d1371c2d6d55f9261d")
add_versions("3.30.2", "d01f7ea52097dd58aa225884b1ecc543827e9ef99d36dac2898609a0d5e60eb6")
elseif os.arch() == "arm64" then
add_urls("https://cmake.org/files/v$(version).zip", {excludes = {"*/doc/*"}, version = function (version)
return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version .. "-windows-arm64"
@ -100,6 +110,8 @@ package("cmake")
add_versions("3.28.1", "a839b8d32c11b24f078142b5b8c3361a955ebc65788f0f0353b2121fe2f74e49")
add_versions("3.28.3", "cfe023b7e82812ef802fb1ec619f6cfa2fdcb58ee61165fc315086286fe9cdcc")
add_versions("3.29.2", "5b16a0db4966c04582c40131038de49d5b0161fcd950dc9e955753dfab858882")
add_versions("3.30.1", "02b433f70aa549449be2d53046d0179590bf3b6290d9fda3fbbb23f96a4f2802")
add_versions("3.30.2", "c0cef52e8f60eb1c3058f8bc0b3803c27d79f066b7d7d94f46a2c689bbd36f22")
end
else
add_urls("https://github.com/Kitware/CMake/releases/download/v$(version)/cmake-$(version).tar.gz")
@ -112,6 +124,8 @@ package("cmake")
add_versions("3.28.1", "15e94f83e647f7d620a140a7a5da76349fc47a1bfed66d0f5cdee8e7344079ad")
add_versions("3.28.3", "72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1")
add_versions("3.29.2", "36db4b6926aab741ba6e4b2ea2d99c9193222132308b4dc824d4123cb730352e")
add_versions("3.30.1", "df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1")
add_versions("3.30.2", "46074c781eccebc433e98f0bbfa265ca3fd4381f245ca3b140e7711531d60db2")
end
if is_plat("mingw") and is_subhost("msys") then

@ -5,6 +5,7 @@ package("cmark")
add_urls("https://github.com/commonmark/cmark/archive/refs/tags/$(version).tar.gz",
"https://github.com/commonmark/cmark.git")
add_versions("0.31.1", "3da93db5469c30588cfeb283d9d62edfc6ded9eb0edc10a4f5bbfb7d722ea802")
add_versions("0.31.0", "bbcb8f8c03b5af33fcfcf11a74e9499f20a9043200b8552f78a6e8ba76e04d11")
add_deps("cmake")

@ -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)

@ -1,9 +1,11 @@
package("cminpack")
set_homepage("http://devernay.free.fr/hacks/cminpack/")
set_homepage("https://devernay.github.io/cminpack/")
set_description("A C/C++ rewrite of the MINPACK software (originally in FORTRAN) for solving nonlinear equations and nonlinear least squares problems")
add_urls("https://github.com/devernay/cminpack.git")
add_versions("2024.01.04", "cba7bcce88d93011411799ee3275caef18aaf7dd")
add_urls("https://github.com/devernay/cminpack/archive/$(version).tar.gz",
"https://github.com/devernay/cminpack.git")
add_versions("v1.3.9", "aa37bac5b5caaa4f5805ea5c4240e3834c993672f6dab0b17190ee645e251c9f")
add_configs("blas", {description = "Compile cminpack using cblas library if possible", default = false, type = "boolean"})

@ -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)

@ -2,12 +2,34 @@ package("cosmocc")
set_kind("toolchain")
set_homepage("https://github.com/jart/cosmopolitan")
set_description("build-once run-anywhere c library")
set_license("ISC")
add_urls("https://cosmo.zip/pub/cosmocc/cosmocc-$(version).zip",
"https://github.com/xmake-mirror/cosmopolitan/releases/download/$(version)/cosmocc-$(version).zip")
add_versions("3.2.4", "d2fa6dbf6f987310494581deff5b915dbdc5ca701f20f7613bb0dcf1de2ee511")
add_versions("3.3.2", "a695012ffbeac5e26e3c4a740debc15273f47e9a8bdc55e8b76a623154d5914b")
add_versions("3.3.4", "98e5b361c525603f5296351e0c11820fd25908b52fe1ce8ff394d66b1537a259")
add_versions("3.3.5", "db78fd8d3f8706e9dff4be72bf71d37a3f12062f212f407e1c33bc4af3780dd0")
add_versions("3.3.6", "26e3449357f31b82489774ef5c2d502a711bb711d4faf99a5fd6c96328a1c205")
add_versions("3.3.7", "638c2c2d9ba968c240e296b3cf901ac60d3a6d9205eff68356673db47a94d836")
add_versions("3.3.8", "61208872dea249fb9621e950a15f438d2db70b0ca3aa3e91f5e8d0b078fc328d")
add_versions("3.3.9", "0a8a781710f58373077a91ca16a2fafc30a0bc3982fb9b9c5583f045833eca36")
add_versions("3.3.10", "00d61c1215667314f66e288c8285bae38cc6137fca083e5bba6c74e3a52439de")
add_versions("3.4.0", "475e24b84a18973312433f5280e267acbe1b4dac1b2e2ebb3cfce46051a8c08c")
add_versions("3.5.0", "6c8443078ce43bf15bb835c8317d6d44e694e1572023263359c082afb7ec2224")
add_versions("3.5.1", "ea1f47cd4ead6ce3038551be164ad357bd45a4b5b7824871c561d2af23f871d6")
add_versions("3.5.2", "69d319eb6f5e9f2581949e60cea8e419e0d7d4095c0c79ac627f5a77490f6240")
add_versions("3.5.3", "4f0850a01a2d83417de21ee79bea09ffddeab4bf9061b072ddbe5522a28d73c6")
add_versions("3.5.4", "1e822906021a5eb56172b4e89840c0b0cd7db97b718355a41414b4ca913171e0")
add_versions("3.5.5", "c48f405298885fbd37737b4cc75e75ead9bd159346c948068cf6e724a01c40e9")
add_versions("3.5.6", "efdc021d1825a27830a45e88d408668c08f22dcb7f6a1ca289fdaf77a937aa66")
add_versions("3.5.7", "596876951b62ad2530c63afc40edd805d751fcb2416e544d249af04ad00bb4ed")
add_versions("3.5.8", "80bea0e523b666d4d4e74fb729ac1e4bd924d1b9f2892d939af62ae2c4a0f622")
add_versions("3.5.9", "1f66831de4bf2d82e138d8993e9ee84a7559afc47aeeb2e2de51872401790a0a")
add_versions("3.6.0", "4918c45ac3e0972ff260e2a249e25716881e39fb679d5e714ae216a2ef6c3f7e")
add_versions("3.6.1", "5f46bdfa4db8326794306d1a0348efc01e199f53b262bc05aa92b37be09a3f3a")
add_versions("3.6.2", "268aa82d9bfd774f76951b250f87b8edcefd5c754b8b409e1639641e8bd8d5bc")
on_load("@windows|x64", function (package)
package:add("deps", "msys2")

@ -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)

@ -7,6 +7,7 @@ package("cpp-dump")
add_urls("https://github.com/philip82148/cpp-dump/archive/refs/tags/$(version).tar.gz",
"https://github.com/philip82148/cpp-dump.git")
add_versions("v0.6.0", "22bc5fafa22ac7c1e99db8824fdabec4af6baabed0c8b7cc80a0205dfb550414")
add_versions("v0.5.0", "31fa8b03c9ee820525137be28f37b36e2abe7fd91df7d67681cb894db2230fe6")
on_install(function (package)

@ -4,21 +4,22 @@ package("cpp-httplib")
set_description("A C++11 single-file header-only cross platform HTTP/HTTPS library.")
set_license("MIT")
set_urls("https://github.com/yhirose/cpp-httplib/archive/v$(version).tar.gz",
set_urls("https://github.com/yhirose/cpp-httplib/archive/refs/tags/$(version).tar.gz",
"https://github.com/yhirose/cpp-httplib.git")
add_versions("0.8.5", "b353f3e7c124a08940d9425aeb7206183fa29857a8f720c162f8fd820cc18f0e")
add_versions("0.9.2", "bfef2587a2aa31c85fb361df71c720be97076f8083e4f3881da8572f6a58054f")
add_versions("0.12.1", "0e56c25c63e730ebd42e2beda6e7cb1b950131d8fc00d3158b1443a8d76f41ca")
add_versions("0.12.6", "24bc594a9efcc08a5a6f3928e848d046d411a88b07bcd6f7f3851227a1f0133e")
add_versions("0.14.0", "3a92248ef8cf2c32ad07f910b8e3052ff2427022b2adb871cf326fb620d2438e")
add_versions("0.14.1", "2d4fb5544da643e5d0a82585555d8b7502b4137eb321a4abbb075e21d2f00e96")
add_versions("0.14.2", "dbcf5590e8ed35c6745c2ad659a5ebec92f05187d1506eec24449d6db95e5084")
add_versions("0.14.3", "dcf6486d9030937636d8a4f820ca9531808fd7edb283893dddbaa05f99357e63")
add_versions("0.15.0", "b658e625e283e2c81437a485a95f3acf8b1d32c53d8147b1ccecc8f630e1f7bb")
add_versions("0.15.1", "8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91")
add_versions("0.15.2", "4afbcf4203249d2cbcb698e46e1f6fb61b479013a84844d6bb1c044e233cab6a")
add_versions("0.15.3", "2121bbf38871bb2aafb5f7f2b9b94705366170909f434428352187cb0216124e")
add_versions("v0.8.5", "b353f3e7c124a08940d9425aeb7206183fa29857a8f720c162f8fd820cc18f0e")
add_versions("v0.9.2", "bfef2587a2aa31c85fb361df71c720be97076f8083e4f3881da8572f6a58054f")
add_versions("v0.12.1", "0e56c25c63e730ebd42e2beda6e7cb1b950131d8fc00d3158b1443a8d76f41ca")
add_versions("v0.12.6", "24bc594a9efcc08a5a6f3928e848d046d411a88b07bcd6f7f3851227a1f0133e")
add_versions("v0.14.0", "3a92248ef8cf2c32ad07f910b8e3052ff2427022b2adb871cf326fb620d2438e")
add_versions("v0.14.1", "2d4fb5544da643e5d0a82585555d8b7502b4137eb321a4abbb075e21d2f00e96")
add_versions("v0.14.2", "dbcf5590e8ed35c6745c2ad659a5ebec92f05187d1506eec24449d6db95e5084")
add_versions("v0.14.3", "dcf6486d9030937636d8a4f820ca9531808fd7edb283893dddbaa05f99357e63")
add_versions("v0.15.0", "b658e625e283e2c81437a485a95f3acf8b1d32c53d8147b1ccecc8f630e1f7bb")
add_versions("v0.15.1", "8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91")
add_versions("v0.15.2", "4afbcf4203249d2cbcb698e46e1f6fb61b479013a84844d6bb1c044e233cab6a")
add_versions("v0.15.3", "2121bbf38871bb2aafb5f7f2b9b94705366170909f434428352187cb0216124e")
add_versions("v0.16.2", "75565bcdf12522929a26fb57a2c7f8cc0e175e27a9ecf51616075f3ea960da44")
add_configs("ssl", { description = "Requires OpenSSL", default = false, type = "boolean"})
add_configs("zlib", { description = "Requires Zlib", default = false, type = "boolean"})
@ -27,6 +28,14 @@ package("cpp-httplib")
add_deps("cmake")
if on_check then
on_check("android", function (package)
local ndk = package:toolchain("ndk")
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) >= 24, "package(httplib): need ndk api level >= 24 for android")
end)
end
on_load(function (package)
if package:config("ssl") then
package:add("deps", "openssl" .. (package:version():ge("0.15.0") and "3" or ""))
@ -42,15 +51,6 @@ package("cpp-httplib")
end
end)
if on_check then
on_check("android", function (package)
import("core.tool.toolchain")
local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()})
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) >= 24, "package(httplib): need ndk api level >= 24 for android")
end)
end
on_install(function (package)
if package:is_plat("android") then
import("core.tool.toolchain")
@ -59,19 +59,26 @@ package("cpp-httplib")
assert(ndk_sdkver and tonumber(ndk_sdkver) >= 24, "package(httplib): need ndk api level >= 24 for android")
end
local configs = {"-DHTTPLIB_COMPILE=OFF"}
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, "-DHTTPLIB_REQUIRE_OPENSSL=" .. (package:config("ssl") and "ON" or "OFF"))
table.insert(configs, "-DHTTPLIB_REQUIRE_ZLIB=" .. (package:config("zlib") and "ON" or "OFF"))
table.insert(configs, "-DHTTPLIB_REQUIRE_BROTLI=" .. (package:config("brotli") and "ON" or "OFF"))
table.insert(configs, "-DHTTPLIB_NO_EXCEPTIONS=" .. (package:config("exceptions") and "OFF" or "ON"))
if package:config("ssl") then
local openssl = package:dep("openssl" .. (package:version():ge("0.15.0") and "3" or ""))
if not openssl:is_system() then
table.insert(configs, "-DOPENSSL_ROOT_DIR=" .. openssl:installdir())
end
end
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <httplib.h>
static void test() {
void test() {
httplib::Client cli("http://cpp-httplib-server.yhirose.repl.co");
}
]]}, {includes = "httplib.h",configs = {languages = "c++11"}}))
]]}, {configs = {languages = "c++11"}, includes = "httplib.h"}))
end)

@ -2,6 +2,7 @@ package("cpp-lazy")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/MarcDirven/cpp-lazy")
set_description("A fast C++11/14/17/20 header only library for lazy evaluation and function tools")
set_license("MIT")
set_urls("https://github.com/MarcDirven/cpp-lazy/archive/refs/tags/v$(version).tar.gz",
"https://github.com/MarcDirven/cpp-lazy.git")

@ -7,6 +7,7 @@ package("cpp-sort")
add_urls("https://github.com/Morwenn/cpp-sort/archive/refs/tags/$(version).tar.gz",
"https://github.com/Morwenn/cpp-sort.git")
add_versions("1.16.0", "54eb65de5655ce58719d45616f29e4b9060135b9cc8b526bcfc9f5434975ea8c")
add_versions("1.10.0", "48951cac0051d48fee286c3bc02804975f9d83269d80c10dfc5589e76a542765")
add_versions("1.11.0", "a53b3ea240d6f8d8ea9da0a7e0c8e313cf5e714daedf1617473ab34f111ffeec")
add_versions("1.12.0", "70877c1993fa1e5eb53974ac30aeb713448c206344379f193dec8ee887c23998")

@ -4,18 +4,23 @@ package("cppcheck")
set_description("A static analysis tool for C/C++ code")
add_urls("https://github.com/danmar/cppcheck/archive/refs/tags/$(version).tar.gz")
add_versions("2.14.2", "9c3acea5f489336bd83a8ea33917a9a04a80c56d874bf270287e7de27acf2d00")
add_versions("2.14.1", "22d1403fbc3158f35b5216d7b0a50bbaf0c80bf6663933a71f65cc4fc307ff3d")
add_versions("2.13.4", "d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c")
add_versions("2.13.0", "8229afe1dddc3ed893248b8a723b428dc221ea014fbc76e6289840857c03d450")
add_deps("cmake")
on_install("windows|x64", "macosx", "linux", "msys", function (package)
local configs = {}
io.replace("cmake/findDependencies.cmake", "find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint)", "", {plain = true})
local configs = {"-DLIBXML2_XMLLINT_EXECUTABLE=OFF"}
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
io.replace("cmake/compileroptions.cmake", "add_compile_options($<$<NOT:$<CONFIG:Debug>>:/MD>)", "", {plain = true})
io.replace("cmake/compileroptions.cmake", "add_compile_options($<$<NOT:$<CONFIG:Debug>>:/MDd>)", "", {plain = true})
import("package.tools.cmake").install(package, configs)
end)

@ -5,6 +5,7 @@ package("cppfront")
add_urls("https://github.com/hsutter/cppfront/archive/refs/tags/$(version).tar.gz")
add_urls("https://github.com/hsutter/cppfront.git")
add_versions("v0.7.2", "fb44c6a65fa19b185ddf385dd3bfea05afe0bc8260382b7a8e3c75b3c9004cd6")
add_versions("v0.7.0", "d4ffb37d19a2b7c054d005cf4687439577ef2f3d93b340a342704e064cd1d047")
on_fetch(function (package, opt)
@ -13,6 +14,19 @@ package("cppfront")
end
end)
on_check(function (package)
if package:is_plat("windows") then
local vs = package:toolchain("msvc"):config("vs")
assert(vs and tonumber(vs) >= 2022, "package(cppfront): need vs >= 2022.")
end
assert(package:check_cxxsnippets({test = [[
#include <compare>
void test() {
std::compare_three_way{};
}
]]}, {configs = {languages = "c++20"}}), "package(cppfront): requires at least C++20.")
end)
on_install("windows", "linux", "macosx|x86_64", function (package)
local configs = {}
io.writefile("xmake.lua", [[
@ -29,12 +43,13 @@ package("cppfront")
on_test(function (package)
io.writefile("main.cpp2", [[
main: () -> int =
println("Hello world!\n");
main: () -> int =
println("Hello world!\n");
println: (msg: _) -> int = {
std::cout << "msg: " << msg;
return 0;
}]])
println: (msg: _) -> int = {
std::cout << "msg: " << msg;
return 0;
}
]])
os.vrun("cppfront -o main.cpp main.cpp2")
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

@ -1,39 +1,39 @@
package("cppp-reiconv")
set_homepage("https://github.com/cppp-project/cppp-reiconv")
set_description("A character set conversion library based on GNU LIBICONV.")
set_license("LGPL-3.0")
add_urls("https://github.com/cppp-project/cppp-reiconv/releases/download/$(version)/cppp-reiconv-$(version).zip")
add_urls("https://github.com/cppp-project/cppp-reiconv/releases/download/$(version)/cppp-reiconv-$(version).zip",
"https://github.com/cppp-project/cppp-reiconv.git")
add_versions("v2.1.0", "3e539785a437843793c5ce2f8a72cb08f2b543cba11635b06db25cfc6d9cc3a4")
add_patches("2.1.0", "patches/2.1.0/cmake.patch", "21bd2fcb5874f8774af1360aaac51073b67bf4c754096f0fe162d66632c1b7f9")
add_deps("cmake", "python")
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
local configs = {"-DENABLE_TEST=OFF", "-DENABLE_EXTRA=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_EXTRA=ON")
table.insert(configs, "-DENABLE_TEST=OFF")
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <cppp/reiconv.hpp>
#include <iostream>
#include <cstdlib>
using namespace cppp::base::reiconv;
#include <cppp/reiconv.hpp>
#include <iostream>
#include <cstdlib>
using namespace cppp::base::reiconv;
void test()
{
iconv_t cd = iconv_open("UTF-8", "UTF-8");
if (cd == (iconv_t)(-1))
void test()
{
abort();
iconv_t cd = iconv_open("UTF-8", "UTF-8");
if (cd == (iconv_t)(-1))
{
abort();
}
iconv_close(cd);
}
iconv_close(cd);
}
]]}, {configs = {languages = "c++14"}}))
]]}, {configs = {languages = "c++14"}}))
end)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save