commit
f6f03b153f
960 changed files with 25220 additions and 3141 deletions
@ -0,0 +1,58 @@ |
||||
name: Android (Windows) |
||||
|
||||
on: |
||||
pull_request: |
||||
branches: |
||||
- dev |
||||
|
||||
jobs: |
||||
build: |
||||
runs-on: windows-latest |
||||
strategy: |
||||
fail-fast: false |
||||
matrix: |
||||
arch: [armeabi-v7a, arm64-v8a] |
||||
ndk: ["r22", "r26c"] |
||||
ndk_sdkver: ["29"] |
||||
|
||||
concurrency: |
||||
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 |
||||
with: |
||||
xmake-version: branch@master |
||||
|
||||
- name: Configure Pagefile |
||||
uses: al-cheb/configure-pagefile-action@v1.2 |
||||
with: |
||||
minimum-size: 8GB |
||||
maximum-size: 32GB |
||||
disk-root: "D:" |
||||
|
||||
- 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 |
||||
} 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 |
||||
} |
||||
|
||||
- name: Tests |
||||
run: | |
||||
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b master xmakesrc |
||||
cd xmakesrc/core |
||||
xmake |
||||
cd ../.. |
||||
Copy-Item ./xmakesrc/core/build/xmake.exe ./xmakesrc/xmake |
||||
Copy-Item ./xmakesrc/scripts/xrepo.bat ./xmakesrc/xmake |
||||
Copy-Item ./xmakesrc/scripts/xrepo.ps1 ./xmakesrc/xmake |
||||
$Env:XMAKE_MAIN_REPO = "https://github.com/xmake-io/xmake-repo.git" |
||||
$Env:XMAKE_PROGRAM_DIR = $(Resolve-Path ./xmakesrc/xmake) |
||||
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 }} |
||||
|
@ -0,0 +1,43 @@ |
||||
name: Auto-update packages |
||||
|
||||
on: |
||||
schedule: # execute every 24 hours |
||||
- cron: "0 */24 * * *" |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
matrix: |
||||
os: [ubuntu-latest] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
- uses: xmake-io/github-action-setup-xmake@v1 |
||||
with: |
||||
xmake-version: branch@master |
||||
|
||||
- name: Installation |
||||
run: | |
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg |
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null |
||||
sudo apt update |
||||
sudo apt install -y gh unzip zip |
||||
echo ${{ secrets.XMAKE_REPO_TOKEN }} | gh auth login --with-token |
||||
git config --global user.email "waruqi@gmail.com" |
||||
git config --global user.name "ruki" |
||||
|
||||
- name: Install SSH key |
||||
uses: shimataro/ssh-key-action@v2 |
||||
with: |
||||
key: ${{ secrets.SSH_KEY }} |
||||
name: id_rsa # optional |
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }} |
||||
|
||||
- name: Auto-update packages |
||||
if: ${{ github.repository }} == "xmake-io/xmake-repo" |
||||
run: | |
||||
xmake l -vD scripts/autoupdate.lua |
||||
|
||||
|
@ -0,0 +1,33 @@ |
||||
name: macOS (x86_64) |
||||
|
||||
on: |
||||
pull_request: |
||||
branches: |
||||
- dev |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
fail-fast: false |
||||
matrix: |
||||
os: [macos-12] |
||||
arch: [x86_64] |
||||
kind: [static, shared] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
concurrency: |
||||
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-macOS-${{ matrix.arch }}-${{ matrix.kind }} |
||||
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' |
||||
|
||||
- name: Tests |
||||
run: | |
||||
wget https://curl.haxx.se/ca/cacert.pem -O /tmp/cacert.pem |
||||
export CURL_CA_BUNDLE=/tmp/cacert.pem |
||||
xmake l ./scripts/test.lua -D -a ${{ matrix.arch }} -k ${{ matrix.kind }} |
@ -1,37 +0,0 @@ |
||||
name: Monkey (FreeBSD) |
||||
|
||||
on: |
||||
schedule: # execute every 24 hours |
||||
- cron: "0 */24 * * *" |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
matrix: |
||||
os: [macOS-12] |
||||
kind: [static, shared] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
|
||||
- name: Tests |
||||
uses: vmactions/freebsd-vm@v0 |
||||
with: |
||||
usesh: true |
||||
mem: 4096 |
||||
copyback: false |
||||
prepare: pkg install -y git curl unzip gmake llvm gsed bash perl5 |
||||
run: | |
||||
git clone --recurse-submodules https://github.com/xmake-io/xmake.git /tmp/xmake -b dev |
||||
cd /tmp/xmake |
||||
./configure |
||||
gmake -j4 |
||||
gmake install |
||||
export XMAKE_ROOT=y |
||||
git clone https://github.com/xmake-io/xmake-repo.git /tmp/xmake-repo -b dev --depth 2 |
||||
cd /tmp/xmake-repo |
||||
xmake l ./scripts/monkey.lua -D -k ${{ matrix.kind }} |
||||
|
||||
|
@ -1,36 +0,0 @@ |
||||
name: Monkey (Linux) |
||||
|
||||
on: |
||||
schedule: # execute every 24 hours |
||||
- cron: "0 */24 * * *" |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
matrix: |
||||
os: [ubuntu-latest] |
||||
kind: [static, shared] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
- uses: xmake-io/github-action-setup-xmake@v1 |
||||
with: |
||||
xmake-version: branch@master |
||||
|
||||
- name: Installation |
||||
run: | |
||||
# TODO we will remove it later |
||||
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip |
||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60 |
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 |
||||
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 60 |
||||
sudo update-alternatives --set g++ /usr/bin/g++-9 |
||||
sudo update-alternatives --set gcc /usr/bin/gcc-9 |
||||
sudo update-alternatives --set cpp /usr/bin/cpp-9 |
||||
|
||||
- name: Tests |
||||
run: | |
||||
xmake l ./scripts/monkey.lua -D -k ${{ matrix.kind }} |
||||
|
@ -1,25 +0,0 @@ |
||||
name: Monkey (macOS) |
||||
|
||||
on: |
||||
schedule: # execute every 24 hours |
||||
- cron: "0 */24 * * *" |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
matrix: |
||||
os: [macOS-latest] |
||||
kind: [static, shared] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
- uses: xmake-io/github-action-setup-xmake@v1 |
||||
with: |
||||
xmake-version: branch@master |
||||
|
||||
- name: Tests |
||||
run: | |
||||
xmake l ./scripts/monkey.lua -D -k ${{ matrix.kind }} |
||||
|
@ -1,34 +0,0 @@ |
||||
name: Monkey (Windows) |
||||
|
||||
on: |
||||
schedule: # execute every 24 hours |
||||
- cron: "0 */24 * * *" |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
matrix: |
||||
os: [windows-latest] |
||||
kind: [static, shared] |
||||
arch: [x64, x86, arm64] |
||||
vs_runtime: [MT, MD] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
- uses: xmake-io/github-action-setup-xmake@v1 |
||||
with: |
||||
xmake-version: branch@master |
||||
|
||||
- name: Configure Pagefile |
||||
uses: al-cheb/configure-pagefile-action@v1.2 |
||||
with: |
||||
minimum-size: 8GB |
||||
maximum-size: 32GB |
||||
disk-root: "D:" |
||||
|
||||
- name: Tests |
||||
run: | |
||||
xmake l ./scripts/monkey.lua -D -a ${{ matrix.arch }} -k ${{ matrix.kind }} --vs_runtime=${{ matrix.vs_runtime }} --vs_sdkver=10.0.19041.0 |
||||
|
@ -0,0 +1,34 @@ |
||||
name: Sync Packagerefs |
||||
|
||||
on: |
||||
schedule: # execute every 24 hours |
||||
- cron: "0 */24 * * *" |
||||
|
||||
jobs: |
||||
build: |
||||
strategy: |
||||
matrix: |
||||
os: [ubuntu-latest] |
||||
|
||||
runs-on: ${{ matrix.os }} |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
- uses: xmake-io/github-action-setup-xmake@v1 |
||||
with: |
||||
xmake-version: branch@master |
||||
|
||||
- name: Install SSH key |
||||
uses: shimataro/ssh-key-action@v2 |
||||
with: |
||||
key: ${{ secrets.SSH_KEY }} |
||||
name: id_rsa # optional |
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }} |
||||
|
||||
- name: Build artifacts for packagerefs |
||||
if: ${{ github.repository }} == "xmake-io/xmake-repo" |
||||
run: | |
||||
git config --global user.email "waruqi@gmail.com" |
||||
git config --global user.name "ruki" |
||||
xmake l scripts/build_artifacts.lua true |
||||
|
@ -0,0 +1,32 @@ |
||||
package("access_private") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/martong/access_private") |
||||
set_description("Access private members and statics of a C++ class") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/martong/access_private.git") |
||||
add_versions("2024.02.01", "9e47d135067ecfe569158b2f42ead9c6db9aaedf") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <access_private.hpp> |
||||
|
||||
class A { |
||||
int m_i = 3; |
||||
int m_f(int p) { return 14 * p; } |
||||
}; |
||||
|
||||
ACCESS_PRIVATE_FIELD(A, int, m_i) |
||||
ACCESS_PRIVATE_FUN(A, int(int), m_f) |
||||
|
||||
void test() { |
||||
A a; |
||||
auto &i = access_private::m_i(a); |
||||
auto res = call_private::m_f(a, 3); |
||||
} |
||||
]]}, {configs = {languages = "cxx11"}})) |
||||
end) |
@ -0,0 +1,23 @@ |
||||
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_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:has_cxxtypes("ade::Graph", {configs = {languages = "c++11"}, includes = "ade/graph.hpp"})) |
||||
end) |
@ -0,0 +1,40 @@ |
||||
package("agg") |
||||
|
||||
set_homepage("https://agg.sourceforge.net/antigrain.com/index.html") |
||||
set_description("Anti-Grain Geometry: A High Quality Rendering Engine for C++") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/aggeom/agg-2.6/archive/refs/tags/agg-$(version).zip", |
||||
"https://github.com/aggeom/agg-2.6.git") |
||||
add_versions("2.7.1", "d7b86cdf55282e798aba43194a87705ad30ba950b5723144524e08fe8477db80") |
||||
|
||||
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) |
||||
add_configs("freetype", {description = "Use Freetype library.", default = false, type = "boolean", readonly = true}) |
||||
|
||||
add_deps("cmake") |
||||
if is_plat("macosx", "linux") then |
||||
add_deps("libx11", "libxext") |
||||
end |
||||
add_links("aggctrl", "aggplatform", "agg") |
||||
on_load("windows", "macosx", "linux", "mingw", function (package) |
||||
if package:config("freetype") then |
||||
package:add("deps", "freetype") |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "macosx", "linux", "mingw", function (package) |
||||
io.replace("src/platform/CMakeLists.txt", "IF(APPLE)", "IF(FALSE)", {plain = true}) |
||||
local configs = {} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-Dagg_USE_FREETYPE=" .. (package:config("freetype") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
agg::rasterizer_scanline_aa<> ras; |
||||
ras.reset(); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "agg/agg_rasterizer_scanline_aa.h"})) |
||||
end) |
@ -0,0 +1,20 @@ |
||||
package("aitoolkit") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://linkdd.github.io/aitoolkit/") |
||||
set_description("Give a brain to your game's NPCs") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/linkdd/aitoolkit/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/linkdd/aitoolkit.git") |
||||
|
||||
add_versions("v0.5.1", "25ce3e5225d9ab3e4aa5b5cf41b790d17c8d6586a06fa70e18ae7aad7ca6ac26") |
||||
add_versions("v0.5.0", "e2f59412a6cdc7389f25f4b85847e81c39866d33367515bd02e38be4d54ac74c") |
||||
add_versions("v0.3.0", "8cbe1d281235a3486c5840c7f9782f2b3b2ed181d76e8cbe83a2b1395d21ab8a") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cxxincludes("aitoolkit/fsm.hpp", {configs = {languages = "c++20"}})) |
||||
end) |
@ -0,0 +1,37 @@ |
||||
package("alembic") |
||||
|
||||
set_homepage("https://alembic.io/") |
||||
set_description("Open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/alembic/alembic/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/alembic/alembic.git") |
||||
add_versions("1.8.6", "c572ebdea3a5f0ce13774dd1fceb5b5815265cd1b29d142cf8c144b03c131c8c") |
||||
add_versions("1.8.5", "180a12f08d391cd89f021f279dbe3b5423b1db751a9898540c8059a45825c2e9") |
||||
|
||||
add_deps("cmake", "imath") |
||||
if is_plat("linux") then |
||||
add_syslinks("m") |
||||
end |
||||
on_load("windows", function (package) |
||||
if package:config("shared") then |
||||
package:add("defines", "ALEMBIC_DLL") |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "macosx", "linux", function (package) |
||||
local configs = {"-DBUILD_TESTING=OFF"} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DALEMBIC_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 <Alembic/Abc/All.h> |
||||
void test() { |
||||
Alembic::Abc::OArchive archive; |
||||
Alembic::Abc::OObject object = archive.getTop(); |
||||
} |
||||
]]}, {configs = {languages = "c++14"}})) |
||||
end) |
@ -1,26 +1,37 @@ |
||||
package("alsa-lib") |
||||
set_homepage("https://alsa-project.org/wiki/Main_Page") |
||||
set_description("The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.") |
||||
set_license("LGPL-2.1") |
||||
|
||||
set_urls("http://www.alsa-project.org/files/pub/lib/alsa-lib-$(version).tar.bz2") |
||||
add_urls("http://www.alsa-project.org/files/pub/lib/alsa-lib-$(version).tar.bz2", {alias = "home"}) |
||||
add_urls("https://github.com/alsa-project/alsa-lib/archive/refs/tags/v$(version).tar.gz", {alias = "github"}) |
||||
add_versions("home:1.2.10", "c86a45a846331b1b0aa6e6be100be2a7aef92efd405cf6bac7eef8174baa920e") |
||||
add_versions("github:1.2.10", "f55749847fd98274501f4691a2d847e89280c07d40a43cdac43d6443f69fc939") |
||||
|
||||
add_versions("1.2.10", "c86a45a846331b1b0aa6e6be100be2a7aef92efd405cf6bac7eef8174baa920e") |
||||
add_configs("versioned", {description = "pass flag --without-versioned", default = true, type = "boolean"}) |
||||
|
||||
if is_plat("linux") then |
||||
add_syslinks("pthread") |
||||
add_extsources("pacman::alsa-lib", "apt::libasound2-dev") |
||||
end |
||||
|
||||
if not is_plat("windows") then |
||||
add_deps("autoconf", "automake", "libtool", "m4") |
||||
end |
||||
|
||||
on_install("linux", function (package) |
||||
local configs = {"--without-versioned"} |
||||
local configs = {} |
||||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||
if package:is_debug() then |
||||
table.insert(configs, "--enable-debug") |
||||
end |
||||
if package:config("versioned")then |
||||
table.insert(configs, "--without-versioned") |
||||
end |
||||
import("package.tools.autoconf").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_csnippets({test = [[ |
||||
void test() { |
||||
snd_ctl_card_info_t *info; |
||||
snd_ctl_card_info_alloca(&info); |
||||
} |
||||
]]}, {includes = {"alsa/asoundlib.h"}})) |
||||
assert(package:has_cfuncs("snd_pcm_open", {includes = "alsa/asoundlib.h"})) |
||||
end) |
||||
|
@ -0,0 +1,27 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7bc0f1b9..7b0b606e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -30,6 +30,7 @@ cmake_minimum_required (VERSION 3.18)
|
||||
project (AMG LANGUAGES C CXX CUDA)
|
||||
|
||||
find_package(MPI)
|
||||
+find_package(OpenMP)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index b7fbef7d..0d77ddc7 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -107,9 +107,7 @@ ELSE()
|
||||
set(libs_all CUDA::cusparse CUDA::cublas rt dl)
|
||||
ENDIF()
|
||||
|
||||
-add_dependencies(amgx_tests_launcher amgx_tests_library)
|
||||
-
|
||||
-target_link_libraries(amgx_tests_launcher amgxsh ${libs_all} OpenMP::OpenMP_C)
|
||||
+target_link_libraries(amgx_tests_launcher amgx_tests_library amgxsh ${libs_all} OpenMP::OpenMP_C)
|
||||
|
||||
if(MPI_FOUND)
|
||||
target_link_libraries(amgx_tests_launcher MPI::MPI_CXX)
|
@ -0,0 +1,42 @@ |
||||
package("amgx") |
||||
|
||||
set_homepage("https://developer.nvidia.com/amgx") |
||||
set_description("Distributed multigrid linear solver library on GPU") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/NVIDIA/AMGX.git") |
||||
add_versions("v2.4.0", "2b4762f02af2ed136134c7f0570646219753ab3e") |
||||
|
||||
add_patches("2.4.0", "patches/2.4.0/msvc.patch", "46dcb9a5e1b4157fce91e06050c1d70f5e4fe34d7bf085216629c4f8708f90a5") |
||||
|
||||
if is_plat("windows") then |
||||
set_policy("platform.longpaths", true) |
||||
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) |
||||
end |
||||
|
||||
add_deps("cmake", "openmp") |
||||
on_load("windows", function (package) |
||||
package:add("deps", "cuda", {system = true, configs = {utils = {"cublas", "cusparse", "cusolver"}}}) |
||||
if not package:config("shared") then |
||||
package:add("defines", "AMGX_API_NO_IMPORTS") |
||||
end |
||||
end) |
||||
|
||||
on_load("linux", function (package) |
||||
package:add("deps", "cuda", {system = true, configs = {utils = {"cublas", "cusparse", "cusolver"}}}) |
||||
package:add("deps", "nvtx") |
||||
package:add("syslinks", "pthread", "m") |
||||
end) |
||||
|
||||
on_install("windows", "linux", function (package) |
||||
io.replace("CMakeLists.txt", "/Zl", "", {plain = true}) |
||||
io.replace("CMakeLists.txt", "add_subdirectory(examples)", "", {plain = true}) |
||||
local configs = {"-DCMAKE_NO_MPI=ON"} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
package:add("links", package:config("shared") and "amgxsh" or "amgx") |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("AMGX_initialize", {includes = "amgx_c.h"})) |
||||
end) |
@ -0,0 +1,43 @@ |
||||
package("amqp-cpp") |
||||
set_homepage("https://github.com/CopernicaMarketingSoftware/AMQP-CPP") |
||||
set_description("C++ library for asynchronous non-blocking communication with RabbitMQ") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/CopernicaMarketingSoftware/AMQP-CPP/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git") |
||||
|
||||
add_versions("v4.3.26", "2baaab702f3fd9cce40563dc1e23f433cceee7ec3553bd529a98b1d3d7f7911c") |
||||
|
||||
if is_plat("windows", "mingw") then |
||||
add_syslinks("ws2_32") |
||||
elseif is_plat("linux") then |
||||
add_configs("tcp", {description = "Build TCP module.", default = false, type = "boolean"}) |
||||
add_syslinks("pthread", "dl") |
||||
end |
||||
|
||||
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")) |
||||
if package:is_plat("windows") then |
||||
package:add("defines", "NOMINMAX") |
||||
if package:config("shared") and package:version():le("4.3.26") then |
||||
table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON") |
||||
end |
||||
elseif package:is_plat("linux") then |
||||
table.insert(configs, "-DAMQP-CPP_LINUX_TCP=" .. (package:config("tcp") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <amqpcpp.h> |
||||
void test() { |
||||
AMQP::Connection connection(nullptr, AMQP::Login("guest","guest"), "/"); |
||||
AMQP::Channel channel(nullptr); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}})) |
||||
end) |
@ -0,0 +1,27 @@ |
||||
diff --git a/angelscript/source/as_callfunc_arm64_msvc.asm b/angelscript/source/as_callfunc_arm64_msvc.asm
|
||||
index ce43c75..1059246 100644
|
||||
--- a/angelscript/source/as_callfunc_arm64_msvc.asm
|
||||
+++ b/angelscript/source/as_callfunc_arm64_msvc.asm
|
||||
@@ -68,7 +68,7 @@ GetHFAReturnDouble PROC
|
||||
ALIGN 4
|
||||
GetHFAReturnFloat PROC
|
||||
adr x9, |populateFloats|
|
||||
- sub x9, x9, x2 // x9 -= returnSize; (already 4 bytes per return)
|
||||
+ sub x9, x9, x2 ; x9 -= returnSize; (already 4 bytes per return)
|
||||
br x9
|
||||
|
||||
str s3, [x1, #0x4]
|
||||
@@ -185,6 +185,7 @@ CallARM64Ret128 PROC
|
||||
ldp fp, lr, [sp],#0x20
|
||||
|
||||
ret ; CallARM64Ret128
|
||||
+ ENDP
|
||||
|
||||
ALIGN 4
|
||||
CallARM64RetInMemory PROC
|
||||
@@ -202,4 +203,4 @@ CallARM64RetInMemory PROC
|
||||
|
||||
ret ; CallARM64RetInMemory
|
||||
|
||||
- END
|
||||
+ ENDP
|
@ -0,0 +1,36 @@ |
||||
add_rules("mode.debug", "mode.release") |
||||
add_rules("utils.install.cmake_importfiles") |
||||
set_languages("c++11") |
||||
|
||||
option("exceptions", {showmenu = true, default = false}) |
||||
|
||||
target("angelscript") |
||||
set_kind("shared") |
||||
add_files("angelscript/source/*.cpp") |
||||
add_headerfiles("angelscript/include/*.h") |
||||
add_includedirs("angelscript/include") |
||||
|
||||
add_defines("ANGELSCRIPT_EXPORT") |
||||
if not has_config("exceptions") then |
||||
add_defines("AS_NO_EXCEPTIONS") |
||||
end |
||||
|
||||
if is_plat("windows") then |
||||
if is_arch("x64") then |
||||
add_files("angelscript/source/as_callfunc_x64_msvc_asm.asm") |
||||
elseif is_arch("arm64") then |
||||
add_files("angelscript/source/as_callfunc_arm64_msvc.asm") |
||||
-- elseif is_arch("arm32") then |
||||
-- add_files("angelscript/source/as_callfunc_arm_msvc.asm") |
||||
end |
||||
else |
||||
if is_arch("arm32") then |
||||
add_files("angelscript/source/as_callfunc_arm_gcc.S") |
||||
elseif is_arch("arm64") then |
||||
add_files("angelscript/source/as_callfunc_arm64_gcc.S") |
||||
end |
||||
|
||||
if is_plat("linux") then |
||||
add_syslinks("pthread") |
||||
end |
||||
end |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,51 @@ |
||||
package("angle") |
||||
|
||||
set_homepage("https://chromium.googlesource.com/angle/angle") |
||||
set_description("ANGLE - Almost Native Graphics Layer Engine") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/google/angle/archive/refs/heads/chromium/$(version).zip") |
||||
add_versions("6288", "0d3bcf5bfd9eecd2b1635a6220a18f52a27ae5823928d4b6b083c54c163f963b") |
||||
|
||||
add_resources(">=6288", "chromium_zlib", "https://github.com/xmake-mirror/chromium_zlib.git", "646b7f569718921d7d4b5b8e22572ff6c76f2596") |
||||
|
||||
add_deps("python 3.x", {kind = "binary"}) |
||||
add_deps("zlib") |
||||
add_deps("opengl") |
||||
if is_plat("windows") then |
||||
add_links("libEGL", "libGLESv2", "libANGLE") |
||||
add_syslinks("user32", "gdi32", "dxgi", "dxguid", "d3d9", "delayimp") |
||||
add_ldflags("/DELAYLOAD:d3d9.dll") |
||||
else |
||||
if is_plat("macosx") then |
||||
add_syslinks("objc") |
||||
add_frameworks("CoreFoundation", "CoreGraphics", "IOKit", "Metal", "IOSurface", "QuartzCore", "Cocoa") |
||||
end |
||||
if is_plat("linux") then |
||||
add_deps("libx11", "libxext", "libxi") |
||||
end |
||||
add_links("EGL", "GLESv2", "ANGLE") |
||||
end |
||||
on_load("windows", "macosx", "linux", function (package) |
||||
if not package:config("shared") then |
||||
package:add("defines", "KHRONOS_STATIC") |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "macosx", "linux", function (package) |
||||
local zlib_dir = package:resourcefile("chromium_zlib") |
||||
os.cp(path.join(zlib_dir, "google"), "third_party/zlib") |
||||
os.cp(path.join(os.scriptdir(), "port", package:version_str(), "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <EGL/egl.h> |
||||
void test() { |
||||
const char *extensionString = |
||||
static_cast<const char *>(eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)); |
||||
EGLint res = eglGetError(); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}})) |
||||
end) |
@ -0,0 +1,29 @@ |
||||
package("arduinojson") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://arduinojson.org") |
||||
set_description("📟 JSON library for Arduino and embedded C++. Simple and efficient.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/bblanchon/ArduinoJson/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/bblanchon/ArduinoJson.git") |
||||
|
||||
add_versions("v7.0.4", "98ca14d98e9f1e8978ce5ad3ca0eeda3d22419d17586c60f299f369078929917") |
||||
add_versions("v7.0.3", "6da2d069e0caa0c829444912ee13e78bdf9cc600be632428a164c92e69528000") |
||||
add_versions("v6.21.4", "9551af9282372f6e64cf4009fc43be7f2df6eb96fe9c0aab44d4eed217d09747") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
import("package.tools.cmake").install(package, {"-DBUILD_TESTING=OFF"}) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <ArduinoJson.h> |
||||
void test() { |
||||
char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}"; |
||||
DynamicJsonDocument doc(1024); |
||||
deserializeJson(doc, json); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}})) |
||||
end) |
@ -0,0 +1,25 @@ |
||||
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_deps("asio", "cereal", "fmt", "openssl3") |
||||
add_deps("spdlog", { configs = { header_only = false, fmt_external = true } }) |
||||
|
||||
on_install("windows", "linux", "macosx", "mingw", "bsd", function (package) |
||||
os.cp(path.join("include", "*"), package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <asio2/asio2.hpp> |
||||
void test() { |
||||
asio2::tcp_server server; |
||||
} |
||||
]]}, {configs = {languages = "c++17"}})) |
||||
end) |
@ -0,0 +1,26 @@ |
||||
package("asio3") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/zhllxt/asio3") |
||||
set_description("Header only c++ network library, based on c++ 20 coroutine and asio") |
||||
set_license("BSL-1.0") |
||||
|
||||
add_urls("https://github.com/zhllxt/asio3.git") |
||||
add_versions("2023.12.03", "66e76da69b359540fdf15b85bd5f3612b358c1da") |
||||
|
||||
add_deps("asio", "cereal", "fmt", "openssl3", "nlohmann_json") |
||||
add_deps("spdlog", { configs = { header_only = false, fmt_external = true } }) |
||||
|
||||
on_install("windows", "linux", "macosx", "mingw", "bsd", function (package) |
||||
os.cp(path.join("include"), package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <asio3/tcp/tcp_client.hpp> |
||||
namespace net = ::asio; |
||||
void test() { |
||||
net::io_context ctx; |
||||
net::tcp_client client(ctx.get_executor()); |
||||
} |
||||
]]}, {configs = {languages = "c++23"}})) |
||||
end) |
@ -0,0 +1,72 @@ |
||||
package("astc-encoder") |
||||
set_homepage("https://developer.arm.com/graphics") |
||||
set_description("The Arm ASTC Encoder, a compressor for the Adaptive Scalable Texture Compression data format.") |
||||
set_license("Apache-2.0") |
||||
|
||||
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") |
||||
|
||||
add_configs("avx2", {description = "Enable astcenc builds for AVX2 SIMD", default = false, type = "boolean"}) |
||||
add_configs("sse41", {description = "Enable astcenc builds for SSE4.1 SIMD", default = false, type = "boolean"}) |
||||
add_configs("sse2", {description = "Enable astcenc builds for SSE2 SIMD", default = false, type = "boolean"}) |
||||
add_configs("neon", {description = "Enable astcenc builds for NEON SIMD", default = false, type = "boolean"}) |
||||
add_configs("none", {description = "Enable astcenc builds for no SIMD", default = false, type = "boolean"}) |
||||
add_configs("native", {description = "Enable astcenc builds for native SIMD", default = false, type = "boolean"}) |
||||
add_configs("decompressor", {description = "Enable astcenc builds for decompression only", default = false, type = "boolean"}) |
||||
add_configs("diagnostics", {description = "Enable astcenc builds with diagnostic trace", default = false, type = "boolean"}) |
||||
add_configs("asan", {description = "Enable astcenc builds with address sanitizer", default = false, type = "boolean"}) |
||||
|
||||
add_configs("invariance", {description = "Enable astcenc floating point invariance", default = true, type = "boolean"}) |
||||
add_configs("cli", {description = "Enable build of astcenc command line tools", default = true, type = "boolean"}) |
||||
|
||||
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")) |
||||
|
||||
table.insert(configs, "-DASTCENC_ISA_AVX2=" .. (package:config("avx2") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_ISA_SSE41=" .. (package:config("sse41") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_ISA_SSE2=" .. (package:config("sse2") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_ISA_NEON=" .. (package:config("neon") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_ISA_NONE=" .. (package:config("none") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_ISA_NATIVE=" .. (package:config("native") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_DECOMPRESSOR=" .. (package:config("decompressor") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_DIAGNOSTICS=" .. (package:config("diagnostics") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_ASAN=" .. (package:config("asan") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_INVARIANCE=" .. (package:config("invariance") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASTCENC_CLI=" .. (package:config("cli") and "ON" or "OFF")) |
||||
|
||||
import("package.tools.cmake").install(package, configs) |
||||
|
||||
os.cp("Source/astcenc.h", package:installdir("include")) |
||||
if package:config("shared") then |
||||
package:add("linkdirs", "bin") |
||||
end |
||||
if package:config("cli") then |
||||
local exe_prefix = package:is_plat("mingw", "windows") and ".exe" or "" |
||||
os.mv(path.join(package:installdir("bin"), "astcenc-native" .. exe_prefix), path.join(package:installdir("bin"), "astcenc" .. exe_prefix)) |
||||
package:addenv("PATH", "bin") |
||||
end |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <astcenc.h> |
||||
void test() { |
||||
astcenc_context* context; |
||||
astcenc_config* config = new astcenc_config(); |
||||
astcenc_error status = astcenc_context_alloc(config, 1, &context); |
||||
} |
||||
]]}, {configs = {languages = "c++14"}})) |
||||
if package:config("cli") and (not package:is_cross()) then |
||||
os.vrun("astcenc -help") |
||||
end |
||||
end) |
@ -0,0 +1,26 @@ |
||||
package("atomic_queue") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/max0x7ba/atomic_queue") |
||||
set_description("C++ lockless queue.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/max0x7ba/atomic_queue/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/max0x7ba/atomic_queue.git") |
||||
add_versions("v1.5", "599b76a0222e7b54118d6f0fb686845c9d323107f2de76b3f68292b057e5a99f") |
||||
add_versions("v1.6.3", "0ad6e0203d90367f6a4e496449dfd9ad65b80168fadafef4eac08820c6bda79c") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include/atomic_queue/", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <iostream> |
||||
int test(int argc, char* argv[]) { |
||||
using Queue = atomic_queue::AtomicQueue<uint32_t, 1024>; |
||||
Queue q{}; |
||||
q.try_push(10); |
||||
return 0; |
||||
} |
||||
]]}, {configs = {languages = "cxx14"}, includes = "atomic_queue/atomic_queue.h"})) |
||||
end) |
@ -0,0 +1,37 @@ |
||||
package("audiofile") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/adamstark/AudioFile") |
||||
set_description("A simple C++ library for reading and writing audio files.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/adamstark/AudioFile/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/adamstark/AudioFile.git") |
||||
|
||||
add_versions("1.1.1", "664f9d5fbbf1ff6c603ae054a35224f12e9856a1d8680be567909015ccaac328") |
||||
add_versions("1.1.0", "7546e39ca17ac09c653f46bfecce4a9936fae3784209ad53094915c78792a327") |
||||
add_versions("1.0.9", "1d609b80496fc5c688d8e83086cdcad5b60ddb20f02d160f80be271fab97c4c0") |
||||
add_versions("1.0.8", "f9ecc578425cb90a4a846b32c8ac162c9a61952713bd07525337245a8dee8ad2") |
||||
add_versions("1.0.7", "a03c8dfee26e34e96ca07065b72a9a6860cf9a78849abf26c32a4db42469f6e6") |
||||
add_versions("1.0.6", "ac802070beb217c373a0fba83d3e7542672cf8118763677bb8c5de396030cf40") |
||||
add_versions("1.0.5", "61b7328459591aa11edfee7377acffa3c5638bac71a0fa57ddafe95b696eeed1") |
||||
add_versions("1.0.4", "cb57df92f252d194b911eebe6dedaba2c063a02c2579e00bf0a18cac92793027") |
||||
add_versions("1.0.3", "7c5d2b89b2c8675faee36de63ddcb5df3f9e1514439c2578e462b8ab2950571d") |
||||
add_versions("1.0.2", "63b7f0b76318299be7f74944f50967825240124aab3c0f82f1753689c2c5a092") |
||||
add_versions("1.0.1", "c52957662b717addd32b6c72b279d0c82fb5cf0fe74f98fa74469ae6bcba5b26") |
||||
add_versions("1.0.0", "2740f8b7b5f70f6ac848e3e2814ceeae141d806c07424a0cd03fde2ecaf463f1") |
||||
|
||||
on_install(function (package) |
||||
os.cp("AudioFile.h", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <stdint.h> |
||||
#include <AudioFile.h> |
||||
|
||||
void test () { |
||||
AudioFile<float> audioFile; |
||||
audioFile.load("somerandomfile.wav"); |
||||
} |
||||
]]}, {configs = {languages = "c++17"}})) |
||||
end) |
@ -0,0 +1,38 @@ |
||||
package("aws-c-auth") |
||||
set_homepage("https://github.com/awslabs/aws-c-auth") |
||||
set_description("C99 library implementation of AWS client-side authentication: standard credentials providers and signing.") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.22", "f249a12a6ac319e929c005fb7efd5534c83d3af3a3a53722626ff60a494054bb") |
||||
add_versions("v0.7.18", "c705199655066f1f874bc3758683f32e288024196a22f28360d336231e45406f") |
||||
add_versions("v0.7.17", "8fe380255a71a2d5c9acd4979c135f9842135ce6385010ea562bc0b532bf5b84") |
||||
add_versions("v0.7.3", "22e334508b76f1beddefbf877f200c8a5ace4e3956c6be6545b7572762afe8c5") |
||||
|
||||
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"}) |
||||
add_configs("assert_lock_help", {description = "Enable ASSERT_SYNCED_DATA_LOCK_HELD for checking thread issue", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake", "aws-c-common", "aws-c-cal", "aws-c-io", "aws-c-sdkutils", "aws-c-http") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASSERT_LOCK_HELD=" .. (package:config("assert_lock_help") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_auth_library_init", {includes = "aws/auth/auth.h"})) |
||||
end) |
@ -0,0 +1,35 @@ |
||||
package("aws-c-event-stream") |
||||
set_homepage("https://github.com/awslabs/aws-c-event-stream") |
||||
set_description("C99 implementation of the vnd.amazon.eventstream content-type.") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.2", "c98b8fa05c2ca10aacfce7327b92a84669c2da95ccb8e7d7b3e3285fcec8beee") |
||||
add_versions("v0.4.1", "f8915fba57c86148f8df4c303ca6f31de6c23375de554ba8d6f9aef2a980e93e") |
||||
add_versions("v0.3.2", "3134b35a45e9f9d974c2b78ee44fd2ea0aebc04df80236b80692aa63bee2092e") |
||||
|
||||
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake", "aws-c-common", "aws-c-io", "aws-checksums") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_event_stream_library_init", {includes = "aws/event-stream/event_stream.h"})) |
||||
end) |
@ -0,0 +1,34 @@ |
||||
package("aws-c-http") |
||||
set_homepage("https://github.com/awslabs/aws-c-http") |
||||
set_description("C99 implementation of the HTTP/1.1 and HTTP/2 specifications") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.1", "83fb47e2d7956469bb328f16dea96663e96f8f20dc60dc4e9676b82804588530") |
||||
add_versions("v0.7.12", "0f92f295c96e10aa9c1e66ac73c038ee9d9c61e1be7551e721ee0dab9c89fc6f") |
||||
|
||||
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake", "aws-c-cal", "aws-c-io", "aws-c-compression") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_http_message_new_request", {includes = "aws/http/request_response.h"})) |
||||
end) |
@ -0,0 +1,45 @@ |
||||
package("aws-c-io") |
||||
set_homepage("https://github.com/awslabs/aws-c-io") |
||||
set_description("This is a module for the AWS SDK for C. It handles all IO and TLS work for application protocols. ") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.8", "d50e21fdbd5170a4071fe067ef4ce297b02cb058ad47e118305e25f6e07d9cf0") |
||||
add_versions("v0.14.7", "ecf1f660d7d43913aa8a416be6a2027101ce87c3b241344342d608335b4df7d4") |
||||
add_versions("v0.14.6", "bb3af305af748185b1c7b17afa343e54f2d494ccff397402f1b17041b0967865") |
||||
add_versions("v0.14.5", "2700bcde062f7de1c1cbfd236b9fdfc9b24b4aa6dc0fb09bb156e16e07ebd0b6") |
||||
add_versions("v0.13.32", "2a6b18c544d014ca4f55cb96002dbbc1e52a2120541c809fa974cb0838ea72cc") |
||||
|
||||
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"}) |
||||
|
||||
if is_plat("windows") then |
||||
add_syslinks("advapi32", "crypt32", "secur32", "ncrypt") |
||||
elseif is_plat("linux", "bsd", "cross") then |
||||
add_deps("s2n-tls") |
||||
elseif is_plat("macosx") then |
||||
add_frameworks("Security") |
||||
end |
||||
|
||||
add_deps("cmake", "aws-c-common", "aws-c-cal") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_io_library_init", {includes = "aws/io/io.h"})) |
||||
end) |
@ -0,0 +1,37 @@ |
||||
package("aws-c-mqtt") |
||||
set_homepage("https://github.com/awslabs/aws-c-mqtt") |
||||
set_description("C99 implementation of the MQTT 3.1.1 specification.") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/awslabs/aws-c-mqtt/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/awslabs/aws-c-mqtt.git") |
||||
|
||||
add_versions("v0.10.4", "6a41456f9eee15d71e4e2ee162b354865809f26620f1e6e5acb237f190f77f3f") |
||||
add_versions("v0.10.3", "bb938d794b0757d669b5877526363dc6f6f0e43869ca19fc196ffd0f7a35f5b9") |
||||
add_versions("v0.9.5", "987289535d3c988fe949f49d81268736c96fe27b27c98c899f0a148577f6627b") |
||||
|
||||
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"}) |
||||
add_configs("assert_lock_help", {description = "Enable ASSERT_SYNCED_DATA_LOCK_HELD for checking thread issue", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake", "aws-c-http", "aws-c-io", "aws-c-cal", "aws-c-common") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASSERT_LOCK_HELD=" .. (package:config("assert_lock_help") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_mqtt_library_init", {includes = "aws/mqtt/mqtt.h"})) |
||||
end) |
@ -0,0 +1,37 @@ |
||||
package("aws-c-s3") |
||||
set_homepage("https://github.com/awslabs/aws-c-s3") |
||||
set_description("C99 library implementation for communicating with the S3 service, designed for maximizing throughput on high bandwidth EC2 instances.") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.5.9", "7a337195b295406658d163b6dac64ff81f7556291b8a8e79e58ebaa2d55178ee") |
||||
add_versions("v0.5.7", "2f2eab9bf90a319030fd3525953dc7ac00c8dc8c0d33e3f0338f2a3b554d3b6a") |
||||
add_versions("v0.3.17", "72fd93a2f9a7d9f205d66890da249944b86f9528216dc0321be153bf19b2ecd5") |
||||
|
||||
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"}) |
||||
add_configs("assert_lock_help", {description = "Enable ASSERT_SYNCED_DATA_LOCK_HELD for checking thread issue", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake", "aws-c-common", "aws-checksums", "aws-c-io", "aws-c-http", "aws-c-auth") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
table.insert(configs, "-DASSERT_LOCK_HELD=" .. (package:config("assert_lock_help") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_s3_library_init", {includes = "aws/s3/s3.h"})) |
||||
end) |
@ -0,0 +1,45 @@ |
||||
package("aws-c-sdkutils") |
||||
set_homepage("https://github.com/awslabs/aws-c-sdkutils") |
||||
set_description("C99 library implementing AWS SDK specific utilities. Includes utilities for ARN parsing, reading AWS profiles, etc...") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.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) |
||||
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 |
||||
aws_cmakedir = aws_cmakedir:gsub("\\", "/") |
||||
aws_c_common_configdir = aws_c_common_configdir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = |
||||
{ |
||||
"-DBUILD_TESTING=OFF", |
||||
"-DCMAKE_MODULE_PATH=" .. aws_cmakedir, |
||||
"-Daws-c-common_DIR=" .. aws_c_common_configdir |
||||
} |
||||
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_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("aws_sdkutils_library_init", {includes = "aws/sdkutils/sdkutils.h"})) |
||||
end) |
@ -0,0 +1,49 @@ |
||||
package("aws-crt-cpp") |
||||
set_homepage("https://github.com/awslabs/aws-crt-cpp") |
||||
set_description("C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.") |
||||
set_license("Apache-2.0") |
||||
|
||||
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.26.11", "23acb2b14019182dd73fe6779ec266ee4d8937f19a99803da6407937fa22db7d") |
||||
add_versions("v0.26.9", "5b5760d34fbbfcc971f561296e828de4c788750472fd9bd3ac20068a083620f2") |
||||
add_versions("v0.26.8", "36ced4fb54c8eb7325b4576134e01f93bfaca2709565b5ad036d198d703e4c8f") |
||||
add_versions("v0.26.4", "486113a556614b7b824e1aefec365a2261154fe06321b85601aefe2f65bd0706") |
||||
add_versions("v0.23.1", "8f7029fea12907564b80260cbea4a2b268ca678e7427def3e0c46871e9b42d16") |
||||
|
||||
add_configs("openssl", {description = "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto", default = false, type = "boolean"}) |
||||
|
||||
add_deps("cmake", "aws-c-common", "aws-c-io", "aws-checksums", "aws-c-event-stream", |
||||
"aws-c-http", "aws-c-mqtt", "aws-c-auth", "aws-c-s3") |
||||
|
||||
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", function (package) |
||||
local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake") |
||||
if package:is_plat("windows") then |
||||
cmakedir = cmakedir:gsub("\\", "/") |
||||
end |
||||
|
||||
local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir, "-DBUILD_DEPS=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, "-DENABLE_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
|
||||
io.replace("include/aws/crt/Exports.h", "WIN32", "_WIN32", {plain = true}) |
||||
if package:config("shared") then |
||||
package:add("defines", "AWS_CRT_CPP_USE_IMPORT_EXPORT") |
||||
end |
||||
end |
||||
table.insert(configs, "-DUSE_OPENSSL=" .. (package:config("openssl") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <aws/crt/Api.h> |
||||
void test() { |
||||
Aws::Crt::ApiHandle apiHandle; |
||||
} |
||||
]]}, {configs = {languages = "c++11"}})) |
||||
end) |
@ -0,0 +1,25 @@ |
||||
package("backportcpp") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/bitwizeshift/BackportCpp") |
||||
set_description("Library of backported modern C++ types to work with C++11") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/bitwizeshift/BackportCpp/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/bitwizeshift/BackportCpp.git") |
||||
|
||||
add_versions("v1.2.0", "8efded40a1d0e6674824336499d8706043a62bd8ae8aef62210c8c215f710b84") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
import("package.tools.cmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <bpstd/string_view.hpp> |
||||
void test() { |
||||
bpstd::string_view view; |
||||
} |
||||
]]}, {configs = {languages = "c++11"}})) |
||||
end) |
@ -0,0 +1,37 @@ |
||||
option("opencl", {default = false}) |
||||
option("tools", {default = false}) |
||||
|
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
set_languages("c++11") |
||||
add_rules("utils.install.cmake_importfiles") |
||||
|
||||
if has_config("opencl") then |
||||
add_requires("opencl") |
||||
add_packages("opencl") |
||||
add_defines("BASISU_SUPPORT_OPENCL") |
||||
end |
||||
|
||||
add_requires("zstd") |
||||
add_packages("zstd") |
||||
add_defines("BASISD_SUPPORT_KTX2_ZSTD") |
||||
|
||||
target("basisu") |
||||
set_kind("$(kind)") |
||||
add_files("encoder/*.cpp", "transcoder/*.cpp") |
||||
add_headerfiles("(encoder/*.h)", "(transcoder/*.h)", "(transcoder/*.inc)", {prefixdir = "basisu"}) |
||||
|
||||
add_vectorexts("all") |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all", {export_classes = true}) |
||||
elseif is_plat("linux", "bsd") then |
||||
add_syslinks("m", "pthread") |
||||
end |
||||
|
||||
if has_config("tools") then |
||||
target("basisu_tool") |
||||
set_kind("binary") |
||||
add_files("basisu_tool.cpp") |
||||
add_deps("basisu") |
||||
end |
@ -0,0 +1,43 @@ |
||||
package("basisu") |
||||
set_homepage("https://github.com/BinomialLLC/basis_universal") |
||||
set_description("Basis Universal GPU Texture Codec") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/BinomialLLC/basis_universal/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/BinomialLLC/basis_universal.git") |
||||
|
||||
add_versions("1.16.4", "e5740fd623a2f8472c9700b9447a8725a6f27d65b0b47c3e3926a60db41b8a64") |
||||
|
||||
add_configs("opencl", {description = "Enable opencl", default = false, type = "boolean"}) |
||||
add_configs("tools", {description = "Build tools", default = false, type = "boolean"}) |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("m", "pthread") |
||||
end |
||||
|
||||
add_deps("zstd") |
||||
|
||||
on_load(function (package) |
||||
if package:config("opencl") then |
||||
package:add("deps", "opencl") |
||||
end |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
io.replace("encoder/basisu_comp.cpp", "../zstd/zstd.h", "zstd.h", {plain = true}) |
||||
|
||||
local configs = { |
||||
opencl = package:config("opencl"), |
||||
tools = package:config("tools"), |
||||
} |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
void test() { |
||||
basist::basisu_transcoder_init(); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "basisu/transcoder/basisu_transcoder.h"})) |
||||
end) |
@ -0,0 +1,35 @@ |
||||
package("bcg729") |
||||
set_homepage("http://linphone.org") |
||||
set_description("Bcg729 is an opensource implementation of both encoder and decoder of the ITU G729 Annex A/B speech codec.") |
||||
|
||||
add_urls("https://github.com/BelledonneCommunications/bcg729/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/BelledonneCommunications/bcg729.git") |
||||
add_versions("1.0.4", "94b3542a06cbd96306efc19f959f9febae62806a22599063f82a8c33e989d48b") |
||||
add_versions("1.1.1", "68599a850535d1b182932b3f86558ac8a76d4b899a548183b062956c5fdc916d") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_load(function (package) |
||||
if not package:config("shared") then |
||||
package:add("defines", "BCG729_STATIC") |
||||
end |
||||
end) |
||||
|
||||
on_install(function (package) |
||||
local configs = {"-DENABLE_TESTS=OFF"} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||
if package:config("shared") then |
||||
table.insert(configs, "-DENABLE_SHARED=ON") |
||||
table.insert(configs, "-DENABLE_STATIC=OFF") |
||||
else |
||||
table.insert(configs, "-DENABLE_SHARED=OFF") |
||||
table.insert(configs, "-DENABLE_STATIC=ON") |
||||
end |
||||
|
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("bcg729Decoder", {includes = "bcg729/decoder.h"})) |
||||
assert(package:has_cfuncs("bcg729Encoder", {includes = "bcg729/encoder.h"})) |
||||
end) |
@ -0,0 +1,135 @@ |
||||
-- Compile bgfx shader files. Substitution for scripts/shader.mk. |
||||
-- |
||||
-- Usage: |
||||
-- |
||||
-- add_rules("@bgfx/shaders") |
||||
-- add_files("shader.vert", {type = "vertex", output_dir = "shaders", output_name = "shader.vert.bin", profiles = {glsl = "330"}}) |
||||
|
||||
rule("shaders") |
||||
set_extensions(".vert", ".frag", ".comp") |
||||
on_buildcmd_file(function (target, batchcmds, shaderfile, opt) |
||||
import("lib.detect.find_program") |
||||
import("core.base.option") |
||||
|
||||
batchcmds:show_progress(opt.progress, "${color.build.object}compiling.shaderc %s", shaderfile) |
||||
|
||||
-- get bgfx shaderc |
||||
local shaderc = find_program("shadercRelease") or find_program("shadercDebug") |
||||
assert(shaderc, "bgfx shaderc not found! please check your bgfx installation.") |
||||
|
||||
-- determine arguments for shaderc from fileconfig |
||||
local fileconfig = target:fileconfig(shaderfile) |
||||
|
||||
local output_filename |
||||
if fileconfig and fileconfig.output_name then |
||||
output_filename = fileconfig.output_name |
||||
else |
||||
output_filename = path.filename(shaderfile) .. ".bin" |
||||
end |
||||
|
||||
local output_dir |
||||
if fileconfig and fileconfig.output_dir then |
||||
output_dir = fileconfig.output_dir |
||||
else |
||||
output_dir = "shaders" |
||||
end |
||||
|
||||
local vardef_filename |
||||
if fileconfig and fileconfig.vardef then |
||||
vardef_filename = fileconfig.vardef |
||||
else |
||||
vardef_filename = path.join( |
||||
path.directory(shaderfile), |
||||
path.basename(shaderfile) .. ".varying.def.sc") |
||||
end |
||||
|
||||
local shader_type |
||||
if fileconfig and fileconfig.type then |
||||
if table.contains(bgfx_types, fileconfig.type) then |
||||
shader_type = fileconfig.type |
||||
else |
||||
raise("unsupported shader type " .. fileconfig.type) |
||||
end |
||||
elseif shaderfile:match("%.vert$") then |
||||
shader_type = "vertex" |
||||
elseif shaderfile:match("%.frag$") then |
||||
shader_type = "fragment" |
||||
elseif shaderfile:match("%.comp$") then |
||||
shader_type = "compute" |
||||
else |
||||
raise("cannot determine shader type from file name " .. path.filename(shaderfile)) |
||||
end |
||||
|
||||
-- determine platform-specific shaderc arguments |
||||
local bgfx_platforms = { |
||||
windows = "windows", |
||||
macosx = "osx", |
||||
linux = "linux" |
||||
} |
||||
local bgfx_types = { |
||||
"vertex", |
||||
"fragment", |
||||
"compute" |
||||
} |
||||
local bgfx_default_profiles = { |
||||
windows = { |
||||
vertex = {dx9 = "s_3_0", dx11 = "s_5_0", glsl = "120"}, |
||||
fragment = {dx9 = "s_3_0", dx11 = "s_5_0", glsl = "120"}, |
||||
compute = {dx11 = "s_5_0", glsl = "430"}, |
||||
}, |
||||
macosx = { |
||||
vertex = {metal = "metal", glsl = "120"}, |
||||
fragment = {metal = "metal", glsl = "120"}, |
||||
compute = {metal = "metal", glsl = "430"} |
||||
}, |
||||
linux = { |
||||
vertex = {glsl = "120", spirv = "spirv"}, |
||||
fragment = {glsl = "120", spirv = "spirv"}, |
||||
compute = {glsl = "430", spirv = "spirv"} |
||||
} |
||||
} |
||||
|
||||
-- build command args |
||||
local args = { |
||||
"-f", shaderfile, |
||||
"--type", shader_type, |
||||
"--varyingdef", vardef_filename, |
||||
"--platform", bgfx_platforms[target:plat()], |
||||
} |
||||
for _, includedir in ipairs(target:get("includedirs")) do |
||||
table.insert(args, "-i") |
||||
table.insert(args, includedir) |
||||
end |
||||
|
||||
local mtime = 0 |
||||
local shader_profiles |
||||
if fileconfig and fileconfig.profiles then |
||||
shader_profiles = fileconfig.profiles |
||||
else |
||||
shader_profiles = bgfx_default_profiles[target:plat()][shader_type] |
||||
end |
||||
for folder, profile in pairs(shader_profiles) do |
||||
-- set output dir |
||||
local outputdir = path.join(target:targetdir(), output_dir, folder) |
||||
batchcmds:mkdir(outputdir) |
||||
local binary = path.join(outputdir, output_filename) |
||||
|
||||
-- compiling |
||||
local real_args = {} |
||||
table.join2(real_args, args) |
||||
table.insert(real_args, "-o") |
||||
table.insert(real_args, binary) |
||||
table.insert(real_args, "--profile") |
||||
table.insert(real_args, profile) |
||||
if option.get("verbose") then |
||||
batchcmds:show(shaderc .. " " .. os.args(real_args)) |
||||
end |
||||
batchcmds:vrunv(shaderc, real_args) |
||||
|
||||
if (mtime == 0) then mtime = os.mtime(binary) end |
||||
end |
||||
|
||||
-- add deps |
||||
batchcmds:add_depfiles(shaderfile) |
||||
batchcmds:set_depmtime(mtime) |
||||
end) |
@ -0,0 +1,17 @@ |
||||
package("bght") |
||||
|
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://owensgroup.github.io/BGHT/") |
||||
set_description("BGHT: Better GPU Hash Tables") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/owensgroup/BGHT.git") |
||||
add_versions("2024.03.06", "fd58966b20f76c7cd1aa1bdae58e28f6e3a7d242") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include/bght", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(os.isfile(path.join(package:installdir("include"), "bght", "bcht.hpp"))) |
||||
end) |
@ -0,0 +1,12 @@ |
||||
diff --git a/include/bitsery/details/adapter_common.h b/include/bitsery/details/adapter_common.h
|
||||
index 7f665d4..166d188 100644
|
||||
--- a/include/bitsery/details/adapter_common.h
|
||||
+++ b/include/bitsery/details/adapter_common.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace bitsery {
|
||||
|
@ -0,0 +1,50 @@ |
||||
package("bitsery") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/fraillt/bitsery") |
||||
set_description("Header only C++ binary serialization library. It is designed around the networking requirements for real-time data delivery, especially for games.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/fraillt/bitsery/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/fraillt/bitsery.git") |
||||
add_versions("v5.2.3", "896d82ab4ccea9899ff2098aa69ad6d25e524ee1d4c747ce3232d0afe3cd05a5") |
||||
|
||||
add_patches("5.2.3", path.join(os.scriptdir(), "patches", "5.2.3", "cstdint-include.patch"), "bb9ea1f68b219249395f3f3f9404d6e5c150144d793b6707f51facd1ff751f2c") |
||||
|
||||
on_install(function (package) |
||||
os.cp(path.join("include", "*"), package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
enum class MyEnum:uint16_t { V1,V2,V3 }; |
||||
struct MyStruct { |
||||
uint32_t i; |
||||
MyEnum e; |
||||
std::vector<float> fs; |
||||
}; |
||||
|
||||
template <typename S> |
||||
void serialize(S& s, MyStruct& o) { |
||||
s.value4b(o.i); |
||||
s.value2b(o.e); |
||||
s.container4b(o.fs, 10); |
||||
} |
||||
|
||||
using Buffer = std::vector<uint8_t>; |
||||
using OutputAdapter = bitsery::OutputBufferAdapter<Buffer>; |
||||
using InputAdapter = bitsery::InputBufferAdapter<Buffer>; |
||||
|
||||
void test() { |
||||
MyStruct data{8941, MyEnum::V2, {15.0f, -8.5f, 0.045f}}; |
||||
MyStruct res{}; |
||||
|
||||
Buffer buffer; |
||||
|
||||
auto writtenSize = bitsery::quickSerialization<OutputAdapter>(buffer, data); |
||||
auto state = bitsery::quickDeserialization<InputAdapter>({buffer.begin(), writtenSize}, res); |
||||
|
||||
assert(state.first == bitsery::ReaderError::NoError && state.second); |
||||
assert(data.fs == res.fs && data.i == res.i && data.e == res.e); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = {"bitsery/bitsery.h", "bitsery/adapter/buffer.h", "bitsery/traits/vector.h"}})) |
||||
end) |
@ -0,0 +1,39 @@ |
||||
package("boost_di") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://boost-ext.github.io/di") |
||||
set_description("DI: C++14 Dependency Injection Library") |
||||
|
||||
add_urls("https://github.com/boost-ext/di/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/boost-ext/di.git") |
||||
|
||||
add_versions("v1.3.0", "853e02ade9bf39f2863b470350c3ef55caffc3090d7d9a503724ff480c8d7eff") |
||||
|
||||
on_install(function (package) |
||||
os.cp("include", package:installdir()) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <boost/di.hpp> |
||||
namespace di = boost::di; |
||||
class ctor { |
||||
public: |
||||
explicit ctor(int i) : i(i) {} |
||||
int i; |
||||
}; |
||||
struct aggregate { |
||||
double d; |
||||
}; |
||||
class example { |
||||
public: |
||||
example(aggregate a, const ctor& c) {} |
||||
}; |
||||
void test() { |
||||
const auto injector = di::make_injector( |
||||
di::bind<int>.to(42), |
||||
di::bind<double>.to(87.0) |
||||
); |
||||
injector.create<example>(); |
||||
} |
||||
]]}, {configs = {languages = "c++14"}})) |
||||
end) |
@ -0,0 +1,25 @@ |
||||
package("boost_reflect") |
||||
set_kind("library", {headeronly = true}) |
||||
set_homepage("https://github.com/boost-ext/reflect") |
||||
set_description("C++20 static reflection library") |
||||
|
||||
add_urls("https://github.com/boost-ext/reflect/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/boost-ext/reflect.git") |
||||
|
||||
add_versions("v1.1.1", "49b20cbc0e5d9f94bcdc96056f8c5d91ee2e45d8642e02cb37e511079671ad48") |
||||
|
||||
on_install("linux", function (package) |
||||
os.cp("reflect", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <reflect> |
||||
enum E { A, B }; |
||||
struct foo { int a; E b; }; |
||||
void test() { |
||||
constexpr auto f = foo{.a = 42, .b = B}; |
||||
static_assert(2 == reflect::size(f)); |
||||
} |
||||
]]}, {configs = {languages = "c++20"}})) |
||||
end) |
@ -0,0 +1,180 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index aadcb9b..e8e1f50 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -567,8 +567,6 @@ endif()
|
||||
|
||||
# Add minimal googletest targets. The provided one has many side-effects, and
|
||||
# googletest has a very straightforward build.
|
||||
-add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc)
|
||||
-target_include_directories(boringssl_gtest PRIVATE third_party/googletest)
|
||||
|
||||
include_directories(third_party/googletest/include)
|
||||
|
||||
@@ -594,15 +592,14 @@ add_custom_command(
|
||||
DEPENDS util/embed_test_data.go ${CRYPTO_TEST_DATA}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
-add_library(crypto_test_data OBJECT crypto_test_data.cc)
|
||||
|
||||
add_subdirectory(crypto)
|
||||
add_subdirectory(ssl)
|
||||
-add_subdirectory(ssl/test)
|
||||
+# add_subdirectory(ssl/test)
|
||||
add_subdirectory(tool)
|
||||
add_subdirectory(util/fipstools)
|
||||
add_subdirectory(util/fipstools/acvp/modulewrapper)
|
||||
-add_subdirectory(decrepit)
|
||||
+# add_subdirectory(decrepit)
|
||||
|
||||
if(FUZZ)
|
||||
if(LIBFUZZER_FROM_DEPS)
|
||||
@@ -653,16 +650,7 @@ else()
|
||||
add_custom_target(fips_specific_tests_if_any)
|
||||
endif()
|
||||
|
||||
-add_custom_target(
|
||||
- run_tests
|
||||
- COMMAND ${GO_EXECUTABLE} run util/all_tests.go -build-dir
|
||||
- ${CMAKE_BINARY_DIR}
|
||||
- COMMAND cd ssl/test/runner &&
|
||||
- ${GO_EXECUTABLE} test -shim-path $<TARGET_FILE:bssl_shim>
|
||||
- ${HANDSHAKER_ARGS} ${RUNNER_ARGS}
|
||||
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
- DEPENDS all_tests bssl_shim handshaker fips_specific_tests_if_any
|
||||
- USES_TERMINAL)
|
||||
+
|
||||
|
||||
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
|
||||
index cf7199c..73cdd70 100644
|
||||
--- a/crypto/CMakeLists.txt
|
||||
+++ b/crypto/CMakeLists.txt
|
||||
@@ -91,7 +91,6 @@ function(perlasm dest src)
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(fipsmodule)
|
||||
-add_subdirectory(test)
|
||||
|
||||
if(FIPS_DELOCATE OR FIPS_SHARED)
|
||||
SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES EXTERNAL_OBJECT true)
|
||||
@@ -478,93 +477,3 @@ endif()
|
||||
# urandom_test is a separate binary because it needs to be able to observe the
|
||||
# PRNG initialisation, which means that it can't have other tests running before
|
||||
# it does.
|
||||
-add_executable(
|
||||
- urandom_test
|
||||
-
|
||||
- fipsmodule/rand/urandom_test.cc
|
||||
-)
|
||||
-
|
||||
-target_link_libraries(urandom_test test_support_lib boringssl_gtest crypto)
|
||||
-
|
||||
-add_dependencies(urandom_test global_target)
|
||||
-add_dependencies(all_tests urandom_test)
|
||||
-
|
||||
-add_executable(
|
||||
- crypto_test
|
||||
-
|
||||
- abi_self_test.cc
|
||||
- asn1/asn1_test.cc
|
||||
- base64/base64_test.cc
|
||||
- bio/bio_test.cc
|
||||
- blake2/blake2_test.cc
|
||||
- buf/buf_test.cc
|
||||
- bytestring/bytestring_test.cc
|
||||
- chacha/chacha_test.cc
|
||||
- cipher_extra/aead_test.cc
|
||||
- cipher_extra/cipher_test.cc
|
||||
- compiler_test.cc
|
||||
- conf/conf_test.cc
|
||||
- constant_time_test.cc
|
||||
- cpu_arm_linux_test.cc
|
||||
- crypto_test.cc
|
||||
- curve25519/ed25519_test.cc
|
||||
- curve25519/spake25519_test.cc
|
||||
- curve25519/x25519_test.cc
|
||||
- ecdh_extra/ecdh_test.cc
|
||||
- dh_extra/dh_test.cc
|
||||
- digest_extra/digest_test.cc
|
||||
- dsa/dsa_test.cc
|
||||
- err/err_test.cc
|
||||
- evp/evp_extra_test.cc
|
||||
- evp/evp_test.cc
|
||||
- evp/pbkdf_test.cc
|
||||
- evp/scrypt_test.cc
|
||||
- fipsmodule/aes/aes_test.cc
|
||||
- fipsmodule/bn/bn_test.cc
|
||||
- fipsmodule/cmac/cmac_test.cc
|
||||
- fipsmodule/ec/ec_test.cc
|
||||
- fipsmodule/ec/p256-nistz_test.cc
|
||||
- fipsmodule/ecdsa/ecdsa_test.cc
|
||||
- fipsmodule/md5/md5_test.cc
|
||||
- fipsmodule/modes/gcm_test.cc
|
||||
- fipsmodule/rand/ctrdrbg_test.cc
|
||||
- fipsmodule/rand/fork_detect_test.cc
|
||||
- fipsmodule/service_indicator/service_indicator_test.cc
|
||||
- fipsmodule/sha/sha_test.cc
|
||||
- hkdf/hkdf_test.cc
|
||||
- hpke/hpke_test.cc
|
||||
- hmac_extra/hmac_test.cc
|
||||
- hrss/hrss_test.cc
|
||||
- impl_dispatch_test.cc
|
||||
- lhash/lhash_test.cc
|
||||
- obj/obj_test.cc
|
||||
- pem/pem_test.cc
|
||||
- pkcs7/pkcs7_test.cc
|
||||
- pkcs8/pkcs8_test.cc
|
||||
- pkcs8/pkcs12_test.cc
|
||||
- poly1305/poly1305_test.cc
|
||||
- pool/pool_test.cc
|
||||
- rand_extra/rand_test.cc
|
||||
- refcount_test.cc
|
||||
- rsa_extra/rsa_test.cc
|
||||
- self_test.cc
|
||||
- stack/stack_test.cc
|
||||
- siphash/siphash_test.cc
|
||||
- test/file_test_gtest.cc
|
||||
- thread_test.cc
|
||||
- trust_token/trust_token_test.cc
|
||||
- x509/x509_test.cc
|
||||
- x509/x509_time_test.cc
|
||||
- x509v3/tab_test.cc
|
||||
-
|
||||
- $<TARGET_OBJECTS:crypto_test_data>
|
||||
- $<TARGET_OBJECTS:boringssl_gtest_main>
|
||||
-)
|
||||
-
|
||||
-add_dependencies(crypto_test global_target)
|
||||
-
|
||||
-target_link_libraries(crypto_test test_support_lib boringssl_gtest crypto)
|
||||
-if(WIN32)
|
||||
- target_link_libraries(crypto_test ws2_32)
|
||||
-endif()
|
||||
-add_dependencies(all_tests crypto_test)
|
||||
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
|
||||
index 67a72ae..249f9e2 100644
|
||||
--- a/ssl/CMakeLists.txt
|
||||
+++ b/ssl/CMakeLists.txt
|
||||
@@ -52,20 +52,3 @@ add_dependencies(ssl global_target)
|
||||
|
||||
target_link_libraries(ssl crypto)
|
||||
|
||||
-add_executable(
|
||||
- ssl_test
|
||||
-
|
||||
- span_test.cc
|
||||
- ssl_test.cc
|
||||
- ssl_c_test.c
|
||||
-
|
||||
- $<TARGET_OBJECTS:boringssl_gtest_main>
|
||||
-)
|
||||
-
|
||||
-add_dependencies(ssl_test global_target)
|
||||
-
|
||||
-target_link_libraries(ssl_test test_support_lib boringssl_gtest ssl crypto)
|
||||
-if(WIN32)
|
||||
- target_link_libraries(ssl_test ws2_32)
|
||||
-endif()
|
||||
-add_dependencies(all_tests ssl_test)
|
@ -0,0 +1,201 @@ |
||||
package("botan") |
||||
set_homepage("https://botan.randombit.net") |
||||
set_description("Cryptography Toolkit") |
||||
set_license("BSD-2-Clause") |
||||
|
||||
set_urls("https://github.com/randombit/botan/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/randombit/botan.git") |
||||
|
||||
add_versions("3.4.0", "6ef2a16a0527b1cfc9648a644877f7b95c4d07e8ef237273b030c623418c5e5b") |
||||
|
||||
add_configs("tools", {description = "Build tools.", default = false, type = "boolean"}) |
||||
add_configs("python", {description = "Enable python module", default = false, type = "boolean"}) |
||||
add_configs("endian", {description = [[The parameter should be either “little” or “big”. If not used then if the target architecture has a default, that is used. Otherwise left unspecified, which causes less optimal codepaths to be used but will work on either little or big endian.]], default = nil, type = "string", values = {"little", "big"}}) |
||||
add_configs("modules", {description = [[Enable modules, example: {configs = {modules = {"zlib", "lzma"}}}]], type = "table"}) |
||||
if is_plat("wasm") then |
||||
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) |
||||
end |
||||
|
||||
add_deps("python 3.x", "ninja", {kind = "binary"}) |
||||
|
||||
if is_plat("mingw") and is_subhost("msys") then |
||||
add_extsources("pacman::libbotan") |
||||
elseif is_plat("linux") then |
||||
add_extsources("pacman::botan", "apt::libbotan-2-dev") |
||||
elseif is_plat("macosx") then |
||||
add_extsources("brew::botan") |
||||
end |
||||
|
||||
if is_plat("linux", "bsd") then |
||||
add_syslinks("pthread") |
||||
end |
||||
|
||||
if on_check then |
||||
on_check("windows", function (package) |
||||
import("core.tool.toolchain") |
||||
|
||||
local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}) |
||||
if msvc then |
||||
local vs = msvc:config("vs") |
||||
assert(vs and tonumber(vs) >= 2022, "package(botan): current version need vs >= 2022") |
||||
end |
||||
end) |
||||
end |
||||
|
||||
on_load(function (package) |
||||
import("core.base.hashset") |
||||
|
||||
local major = "3" |
||||
if package:version() then |
||||
major = package:version():major() |
||||
end |
||||
package:add("includedirs", "include/botan-" .. major) |
||||
|
||||
local modules = package:config("modules") |
||||
if modules then |
||||
local deps = hashset.from(modules) |
||||
if deps then |
||||
for _, dep in ipairs({"boost", "bzip2", "lzma", "sqlite3", "zlib"}) do |
||||
if deps:has(dep) then |
||||
if dep == "boost" then |
||||
package:add("deps", "boost", {configs = {filesystem = true}}) |
||||
elseif dep == "lzma" then |
||||
package:add("deps", "xz") |
||||
else |
||||
package:add("deps", dep) |
||||
end |
||||
end |
||||
end |
||||
end |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "linux", "macosx|native", "bsd", "mingw@windows", "msys", "wasm", function (package) |
||||
-- https://botan.randombit.net/handbook/building.html |
||||
local configs = { |
||||
"configure.py", |
||||
"--prefix=" .. package:installdir(), |
||||
"--build-tool=ninja", |
||||
"--without-documentation", |
||||
"--minimized-build", |
||||
} |
||||
|
||||
local cc |
||||
local envs |
||||
if package:is_plat("windows") then |
||||
local msvc = package:toolchain("msvc") |
||||
assert(msvc:check(), "vs not found!") |
||||
|
||||
local vs = msvc:config("vs") |
||||
if tonumber(vs) < 2019 then |
||||
raise("This version of Botan requires at least msvc 19.30") |
||||
end |
||||
|
||||
envs = msvc:runenvs() |
||||
table.insert(configs, "--msvc-runtime=" .. package:runtimes()) |
||||
|
||||
if package:has_tool("cxx", "cl") then |
||||
cc = "msvc" |
||||
elseif package:has_tool("cxx", "clang_cl") then |
||||
raise("Unsupported toolchains on windows") |
||||
end |
||||
else |
||||
local cxx = package:build_getenv("cxx") |
||||
|
||||
if cxx:find("clang", 1, true) then |
||||
cc = "clang" |
||||
elseif cxx:find("gcc", 1, true) then |
||||
cc = "gcc" |
||||
end |
||||
|
||||
local cc_bin |
||||
if package:is_plat("mingw") then |
||||
cc = "gcc" |
||||
cc_bin = cxx |
||||
elseif package:is_plat("wasm") then |
||||
cc = "emcc" |
||||
cc_bin = cxx |
||||
end |
||||
end |
||||
|
||||
if cc then |
||||
table.insert(configs, "--cc=" .. cc) |
||||
end |
||||
if cc_bin then |
||||
table.insert(configs, "--cc-bin=" .. cc_bin) |
||||
end |
||||
|
||||
if package:is_plat("wasm") then |
||||
table.insert(configs, "--os=emscripten") |
||||
table.insert(configs, "--cpu=wasm") |
||||
else |
||||
if package:is_plat("iphoneos") then |
||||
table.insert(configs, "--os=ios") |
||||
elseif not package:is_plat("bsd") then |
||||
-- let configure.py detech bsd host name |
||||
table.insert(configs, "--os=" .. package:plat()) |
||||
end |
||||
table.insert(configs, "--cpu=" .. package:arch()) |
||||
end |
||||
|
||||
if package:is_debug() then |
||||
table.insert(configs, "--debug-mode") |
||||
end |
||||
|
||||
local targets = (package:config("shared") and "shared" or "static") |
||||
if package:config("tools") then |
||||
targets = targets .. ",cli" |
||||
end |
||||
table.insert(configs, "--build-targets=" .. targets) |
||||
|
||||
local modules = package:config("modules") |
||||
if modules then |
||||
table.insert(configs, "--enable-modules=" .. table.concat(modules, ",")) |
||||
end |
||||
|
||||
if not package:config("python") then |
||||
table.insert(configs, "--no-install-python-module") |
||||
end |
||||
|
||||
if package:config("endian") then |
||||
table.insert(configs, "--with-endian=" .. package:config("endian")) |
||||
end |
||||
|
||||
local cxflags = {} |
||||
table.join2(cxflags, table.wrap(package:config("cxflags"))) |
||||
table.join2(cxflags, table.wrap(package:config("cxxflags"))) |
||||
for _, flag in ipairs(cxflags) do |
||||
table.insert(configs, "--extra-cxxflags=" .. flag) |
||||
end |
||||
|
||||
for _, dep in ipairs({"boost", "bzip2", "xz", "sqlite3", "zlib"}) do |
||||
local packagedep = package:dep(dep) |
||||
if packagedep then |
||||
local fetchinfo = packagedep:fetch() |
||||
if fetchinfo then |
||||
for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do |
||||
table.insert(configs, "--with-external-includedir=" .. includedir) |
||||
end |
||||
for _, linkdir in ipairs(fetchinfo.linkdirs) do |
||||
table.insert(configs, "--with-external-libdir=" .. linkdir) |
||||
end |
||||
end |
||||
end |
||||
end |
||||
|
||||
os.vrunv("python3", configs, {envs = envs}) |
||||
import("package.tools.ninja").install(package, {}, {envs = envs}) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <botan/hex.h> |
||||
void test() { |
||||
std::vector<uint8_t> key = Botan::hex_decode("000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"); |
||||
} |
||||
]]}, {configs = {languages = "c++20"}})) |
||||
|
||||
if not package:is_cross() and package:config("tools") then |
||||
os.vrun("botan-cli version") |
||||
end |
||||
end) |
@ -0,0 +1,133 @@ |
||||
-- ref: https://github.com/microsoft/vcpkg/blob/master/ports/breakpad/CMakeLists.txt |
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
set_languages("c++17") |
||||
|
||||
add_requires("libdisasm") |
||||
|
||||
target("breakpad") |
||||
set_kind("$(kind)") |
||||
|
||||
add_includedirs("src") |
||||
add_headerfiles("src/(google_breakpad/**.h)") |
||||
add_packages("libdisasm") |
||||
|
||||
if is_plat("android") then |
||||
add_files("android/google_breakpad/Android.mk") |
||||
else |
||||
add_files("src/processor/*.cc") |
||||
remove_files("src/processor/*test*.cc", |
||||
"src/processor/microdump_stackwalk.cc", |
||||
"src/processor/synth_minidump.cc", |
||||
"src/processor/minidump_dump.cc", |
||||
"src/processor/minidump_stackwalk.cc") |
||||
add_headerfiles("src/(processor/*.h)") |
||||
remove_headerfiles("src/processor/*test*.h", "src/processor/synth_minidump.h") |
||||
|
||||
add_files("src/common/*.cc", "src/client/*.cc") |
||||
remove_files("src/common/*test*.cc", "src/client/*test*.cc") |
||||
add_headerfiles("src/(common/*.h)", "src/(client/*.h)") |
||||
remove_headerfiles("src/common/*test*.h", "src/client/*test*.h") |
||||
|
||||
if is_plat("windows") then |
||||
add_defines("UNICODE", |
||||
"WIN32_LEAN_AND_MEAN", |
||||
"_CRT_SECURE_NO_WARNINGS", |
||||
"_CRT_SECURE_NO_DEPRECATE", |
||||
"_CRT_NONSTDC_NO_DEPRECATE") |
||||
add_files("src/common/windows/*.cc", |
||||
"src/client/windows/crash_generation/*.cc", |
||||
"src/client/windows/handler/*.cc") |
||||
remove_files("src/common/windows/*test*.cc", |
||||
"src/common/language.cc", |
||||
"src/common/path_helper.cc", |
||||
"src/common/stabs_to_module.cc", |
||||
"src/common/stabs_reader.cc", |
||||
"src/common/dwarf*.cc", |
||||
"src/client/minidump_file_writer.cc") |
||||
add_headerfiles("src/(common/windows/*.h)", |
||||
"src/(client/windows/common/*.h)", |
||||
"src/(client/windows/crash_generation/*.h)", |
||||
"src/(client/windows/handler/*.h)") |
||||
remove_headerfiles("src/common/windows/*test*.h", |
||||
"src/common/language.h", |
||||
"src/common/path_helper.h", |
||||
"src/common/stabs_to_module.h", |
||||
"src/common/stabs_reader.h", |
||||
"src/common/dwarf*.h", |
||||
"src/client/minidump_file_writer.h") |
||||
|
||||
add_syslinks("wininet", "dbghelp", "imagehlp") |
||||
if is_kind("shared") then |
||||
add_rules("utils.symbols.export_all", {export_classes = true}) |
||||
end |
||||
else |
||||
add_files("src/common/dwarf/*.cc") |
||||
remove_files("src/common/dwarf/*test*.cc") |
||||
add_headerfiles("src/(common/dwarf/*.h)") |
||||
remove_headerfiles("src/common/dwarf/*test*.h") |
||||
|
||||
if is_plat("macosx") then |
||||
add_defines("HAVE_MACH_O_NLIST_H") |
||||
add_files("src/common/mac/MachIPC.mm", |
||||
"src/common/mac/*.cc", |
||||
"src/client/mac/crash_generation/*.cc", |
||||
"src/client/mac/handler/*.cc") |
||||
remove_files("src/common/mac/*test*.cc") |
||||
add_headerfiles("src/(common/mac/*.h)", |
||||
"src/(client/mac/crash_generation/*.h)", |
||||
"src/(client/mac/handler/*.h)") |
||||
|
||||
add_frameworks("CoreFoundation") |
||||
else |
||||
add_defines("HAVE_A_OUT_H") |
||||
add_files("src/client/linux/**.cc", "src/common/linux/**.cc") |
||||
remove_files("src/client/linux/sender/*test*.cc", |
||||
"src/client/linux/handler/*test*.cc", |
||||
"src/client/linux/microdump_writer/*test*.cc", |
||||
"src/client/linux/minidump_writer/*test*.cc") |
||||
add_headerfiles("src/(client/linux/**.h)", "src/(common/linux/**.h)") |
||||
add_syslinks("pthread") |
||||
end |
||||
end |
||||
end |
||||
|
||||
on_config(function (target) |
||||
if target:is_plat("windows") then |
||||
local msvc = target:toolchain("msvc") |
||||
if msvc then |
||||
local envs = msvc:runenvs() |
||||
local VSInstallDir = envs and envs.VSInstallDir |
||||
if VSInstallDir then |
||||
local dir = path.join(VSInstallDir, "DIA SDK") |
||||
target:add("includedirs", path.join(dir, "include")) |
||||
target:add("syslinks", "diaguids") |
||||
if os.isdir(dir) then |
||||
if target:is_arch("x86") then |
||||
target:add("runenvs", path.join(dir, "bin")) |
||||
target:add("linkdirs", path.join(dir, "lib")) |
||||
else |
||||
local arch |
||||
if target:is_arch("x64") then |
||||
arch = "amd64" |
||||
elseif target:is_arch("arm") then |
||||
arch = "arm" |
||||
elseif target:is_arch("arm64") then |
||||
arch = "arm64" |
||||
else |
||||
raise("Unsupported arch") |
||||
end |
||||
target:add("runenvs", path.join(dir, "bin", arch)) |
||||
target:add("linkdirs", path.join(dir, "lib", arch)) |
||||
end |
||||
end |
||||
end |
||||
end |
||||
elseif not target:is_plat("macosx") then |
||||
if target:has_cfuncs("getcontext", {includes = "ucontext.h"}) then |
||||
target:add("defines", "HAVE_GETCONTEXT=1") |
||||
else |
||||
target:add("files", path.join(os.projectdir(), "src/common/linux/breakpad_getcontext.S")) |
||||
end |
||||
end |
||||
end) |
@ -0,0 +1,67 @@ |
||||
package("breakpad") |
||||
set_homepage("https://chromium.googlesource.com/breakpad/breakpad") |
||||
set_description("Mirror of Google Breakpad project") |
||||
|
||||
add_urls("https://github.com/google/breakpad/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/google/breakpad.git", |
||||
"https://chromium.googlesource.com/breakpad/breakpad.git") |
||||
|
||||
add_versions("v2023.01.27", "f187e8c203bd506689ce4b32596ba821e1e2f034a83b8e07c2c635db4de3cc0b") |
||||
|
||||
if is_plat("windows") then |
||||
add_configs("shared", {description = "Build shared binaries.", default = false, type = "boolean", readonly = true}) |
||||
end |
||||
|
||||
if is_plat("mingw") and is_subhost("msys") then |
||||
add_extsources("pacman::breakpad") |
||||
end |
||||
|
||||
if is_plat("windows") then |
||||
add_syslinks("wininet", "dbghelp", "imagehlp") |
||||
elseif is_plat("linux") then |
||||
add_syslinks("pthread") |
||||
elseif is_plat("macosx") then |
||||
add_frameworks("CoreFoundation") |
||||
end |
||||
|
||||
add_deps("libdisasm") |
||||
|
||||
on_install("windows|x64", "windows|x86", function (package) |
||||
io.replace("src/processor/disassembler_x86.h", "third_party/", "", {plain = true}) |
||||
io.replace("src/processor/exploitability_win.cc", "third_party/", "", {plain = true}) |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
local plat |
||||
local snippets |
||||
if package:is_plat("windows") then |
||||
plat = "windows" |
||||
snippets = [[ |
||||
void test() { |
||||
std::wstring dump_path; |
||||
google_breakpad::ExceptionHandler handler(dump_path, nullptr, nullptr, nullptr, 0); |
||||
} |
||||
]] |
||||
elseif package:is_plat("macosx") then |
||||
plat = "mac" |
||||
snippets = [[ |
||||
void test() { |
||||
std::string dump_path; |
||||
google_breakpad::ExceptionHandler handler( |
||||
dump_path, nullptr, nullptr, nullptr, false, nullptr); |
||||
} |
||||
]] |
||||
else |
||||
plat = "linux" |
||||
snippets = [[ |
||||
void test() { |
||||
google_breakpad::MinidumpDescriptor descriptor("/tmp"); |
||||
} |
||||
]] |
||||
end |
||||
|
||||
local header = "client/" .. plat .. "/handler/exception_handler.h" |
||||
assert(package:check_cxxsnippets({test = snippets}, {configs = {languages = "c++11"}, includes = header})) |
||||
end) |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue