Merge branch 'dev' into SirLynix-patch-1

SirLynix-patch-1
Jérôme Leclercq 6 months ago committed by GitHub
commit f6f03b153f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      .github/workflows/android.yml
  2. 58
      .github/workflows/android_windows.yml
  3. 43
      .github/workflows/autoupdate.yml
  4. 13
      .github/workflows/deploy.yml
  5. 3
      .github/workflows/fedora.yml
  6. 6
      .github/workflows/freebsd.yml
  7. 11
      .github/workflows/macos_arm64.yml
  8. 33
      .github/workflows/macos_x86_64.yml
  9. 6
      .github/workflows/mingw_macos.yml
  10. 2
      .github/workflows/mingw_msys2.yml
  11. 37
      .github/workflows/monkey_freebsd.yml
  12. 36
      .github/workflows/monkey_linux.yml
  13. 25
      .github/workflows/monkey_macos.yml
  14. 34
      .github/workflows/monkey_windows.yml
  15. 2
      .github/workflows/sync.yml
  16. 34
      .github/workflows/sync_packagerefs.yml
  17. 1
      .github/workflows/ubuntu.yml
  18. 12
      .github/workflows/ubuntu_clang.yml
  19. 5
      .github/workflows/wasm_ubuntu.yml
  20. 19
      .github/workflows/windows.yml
  21. 67
      packages/a/abseil/xmake.lua
  22. 32
      packages/a/access_private/xmake.lua
  23. 1
      packages/a/acl/xmake.lua
  24. 1
      packages/a/actor-framework/xmake.lua
  25. 9
      packages/a/ada/xmake.lua
  26. 23
      packages/a/ade/xmake.lua
  27. 40
      packages/a/agg/xmake.lua
  28. 20
      packages/a/aitoolkit/xmake.lua
  29. 37
      packages/a/alembic/xmake.lua
  30. 29
      packages/a/alsa-lib/xmake.lua
  31. 27
      packages/a/amgx/patches/2.4.0/msvc.patch
  32. 42
      packages/a/amgx/xmake.lua
  33. 43
      packages/a/amqp-cpp/xmake.lua
  34. 27
      packages/a/angelscript/patches/msvc-arm64.patch
  35. 36
      packages/a/angelscript/port/xmake.lua
  36. 22
      packages/a/angelscript/xmake.lua
  37. 1243
      packages/a/angle/port/6288/xmake.lua
  38. 51
      packages/a/angle/xmake.lua
  39. 5
      packages/a/apr/xmake.lua
  40. 4
      packages/a/aqt/xmake.lua
  41. 29
      packages/a/arduinojson/xmake.lua
  42. 1
      packages/a/argparse/xmake.lua
  43. 4
      packages/a/asio/xmake.lua
  44. 25
      packages/a/asio2/xmake.lua
  45. 26
      packages/a/asio3/xmake.lua
  46. 15
      packages/a/asmjit/xmake.lua
  47. 23
      packages/a/asmtk/xmake.lua
  48. 67
      packages/a/assimp/xmake.lua
  49. 72
      packages/a/astc-encoder/xmake.lua
  50. 21
      packages/a/async_simple/xmake.lua
  51. 26
      packages/a/atomic_queue/xmake.lua
  52. 6
      packages/a/attr/xmake.lua
  53. 37
      packages/a/audiofile/xmake.lua
  54. 4
      packages/a/autoconf-archive/xmake.lua
  55. 3
      packages/a/autoconf/xmake.lua
  56. 1
      packages/a/autodiff/xmake.lua
  57. 4
      packages/a/automake/xmake.lua
  58. 38
      packages/a/aws-c-auth/xmake.lua
  59. 3
      packages/a/aws-c-cal/xmake.lua
  60. 5
      packages/a/aws-c-common/xmake.lua
  61. 3
      packages/a/aws-c-compression/xmake.lua
  62. 35
      packages/a/aws-c-event-stream/xmake.lua
  63. 34
      packages/a/aws-c-http/xmake.lua
  64. 45
      packages/a/aws-c-io/xmake.lua
  65. 37
      packages/a/aws-c-mqtt/xmake.lua
  66. 37
      packages/a/aws-c-s3/xmake.lua
  67. 45
      packages/a/aws-c-sdkutils/xmake.lua
  68. 34
      packages/a/aws-checksums/xmake.lua
  69. 49
      packages/a/aws-crt-cpp/xmake.lua
  70. 3
      packages/b/b2/xmake.lua
  71. 25
      packages/b/backportcpp/xmake.lua
  72. 15
      packages/b/backward-cpp/xmake.lua
  73. 37
      packages/b/basisu/port/xmake.lua
  74. 43
      packages/b/basisu/xmake.lua
  75. 7
      packages/b/bazel/xmake.lua
  76. 4
      packages/b/bc/xmake.lua
  77. 35
      packages/b/bcg729/xmake.lua
  78. 1
      packages/b/bdwgc/xmake.lua
  79. 10
      packages/b/benchmark/xmake.lua
  80. 135
      packages/b/bgfx/rules/shaders.lua
  81. 5
      packages/b/bgfx/xmake.lua
  82. 17
      packages/b/bght/xmake.lua
  83. 7
      packages/b/binutils/xmake.lua
  84. 3
      packages/b/bison/xmake.lua
  85. 12
      packages/b/bitsery/patches/5.2.3/cstdint-include.patch
  86. 50
      packages/b/bitsery/xmake.lua
  87. 4
      packages/b/blake3/xmake.lua
  88. 45
      packages/b/blend2d/xmake.lua
  89. 3
      packages/b/blosc/xmake.lua
  90. 4
      packages/b/bluez/xmake.lua
  91. 181
      packages/b/boost/xmake.lua
  92. 39
      packages/b/boost_di/xmake.lua
  93. 25
      packages/b/boost_reflect/xmake.lua
  94. 1
      packages/b/boost_sml/xmake.lua
  95. 1
      packages/b/boost_ut/xmake.lua
  96. 180
      packages/b/boringssl/patches/2022.06.13/cmake.patch
  97. 35
      packages/b/boringssl/xmake.lua
  98. 201
      packages/b/botan/xmake.lua
  99. 133
      packages/b/breakpad/port/xmake.lua
  100. 67
      packages/b/breakpad/xmake.lua
  101. Some files were not shown because too many files have changed in this diff Show More

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

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

@ -35,6 +35,13 @@ jobs:
tar -xvf node-v14.15.4-linux-x64.tar.xz
export PATH=`pwd`/node-v14.15.4-linux-x64/bin:$PATH
sudo npm install markdown-to-html -g
git config --global user.email "waruqi@gmail.com"
git config --global user.name "ruki"
- name: Build artifacts
if: ${{ github.repository }} == "xmake-io/xmake-repo"
run: |
xmake l scripts/build_artifacts.lua
- name: Publish documents
run: |
@ -45,14 +52,8 @@ jobs:
git remote set-url --add all git@gitee.com:xmake-io/xrepo-docs.git
git remote set-url --add all git@gitlab.com:xmake-io/xrepo-docs.git
xmake l -vD `pwd`/build.lua
git config --global user.email "waruqi@gmail.com"
git config --global user.name "ruki"
git status
git add -A
git diff-index --quiet HEAD || git commit -m "autoupdate docs by xmake-repo/ci"
git push all master
- name: Build artifacts
run: |
xmake l scripts/build_artifacts.lua

@ -22,7 +22,7 @@ jobs:
- name: Installation
run: |
uname -a
dnf -y install gfortran p7zip
dnf -y install gfortran p7zip which
dnf -y install mesa-libGL-devel mesa-libGLU-devel
dnf -y install @development-tools @rpm-development-tools
dnf -y install copr-cli make gcc-c++ libatomic libcxx-devel
@ -35,6 +35,7 @@ jobs:
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: 'fedora'
- name: Tests
env:

@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [macOS-12]
os: [ubuntu-latest]
kind: [static, shared]
runs-on: ${{ matrix.os }}
@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v1
- name: Tests
uses: vmactions/freebsd-vm@v0
uses: vmactions/freebsd-vm@v1
with:
usesh: true
sync: sshfs
@ -30,6 +30,7 @@ jobs:
copyback: false
prepare: pkg install -y git curl unzip gmake llvm gsed bash perl5 openssl
run: |
git config --global --add safe.directory `pwd`
git clone --recurse-submodules https://github.com/xmake-io/xmake.git /tmp/xmake -b dev
cd /tmp/xmake
./configure
@ -37,7 +38,6 @@ jobs:
gmake install
export XMAKE_ROOT=y
cd -
git config --global --add safe.directory /Users/runner/work/xmake-repo/xmake-repo
xmake l ./scripts/test.lua -D -k ${{ matrix.kind }} -vD

@ -1,4 +1,4 @@
name: macOS
name: macOS (arm64)
on:
pull_request:
@ -8,14 +8,16 @@ on:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
os: [macos-14]
arch: [arm64]
kind: [static, shared]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-macOS-${{ matrix.kind }}
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-macOS-${{ matrix.arch }}-${{ matrix.kind }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
@ -28,5 +30,4 @@ jobs:
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 -k ${{ matrix.kind }}
xmake l ./scripts/test.lua -D -a ${{ matrix.arch }} -k ${{ matrix.kind }}

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

@ -11,11 +11,12 @@ jobs:
matrix:
os: [macOS-latest]
kind: [static, shared]
arch: [i386, x86_64]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-MingW-macOS-${{ matrix.kind }}
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-MingW-macOS-${{ matrix.kind }}-${{ matrix.arch }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
@ -30,5 +31,4 @@ jobs:
- name: Tests
run: |
xmake l ./scripts/test.lua -D -p mingw -k ${{ matrix.kind }}
xmake l ./scripts/test.lua -D -p mingw -a ${{ matrix.arch }} -k ${{ matrix.kind }}

@ -33,7 +33,7 @@ jobs:
- name: Prepare
shell: msys2 {0}
run: |
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b dev
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b master
cd xmake
./configure
make -j4

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

@ -43,6 +43,8 @@ jobs:
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Update
if: ${{ github.repository }} == "xmake-io/xmake-repo"
run: |
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
xmake l -vD ./scripts/sync.lua
xmake l -vD ./scripts/automerge.lua

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

@ -24,6 +24,7 @@ jobs:
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: 'ubuntu'
- name: Installation
run: |

@ -23,13 +23,21 @@ jobs:
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: 'ubuntu_clang'
- name: Installation
run: |
# TODO we will remove it later
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev clang libc++-dev p7zip
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip
- name: Clang Toolchain Installation
run: |
# https://apt.llvm.org/
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17 all
- name: Tests
run: |
xmake l ./scripts/test.lua -vD --toolchain=clang -k ${{ matrix.kind }}
xmake l ./scripts/test.lua -D --toolchain=clang-17 -k ${{ matrix.kind }}

@ -23,12 +23,11 @@ jobs:
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
actions-cache-key: 'wasm'
- name: Prepare
uses: mymindstorm/setup-emsdk@v11
uses: mymindstorm/setup-emsdk@v14
with:
# Make sure to set a version number!
version: 3.1.28
# This is the name of the cache folder.
# The cache folder will be placed in the build directory,
# so make sure it doesn't conflict with anything!

@ -13,12 +13,12 @@ jobs:
os: [windows-2019, windows-2022]
kind: [static, shared]
arch: [x64, x86, arm64]
vs_runtime: [MT, MD]
runtimes: [MT, MD]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Windows-${{ matrix.os }}-${{ matrix.kind }}-${{ matrix.arch }}-${{ matrix.vs_runtime }}
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Windows-${{ matrix.os }}-${{ matrix.kind }}-${{ matrix.arch }}-${{ matrix.runtimes }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
@ -35,9 +35,20 @@ jobs:
- 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
if ("${{ matrix.os }}" -eq "windows-2019") {
xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --vs_runtime=${{ matrix.vs_runtime }} --vs_sdkver=10.0.19041.0 --linkjobs=2
xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --vs_sdkver=10.0.19041.0 --linkjobs=2
} else {
xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --vs_runtime=${{ matrix.vs_runtime }} --linkjobs=2
xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --linkjobs=2
}

@ -12,30 +12,13 @@ package("abseil")
add_versions("20211102.0", "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4")
add_versions("20220623.0", "4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602")
add_versions("20230125.2", "9a2b5752d7bfade0bdeee2701de17c9480620f8b237e1964c1b9967c75374906")
add_versions("20230802.1", "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed")
add_versions("20240116.1", "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a")
add_versions("20240116.2", "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc")
add_deps("cmake")
add_links(
"absl_status", "absl_cord",
"absl_flags", "absl_flags_parse", "absl_flags_internal", "absl_flags_reflection", "absl_flags_marshalling",
"absl_flags_commandlineflag_internal", "absl_synchronization", "absl_time", "absl_hash", "absl_city", "absl_time_zone",
"absl_spinlock_wait", "absl_failure_signal_handler", "absl_bad_optional_access", "absl_flags_commandlineflag",
"absl_random_internal_pool_urbg",
"absl_cordz_info", "absl_cord_internal", "absl_cordz_functions", "absl_cordz_handle", "absl_cordz_sample_token",
"absl_base", "absl_bad_any_cast_impl", "absl_periodic_sampler", "absl_random_distributions",
"absl_flags_usage_internal", "absl_random_seed_sequences",
"absl_throw_delegate", "absl_stacktrace", "absl_symbolize", "absl_debugging_internal",
"absl_flags_private_handle_accessor",
"absl_strings", "absl_flags_config", "absl_malloc_internal", "absl_str_format_internal",
"absl_flags_usage", "absl_strings_internal", "absl_flags_program_name", "absl_int128",
"absl_scoped_set_env", "absl_raw_hash_set", "absl_random_internal_seed_material",
"absl_random_internal_randen", "absl_random_internal_randen_slow", "absl_random_internal_randen_hwaes_impl",
"absl_random_internal_randen_hwaes",
"absl_graphcycles_internal", "absl_exponential_biased", "absl_bad_variant_access", "absl_statusor",
"absl_random_internal_distribution_test_util", "absl_random_internal_platform",
"absl_hashtablez_sampler", "absl_demangle_internal", "absl_leak_check", "absl_log_severity", "absl_raw_logging_internal",
"absl_strerror", "absl_examine_stack", "absl_low_level_hash", "absl_random_seed_gen_exception", "absl_civil_time",
"absl_crc_cord_state", "absl_crc32c", "absl_crc_cpu_detect", "absl_crc_internal")
add_configs("cxx_standard", {description = "Select c++ standard to build.", default = "17", type = "string", values = {"14", "17", "20"}})
if is_plat("macosx") then
add_frameworks("CoreFoundation")
@ -44,30 +27,58 @@ package("abseil")
on_load(function (package)
if package:is_plat("windows") and package:config("shared") then
package:add("defines", "ABSL_CONSUME_DLL")
package:add("links", "abseil_dll")
end
end)
on_install("macosx", "linux", "windows", "mingw", "cross", function (package)
local configs = {"-DCMAKE_CXX_STANDARD=17"}
if package:version() and package:version():eq("20230802.1") and package:is_plat("mingw") then
io.replace(path.join("absl", "synchronization", "internal", "pthread_waiter.h"), "#ifndef _WIN32", "#if !defined(_WIN32) && !defined(__MINGW32__)", {plain = true})
io.replace(path.join("absl", "synchronization", "internal", "win32_waiter.h"), "#if defined(_WIN32) && _WIN32_WINNT >= _WIN32_WINNT_VISTA", "#if defined(_WIN32) && !defined(__MINGW32__) && _WIN32_WINNT >= _WIN32_WINNT_VISTA", {plain = true})
end
local configs = {"-DCMAKE_CXX_STANDARD=" .. package:config("cxx_standard"), "-DABSL_ENABLE_INSTALL=ON", "-DABSL_PROPAGATE_CXX_STD=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs, {buildir = os.tmpfile() .. ".dir"})
-- get links and ensure link order
import("core.base.graph")
local dag = graph.new(true)
local pkgconfigdir = package:installdir("lib", "pkgconfig")
for _, pcfile in ipairs(os.files(path.join(pkgconfigdir, "*.pc"))) do
local link = path.basename(pcfile)
local content = io.readfile(pcfile)
for _, line in ipairs(content:split("\n")) do
if line:startswith("Requires: ") then
local requires = line:sub(10):split(",")
for _, dep in ipairs(requires) do
dep = dep:split("=")[1]:trim()
dag:add_edge(link, dep)
end
end
end
end
local links = dag:topological_sort()
package:add("links", links)
local cycle = dag:find_cycle()
if cycle then
wprint("cycle links found", cycle)
end
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include "absl/strings/numbers.h"
#include "absl/strings/str_join.h"
#include <iostream>
#include <string>
#include <vector>
#include "absl/strings/numbers.h"
#include "absl/strings/str_join.h"
void test () {
std::vector<std::string> v = {"foo","bar","baz"};
void test() {
std::vector<std::string> v = {"foo", "bar", "baz"};
std::string s = absl::StrJoin(v, "-");
int result = 0;
auto a = absl::SimpleAtoi("123", &result);
std::cout << "Joined string: " << s << "\\n";
}
]]}, {configs = {languages = "c++17"}}))
]]}, {configs = {languages = "cxx17"}}))
end)

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

@ -5,6 +5,7 @@ package("acl")
set_license("GPL-2.0")
add_urls("http://download.savannah.nongnu.org/releases/acl/acl-$(version).tar.gz")
add_versions("2.3.2", "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c")
add_versions("2.3.1", "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af")
add_deps("pkgconf", "attr")

@ -6,6 +6,7 @@ package("actor-framework")
add_urls("https://github.com/actor-framework/actor-framework/archive/refs/tags/$(version).tar.gz",
"https://github.com/actor-framework/actor-framework.git")
add_versions("0.19.6", "48dc4c4abf5ab5a7c6f84b9259cc8be1b02c601d31893647ab44e143cdc4b6d5")
add_versions("0.19.2", "aa3fcc494424e0e20b177125458a6a6ed39c751a3d3d5193054e88bdf8a146d2")
add_configs("profiler", {description = "Enable experimental profiler API", default = false, type = "boolean"})

@ -1,5 +1,4 @@
package("ada")
set_homepage("https://www.ada-url.com")
set_description("WHATWG-compliant and fast URL parser written in modern C++")
set_license("Apache-2.0")
@ -7,6 +6,10 @@ package("ada")
set_urls("https://github.com/ada-url/ada/archive/refs/tags/v$(version).tar.gz",
"https://github.com/ada-url/ada.git")
add_versions("2.8.0", "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139")
add_versions("2.7.8", "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75")
add_versions("2.7.7", "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554")
add_versions("2.7.6", "e2822783913c50b9f5c0f20b5259130a7bdc36e87aba1cc38a5de461fe45288f")
add_versions("2.3.1", "298992ec0958979090566c7835ea60c14f5330d6372ee092ef6eee1d2e6ac079")
add_versions("2.4.0", "14624f1dfd966fee85272688064714172ff70e6e304a1e1850f352a07e4c6dc7")
add_versions("2.4.1", "e9359937e7aeb8e5889515c0a9e22cd5da50e9b053038eb092135a0e64888fe7")
@ -21,8 +24,8 @@ package("ada")
local configs = {"-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
io.replace("CMakeLists.txt", " add_subdirectory(singleheader)", "", {plain = true})
io.replace("CMakeLists.txt", " add_subdirectory(tools)", "", {plain = true})
io.replace("CMakeLists.txt", "add_subdirectory(singleheader)", "", {plain = true})
io.replace("CMakeLists.txt", "add_subdirectory(tools)", "", {plain = true})
import("package.tools.cmake").install(package, configs)
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

@ -1,31 +1,45 @@
package("angelscript")
set_homepage("http://angelcode.com/angelscript/")
set_description("Extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts")
set_license("zlib")
add_urls("http://angelcode.com/angelscript/sdk/files/angelscript_$(version).zip")
add_versions("2.36.0", "33f95f7597bc0d88b097d35e7b1320d15419ffc5779851d9d2a6cccec57811b3")
add_versions("2.35.1", "5c1096b6d6cf50c7e77ae93c736d35b69b07b1e5047161c7816bca25b413a18b")
add_versions("2.35.0", "010dd45e23e734d46f5891d70e268607a12cb9ab12503dda42f842d9db7e8857")
add_versions("2.34.0", "6faa043717522ae0fb2677d907ca5b0e35a79d28e5f83294565e6c6229bfbdf7")
add_patches(">=2.34.0", "patches/msvc-arm64.patch", "1433f474870102e6fd8d0c9978b6d122a098cdecded29be70176b9dab534564f")
add_configs("exceptions", {description = "Enable exception handling in script context", default = false, type = "boolean"})
if is_plat("linux") then
add_syslinks("pthread")
end
add_deps("cmake")
on_load("windows|x86", "windows|x64", "linux", "android", "msys", "mingw", function (package)
package:add("deps", "cmake")
end)
on_install("windows", "linux", "android", "msys", "mingw", function (package)
on_install("windows|x86", "windows|x64", "linux", "android", "msys", "mingw", function (package)
os.cd("angelscript/projects/cmake")
local configs = {}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DAS_NO_EXCEPTIONS=" .. (package:config("exceptions") and "OFF" or "ON"))
if package:is_plat("android") then
io.gsub("CMakeLists.txt", "set_property", "#set_property")
end
import("package.tools.cmake").install(package, configs)
end)
on_install("windows|arm64", function (package)
local configs = {}
configs.exceptions = package:config("exceptions")
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 = [[
#include <iostream>

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)

@ -5,6 +5,7 @@ package("apr")
add_urls("https://github.com/apache/apr/archive/refs/tags/$(version).tar.gz",
"https://github.com/apache/apr.git")
add_versions("1.7.4", "060b6e5ca8b3251545a93777c9ef744ceff02d4a59bb60a7dd9b3da9da33673e")
add_versions("1.7.0", "a7e2c5e6d60f6c7b1611b31a2f914a3e58f44eded5b064f0bae43ff30b16a4e6")
if is_plat("linux") then
@ -15,7 +16,7 @@ package("apr")
add_syslinks("wsock32", "ws2_32", "advapi32", "shell32", "rpcrt4")
end
on_install("linux", "macosx", function (package)
on_install("linux", "macosx|x86_64", function (package)
local configs = {}
if package:is_plat("linux") then
os.vrunv("sh", {"./buildconf"})
@ -36,7 +37,7 @@ package("apr")
package:add("includedirs", "include/apr-1")
end)
on_install("windows", function (package)
on_install("windows|x86", "windows|x64", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DAPR_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))

@ -6,7 +6,7 @@ package("aqt")
if is_host("windows") and (os.arch() == "x64" or os.arch() == "x86") then
add_configs("shared", {description = "Download shared binaries.", default = true, type = "boolean", readonly = true})
add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
add_configs("runtimes", {description = "Set compiler runtimes.", default = "MD", readonly = true})
if os.arch() == "x86" then
add_urls("https://github.com/miurahr/aqtinstall/releases/download/v$(version)/aqt_x86_signed.exe", { alias = "signed" })
@ -30,7 +30,7 @@ package("aqt")
on_install("@macosx", "@linux", "@windows", "@msys", function (package)
if is_host("windows") and (os.arch() == "x64" or os.arch() == "x86") then
os.mv(package:originfile(), path.join(package:installdir("bin"), "aqt.exe"))
os.cp(package:originfile(), path.join(package:installdir("bin"), "aqt.exe"))
else
-- ensurepip has been dropped in recent releases
try {function () os.vrunv("python3", {"-m", "ensurepip"}) 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)

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

@ -7,13 +7,15 @@ package("asio")
add_urls("https://sourceforge.net/projects/asio/files/asio/$(version) (Stable)/asio-$(version).tar.gz", {alias = "sourceforge"})
add_urls("https://github.com/chriskohlhoff/asio/archive/refs/tags/asio-$(version).tar.gz", {alias = "github", version = function (version) return version:gsub("%.", "-") end})
add_versions("github:1.30.2", "755bd7f85a4b269c67ae0ea254907c078d408cce8e1a352ad2ed664d233780e8")
add_versions("github:1.29.0", "44305859b4e6664dbbf853c1ef8ca0259d694f033753ae309fcb2534ca20f721")
add_versions("github:1.28.0", "226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328")
add_versions("github:1.24.0", "cbcaaba0f66722787b1a7c33afe1befb3a012b5af3ad7da7ff0f6b8c9b7a8a5b")
add_versions("github:1.21.0", "5d2d2dcb7bfb39bff941cabbfc8c27ee322a495470bf0f3a7c5238648cf5e6a9")
add_versions("sourceforge:1.20.0", "4cd5cd0ad97e752a4075f02778732a3737b587f5eeefab59cd98dc43b0dcadb3")
add_versions("github:1.20.0", "34a8f07be6f54e3753874d46ecfa9b7ab7051c4e3f67103c52a33dfddaea48e6")
on_install(function (package)
on_install("!wasm", function (package)
if os.isdir("asio") then
os.cp("asio/include/asio.hpp", package:installdir("include"))
os.cp("asio/include/asio", package:installdir("include"))

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

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

@ -1,15 +1,17 @@
package("asmtk")
set_homepage("https://github.com/asmjit/asmtk")
set_description("Assembler toolkit based on AsmJit")
set_license("zlib")
set_urls("https://github.com/asmjit/asmtk.git")
add_versions("2023.6.14", "6e25b8983fbd8bf455c01ed7c5dd40c99b789565")
add_versions("2023.07.18", "e2752c85d39da4b0c5c729737a6faa25286b8e0c")
add_deps("asmjit")
on_install("windows", "linux", "macosx", function (package)
on_install("!iphoneos", function (package)
if not package:config("shared") then
package:add("defines", "ASMTK_STATIC")
end
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
add_requires("asmjit")
@ -18,6 +20,11 @@ package("asmtk")
add_files("src/**.cpp")
add_headerfiles("src/(**.h)")
set_languages("c++11")
if is_kind("static") then
add_defines("ASMTK_STATIC")
elseif is_kind("shared") then
add_defines("ASMTK_EXPORTS")
end
if is_plat("windows") then
add_cxxflags("/GR-", "/GF", "/Zc:inline", "/Zc:strictStrings", "/Zc:threadSafeInit-")
if is_mode("debug") then
@ -25,30 +32,26 @@ package("asmtk")
else
add_cxxflags("/GS-", "/Oi")
end
if is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
end
else
add_cxxflags("-fno-math-errno", "-fno-threadsafe-statics")
end
add_packages("asmjit")
]])
local configs = {}
if package:config("shared") then
configs.kind = "shared"
end
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <asmtk/asmtk.h>
#include <asmjit/asmjit.h>
using namespace asmjit;
using namespace asmtk;
void test() {
Environment env(Arch::kX64);
CodeHolder code;
code.init(env);
x86::Assembler a(&code);
AsmParser p(&a);
}
]]}, {configs = {languages = "c++11"}}))
end)

@ -1,11 +1,14 @@
package("assimp")
set_homepage("https://assimp.org")
set_description("Portable Open-Source library to import various well-known 3D model formats in a uniform manner")
set_license("BSD-3-Clause")
set_urls("https://github.com/assimp/assimp/archive/$(version).zip",
set_urls("https://github.com/assimp/assimp/archive/refs/tags/$(version).zip",
"https://github.com/assimp/assimp.git")
add_versions("v5.4.1", "08837ee7c50b98ca72d2c9e66510ca6640681db8800aa2d3b1fcd61ccc615113")
add_versions("v5.4.0", "0f3698e9ba0110df0b636dbdd95706e7e28d443ff3dbaf5828926c23bfff778d")
add_versions("v5.3.1", "f4020735fe4601de9d85cb335115568cce0e027a65e546dd8895081696d624bd")
add_versions("v5.3.0", "cccbd20522b577613096b0b157f62c222f844bc177356b8301cd74eee3fecadb")
add_versions("v5.2.5", "5384877d53be7b5bbf50c26ab3f054bec91b3df8614372dcd7240f44f61c509b")
add_versions("v5.2.4", "713e9aa035ae019e5f3f0de1605de308d63538897249a2ba3a2d7d40036ad2b1")
add_versions("v5.2.3", "9667cfc8ddabd5dd5e83f3aebb99dbf232fce99f17b9fe59540dccbb5e347393")
@ -46,16 +49,38 @@ package("assimp")
add_syslinks("advapi32")
end
if on_check then
on_check("android", function (package)
import("core.tool.toolchain")
local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()})
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) >= 26, "package(assimp): need ndk api level >= 26 for android")
end)
end
on_load(function (package)
if not package:gitref() and package:version():le("5.1.0") then
if not package:gitref() then
if package:version():le("5.1.0") then
package:add("deps", "irrxml")
end
if package:version():eq("5.3.0") then
package:add("deps", "utfcpp")
package:add("defines", "ASSIMP_USE_HUNTER")
end
end
if package:is_plat("linux", "macosx") and package:config("shared") then
package:add("links", "assimp" .. (package:is_debug() and "d" or ""))
end
end)
on_install(function (package)
if package:is_plat("android") then
import("core.tool.toolchain")
local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()})
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) >= 26, "package(assimp): need ndk api level >= 26 for android")
end
local configs = {"-DASSIMP_BUILD_SAMPLES=OFF",
"-DASSIMP_BUILD_TESTS=OFF",
"-DASSIMP_BUILD_DOCS=OFF",
@ -85,18 +110,17 @@ package("assimp")
table.insert(configs, "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF")
end
if not package:gitref() and package:version():lt("v5.2.4") then
-- ASSIMP_WARNINGS_AS_ERRORS is not supported before v5.2.4
-- ASSIMP_WARNINGS_AS_ERRORS maybe does not work for some old versions
for _, cmakefile in ipairs(table.join("CMakeLists.txt", os.files("**/CMakeLists.txt"))) do
if package:is_plat("windows") then
io.replace("code/CMakeLists.txt", "TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)", "", {plain = true})
io.replace(cmakefile, "/W4 /WX", "", {plain = true})
else
io.replace("code/CMakeLists.txt", "TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)", "", {plain = true})
io.replace(cmakefile, "-Werror", "", {plain = true})
end
end
if not package:gitref() and package:version():eq("v5.2.5") then
-- Remove /WX from CMakeLists for MSVC: https://github.com/assimp/assimp/pull/5183
io.replace("CMakeLists.txt", "ADD_COMPILE_OPTIONS(/bigobj /W4 /WX )", "ADD_COMPILE_OPTIONS(/bigobj)", {plain = true})
io.replace("CMakeLists.txt", "ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX)", "ADD_COMPILE_OPTIONS(/MP /bigobj)", {plain = true})
-- fix cmake_install failed
if not package:gitref() and package:version():ge("v5.3.0") and package:is_plat("windows") and package:is_debug() then
io.replace("code/CMakeLists.txt", "IF(GENERATOR_IS_MULTI_CONFIG)", "IF(TRUE)", {plain = true})
end
if package:is_plat("mingw") and package:version():lt("v5.1.5") then
-- CMAKE_COMPILER_IS_MINGW has been removed: https://github.com/assimp/assimp/pull/4311
@ -104,21 +128,30 @@ package("assimp")
end
-- Assimp CMakeLists doesn't find minizip on Windows
local ldflags
local packagedeps
if package:is_plat("windows") then
local minizip = package:dep("minizip")
if minizip and not minizip:is_system() then
local fetchinfo = minizip:fetch({external = false})
packagedeps = table.join2(packagedeps or {}, "minizip")
end
end
local zlib = package:dep("zlib")
if zlib and not zlib:is_system() then
local fetchinfo = zlib:fetch({external = false})
if fetchinfo then
ldflags = {}
for _, linkdir in ipairs(fetchinfo.linkdirs) do
table.insert(ldflags, "/LIBPATH:" .. linkdir:gsub("\\", "/"))
local includedirs = fetchinfo.includedirs or fetchinfo.sysincludedirs
if includedirs and #includedirs > 0 then
table.insert(configs, "-DZLIB_INCLUDE_DIR=" .. table.concat(includedirs, " "))
end
local libfiles = fetchinfo.libfiles
if libfiles then
table.insert(configs, "-DZLIB_LIBRARY=" .. table.concat(libfiles, " "))
end
end
end
import("package.tools.cmake").install(package, configs, {ldflags = ldflags, shflags = ldflags})
import("package.tools.cmake").install(package, configs, {packagedeps = packagedeps})
-- copy pdb
if package:is_plat("windows") then

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

@ -1,12 +1,15 @@
package("async_simple")
set_homepage("https://github.com/alibaba/async_simple")
set_description("Simple, light-weight and easy-to-use asynchronous components")
set_license("Apache-2.0")
add_urls("https://github.com/alibaba/async_simple/archive/refs/tags/$(version).tar.gz",
"https://github.com/alibaba/async_simple/archive/refs/tags/v$(version).tar.gz",
"https://github.com/alibaba/async_simple.git")
add_versions("1.1", "32d1ea16dfc1741206b6e4a3fbe532eeb1c378619766c1abe11a9efc53109c10")
add_versions("1.2", "a59a2674ac2b0a3997b90873b2bf0fbe4d96fdedbe6a2628c16c92a65a3fa39a")
add_versions("1.3", "0ba0dc3397882611b538d04b8ee6668b1a04ce046128599205184c598b718743")
add_configs("aio", {description = "default not open aio", default = false, type = "boolean"})
add_configs("modules", {description = "default not use modules", default = false, type = "boolean"})
@ -14,16 +17,24 @@ package("async_simple")
add_deps("cmake")
on_install("windows", "linux", "macosx", function (package)
local configs = {"-DASYNC_SIMPLE_ENABLE_TESTS=OFF",
"-DASYNC_SIMPLE_BUILD_DEMO_EXAMPLE=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
if package:version():le("1.3") then
io.replace("async_simple/CMakeLists.txt",
[[file(GLOB coro_header "coro/*.h")]],
"file(GLOB coro_header \"coro/*.h\")\nfile(GLOB executors_header \"executors/*.h\")", {plain = true})
end
local configs = {
"-DASYNC_SIMPLE_ENABLE_TESTS=OFF",
"-DASYNC_SIMPLE_BUILD_DEMO_EXAMPLE=OFF"
}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DASYNC_SIMPLE_DISABLE_AIO=" .. (package:config("aio") and "OFF" or "ON"))
table.insert(configs, "-DASYNC_SIMPLE_BUILD_MODULES=" .. (package:config("modules") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
if package:config("shared") then
os.rm(package:installdir("lib/libasync_simple.a"))
else
os.rm(package:installdir("lib/libasync_simple.so"))
os.rm(package:installdir("lib/*.so*"))
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)

@ -4,16 +4,14 @@ package("attr")
set_description("Commands for Manipulating Filesystem Extended Attributes")
set_license("GPL-2.0")
add_urls("http://download.savannah.nongnu.org/releases/attr/attr-$(version).tar.gz")
add_urls("https://github.com/xmake-mirror/attr/releases/download/v$(version)/attr-$(version).tar.gz",
"http://download.savannah.nongnu.org/releases/attr/attr-$(version).tar.gz")
add_versions("2.5.1", "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8")
on_install("linux", function (package)
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:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
import("package.tools.autoconf").install(package, configs)
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)

@ -3,8 +3,8 @@ package("autoconf-archive")
set_description("A mirror of the GNU Autoconf Archive, a collection of more than 500 macros for GNU Autoconf that have been contributed as free software by friendly supporters of the cause from all over the Internet.")
set_license("GPL-3.0-or-later")
add_urls("https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-$(version).tar.xz",
"https://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-$(version).tar.xz")
add_urls("https://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-$(version).tar.xz",
"https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-$(version).tar.xz")
add_versions("2023.02.20", "71d4048479ae28f1f5794619c3d72df9c01df49b1c628ef85fde37596dc31a33")
add_deps("autoconf")

@ -4,7 +4,8 @@ package("autoconf")
set_homepage("https://www.gnu.org/software/autoconf/autoconf.html")
set_description("An extensible package of M4 macros that produce shell scripts to automatically configure software source code packages.")
add_urls("http://ftp.gnu.org/gnu/autoconf/autoconf-$(version).tar.gz",
add_urls("http://ftpmirror.gnu.org/gnu/autoconf/autoconf-$(version).tar.gz",
"http://ftp.gnu.org/gnu/autoconf/autoconf-$(version).tar.gz",
"https://mirrors.ustc.edu.cn/gnu/autoconf/autoconf-$(version).tar.gz",
"git://git.sv.gnu.org/autoconf")
add_versions("2.68", "eff70a2916f2e2b3ed7fe8a2d7e63d72cf3a23684b56456b319c3ebce0705d99")

@ -8,6 +8,7 @@ package("autodiff")
add_urls("https://github.com/autodiff/autodiff/archive/refs/tags/$(version).tar.gz",
"https://github.com/autodiff/autodiff.git")
add_versions("v1.1.2", "86f68aabdae1eed214bfbf0ddaa182c78ea1bb99e4df404efb7b94d30e06b744")
add_versions("v1.0.3", "21b57ce60864857913cacb856c3973ae10f7539b6bb00bcc04f85b2f00db0ce2")
add_deps("cmake", "eigen")

@ -4,8 +4,10 @@ package("automake")
set_homepage("https://www.gnu.org/software/automake/")
set_description("A tool for automatically generating Makefile.in files compliant with the GNU Coding Standards.")
add_urls("https://ftp.gnu.org/gnu/automake/automake-$(version).tar.gz",
add_urls("https://ftpmirror.gnu.org/gnu/automake/automake-$(version).tar.gz",
"https://ftp.gnu.org/gnu/automake/automake-$(version).tar.gz",
"https://mirrors.ustc.edu.cn/gnu/automake/automake-$(version).tar.gz")
add_versions("1.16.5", "07bd24ad08a64bc17250ce09ec56e921d6343903943e99ccf63bbf0705e34605")
add_versions("1.16.4", "8a0f0be7aaae2efa3a68482af28e5872d8830b9813a6a932a2571eac63ca1794")
add_versions("1.16.1", "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8")
add_versions("1.15.1", "988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260")

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

@ -6,6 +6,9 @@ package("aws-c-cal")
add_urls("https://github.com/awslabs/aws-c-cal/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-cal.git")
add_versions("v0.6.14", "2326304b15bec45b212f6b738020c21afa41f9da295936687e103f9f2efb7b5e")
add_versions("v0.6.12", "1ec1bc9a50df8d620f226480b420ec69d4fefd3792fb4e877aa7e350c2b174dc")
add_versions("v0.6.11", "e1b0af88c14300e125e86ee010d4c731292851fff16cfb67eb6ba6036df2d648")
add_versions("v0.6.2", "777feb1e88b261415e1ad607f7e420a743c3b432e21a66a5aaf9249149dc6fef")
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"})

@ -6,6 +6,11 @@ package("aws-c-common")
add_urls("https://github.com/awslabs/aws-c-common/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-common.git")
add_versions("v0.9.19", "196430fda1bca2c77df7d9199232956d371a92f49ee48fd6c29ff969410ca0ed")
add_versions("v0.9.17", "82f1a88494c5563892f0e048f0f56acfe7e10e5aa3fe9267b956dbabcc043440")
add_versions("v0.9.15", "8f36c7a6a5d2e17365759d15591f800d3e76dcaa34a226389b92647cbd92393a")
add_versions("v0.9.14", "70b10ebbf40e3b6c1b36d81d5e4b63fe430414a81f76293a65e42dfa5def571e")
add_versions("v0.9.13", "6d2044fc58e5d7611610976602f3fc2173676726b00eed026526962c599ece1d")
add_versions("v0.9.3", "389eaac7f64d7d5a91ca3decad6810429eb5a65bbba54798b9beffcb4d1d1ed6")
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"})

@ -6,6 +6,7 @@ package("aws-c-compression")
add_urls("https://github.com/awslabs/aws-c-compression/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-compression.git")
add_versions("v0.2.18", "517c361f3b7fffca08efd5ad251a20489794f056eab0dfffacc6d5b341df8e86")
add_versions("v0.2.17", "703d1671e395ea26f8b0b70d678ed471421685a89e127f8aa125e2b2ecedb0e0")
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"})
@ -18,7 +19,7 @@ package("aws-c-compression")
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 package:is_plat("windows") then
if is_host("windows") then
aws_cmakedir = aws_cmakedir:gsub("\\", "/")
aws_c_common_configdir = aws_c_common_configdir:gsub("\\", "/")
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)

@ -3,29 +3,29 @@ package("aws-checksums")
set_description("Cross platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations - C interface with language bindings for AWS SDKs")
set_license("Apache-2.0")
add_urls("https://github.com/awslabs/aws-checksums/archive/$(version).tar.gz",
add_urls("https://github.com/awslabs/aws-checksums/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-checksums.git")
add_versions("v0.1.12", "394723034b81cc7cd528401775bc7aca2b12c7471c92350c80a0e2fb9d2909fe")
if is_plat("linux") then
add_deps("cmake")
end
add_versions("v0.1.18", "bdba9d0a8b8330a89c6b8cbc00b9aa14f403d3449b37ff2e0d96d62a7301b2ee")
add_versions("v0.1.17", "83c1fbae826631361a529e9565e64a942c412baaec6b705ae5da3f056b97b958")
add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"})
add_deps("cmake", "aws-c-common")
on_load(function (package)
if package:config("shared") then
package:add("deps", "aws-c-common", {configs = {shared = true}})
else
package:add("deps", "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
end)
on_install("linux", function (package)
local configs = {}
local common_cmake_dir = package:dep("aws-c-common"):installdir("lib", "cmake")
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
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"))
io.replace("CMakeLists.txt", "list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH})",
"list(APPEND CMAKE_MODULE_PATH \"" .. common_cmake_dir .. "\")", {plain = true})
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)

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

@ -6,6 +6,9 @@ package("b2")
set_license("BSL-1.0")
add_urls("https://github.com/bfgroup/b2/releases/download/$(version)/b2-$(version).zip")
add_versions("5.1.0", "2bf9618a0baa132d22fdfebf6b40436329172e3ca4b7b8a33e06ed97cd603dad")
add_versions("5.0.1", "5d3b98c63ed4d0f6114f660bd4eca5df32afa332310878b35c0d0faa04a3b6dd")
add_versions("5.0.0", "d5f280f466b80b694ccb9696413375522d16e6f811918daeb44a917d5bd6c7b5")
add_versions("4.9.6", "a049f7fdfae4b62353a3f76f34a72c8c87324d1c026cf87febe6c563311bf687")
on_install("@windows", function (package)

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

@ -4,6 +4,8 @@ package("backward-cpp")
set_description("Backward is a beautiful stack trace pretty printer for C++.")
set_license("MIT")
add_configs("bfd", {description = "Get stack trace with details about your sources by using libbfd from binutils.", default = false, type = "boolean"})
add_urls("https://github.com/bombela/backward-cpp/archive/refs/tags/$(version).zip",
"https://github.com/bombela/backward-cpp.git")
add_versions("v1.6", "9b07e12656ab9af8779a84e06865233b9e30fadbb063bf94dd81d318081db8c2")
@ -18,7 +20,17 @@ package("backward-cpp")
add_deps("cmake")
on_install("linux", "mingw", "macosx", "windows", function (package)
on_load("linux", "mingw@msys", "macos", function (package)
if package:config("bfd") then
package:add("deps", "binutils")
end
end)
on_install("linux", "mingw", "macosx", "windows|!arm*", function (package)
if package:config("bfd") and package:is_plat("linux", "mingw@msys", "macos") then
package:add("syslinks", "bfd")
package:add("defines", "BACKWARD_HAS_BFD=1")
end
local configs = {"-DBACKWARD_TESTS=OFF"}
table.insert(configs, "-DBACKWARD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
@ -28,3 +40,4 @@ package("backward-cpp")
on_test(function (package)
assert(package:has_cxxtypes("backward::SignalHandling", {configs = {languages = "c++11"}, includes = "backward/backward.hpp"}))
end)

@ -0,0 +1,37 @@
option("opencl", {default = false})
option("tools", {default = false})
add_rules("mode.debug", "mode.release")
set_languages("c++11")
add_rules("utils.install.cmake_importfiles")
if has_config("opencl") then
add_requires("opencl")
add_packages("opencl")
add_defines("BASISU_SUPPORT_OPENCL")
end
add_requires("zstd")
add_packages("zstd")
add_defines("BASISD_SUPPORT_KTX2_ZSTD")
target("basisu")
set_kind("$(kind)")
add_files("encoder/*.cpp", "transcoder/*.cpp")
add_headerfiles("(encoder/*.h)", "(transcoder/*.h)", "(transcoder/*.inc)", {prefixdir = "basisu"})
add_vectorexts("all")
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
elseif is_plat("linux", "bsd") then
add_syslinks("m", "pthread")
end
if has_config("tools") then
target("basisu_tool")
set_kind("binary")
add_files("basisu_tool.cpp")
add_deps("basisu")
end

@ -0,0 +1,43 @@
package("basisu")
set_homepage("https://github.com/BinomialLLC/basis_universal")
set_description("Basis Universal GPU Texture Codec")
set_license("Apache-2.0")
add_urls("https://github.com/BinomialLLC/basis_universal/archive/refs/tags/$(version).tar.gz",
"https://github.com/BinomialLLC/basis_universal.git")
add_versions("1.16.4", "e5740fd623a2f8472c9700b9447a8725a6f27d65b0b47c3e3926a60db41b8a64")
add_configs("opencl", {description = "Enable opencl", default = false, type = "boolean"})
add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
if is_plat("linux", "bsd") then
add_syslinks("m", "pthread")
end
add_deps("zstd")
on_load(function (package)
if package:config("opencl") then
package:add("deps", "opencl")
end
end)
on_install(function (package)
io.replace("encoder/basisu_comp.cpp", "../zstd/zstd.h", "zstd.h", {plain = true})
local configs = {
opencl = package:config("opencl"),
tools = package:config("tools"),
}
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
basist::basisu_transcoder_init();
}
]]}, {configs = {languages = "c++11"}, includes = "basisu/transcoder/basisu_transcoder.h"}))
end)

@ -7,18 +7,23 @@ package("bazel")
if is_host("windows") and os.arch() == "x64" then
add_urls("https://github.com/bazelbuild/bazel/releases/download/$(version)/bazel-$(version)-windows-x86_64.exe")
add_versions("5.0.0", "452217bcc4f8153c521fd985256316cd0bcad869fd192e1afd406dcb16f880d6")
add_versions("7.1.0", "f3e01effd7674364ef2d7539d5ece6cd2f68d212ee94652623ae2405b53feeaf")
elseif is_host("macosx") and os.arch() == "x86_64" then
add_urls("https://github.com/bazelbuild/bazel/releases/download/$(version)/bazel-$(version)-darwin-x86_64")
add_versions("5.0.0", "60558f06b9410b15602d6f41a294cec2cb69436c6e64d72ea78f42056373b8b9")
add_versions("7.1.0", "52ad8d57c22e4f873c724473a09ecfd98966c3a2950e102a7bd7e8c612b8001c")
elseif is_host("macosx") and os.arch() == "arm64" then
add_urls("https://github.com/bazelbuild/bazel/releases/download/$(version)/bazel-$(version)-darwin-x86_64")
add_urls("https://github.com/bazelbuild/bazel/releases/download/$(version)/bazel-$(version)-darwin-arm64")
add_versions("5.0.0", "86ba0e31b61b675afdfe393bd3b02e12b8fe1196eb5ea045da86f067547fe90f")
add_versions("7.1.0", "fb5e7bc62fc3c8f2511e3b64d795296444129b26f13d8dece4d4cee1845b758f")
elseif is_host("linux") and os.arch() == "x86_64" then
add_urls("https://github.com/bazelbuild/bazel/releases/download/$(version)/bazel-$(version)-linux-x86_64")
add_versions("5.0.0", "399eedb225cff7a13f9f027f7ea2aad02ddb668a8eb89b1d975d222e4dc12ed9")
add_versions("7.1.0", "62d62c699c1eb9f9be6a88030912a54d19fe45ae29329c7e5c53aba787492522")
elseif is_host("linux") and os.arch() == "arm64" then
add_urls("https://github.com/bazelbuild/bazel/releases/download/$(version)/bazel-$(version)-linux-arm64")
add_versions("5.0.0", "4a88b8f48cac3bf6fe657332631c36b4d255628c87bd77eb3159f4eb166f5e66")
add_versions("7.1.0", "b8cb5f842ce457606fbff3dba7a47e973f72bba0af1b7575ae500ca5a3d44282")
end
on_install("@windows|x64", "@macosx", "@linux|x86_64", "@linux|arm64", function (package)

@ -5,8 +5,8 @@ package("bc")
set_description("Arbitrary precision numeric processing language")
set_license("GPL-3.0-or-later")
set_urls("https://ftp.gnu.org/gnu/bc/bc-$(version).tar.gz",
"https://ftpmirror.gnu.org/bc/bc-$(version).tar.gz")
set_urls("https://ftpmirror.gnu.org/bc/bc-$(version).tar.gz",
"https://ftp.gnu.org/gnu/bc/bc-$(version).tar.gz")
add_versions("1.07.1", "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a")
add_deps("flex", "bison", "ed", "texinfo")

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

@ -5,6 +5,7 @@ package("bdwgc")
add_urls("https://github.com/ivmai/bdwgc/-/archive/$(version).tar.gz",
"https://github.com/ivmai/bdwgc.git")
add_versions("v8.2.6", "3bfc2b1dd385bfb46d2dab029211a66249a309795b6893f4e00554904999e40a")
add_versions("v8.2.4", "18e63ab1428bd52e691da107a6a56651c161210b11fbe22e2aa3c31f7fa00ca5")
add_deps("cmake")

@ -16,6 +16,8 @@ package("benchmark")
add_versions("1.7.0", "3aff99169fa8bdee356eaa1f691e835a6e57b1efeadb8a0f9f228531158246ac")
add_versions("1.7.1", "6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7")
add_versions("1.8.0", "ea2e94c24ddf6594d15c711c06ccd4486434d9cf3eca954e2af8a20c88f9f172")
add_versions("1.8.3", "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce")
add_versions("1.8.4", "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45")
if is_plat("mingw") and is_subhost("msys") then
add_extsources("pacman::benchmark")
@ -27,10 +29,14 @@ package("benchmark")
if is_plat("linux") then
add_syslinks("pthread")
elseif is_plat("windows") then
elseif is_plat("windows", "mingw") then
add_syslinks("shlwapi")
end
if is_plat("mingw") then
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
end
add_deps("cmake")
add_links("benchmark_main", "benchmark")
on_load("windows", function (package)
@ -39,7 +45,7 @@ package("benchmark")
end
end)
on_install("macosx", "linux", "windows", function (package)
on_install("macosx", "linux", "windows", "mingw", function (package)
local configs = {"-DBENCHMARK_ENABLE_TESTING=OFF", "-DBENCHMARK_INSTALL_DOCS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))

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

@ -7,11 +7,14 @@ package("bgfx")
add_urls("https://github.com/bkaradzic/bgfx.git")
add_versions("7816", "5ecddbf4d51e2dda2a56ae8cafef4810e3a45d87")
add_versions("8203", "484a5f0c25b53584a6b7fce0702a6bb580072d81")
add_versions("8674", "f42134876038027667ef7e47c9a612dca1051ef2")
add_resources("7816", "bx", "https://github.com/bkaradzic/bx.git", "51f25ba638b9cb35eb2ac078f842a4bed0746d56")
add_resources("8203", "bx", "https://github.com/bkaradzic/bx.git", "b9501348c596b68e5e655a8308df5c55f61ecd80")
add_resources("8674", "bx", "https://github.com/bkaradzic/bx.git", "67dfdf34f642a4a807b75eb600f82f4f04027963")
add_resources("7816", "bimg", "https://github.com/bkaradzic/bimg.git", "8355d36befc90c1db82fca8e54f38bfb7eeb3530")
add_resources("8203", "bimg", "https://github.com/bkaradzic/bimg.git", "663f724186e26caf46494e389ed82409106205fb")
add_resources("8674", "bimg", "https://github.com/bkaradzic/bimg.git", "964a5b85483cdf59a30dc006e9bd8bbdde6cb2be")
if is_plat("windows") then
add_syslinks("user32", "gdi32", "psapi")
@ -34,7 +37,7 @@ package("bgfx")
package:add("defines", "BX_CONFIG_DEBUG=" .. (package:debug() and "1" or "0"))
end)
on_install("windows", "macosx", "linux", function (package)
on_install("windows|native", "macosx", "linux", function (package)
local bxdir = package:resourcefile("bx")
local bimgdir = package:resourcefile("bimg")
local genie = is_host("windows") and "genie.exe" or "genie"

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

@ -5,8 +5,9 @@ package("binutils")
set_description("GNU binary tools for native development")
set_license("GPL-2.0")
set_urls("https://ftp.gnu.org/gnu/binutils/binutils-$(version).tar.xz",
"https://ftpmirror.gnu.org/binutils/binutils-$(version).tar.xz")
set_urls("https://ftpmirror.gnu.org/binutils/binutils-$(version).tar.xz",
"https://ftp.gnu.org/gnu/binutils/binutils-$(version).tar.xz")
add_versions("2.41", "ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450")
add_versions("2.38", "e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024")
add_versions("2.34", "f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952")
@ -18,6 +19,8 @@ package("binutils")
add_extsources("brew::binutils")
end
add_deps("bison")
on_install("@linux", "@macosx", "@msys", function (package)
local configs = {"--disable-debug",
"--disable-dependency-tracking",

@ -5,7 +5,8 @@ package("bison")
set_license("GPL-3.0")
if not is_plat("windows") then
add_urls("http://ftp.gnu.org/gnu/bison/bison-$(version).tar.gz")
add_urls("http://ftpmirror.gnu.org/gnu/bison/bison-$(version).tar.gz",
"http://ftp.gnu.org/gnu/bison/bison-$(version).tar.gz")
end
add_versions("3.7.4", "fbabc7359ccd8b4b36d47bfe37ebbce44805c052526d5558b95eda125d1677e2")

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

@ -5,10 +5,12 @@ package("blake3")
add_urls("https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/$(version).tar.gz",
"https://github.com/BLAKE3-team/BLAKE3.git")
add_versions("1.5.1", "822cd37f70152e5985433d2c50c8f6b2ec83aaf11aa31be9fe71486a91744f37")
add_versions("1.5.0", "f506140bc3af41d3432a4ce18b3b83b08eaa240e94ef161eb72b2e57cdc94c69")
add_versions("1.3.3", "27d2bc4ee5945ba75434859521042c949463ee7514ff17aaef328e23ef83fec0")
add_versions("1.3.1", "112becf0983b5c83efff07f20b458f2dbcdbd768fd46502e7ddd831b83550109")
on_install("windows", "linux", "macosx", "bsd", "mingw|x86_64", "android", "iphoneos", "cross", function (package)
on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "mingw|x86_64", "android", "iphoneos", "cross", function (package)
local configs = {}
io.writefile("xmake.lua", [[

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

@ -4,8 +4,9 @@ package("blosc")
set_description("A blocking, shuffling and loss-less compression library")
set_license("BSD-3-Clause")
add_urls("https://github.com/Blosc/c-blosc/archive/$(version).tar.gz",
add_urls("https://github.com/Blosc/c-blosc/archive/refs/tags/$(version).tar.gz",
"https://github.com/Blosc/c-blosc.git")
add_versions("v1.21.5", "32e61961bbf81ffea6ff30e9d70fca36c86178afd3e3cfa13376adec8c687509")
add_versions("v1.21.4", "e72bd03827b8564bbb3dc3ea0d0e689b4863871ce3861d946f2efd7a186ecf3e")
add_versions("v1.21.1", "f387149eab24efa01c308e4cba0f59f64ccae57292ec9c794002232f7903b55b")
add_versions("v1.20.1", "42c4d3fcce52af9f8e2078f8f57681bfc711706a3330cb72b9b39e05ae18a413")

@ -1,9 +1,11 @@
package("bluez")
set_homepage("http://www.bluez.org")
set_description("Library for the Bluetooth protocol stack for Linux")
set_license("GPL-2.0")
set_license("GPL-2.0-or-later")
add_urls("https://git.kernel.org/pub/scm/bluetooth/bluez.git")
add_versions("5.70", "c56970cbea3b5482a586b7570e79a28e7d84d295")
add_versions("5.69", "bbe41152d4c1c3fd608f3d933dba445a790a5331")
add_versions("5.68", "d764f78f27653bc1df71c462e9aca7a18bc75f9f")
on_install("linux", function (package)

@ -4,25 +4,27 @@ package("boost")
set_description("Collection of portable C++ source libraries.")
set_license("BSL-1.0")
add_urls("https://boostorg.jfrog.io/artifactory/main/release/$(version).tar.bz2", {version = function (version)
return version .. "/source/boost_" .. (version:gsub("%.", "_"))
end})
add_urls("https://github.com/xmake-mirror/boost/releases/download/boost-$(version).tar.bz2", {version = function (version)
add_urls("https://github.com/boostorg/boost/releases/download/boost-$(version)/boost-$(version)-b2-nodocs.tar.gz")
add_urls("https://github.com/boostorg/boost/releases/download/boost-$(version)/boost-$(version).tar.gz")
add_urls("https://github.com/xmake-mirror/boost/releases/download/boost-$(version).tar.bz2", {alias = "mirror", version = function (version)
return version .. "/boost_" .. (version:gsub("%.", "_"))
end})
add_versions("1.83.0", "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e")
add_versions("1.82.0", "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6")
add_versions("1.81.0", "71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa")
add_versions("1.80.0", "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0")
add_versions("1.79.0", "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39")
add_versions("1.78.0", "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc")
add_versions("1.77.0", "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854")
add_versions("1.76.0", "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41")
add_versions("1.75.0", "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb")
add_versions("1.74.0", "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1")
add_versions("1.73.0", "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402")
add_versions("1.72.0", "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722")
add_versions("1.70.0", "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778")
add_versions("1.85.0", "f4a7d3f81b8a0f65067b769ea84135fd7b72896f4f59c7f405086c8c0dc61434")
add_versions("1.84.0", "4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95")
add_versions("1.83.0", "0c6049764e80aa32754acd7d4f179fd5551d8172a83b71532ae093e7384e98da")
add_versions("1.82.0", "b62bd839ea6c28265af9a1f68393eda37fab3611425d3b28882d8e424535ec9d")
add_versions("1.81.0", "121da556b718fd7bd700b5f2e734f8004f1cfa78b7d30145471c526ba75a151c")
add_versions("mirror:1.80.0", "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0")
add_versions("mirror:1.79.0", "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39")
add_versions("mirror:1.78.0", "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc")
add_versions("mirror:1.77.0", "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854")
add_versions("mirror:1.76.0", "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41")
add_versions("mirror:1.75.0", "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb")
add_versions("mirror:1.74.0", "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1")
add_versions("mirror:1.73.0", "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402")
add_versions("mirror:1.72.0", "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722")
add_versions("mirror:1.70.0", "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778")
if is_plat("mingw") and is_subhost("msys") then
add_extsources("pacman::boost")
@ -112,6 +114,8 @@ package("boost")
end
return linkname
end
if not package:is_plat("windows") then
-- we need the fixed link order
local sublibs = {log = {"log_setup", "log"},
python = {"python", "numpy"},
@ -126,6 +130,7 @@ package("boost")
package:add("links", get_linkname(package, libname))
end
end
end
-- disable auto-link all libs
if package:is_plat("windows") then
package:add("defines", "BOOST_ALL_NO_LIB")
@ -142,17 +147,7 @@ package("boost")
on_install("macosx", "linux", "windows", "bsd", "mingw", "cross", function (package)
import("core.base.option")
-- get toolchain
local toolchain
if package:is_plat("windows") then
toolchain = package:toolchain("clang-cl") or package:toolchain("msvc") or
import("core.tool.toolchain").load("msvc", {plat = package:plat(), arch = package:arch()})
end
-- force boost to compile with the desired compiler
local win_toolset
local file = io.open("user-config.jam", "a")
if file then
function get_compiler(package, toolchain)
local cxx = package:build_getenv("cxx")
if package:is_plat("macosx") then
-- we uses ld/clang++ for link stdc++ for shared libraries
@ -161,11 +156,11 @@ package("boost")
if cc and cc:find("clang", 1, true) and cc:find("Xcode", 1, true) then
cc = "xcrun -sdk macosx clang++"
end
file:print("using darwin : : %s ;", cc)
return format("using darwin : : %s ;", cc)
elseif package:is_plat("windows") then
local vs_toolset = toolchain:config("vs_toolset")
local msvc_ver = ""
win_toolset = "msvc"
local win_toolset = "msvc"
if toolchain:name() == "clang-cl" then
win_toolset = "clang-win"
cxx = cxx:gsub("(clang%-cl)$", "%1.exe", 1)
@ -177,12 +172,35 @@ package("boost")
-- Specifying a version will disable b2 from forcing tools
-- from the latest installed msvc version.
file:print("using %s : %s : \"%s\" ;", win_toolset, msvc_ver, cxx:gsub("\\", "\\\\"))
return format("using %s : %s : \"%s\" ;", win_toolset, msvc_ver, cxx:gsub("\\", "\\\\"))
else
cxx = cxx:gsub("gcc$", "g++")
cxx = cxx:gsub("gcc%-", "g++-")
cxx = cxx:gsub("clang$", "clang++")
file:print("using gcc : : %s ;", cxx:gsub("\\", "/"))
cxx = cxx:gsub("clang%-", "clang++-")
if cxx and cxx:find("clang", 1, true) then
return format("using clang : : \"%s\" ;", cxx:gsub("\\", "/"))
else
return format("using gcc : : \"%s\" ;", cxx:gsub("\\", "/"))
end
end
end
-- get host toolchain
import("core.tool.toolchain")
local host_toolchain
if package:is_plat("windows") then
host_toolchain = toolchain.load("msvc", {plat = "windows", arch = os.arch()})
if not host_toolchain:check() then
host_toolchain = toolchain.load("clang-cl", {plat = "windows", arch = os.arch()})
end
assert(host_toolchain:check(), "host msvc or clang-cl not found!")
end
-- force boost to compile with the desired compiler
local file = io.open("user-config.jam", "w")
if file then
file:write(get_compiler(package, host_toolchain))
file:close()
end
@ -193,12 +211,14 @@ package("boost")
"--without-icu"
}
local runenvs
if package:has_tool("cxx", "clang", "clangxx") then
table.insert(bootstrap_argv, "--with-toolset=clang")
end
if package:is_plat("windows") then
runenvs = toolchain:runenvs()
-- for bootstrap.bat, all other arguments are useless
bootstrap_argv = { "msvc" }
os.vrunv("bootstrap.bat", bootstrap_argv, {envs = runenvs})
os.vrunv("bootstrap.bat", bootstrap_argv, {envs = host_toolchain:runenvs()})
elseif package:is_plat("mingw") and is_host("windows") then
bootstrap_argv = { "gcc" }
os.vrunv("bootstrap.bat", bootstrap_argv)
@ -207,6 +227,29 @@ package("boost")
else
os.vrunv("./bootstrap.sh", bootstrap_argv)
end
-- get build toolchain
local build_toolchain
local build_toolset
local runenvs
if package:is_plat("windows") then
if package:has_tool("cxx", "clang_cl") then
build_toolset = "clang-win"
build_toolchain = package:toolchain("clang-cl")
elseif package:has_tool("cxx", "cl") then
build_toolset = "msvc"
build_toolchain = package:toolchain("msvc")
end
if build_toolchain then
runenvs = build_toolchain:runenvs()
end
end
local file = io.open("user-config.jam", "w")
if file then
file:write(get_compiler(package, build_toolchain))
file:close()
end
os.vrun("./b2 headers")
local njobs = option.get("jobs") or tostring(os.default_njob())
@ -241,6 +284,11 @@ package("boost")
else
table.insert(argv, "address-model=32")
end
local cxxflags = {}
local linkflags = {}
table.join2(cxxflags, table.wrap(package:config("cxflags")))
table.join2(cxxflags, table.wrap(package:config("cxxflags")))
if package:is_plat("windows") then
local vs_runtime = package:config("vs_runtime")
if package:config("shared") then
@ -250,15 +298,53 @@ package("boost")
else
table.insert(argv, "runtime-link=shared")
end
table.insert(argv, "cxxflags=-std:c++14")
table.insert(argv, "toolset=" .. win_toolset)
table.insert(argv, "toolset=" .. build_toolset)
table.insert(cxxflags, "-std:c++14")
elseif package:is_plat("mingw") then
table.insert(argv, "toolset=gcc")
elseif package:is_plat("macosx") then
table.insert(argv, "toolset=darwin")
-- fix macosx arm64 build issue https://github.com/microsoft/vcpkg/pull/18529
table.insert(cxxflags, "-std=c++14")
table.insert(cxxflags, "-arch")
table.insert(cxxflags, package:arch())
local xcode = package:toolchain("xcode") or import("core.tool.toolchain").load("xcode", {plat = package:plat(), arch = package:arch()})
if xcode:check() then
local xcode_dir = xcode:config("xcode")
local xcode_sdkver = xcode:config("xcode_sdkver")
local target_minver = xcode:config("target_minver")
if xcode_dir and xcode_sdkver then
local xcode_sdkdir = xcode_dir .. "/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX" .. xcode_sdkver .. ".sdk"
table.insert(cxxflags, "-isysroot")
table.insert(cxxflags, xcode_sdkdir)
end
if target_minver then
table.insert(cxxflags, "-mmacosx-version-min=" .. target_minver)
end
end
else
table.insert(argv, "cxxflags=-std=c++14")
table.insert(cxxflags, "-std=c++14")
if package:config("pic") ~= false then
table.insert(argv, "cxxflags=-fPIC")
table.insert(cxxflags, "-fPIC")
end
end
if package.has_runtime and package:has_runtime("c++_shared", "c++_static") then
table.insert(cxxflags, "-stdlib=libc++")
table.insert(linkflags, "-stdlib=libc++")
if package:has_runtime("c++_static") then
table.insert(linkflags, "-static-libstdc++")
end
end
if package:config("asan") then
table.insert(cxxflags, "-fsanitize=address")
table.insert(linkflags, "-fsanitize=address")
end
if cxxflags then
table.insert(argv, "cxxflags=" .. table.concat(cxxflags, " "))
end
if linkflags then
table.insert(argv, "linkflags=" .. table.concat(linkflags, " "))
end
for _, libname in ipairs(libnames) do
if package:config("all") or package:config(libname) then
@ -270,7 +356,22 @@ package("boost")
table.insert(argv, "pch=off")
end
os.vrunv("./b2", argv, {envs = runenvs})
if package:is_plat("windows") and package:version():le("1.85.0") then
local vs_toolset = build_toolchain:config("vs_toolset")
local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
local minor = vs_toolset_ver:minor()
if minor and minor >= 40 then
io.replace("tools/build/src/engine/config_toolset.bat", "vc143", "vc144", {plain = true})
io.replace("tools/build/src/engine/build.bat", "vc143", "vc144", {plain = true})
io.replace("tools/build/src/engine/guess_toolset.bat", "vc143", "vc144", {plain = true})
io.replace("tools/build/src/tools/intel-win.jam", "14.3", "14.4", {plain = true})
io.replace("tools/build/src/tools/msvc.jam", "14.3", "14.4", {plain = true})
end
end
local ok = os.execv("./b2", argv, {envs = runenvs, try = true, stdout = "boost-log.txt"})
if ok ~= 0 then
raise("boost build failed, please check log in " .. path.join(os.curdir(), "boost-log.txt"))
end
end)
on_test(function (package)

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

@ -7,6 +7,7 @@ package("boost_sml")
add_urls("https://github.com/boost-ext/sml/archive/refs/tags/$(version).tar.gz",
"https://github.com/boost-ext/sml.git")
add_versions("v1.1.11", "8773efd639ce9649dc449135c8c53232e1cb5f4037d44be02c1b9ccc343f246d")
add_versions("v1.1.8", "d2626b2fd249fa0788ca364a2f8dcb4762dd72195f86d43370e4cad4c02262c5")
add_deps("cmake")

@ -7,6 +7,7 @@ package("boost_ut")
add_urls("https://github.com/boost-ext/ut/archive/refs/tags/$(version).tar.gz")
add_urls("https://github.com/boost-ext/ut.git")
add_versions("v1.1.9", "1a666513157905aa0e53a13fac602b5673dcafb04a869100a85cd3f000c2ed0d")
add_versions("v2.0.1", "1e43be17045a881c95cedc843d72fe9c1e53239b02ed179c1e39e041ebcd7dad")
add_configs("modules", {description = "Enable C++20 modules", default = false, type = "boolean", readonly = true})

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

@ -1,24 +1,36 @@
package("boringssl")
set_homepage("https://boringssl.googlesource.com/boringssl")
set_description("A fork of OpenSSL that is designed to meet Google's needs.")
set_description("BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.")
add_urls("https://github.com/google/boringssl/archive/refs/tags/$(version).tar.gz", {version = function (version) return "fips-" .. version:gsub("%.", "") end})
add_urls("https://github.com/google/boringssl.git")
add_versions("2022.06.13", "a343962da2fbb10d8fa2cd9a2832839a23045a197c0ff306dc0fa0abb85759b3")
add_versions("2021.12.29", "d80f17d5c94b21c4fb2e82ee527bfe001b3553f2")
add_patches("2022.06.13", path.join(os.scriptdir(), "patches", "2022.06.13", "cmake.patch"), "c44e5c2b4b4f010a6fab1c0bce22a50feb5d85f37a870cf9a71f8d58bdfbd169")
add_patches("2021.12.29", path.join(os.scriptdir(), "patches", "2021.12.29", "cmake.patch"), "d8bb6312b87b8aad434ea3f9f4275f769af3cdbaab78adf400e8e3907443b505")
add_deps("cmake", "go")
if is_plat("linux") then
add_syslinks("pthread", "dl", "m")
elseif is_plat("windows") then
add_syslinks("advapi32")
add_deps("nasm")
end
add_links("ssl", "crypto")
on_install("linux", "macosx", "windows", function (package)
add_deps("cmake", "go")
on_load("windows", function (package)
if package:is_plat("windows") and package:version():ge("2022.06.13") and (not package:is_precompiled()) then
package:add("deps", "strawberry-perl")
end
end)
on_install("linux", "macosx", "windows|!arm64", function (package)
import("net.fasturl")
local configs = {}
local proxyurls = {"https://goproxy.cn", "https://proxy.golang.org"}
fasturl.add(proxyurls)
@ -26,6 +38,19 @@ package("boringssl")
if #proxyurls > 0 then
os.setenv("GOPROXY", proxyurls[1])
end
io.replace("CMakeLists.txt", "-WX", "", {plain = true})
io.replace("CMakeLists.txt", "-Werror", "", {plain = true})
if package:version():ge("2022.06.13") then
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"))
import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") then
os.mv(package:installdir("lib/*.dll"), package:installdir("bin"))
end
else
-- we need suppress "hidden symbol ... is referenced by DSO"
local cxflags
if not package:config("shared") and package:is_plat("linux") then
@ -33,7 +58,6 @@ package("boringssl")
end
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
io.replace("CMakeLists.txt", "-WX", "", {plain = true})
import("package.tools.cmake").install(package, configs, {cxflags = cxflags, buildir = "build"})
os.cp("include", package:installdir())
if package:config("shared") then
@ -56,6 +80,7 @@ package("boringssl")
os.cp("build/ssl/libssl.a", package:installdir("lib"))
os.cp("build/crypto/libcrypto.a", package:installdir("lib"))
end
end
end)
on_test(function (package)

@ -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…
Cancel
Save