Skip to content

Commit

Permalink
feat: Update the port version whenever possible (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO authored Nov 15, 2024
1 parent 336406f commit 1827904
Show file tree
Hide file tree
Showing 52 changed files with 1,931 additions and 10,448 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ jobs:
maximum-size: 16GB
disk-root: "D:"

# - name: Free Disk Space (Ubuntu) for cuda
# if: (runner.os == 'Linux') && (!contains(matrix.arch, 'android'))
# uses: jlumbroso/free-disk-space@main
# with:
# # this might remove tools that are actually needed,
# # if set to "true" but frees about 6 GB
# tool-cache: false

# # all of these default to true, but feel free to set to
# # "false" if necessary for your workflow
# android: true
# dotnet: true
# haskell: true
# large-packages: true
# docker-images: true
# swap-storage: true

- uses: actions/checkout@v3
with:
submodules: "recursive"
Expand All @@ -56,33 +73,41 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build python3-pyelftools elfutils patchelf nasm
sudo apt-get install -y autoconf automake autoconf-archive
- name: Install Cross-Compiler for Linux
if: runner.os == 'Linux' && matrix.arch == 'arm64'
run: |
sudo apt install crossbuild-essential-arm64
# - uses: Jimver/[email protected]
# if: (runner.os == 'Linux' || runner.os == 'Windows') && (!contains(matrix.arch, 'android'))
# id: cuda-toolkit
# with:
# log-file-suffix: '${{ matrix.arch }}-${{ runner.os }}.txt'

- uses: nttld/setup-ndk@v1
if: contains(matrix.arch, 'android')
id: setup-ndk
with:
ndk-version: r27
ndk-version: r27c
add-to-path: false

# https://github.com/android/ndk/issues/2032#issuecomment-2274923977
- name: Fix ndk r27
if: contains(matrix.arch, 'android')
run: |
FLAGS_PATH=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/flags.cmake
FLAGS_CONTENT=$(cat $FLAGS_PATH)
echo -e "cmake_policy(PUSH)\ncmake_policy(SET CMP0057 NEW)\n\n${FLAGS_CONTENT}\n\ncmake_policy(POP)\n" > $FLAGS_PATH
cat $FLAGS_PATH
# - name: Fix ndk r27
# if: contains(matrix.arch, 'android')
# run: |
# FLAGS_PATH=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/flags.cmake
# FLAGS_CONTENT=$(cat $FLAGS_PATH)
# echo -e "cmake_policy(PUSH)\ncmake_policy(SET CMP0057 NEW)\n\n${FLAGS_CONTENT}\n\ncmake_policy(POP)\n" > $FLAGS_PATH
# cat $FLAGS_PATH

- name: Install Packages on MacOS
if: runner.os == 'macOS'
run: |
brew update
brew install ccache ninja pkg-config nasm bison
brew install autoconf automake autoconf-archive
brew install bash gnu-sed gnu-tar
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
Expand Down Expand Up @@ -160,6 +185,7 @@ jobs:
- name: Build MaaDeps
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
# CUDAToolkit_ROOT: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}
run: |
for attempt in 1 2 3
do
Expand Down
1 change: 0 additions & 1 deletion maadeps/runtime_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .vcpkg import triplet

exclude = [
"*onnxruntime_providers_shared*",
"*opencv_img_hash*",
]

Expand Down
1 change: 0 additions & 1 deletion maadeps/runtime_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .common import resdir

exclude = [
"*onnxruntime_providers_shared*",
"*opencv_img_hash*",
]

Expand Down
1 change: 0 additions & 1 deletion maadeps/runtime_macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import subprocess

exclude = [
"*onnxruntime_providers_shared*",
"*opencv_img_hash*",
]

Expand Down
1 change: 0 additions & 1 deletion maadeps/runtime_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


exclude = [
"bin/onnxruntime_providers_shared_maa.dll",
"bin/opencv_img_hash*_maa.dll",
"*.pdb",
# mingw gcc-libs
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 2193 files
12 changes: 0 additions & 12 deletions vcpkg-overlay/ports/abseil/avoid-export-internal.patch

This file was deleted.

59 changes: 0 additions & 59 deletions vcpkg-overlay/ports/abseil/portfile.cmake

This file was deleted.

26 changes: 0 additions & 26 deletions vcpkg-overlay/ports/abseil/vcpkg.json

This file was deleted.

4 changes: 2 additions & 2 deletions vcpkg-overlay/ports/boost-asio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/asio
REF boost-${VERSION}
SHA512 bbde7c60f208733d48713d2dcfe5be0e18b8372ecaae51055225e5da6bf3e4671e53da8917d27c17f84e34be858d3002c3ac62cdecfd8e3e3861edf365256bee
SHA512 379905acf0cc0352c8df32f4106c3e17ad0f02fd0367288c2dca319a7573bd34ebf435a0e9d876ee0d44a24189d896167c49c7727e1dc77c0fca887e9f7a6eca
HEAD_REF master
PATCHES
windows_alloca_header.patch
opt-dep.diff
windows_alloca_header.patch
windows_handle_inheritance.patch
)

Expand Down
23 changes: 11 additions & 12 deletions vcpkg-overlay/ports/boost-asio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
{
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
"name": "boost-asio",
"version": "1.85.0",
"port-version": 2,
"version": "1.86.0",
"description": "Boost asio module",
"homepage": "https://www.boost.org/libs/asio",
"license": "BSL-1.0",
"dependencies": [
{
"name": "boost-align",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-assert",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-cmake",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-config",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-context",
"platform": "!uwp & !emscripten",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-coroutine",
"platform": "!(arm & windows) & !uwp & !emscripten",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-date-time",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-headers",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-system",
"version>=": "1.85.0"
"version>=": "1.86.0"
},
{
"name": "boost-throw-exception",
"version>=": "1.85.0"
"version>=": "1.86.0"
}
],
"features": {
Expand Down
24 changes: 24 additions & 0 deletions vcpkg-overlay/ports/boost-process/opt-filesystem.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c0c1bfef94..3c879b8958 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ target_link_libraries(boost_process
Boost::asio
Boost::config
Boost::core
- Boost::filesystem
+ $<TARGET_NAME_IF_EXISTS:Boost::filesystem>
Boost::fusion
Boost::iterator
Boost::move
@@ -28,6 +28,10 @@ target_link_libraries(boost_process
Boost::winapi
)

+if(NOT TARGET Boost::filesystem)
+ target_compile_definitions(boost_process INTERFACE $<$<NOT:$<TARGET_EXISTS:Boost::filesystem>>:BOOST_PROCESS_USE_STD_FS>)
+endif()
+
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

add_subdirectory(test)
18 changes: 18 additions & 0 deletions vcpkg-overlay/ports/boost-process/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Automatically generated by scripts/boost/generate-ports.ps1

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/process
REF boost-${VERSION}
SHA512 f8a5d146d07aad83a2aff1e565026836c833b77daa9697f7680956423e7d8b450b41831c77047afff1e9f716c87d2f9ade6194c21e80cfec33d686a608241c32
HEAD_REF master
PATCHES
opt-filesystem.patch

)

set(FEATURE_OPTIONS "")
boost_configure_and_install(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
)
Loading

0 comments on commit 1827904

Please sign in to comment.