From 2fd5ff7f8c2aed29f59f4570450b251147c2e8d9 Mon Sep 17 00:00:00 2001 From: Saikari Date: Fri, 21 Aug 2026 00:52:01 +0300 Subject: [PATCH 01/21] aui: add new port --- ports/aui/aui-config.cmake.in | 293 ++++++++++++++++++++++++++++ ports/aui/debundle.patch | 350 ++++++++++++++++++++++++++++++++++ ports/aui/disable-auib.patch | 21 ++ ports/aui/disable-tests.patch | 22 +++ ports/aui/fix-arm64.patch | 16 ++ ports/aui/fix-fmt12.patch | 111 +++++++++++ ports/aui/fix-glm.patch | 45 +++++ ports/aui/fix-macos.patch | 17 ++ ports/aui/portfile.cmake | 91 +++++++++ ports/aui/vcpkg.json | 66 +++++++ 10 files changed, 1032 insertions(+) create mode 100644 ports/aui/aui-config.cmake.in create mode 100644 ports/aui/debundle.patch create mode 100644 ports/aui/disable-auib.patch create mode 100644 ports/aui/disable-tests.patch create mode 100644 ports/aui/fix-arm64.patch create mode 100644 ports/aui/fix-fmt12.patch create mode 100644 ports/aui/fix-glm.patch create mode 100644 ports/aui/fix-macos.patch create mode 100644 ports/aui/portfile.cmake create mode 100644 ports/aui/vcpkg.json diff --git a/ports/aui/aui-config.cmake.in b/ports/aui/aui-config.cmake.in new file mode 100644 index 00000000000000..f19a6b4d2b491b --- /dev/null +++ b/ports/aui/aui-config.cmake.in @@ -0,0 +1,293 @@ +get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(AUI_ROOT_DIR "${SELF_DIR}/../.." ABSOLUTE) + +@AUI_CONFIG_VARS@ +@AUIB_DEPS@ + +include(CMakeFindDependencyMacro) + +if (NOT AUI_FIND_COMPONENTS) + set(AUI_FIND_COMPONENTS ${aui_FIND_COMPONENTS}) +endif() + +if (NOT AUI_FIND_COMPONENTS) + set(AUI_FIND_COMPONENTS ${AUI_AVAILABLE_COMPONENTS}) + set(_all TRUE) +else() + if (views IN_LIST AUI_FIND_COMPONENTS) + list(APPEND AUI_FIND_COMPONENTS xml image) + endif() + list(REMOVE_DUPLICATES AUI_FIND_COMPONENTS) +endif() + +set(_aui_needed_targets "") +foreach(_module ${AUI_FIND_COMPONENTS}) + if(NOT DEFINED AUI_COMPONENT_${_module}_LINK_LIBS) + continue() + endif() + foreach(_dep IN LISTS AUI_COMPONENT_${_module}_LINK_LIBS) + string(REGEX REPLACE "^\\\$$" "\\1" _dep_target "${_dep}") + if(_dep_target MATCHES "::" AND NOT _dep_target MATCHES "^aui::") + list(APPEND _aui_needed_targets "${_dep_target}") + endif() + endforeach() +endforeach() +list(REMOVE_DUPLICATES _aui_needed_targets) + +foreach(_target IN LISTS _aui_needed_targets) + if(TARGET "${_target}") + continue() + endif() + if(_target MATCHES "^glm::") + find_dependency(glm CONFIG) + elseif(_target MATCHES "^fmt::") + find_dependency(fmt CONFIG) + elseif(_target MATCHES "^range-v3::") + find_dependency(range-v3 CONFIG) + elseif(_target STREQUAL "ZLIB::ZLIB") + find_dependency(ZLIB) + elseif(_target MATCHES "^Ogg::") + find_dependency(Ogg CONFIG) + elseif(_target MATCHES "^Vorbis::") + find_dependency(Vorbis CONFIG) + elseif(_target STREQUAL "Threads::Threads") + find_dependency(Threads) + elseif(_target STREQUAL "unofficial::libbacktrace::libbacktrace") + find_dependency(unofficial-libbacktrace CONFIG) + elseif(_target MATCHES "^unofficial::libnsgif::") + find_dependency(unofficial-libnsgif CONFIG) + elseif(_target MATCHES "^unofficial::sqlite3::") + find_dependency(unofficial-sqlite3 CONFIG) + elseif(_target MATCHES "^OpenSSL::") + find_dependency(OpenSSL) + elseif(_target MATCHES "^CURL::") + find_dependency(CURL) + elseif(_target MATCHES "^lunasvg::") + find_dependency(lunasvg CONFIG) + elseif(_target MATCHES "^MINIZIP::") + find_dependency(minizip CONFIG) + elseif(_target MATCHES "^WebP::") + find_dependency(WebP CONFIG) + elseif(_target MATCHES "^GLEW::") + find_dependency(GLEW CONFIG) + elseif(_target STREQUAL "Freetype::Freetype") + find_dependency(Freetype) + elseif(_target MATCHES "^X11::") + find_dependency(X11) + elseif(_target STREQUAL "Fontconfig::Fontconfig") + find_dependency(Fontconfig) + elseif(_target MATCHES "^OpenGL::") + find_dependency(OpenGL) + elseif(_target MATCHES "^oboe::") + find_dependency(oboe CONFIG) + elseif(_target MATCHES "^GTest::") + find_dependency(GTest) + elseif(_target MATCHES "^PkgConfig::") + if(NOT DEFINED PKG_CONFIG_FOUND) + find_package(PkgConfig QUIET) + endif() + if(NOT PKG_CONFIG_FOUND) + continue() + endif() + set(_aui_pkgconfig_name "") + if(_target STREQUAL "PkgConfig::PulseAudio") + set(_aui_pkgconfig_name libpulse) + elseif(_target STREQUAL "PkgConfig::PulseAudioSimple") + set(_aui_pkgconfig_name libpulse-simple) + elseif(_target STREQUAL "PkgConfig::Opus") + set(_aui_pkgconfig_name opus) + elseif(_target STREQUAL "PkgConfig::soxr") + set(_aui_pkgconfig_name soxr) + elseif(_target STREQUAL "PkgConfig::DBUS") + set(_aui_pkgconfig_name dbus-1) + elseif(_target STREQUAL "PkgConfig::GTK3") + set(_aui_pkgconfig_name gtk+-3.0) + endif() + if(_aui_pkgconfig_name) + string(REPLACE "PkgConfig::" "" _aui_pkgconfig_prefix "${_target}") + if(NOT TARGET "PkgConfig::${_aui_pkgconfig_prefix}") + if(DEFINED ENV{PKG_CONFIG_PATH}) + set(_aui_prev_pkg_config_path "$ENV{PKG_CONFIG_PATH}") + else() + unset(_aui_prev_pkg_config_path) + endif() + set(ENV{PKG_CONFIG_PATH} "${AUI_ROOT_DIR}/lib/pkgconfig:${AUI_ROOT_DIR}/share/pkgconfig:$ENV{PKG_CONFIG_PATH}") + pkg_check_modules(${_aui_pkgconfig_prefix} IMPORTED_TARGET ${_aui_pkgconfig_name}) + if(DEFINED _aui_prev_pkg_config_path) + set(ENV{PKG_CONFIG_PATH} "${_aui_prev_pkg_config_path}") + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() + endif() + endif() + endif() +endforeach() + +function(_aui_check_component_deps _component) + set(_aui_deps_ok TRUE PARENT_SCOPE) + if(NOT DEFINED AUI_COMPONENT_${_component}_LINK_LIBS) + return() + endif() + foreach(_dep IN LISTS AUI_COMPONENT_${_component}_LINK_LIBS) + string(REGEX REPLACE "^\\\$$" "\\1" _dep_target "${_dep}") + if(_dep_target MATCHES "^aui::") + string(REPLACE "aui::" "" _dep_module "${_dep_target}") + if(NOT _dep_module IN_LIST AUI_AVAILABLE_COMPONENTS) + set(_aui_deps_ok FALSE PARENT_SCOPE) + return() + endif() + elseif(_dep_target MATCHES "::") + if(NOT TARGET "${_dep_target}") + set(_aui_deps_ok FALSE PARENT_SCOPE) + return() + endif() + endif() + endforeach() +endfunction() + +set(${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE) +set(_aui_pending_components ${AUI_FIND_COMPONENTS}) +set(_aui_processed_components "") +while(_aui_pending_components) + list(POP_FRONT _aui_pending_components _module) + if(_module IN_LIST _aui_processed_components) + continue() + endif() + list(APPEND _aui_processed_components ${_module}) + if (_module STREQUAL "toolbox") + set(${CMAKE_FIND_PACKAGE_NAME}_toolbox_FOUND TRUE) + continue() + endif() + + set(_module_target_name aui::${_module}) + if (NOT ${_module} IN_LIST AUI_ALL_COMPONENTS) + message(FATAL_ERROR "Unknown component ${_module}") + endif() + if (_module STREQUAL toolbox) + continue() + endif() + if (${_module} IN_LIST AUI_AVAILABLE_COMPONENTS) + set(_module_dir "${AUI_ROOT_DIR}/aui.${_module}") + if (EXISTS ${_module_dir}) + _aui_check_component_deps(${_module}) + if(NOT _aui_deps_ok) + message(STATUS "AUI component '${_module}' skipped: missing transitive dependencies") + if(NOT _all) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module}) + message(FATAL_ERROR "Component ${_module} requires unavailable dependencies") + endif() + endif() + continue() + endif() + if (WIN32) + find_file(${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY + NAMES "aui.${_module}.dll" "libaui.${_module}.dll" + PATHS "${AUI_ROOT_DIR}/bin" "${AUI_ROOT_DIR}/aui.${_module}/bin" + NO_DEFAULT_PATH + NO_CACHE) + find_file(${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY_DEBUG + NAMES "aui.${_module}.dll" "libaui.${_module}.dll" + PATHS "${AUI_ROOT_DIR}/debug/bin" "${AUI_ROOT_DIR}/debug/aui.${_module}/bin" + NO_DEFAULT_PATH + NO_CACHE) + find_library(${CMAKE_FIND_PACKAGE_NAME}_${_module}_IMPLIBRARY "aui.${_module}" + PATHS "${AUI_ROOT_DIR}/lib" "${AUI_ROOT_DIR}/aui.${_module}/lib" + NO_DEFAULT_PATH + NO_CACHE) + find_library(${CMAKE_FIND_PACKAGE_NAME}_${_module}_IMPLIBRARY_DEBUG "aui.${_module}" + PATHS "${AUI_ROOT_DIR}/debug/lib" "${AUI_ROOT_DIR}/debug/aui.${_module}/lib" + NO_DEFAULT_PATH + NO_CACHE) + else() + find_library(${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY "aui.${_module}" + PATHS "${AUI_ROOT_DIR}/lib" "${AUI_ROOT_DIR}/aui.${_module}/lib" + NO_DEFAULT_PATH + NO_CACHE) + find_library(${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY_DEBUG "aui.${_module}" + PATHS "${AUI_ROOT_DIR}/debug/lib" "${AUI_ROOT_DIR}/debug/aui.${_module}/lib" + NO_DEFAULT_PATH + NO_CACHE) + endif() + set(_lib ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY}) + set(_lib_debug ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY_DEBUG}) + set(_implib ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_IMPLIBRARY}) + set(_implib_debug ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_IMPLIBRARY_DEBUG}) + set(_include ${AUI_ROOT_DIR}/aui.${_module}/include) + if ((_lib OR _implib) AND EXISTS ${_include}) + set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND TRUE) + if (NOT _lib) + set(_lib ${_implib}) + endif() + if (NOT _lib_debug) + set(_lib_debug ${_implib_debug}) + endif() + list(APPEND ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${_lib}) + list(APPEND ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS ${_include}) + list(APPEND ${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TARGETS "${_module_target_name}") + add_library(${_module_target_name} ${AUI_COMPONENT_${_module}_KIND} IMPORTED) + add_library(aui.${_module} ALIAS ${_module_target_name}) + target_link_libraries(${_module_target_name} INTERFACE ${AUI_COMPONENT_${_module}_LINK_LIBS}) + target_link_options(${_module_target_name} INTERFACE ${AUI_COMPONENT_${_module}_LINK_OPTIONS}) + # Per-config imported locations: Debug consumers link the debug + # libs (debug/lib), all other configurations the release ones. + set(_aui_props + IMPORTED_LOCATION "${_lib}" + INTERFACE_INCLUDE_DIRECTORIES "$<$:${AUI_ROOT_DIR}/debug/aui.${_module}/include>$<$>:${AUI_ROOT_DIR}/aui.${_module}/include>" + INTERFACE_LINK_DIRECTORIES "${AUI_ROOT_DIR}/lib") + if(_implib) + list(APPEND _aui_props IMPORTED_IMPLIB "${_implib}") + endif() + if(_lib_debug) + list(APPEND _aui_props IMPORTED_LOCATION_DEBUG "${_lib_debug}") + endif() + if(_implib_debug) + list(APPEND _aui_props IMPORTED_IMPLIB_DEBUG "${_implib_debug}") + endif() + set_target_properties(${_module_target_name} PROPERTIES ${_aui_props}) + + target_compile_definitions(${_module_target_name} INTERFACE ${AUI_COMPONENT_${_module}_COMPILE_DEFINITIONS}) + if (AUI_COMPONENT_${_module}_WHOLEARCHIVE) + set_target_properties(${_module_target_name} PROPERTIES INTERFACE_AUI_WHOLEARCHIVE ON) + endif() + foreach(_dep IN LISTS AUI_COMPONENT_${_module}_LINK_LIBS) + string(REGEX REPLACE "^\\\$$" "\\1" _dep_target "${_dep}") + if(_dep_target MATCHES "^aui::") + string(REPLACE "aui::" "" _dep_module "${_dep_target}") + if(NOT _dep_module IN_LIST _aui_processed_components AND _dep_module IN_LIST AUI_AVAILABLE_COMPONENTS) + list(APPEND _aui_pending_components ${_dep_module}) + endif() + endif() + endforeach() + continue() + endif() + endif() + endif() + + set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND FALSE) + if (NOT _all) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + if (${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED AND ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module}) + message(FATAL_ERROR "Component ${_module} is not found") + else() + message(STATUS "Component ${_module} is not found") + endif() + endif() +endwhile() + +if (${CMAKE_FIND_PACKAGE_NAME}_FOUND AND NOT TARGET aui) + add_library(aui INTERFACE IMPORTED) + set_target_properties(aui PROPERTIES + INTERFACE_LINK_LIBRARIES "${${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TARGETS}") +endif() + +set(AUI_BUILD_AUI_ROOT "${AUI_ROOT_DIR}") + +macro(auib_use_system_libs_begin) +endmacro() +macro(auib_use_system_libs_end) +endmacro() + +include("${AUI_BUILD_AUI_ROOT}/share/aui/cmake/aui.build.cmake") + +find_program(AUI_TOOLBOX_EXE NAMES aui.toolbox) diff --git a/ports/aui/debundle.patch b/ports/aui/debundle.patch new file mode 100644 index 00000000000000..5ed7f509512a65 --- /dev/null +++ b/ports/aui/debundle.patch @@ -0,0 +1,350 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6902d56..3a9f94c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,9 +64,7 @@ function(define_aui_component AUI_COMPONENT_NAME) + add_subdirectory("aui.${AUI_COMPONENT_NAME}") + endfunction() + +-auib_import(ZLIB https://github.com/aui-framework/zlib +- VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a +- CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) ++find_package(ZLIB REQUIRED) + + # define all components + define_aui_component(core) +@@ -86,11 +84,11 @@ define_aui_component(json) + define_aui_component(audio) + define_aui_component(updater) + +-if (NOT ANDROID AND NOT IOS) ++if (0) + define_aui_component(uitests) + endif() + +-if (AUI_BUILD_EXAMPLES) ++if (AUI_BUILD_EXAMPLES) + add_subdirectory(examples) + endif() + +@@ -195,7 +193,6 @@ auib_precompiled_binary() + # [auib_precompiled_binary] + + # test aui.boot on ci/cd +-add_subdirectory(test/) + + # [configure file example] + configure_file(cmake/aui-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aui-config.cmake @ONLY) +diff --git a/aui.audio/CMakeLists.txt b/aui.audio/CMakeLists.txt +index 21e4415..fb0302a 100644 +--- a/aui.audio/CMakeLists.txt ++++ b/aui.audio/CMakeLists.txt +@@ -1,30 +1,25 @@ + cmake_minimum_required(VERSION 3.10) + + aui_module(aui.audio WHOLEARCHIVE EXPORT aui) +-add_subdirectory(3rdparty/ogg) ++find_package(Ogg CONFIG REQUIRED) ++find_package(Vorbis CONFIG REQUIRED) + aui_link(aui.audio PUBLIC aui::core) + + if (AUI_PLATFORM_ANDROID) +- auib_import(oboe https://github.com/google/oboe ADD_SUBDIRECTORY VERSION main) +- aui_link(aui.audio PUBLIC oboe $ $) +- +- install( +- TARGETS oboe +- EXPORT aui +- ARCHIVE DESTINATION "aui.audio/lib" +- LIBRARY DESTINATION "aui.audio/lib" +- RUNTIME DESTINATION "aui.audio/bin" +- PUBLIC_HEADER DESTINATION "aui.audio/include" +- INCLUDES DESTINATION "aui.audio/include" +- ) ++ find_package(oboe CONFIG REQUIRED) ++ aui_link(aui.audio PUBLIC oboe::oboe $ $) + elseif (AUI_PLATFORM_LINUX) +- aui_link(aui.audio PUBLIC pulse) ++ include(FindPkgConfig) ++ pkg_check_modules(PulseAudio REQUIRED IMPORTED_TARGET libpulse) ++ pkg_check_modules(PulseAudioSimple REQUIRED IMPORTED_TARGET libpulse-simple) ++ aui_link(aui.audio PRIVATE PkgConfig::PulseAudio PkgConfig::PulseAudioSimple) + elseif (AUI_PLATFORM_WIN) + aui_link(aui.audio PUBLIC Winmm dsound.lib dxguid.lib) + endif() + +-auib_import(Opus https://github.com/xiph/opus.git VERSION v1.4) +-aui_link(aui.audio PRIVATE Opus::opus) ++include(FindPkgConfig) ++pkg_check_modules(Opus REQUIRED IMPORTED_TARGET opus) ++aui_link(aui.audio PRIVATE PkgConfig::Opus) + + if (AUI_PLATFORM_IOS OR AUI_PLATFORM_MACOS) + auib_use_system_libs_begin() +@@ -42,9 +37,9 @@ if (AUI_PLATFORM_MACOS) + "-framework QuartzCore") + endif() + +-auib_import(soxr https://github.com/aui-framework/soxr +- ADD_SUBDIRECTORY +- VERSION adacc686124ac3568432f3dca388878963a005ee +- ) ++include(FindPkgConfig) ++pkg_check_modules(soxr REQUIRED IMPORTED_TARGET soxr) ++ ++aui_link(aui.audio PRIVATE PkgConfig::soxr) + +-aui_link(aui.audio PRIVATE soxr) ++aui_link(aui.audio PRIVATE Vorbis::vorbisfile) +diff --git a/aui.audio/src/AUI/Audio/Formats/vorbis/AVorbisSoundPipe.cpp b/aui.audio/src/AUI/Audio/Formats/vorbis/AVorbisSoundPipe.cpp +index 5cffdb9..4479ca7 100644 +--- a/aui.audio/src/AUI/Audio/Formats/vorbis/AVorbisSoundPipe.cpp ++++ b/aui.audio/src/AUI/Audio/Formats/vorbis/AVorbisSoundPipe.cpp +@@ -1,7 +1,7 @@ + #include "AVorbisSoundPipe.h" + #include "vorbis/codec.h" + #include "AUI/Logging/ALogger.h" +-#include "os.h" ++#include + + static constexpr auto LOG_TAG = "vorbis"; + +@@ -71,7 +71,7 @@ void AVorbisSoundPipe::write(const char *src, size_t size) { + auto sampleCount = vorbis_synthesis_pcmout(mState.ptr(), &pcm); + for (int sampleNum = 0; sampleNum < sampleCount; sampleNum++) { + for (int channel = 0; channel < mInfo->channels; channel++) { +- auto sample = static_cast(vorbis_ftoi( ++ auto sample = static_cast(std::lrint( + glm::clamp(32768.f * pcm[channel][sampleNum], -32768.f, 32767.f))); + mDecodedSamples.write(reinterpret_cast(&sample), sizeof(sample)); + } +diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt +index 6aa1b07..9115f5d 100644 +--- a/aui.core/CMakeLists.txt ++++ b/aui.core/CMakeLists.txt +@@ -11,9 +11,8 @@ aui_enable_benchmarks(aui.core) + + + get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-if (GLM_INCLUDE_DIR) +- message(STATUS "Using custom GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") +-else() ++find_package(glm REQUIRED) ++if (0) # vendored glm replaced by vcpkg's glm + set(GLM_INCLUDE_DIR "${SELF_DIR}/3rdparty/glm") + + install( +@@ -21,7 +20,8 @@ else() + DESTINATION "aui.core/include/" + ) + endif() +-target_include_directories(aui.core PUBLIC $) ++target_link_libraries(aui.core PUBLIC glm::glm-header-only) ++target_compile_definitions(aui.core PUBLIC GLM_ENABLE_EXPERIMENTAL=1) + + target_compile_definitions(aui.core PRIVATE UNICODE=1) + target_compile_definitions(aui.core PUBLIC NOMINMAX=1) +@@ -49,8 +49,7 @@ if (NOT WIN32) + endif() + + if (AUI_PLATFORM_LINUX) +- auib_import(backtrace https://github.com/aui-framework/libbacktrace +- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ find_package(unofficial-libbacktrace CONFIG REQUIRED) + set(_use_backtrace TRUE) + else() + +@@ -84,7 +83,7 @@ endif() + + if(_use_backtrace) + message(STATUS "Stacktrace backend: backtrace") +- aui_link(aui.core PRIVATE backtrace) ++ aui_link(aui.core PRIVATE unofficial::libbacktrace::libbacktrace) + target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) + elseif(_use_unwind) + message(STATUS "Stacktrace backend: unwind") +@@ -111,7 +110,12 @@ if (ANDROID) + endif() + + aui_link(aui.core PRIVATE ZLIB::ZLIB) +-add_subdirectory(3rdparty/minizip) ++find_package(minizip CONFIG REQUIRED) ++if(TARGET MINIZIP::minizip) ++ aui_link(aui.core PRIVATE MINIZIP::minizip) ++else() ++ aui_link(aui.core PRIVATE MINIZIP::minizipstatic) ++endif() + + # forward platform info + foreach(_var AUI_PLATFORM_WIN +@@ -126,7 +130,7 @@ foreach(_var AUI_PLATFORM_WIN + AUI_COMPILER_CLANG + AUI_COMPILER_GCC + AUI_COMPILER_MSVC +- ++ + AUI_ARCH_X86 + AUI_ARCH_X86_64 + AUI_ARCH_ARM_64 +@@ -147,13 +151,9 @@ endif() + + + # [auib_import examples] +-auib_import(fmt https://github.com/fmtlib/fmt +- VERSION 9.1.0 +- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) ++find_package(fmt CONFIG REQUIRED) + +-auib_import(range-v3 https://github.com/ericniebler/range-v3 +- VERSION 0.12.0 +- CMAKE_ARGS -DRANGE_V3_DOCS=OFF -DRANGE_V3_TESTS=OFF -DRANGE_V3_EXAMPLES=OFF -DRANGE_V3_PERF=OFF -DRANGE_V3_HEADER_CHECKS=OFF) ++find_package(range-v3 CONFIG REQUIRED) + # [auib_import examples] + + aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) +diff --git a/aui.crypt/CMakeLists.txt b/aui.crypt/CMakeLists.txt +index c5354f2..9adab74 100644 +--- a/aui.crypt/CMakeLists.txt ++++ b/aui.crypt/CMakeLists.txt +@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10) + + unset(OPENSSL_CRYPTO_LIBRARY CACHE) + unset(OPENSSL_SSL_LIBRARY CACHE) +-auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) ++find_package(OpenSSL REQUIRED) + + aui_module(aui.crypt EXPORT aui) + aui_enable_tests(aui.crypt) +diff --git a/aui.curl/CMakeLists.txt b/aui.curl/CMakeLists.txt +index 5141c8e..1da335a 100644 +--- a/aui.curl/CMakeLists.txt ++++ b/aui.curl/CMakeLists.txt +@@ -1,7 +1,6 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip +- ARCHIVE) ++find_package(CURL REQUIRED) + + aui_module(aui.curl EXPORT aui WHOLEARCHIVE) + aui_enable_tests(aui.curl) +diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt +index 033e7ad..ac9f3d1 100644 +--- a/aui.image/CMakeLists.txt ++++ b/aui.image/CMakeLists.txt +@@ -1,7 +1,6 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(lunasvg https://github.com/aui-framework/lunasvg +- VERSION 272ceee) ++find_package(lunasvg CONFIG REQUIRED) + + + set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) +@@ -10,7 +9,7 @@ foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) + list(APPEND WEBP_CMAKE_ARGS "-DWEBP_BUILD_${_component}=OFF") + endforeach() + +-auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) ++find_package(WebP CONFIG REQUIRED) + + aui_module(aui.image WHOLEARCHIVE EXPORT aui) + add_subdirectory(3rdparty) +diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt +index dfe6b18..575d849 100644 +--- a/aui.views/CMakeLists.txt ++++ b/aui.views/CMakeLists.txt +@@ -9,10 +9,7 @@ find_package(OpenGL) + auib_use_system_libs_end() + + if (OPENGL_FOUND OR ANDROID OR IOS) +- auib_import(Freetype https://github.com/freetype/freetype/archive/refs/tags/VER-2-13-3.zip ARCHIVE +- CONFIG_ONLY +- CMAKE_ARGS -DFT_DISABLE_BZIP2=ON -DFT_DISABLE_PNG=ON -DFT_DISABLE_HARFBUZZ=ON -DFT_DISABLE_BROTLI=ON +- ) ++ find_package(Freetype REQUIRED) + + if (NOT TARGET Freetype::Freetype) + message(FATAL_ERROR "Freetype not imported") +@@ -20,9 +17,7 @@ if (OPENGL_FOUND OR ANDROID OR IOS) + + + if (AUI_PLATFORM_WIN OR AUI_PLATFORM_LINUX OR AUI_PLATFORM_MACOS) +- auib_import(GLEW https://github.com/aui-framework/glew-cmake +- CMAKE_WORKING_DIR "build/cmake" +- VERSION a80a1dc) ++ find_package(GLEW CONFIG REQUIRED) + endif () + + aui_module(aui.views EXPORT aui) +@@ -32,17 +27,17 @@ if (OPENGL_FOUND OR ANDROID OR IOS) + auib_use_system_libs_begin() + find_package(PkgConfig REQUIRED) + +- pkg_check_modules(DBUS REQUIRED dbus-1) ++ pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1) + include_directories(${DBUS_INCLUDE_DIRS}) + link_directories(${DBUS_LIBRARY_DIRS}) + +- pkg_check_modules(GTK3 REQUIRED gtk+-3.0) ++ pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) + include_directories(${GTK3_INCLUDE_DIRS}) + link_directories(${GTK3_LIBRARY_DIRS}) + + auib_use_system_libs_end() + +- aui_link(aui.views PRIVATE X11::X11 X11::Xrandr X11::Xcursor X11::Xi ${DBUS_LIBRARIES} ${GTK3_LIBRARIES} Fontconfig::Fontconfig) ++ aui_link(aui.views PRIVATE X11::X11 X11::Xrandr X11::Xcursor X11::Xi PkgConfig::DBUS PkgConfig::GTK3 Fontconfig::Fontconfig) + endif () + + if (NOT AUI_PLATFORM_WINDOWS) +diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt +index ac9f3d1..e9494fe 100644 +--- a/aui.image/CMakeLists.txt ++++ b/aui.image/CMakeLists.txt +@@ -12,6 +12,8 @@ endforeach() + find_package(WebP CONFIG REQUIRED) + + aui_module(aui.image WHOLEARCHIVE EXPORT aui) +-add_subdirectory(3rdparty) +-aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) ++find_package(unofficial-libnsgif CONFIG REQUIRED) ++find_package(Stb REQUIRED) ++aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux unofficial::libnsgif::nsgif) ++target_include_directories(aui.image PRIVATE ${Stb_INCLUDE_DIR}) + aui_enable_tests(aui.image) +diff --git a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp +index e9ca38f..4597d68 100644 +--- a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp ++++ b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp +@@ -17,7 +17,9 @@ + #include "AUI/Image/AImage.h" + #include "AUI/Util/ARaiiHelper.h" + #include "AUI/Logging/ALogger.h" +-#include "nsgif.h" ++extern "C" { ++#include ++} + + static nsgif_bitmap_t* create_callback(int width, int height) { + return new char[4 * width * height]; +diff --git a/aui.sqlite/CMakeLists.txt b/aui.sqlite/CMakeLists.txt +index 6afd58f..8514048 100644 +--- a/aui.sqlite/CMakeLists.txt ++++ b/aui.sqlite/CMakeLists.txt +@@ -1,12 +1,11 @@ + cmake_minimum_required(VERSION 3.10) + + +-file(GLOB_RECURSE SQLITE3_SRCS 3rdparty/*.c) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) + +-aui_module(aui.sqlite ADDITIONAL_SRCS ${SQLITE3_SRCS} +- EXPORT aui ++aui_module(aui.sqlite EXPORT aui + PLUGIN) +-target_include_directories(aui.sqlite PRIVATE 3rdparty/sqlite3) ++aui_link(aui.sqlite PRIVATE unofficial::sqlite3::sqlite3) + + aui_link(aui.sqlite PUBLIC aui::core) + aui_link(aui.sqlite PUBLIC aui::data) diff --git a/ports/aui/disable-auib.patch b/ports/aui/disable-auib.patch new file mode 100644 index 00000000000000..546f0b8bde6c7d --- /dev/null +++ b/ports/aui/disable-auib.patch @@ -0,0 +1,21 @@ +diff --git a/aui.boot.cmake b/aui.boot.cmake +index 6baab15..9c39cca 100644 +--- a/aui.boot.cmake ++++ b/aui.boot.cmake +@@ -203,16 +203,6 @@ if(${CMAKE_VERSION} VERSION_LESS "3.21.0") + endif() + + +-# create all required dirs +-if (NOT EXISTS ${AUIB_CACHE_DIR}) +- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}) +-endif() +-if (NOT EXISTS ${AUIB_CACHE_DIR}/prefix) +- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/prefix) +-endif() +-if (NOT EXISTS ${AUIB_CACHE_DIR}/repo) +- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/repo) +-endif() + + + function(_auib_copy_runtime_dependencies DEP_INSTALL_PREFIX) diff --git a/ports/aui/disable-tests.patch b/ports/aui/disable-tests.patch new file mode 100644 index 00000000000000..ef2d760e97f009 --- /dev/null +++ b/ports/aui/disable-tests.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d45..c741359d 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -230,7 +230,7 @@ macro(_aui_import_gtest) + endmacro() + + macro(aui_enable_tests AUI_MODULE_NAME) +- if (NOT CMAKE_CROSSCOMPILING) ++ if (0) + _aui_import_gtest() + if (NOT TARGET GTest::gtest) + message(FATAL_ERROR "GTest::gtest not found!") +@@ -328,7 +328,7 @@ macro(_aui_import_google_benchmark) + endmacro() + + macro(aui_enable_benchmarks AUI_MODULE_NAME) +- if (NOT CMAKE_CROSSCOMPILING) ++ if (0) + _aui_import_gtest() + _aui_import_google_benchmark() + if (NOT TARGET benchmark::benchmark) diff --git a/ports/aui/fix-arm64.patch b/ports/aui/fix-arm64.patch new file mode 100644 index 00000000000000..2b61e63964eb07 --- /dev/null +++ b/ports/aui/fix-arm64.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d45..0000000 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -140,7 +140,10 @@ + set(AUI_COMPILER_MSVC 0 CACHE INTERNAL "Compiler") + endif() + +-if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)") ++string(TOLOWER "${CMAKE_GENERATOR_PLATFORM}" AUI_GENERATOR_PLATFORM_LOWER) ++string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" AUI_SYSTEM_PROCESSOR_LOWER) ++ ++if (AUI_GENERATOR_PLATFORM_LOWER MATCHES "arm64" OR AUI_SYSTEM_PROCESSOR_LOWER MATCHES "(aarch64|arm64)") + set(AUI_ARCH_X86_64 0 CACHE INTERNAL "Arch") + set(AUI_ARCH_X86 0 CACHE INTERNAL "Arch") + set(AUI_ARCH_ARM_64 1 CACHE INTERNAL "Arch") diff --git a/ports/aui/fix-fmt12.patch b/ports/aui/fix-fmt12.patch new file mode 100644 index 00000000000000..b0c8fe2b43e074 --- /dev/null +++ b/ports/aui/fix-fmt12.patch @@ -0,0 +1,111 @@ +diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h +index 0f826537..217f0ba0 100644 +--- a/aui.core/src/AUI/Common/AByteBufferView.h ++++ b/aui.core/src/AUI/Common/AByteBufferView.h +@@ -117,7 +117,7 @@ inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { + lhs << "["; + for (const auto b : rhs) { + char buf[8]; +- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(std::begin(buf), " {:02x}", b))); + } + lhs << " ]"; + +diff --git a/aui.core/src/AUI/Common/AString.h b/aui.core/src/AUI/Common/AString.h +index cbf9d120..33362df9 100644 +--- a/aui.core/src/AUI/Common/AString.h ++++ b/aui.core/src/AUI/Common/AString.h +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include "AUI/Core.h" + #include "AUI/Traits/values.h" + #include +@@ -839,7 +840,6 @@ namespace aui::win32 { + } + #endif + +-template <> struct fmt::detail::is_string: std::false_type {}; + + template <> struct fmt::formatter: fmt::formatter { + auto format(const AString& s, format_context& ctx) const { +diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h +index ef92c34b..46eebfad 100644 +--- a/aui.core/src/AUI/Traits/strings.h ++++ b/aui.core/src/AUI/Traits/strings.h +@@ -36,6 +36,13 @@ namespace aui { + return arg.toStdString(); + } + }; ++ ++ template ++ struct fmt>> { ++ static auto process(T arg) { ++ return static_cast>(arg); ++ } ++ }; + } + + /** +diff --git a/aui.core/src/AUI/Traits/values.h b/aui.core/src/AUI/Traits/values.h +index 65f8d112..2b44e6c6 100644 +--- a/aui.core/src/AUI/Traits/values.h ++++ b/aui.core/src/AUI/Traits/values.h +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -438,4 +439,11 @@ private: + }; + + using float_within_0_1 = ranged_number; +-} // namespace aui +\ No newline at end of file ++} // namespace aui ++ ++template ++struct fmt::formatter> : fmt::formatter { ++ auto format(aui::ranged_number val, fmt::format_context& ctx) const { ++ return fmt::formatter::format(static_cast(val), ctx); ++ } ++}; +diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h +index 84a5ec1d..6221585e 100644 +--- a/aui.views/src/AUI/Util/AMetric.h ++++ b/aui.views/src/AUI/Util/AMetric.h +@@ -16,6 +16,7 @@ + #include + #include + #include "AUI/Util/Assert.h" ++#include + + class AString; + +@@ -140,7 +141,7 @@ public: + operator float() const { + return getValuePx(); + } +- ++ + AMetric operator-() const { + return {-mValue, mUnit}; + } +@@ -259,4 +260,10 @@ inline std::ostream& operator<<(std::ostream& o, const AMetric& value) { + break; + } + return o; +-} +\ No newline at end of file ++} ++ ++template <> struct fmt::formatter : fmt::formatter { ++ auto format(AMetric val, fmt::format_context& ctx) const { ++ return fmt::formatter::format(static_cast(val), ctx); ++ } ++}; diff --git a/ports/aui/fix-glm.patch b/ports/aui/fix-glm.patch new file mode 100644 index 00000000000000..dd252f22689b2a --- /dev/null +++ b/ports/aui/fix-glm.patch @@ -0,0 +1,45 @@ +diff --git a/aui.views/src/AUI/GL/OpenGLRenderer.cpp b/aui.views/src/AUI/GL/OpenGLRenderer.cpp +index 42fafa0b..b33409b3 100644 +--- a/aui.views/src/AUI/GL/OpenGLRenderer.cpp ++++ b/aui.views/src/AUI/GL/OpenGLRenderer.cpp +@@ -33,6 +33,7 @@ + #include "ShaderUniforms.h" + #include "AUI/Render/IRenderer.h" + #include "glm/fwd.hpp" ++#include + #include "AUI/Util/GaussianKernel.h" + #include "AUI/Traits/bit.h" + #include +diff --git a/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp b/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp +index 05ed0b01..39fc6519 100644 +--- a/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp ++++ b/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp +@@ -16,6 +16,7 @@ + #include "AGLEmbedAuiWrap.h" + #include "AUI/GL/State.h" + #include "AUI/GL/OpenGLRenderer.h" ++#include + + void AGLEmbedAuiWrap::render(ARenderContext context) { + windowMakeCurrent(); +diff --git a/aui.views/src/AUI/Render/IRenderer.h b/aui.views/src/AUI/Render/IRenderer.h +index f7268651..d2d2f5ba 100644 +--- a/aui.views/src/AUI/Render/IRenderer.h ++++ b/aui.views/src/AUI/Render/IRenderer.h +@@ -12,6 +12,7 @@ + #pragma once + + #include ++#include + #include + #include + #include +@@ -414,7 +415,7 @@ public: + const glm::vec2& size, + AAngleRadians begin, + AAngleRadians end) = 0; +- ++ + /** + * @brief Sets the color which is multiplied with any brush. + * @param color color diff --git a/ports/aui/fix-macos.patch b/ports/aui/fix-macos.patch new file mode 100644 index 00000000000000..e83298bd24b8a5 --- /dev/null +++ b/ports/aui/fix-macos.patch @@ -0,0 +1,17 @@ +diff --git a/aui.views/src/AUI/GL/gl.h b/aui.views/src/AUI/GL/gl.h +index 64209c64..afd734e3 100644 +--- a/aui.views/src/AUI/GL/gl.h ++++ b/aui.views/src/AUI/GL/gl.h +@@ -10,7 +10,6 @@ + */ + + #pragma once +-extern "C" { + #if AUI_PLATFORM_ANDROID + #include + #include +@@ -27,4 +26,3 @@ extern "C" { + #include + #include + #endif +-} diff --git a/ports/aui/portfile.cmake b/ports/aui/portfile.cmake new file mode 100644 index 00000000000000..9b4af55b5e37b8 --- /dev/null +++ b/ports/aui/portfile.cmake @@ -0,0 +1,91 @@ +# Support aui.core/include/ include folders +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aui-framework/aui + REF "v${VERSION}" + SHA512 decac6cebb6003791896e8d7a9fd7334351aa30205eac787cdbb51d1da657cda140178e0b8f5d236b42a4c1f37633141fb869784e5fc5c9718b5396e077afe7d + HEAD_REF master + PATCHES + debundle.patch + disable-tests.patch + disable-auib.patch + fix-fmt12.patch + fix-glm.patch + fix-macos.patch + fix-arm64.patch +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/aui.audio/3rdparty" "${SOURCE_PATH}/aui.core/3rdparty" "${SOURCE_PATH}/aui.image/3rdparty" "${SOURCE_PATH}/aui.sqlite/3rdparty") + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/aui-config.cmake.in" DESTINATION "${SOURCE_PATH}/cmake") + +vcpkg_find_acquire_program(PKGCONFIG) + +set(_aui_cmake_options "") +if(VCPKG_CROSSCOMPILING) + # aui.views compiles assets and shaders at build time with aui.toolbox, which + # must run on the host. When cross-compiling the in-tree aui.toolbox target is + # not built (and would target the wrong architecture anyway), so use the + # host-built tool from the aui-toolbox port. This also keeps AUI Boot from + # being invoked to fetch a host toolchain. + find_program(AUI_TOOLBOX_EXE NAMES aui.toolbox + HINTS "${CURRENT_HOST_INSTALLED_DIR}/tools/aui-toolbox" + NO_DEFAULT_PATH + ) + if(NOT AUI_TOOLBOX_EXE) + message(FATAL_ERROR + "aui needs the host tool aui.toolbox when cross-compiling; " + "the aui-toolbox host dependency did not install it") + endif() + list(APPEND _aui_cmake_options "-DAUI_TOOLBOX_EXE=${AUI_TOOLBOX_EXE}") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${_aui_cmake_options} + -DAUI_INSTALL_RUNTIME_DEPENDENCIES=OFF + -DAUIB_NO_PRECOMPILED=TRUE + -DAUIB_DISABLE=ON + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" +) + +vcpkg_host_path_list(PREPEND ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin" "${CURRENT_INSTALLED_DIR}/debug/bin") + +vcpkg_cmake_install() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/aui.toolbox${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + vcpkg_copy_tools(TOOL_NAMES aui.toolbox AUTO_CLEAN) +endif() + +# Remove empty folders +function(_aui_prune_empty_dirs _root) + file(GLOB _aui_children "${_root}/*") + foreach(_aui_child IN LISTS _aui_children) + if(IS_DIRECTORY "${_aui_child}") + _aui_prune_empty_dirs("${_aui_child}") + file(GLOB _aui_grandchildren "${_aui_child}/*") + if(NOT _aui_grandchildren) + file(REMOVE_RECURSE "${_aui_child}") + endif() + endif() + endforeach() +endfunction() +_aui_prune_empty_dirs("${CURRENT_PACKAGES_DIR}") + +if(EXISTS "${CURRENT_PACKAGES_DIR}/aui-config.cmake") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/aui") + file(RENAME "${CURRENT_PACKAGES_DIR}/aui-config.cmake" "${CURRENT_PACKAGES_DIR}/share/aui/aui-config.cmake") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/aui-config.cmake") + +if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/aui") + file(RENAME "${CURRENT_PACKAGES_DIR}/cmake" "${CURRENT_PACKAGES_DIR}/share/aui/cmake") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/cmake") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aui/vcpkg.json b/ports/aui/vcpkg.json new file mode 100644 index 00000000000000..c50e1579986a59 --- /dev/null +++ b/ports/aui/vcpkg.json @@ -0,0 +1,66 @@ +{ + "name": "aui", + "version": "7.1.2", + "port-version": 1, + "description": "Declarative UI toolkit for modern C++20", + "homepage": "https://github.com/aui-framework/aui", + "license": "MPL-2.0", + "supports": "!(linux & arm64)", + "dependencies": [ + { + "name": "aui-toolbox", + "host": true, + "platform": "!native" + }, + "curl", + { + "name": "dbus", + "platform": "linux" + }, + "fmt", + { + "name": "fontconfig", + "platform": "linux" + }, + "freetype", + "glew", + "glm", + { + "name": "gtk3", + "platform": "linux" + }, + { + "name": "libbacktrace", + "platform": "linux" + }, + "libnsgif", + "libogg", + "libvorbis", + "libwebp", + { + "name": "libx11", + "platform": "linux" + }, + "lunasvg", + "minizip", + { + "name": "oboe", + "platform": "android" + }, + "openssl", + "opus", + { + "name": "pulseaudio", + "platform": "linux" + }, + "range-v3", + "soxr", + "sqlite3", + "stb", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ] +} From f573e6426ee78384fc1e77b69dfdc7590e4fdf8e Mon Sep 17 00:00:00 2001 From: Saikari Date: Fri, 21 Aug 2026 00:54:12 +0300 Subject: [PATCH 02/21] vdb --- ports/aui/vcpkg.json | 1 - versions/a-/aui.json | 9 +++++++++ versions/baseline.json | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 versions/a-/aui.json diff --git a/ports/aui/vcpkg.json b/ports/aui/vcpkg.json index c50e1579986a59..dce1994c44c0c5 100644 --- a/ports/aui/vcpkg.json +++ b/ports/aui/vcpkg.json @@ -1,7 +1,6 @@ { "name": "aui", "version": "7.1.2", - "port-version": 1, "description": "Declarative UI toolkit for modern C++20", "homepage": "https://github.com/aui-framework/aui", "license": "MPL-2.0", diff --git a/versions/a-/aui.json b/versions/a-/aui.json new file mode 100644 index 00000000000000..77d0b2a7604085 --- /dev/null +++ b/versions/a-/aui.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "db7f4da4caa080836d4c4addd3874eafa022cc7c", + "version": "7.1.2", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index c593be5733fcb4..116fd8cd247a82 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -416,6 +416,10 @@ "baseline": "4.1.4", "port-version": 0 }, + "aui": { + "baseline": "7.1.2", + "port-version": 0 + }, "aurora": { "baseline": "2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933", "port-version": 2 From 364551a3587d7dd78eb9f73d83ac8d4a0c4b72ec Mon Sep 17 00:00:00 2001 From: Saikari Date: Fri, 21 Aug 2026 01:06:07 +0300 Subject: [PATCH 03/21] aui-toolbox: add helper for aui package --- ports/aui-toolbox/fix-arm64.patch | 16 ++ ports/aui-toolbox/fixes.patch | 256 ++++++++++++++++++++++++++++++ ports/aui-toolbox/portfile.cmake | 36 +++++ ports/aui-toolbox/vcpkg.json | 25 +++ 4 files changed, 333 insertions(+) create mode 100644 ports/aui-toolbox/fix-arm64.patch create mode 100644 ports/aui-toolbox/fixes.patch create mode 100644 ports/aui-toolbox/portfile.cmake create mode 100644 ports/aui-toolbox/vcpkg.json diff --git a/ports/aui-toolbox/fix-arm64.patch b/ports/aui-toolbox/fix-arm64.patch new file mode 100644 index 00000000000000..2b61e63964eb07 --- /dev/null +++ b/ports/aui-toolbox/fix-arm64.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d45..0000000 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -140,7 +140,10 @@ + set(AUI_COMPILER_MSVC 0 CACHE INTERNAL "Compiler") + endif() + +-if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)") ++string(TOLOWER "${CMAKE_GENERATOR_PLATFORM}" AUI_GENERATOR_PLATFORM_LOWER) ++string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" AUI_SYSTEM_PROCESSOR_LOWER) ++ ++if (AUI_GENERATOR_PLATFORM_LOWER MATCHES "arm64" OR AUI_SYSTEM_PROCESSOR_LOWER MATCHES "(aarch64|arm64)") + set(AUI_ARCH_X86_64 0 CACHE INTERNAL "Arch") + set(AUI_ARCH_X86 0 CACHE INTERNAL "Arch") + set(AUI_ARCH_ARM_64 1 CACHE INTERNAL "Arch") diff --git a/ports/aui-toolbox/fixes.patch b/ports/aui-toolbox/fixes.patch new file mode 100644 index 00000000000000..8ae751f17f2553 --- /dev/null +++ b/ports/aui-toolbox/fixes.patch @@ -0,0 +1,256 @@ +Only in aui-7.1.2: .git +diff -r aui-7.1.2/CMakeLists.txt current/CMakeLists.txt +--- aui-7.1.2/CMakeLists.txt ++++ current/CMakeLists.txt +@@ -64,9 +64,7 @@ + add_subdirectory("aui.${AUI_COMPONENT_NAME}") + endfunction() + +-auib_import(ZLIB https://github.com/aui-framework/zlib +- VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a +- CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) ++find_package(ZLIB REQUIRED) + + # define all components + define_aui_component(core) +@@ -86,11 +84,11 @@ + define_aui_component(audio) + define_aui_component(updater) + +-if (NOT ANDROID AND NOT IOS) ++if (0) + define_aui_component(uitests) + endif() + +-if (AUI_BUILD_EXAMPLES) ++if (AUI_BUILD_EXAMPLES) + add_subdirectory(examples) + endif() + +@@ -195,7 +193,6 @@ + # [auib_precompiled_binary] + + # test aui.boot on ci/cd +-add_subdirectory(test/) + + # [configure file example] + configure_file(cmake/aui-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aui-config.cmake @ONLY) +diff -r aui-7.1.2/aui.boot.cmake current/aui.boot.cmake +--- aui-7.1.2/aui.boot.cmake ++++ current/aui.boot.cmake +@@ -203,16 +203,6 @@ + endif() + + +-# create all required dirs +-if (NOT EXISTS ${AUIB_CACHE_DIR}) +- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}) +-endif() +-if (NOT EXISTS ${AUIB_CACHE_DIR}/prefix) +- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/prefix) +-endif() +-if (NOT EXISTS ${AUIB_CACHE_DIR}/repo) +- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/repo) +-endif() + + + function(_auib_copy_runtime_dependencies DEP_INSTALL_PREFIX) +diff -r aui-7.1.2/aui.core/CMakeLists.txt current/aui.core/CMakeLists.txt +--- aui-7.1.2/aui.core/CMakeLists.txt ++++ current/aui.core/CMakeLists.txt +@@ -11,9 +11,8 @@ + + + get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-if (GLM_INCLUDE_DIR) +- message(STATUS "Using custom GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") +-else() ++find_package(glm REQUIRED) ++if (0) # vendored glm replaced by vcpkg's glm + set(GLM_INCLUDE_DIR "${SELF_DIR}/3rdparty/glm") + + install( +@@ -21,7 +20,8 @@ + DESTINATION "aui.core/include/" + ) + endif() +-target_include_directories(aui.core PUBLIC $) ++target_link_libraries(aui.core PUBLIC glm::glm-header-only) ++target_compile_definitions(aui.core PUBLIC GLM_ENABLE_EXPERIMENTAL=1) + + target_compile_definitions(aui.core PRIVATE UNICODE=1) + target_compile_definitions(aui.core PUBLIC NOMINMAX=1) +@@ -49,8 +49,7 @@ + endif() + + if (AUI_PLATFORM_LINUX) +- auib_import(backtrace https://github.com/aui-framework/libbacktrace +- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ find_package(unofficial-libbacktrace CONFIG REQUIRED) + set(_use_backtrace TRUE) + else() + +@@ -84,7 +83,7 @@ + + if(_use_backtrace) + message(STATUS "Stacktrace backend: backtrace") +- aui_link(aui.core PRIVATE backtrace) ++ aui_link(aui.core PRIVATE unofficial::libbacktrace::libbacktrace) + target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) + elseif(_use_unwind) + message(STATUS "Stacktrace backend: unwind") +@@ -126,7 +125,7 @@ + AUI_COMPILER_CLANG + AUI_COMPILER_GCC + AUI_COMPILER_MSVC +- ++ + AUI_ARCH_X86 + AUI_ARCH_X86_64 + AUI_ARCH_ARM_64 +@@ -147,13 +146,9 @@ + + + # [auib_import examples] +-auib_import(fmt https://github.com/fmtlib/fmt +- VERSION 9.1.0 +- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) ++find_package(fmt CONFIG REQUIRED) + +-auib_import(range-v3 https://github.com/ericniebler/range-v3 +- VERSION 0.12.0 +- CMAKE_ARGS -DRANGE_V3_DOCS=OFF -DRANGE_V3_TESTS=OFF -DRANGE_V3_EXAMPLES=OFF -DRANGE_V3_PERF=OFF -DRANGE_V3_HEADER_CHECKS=OFF) ++find_package(range-v3 CONFIG REQUIRED) + # [auib_import examples] + + aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) +diff -r aui-7.1.2/aui.core/src/AUI/Common/AByteBufferView.h current/aui.core/src/AUI/Common/AByteBufferView.h +--- aui-7.1.2/aui.core/src/AUI/Common/AByteBufferView.h ++++ current/aui.core/src/AUI/Common/AByteBufferView.h +@@ -117,7 +117,7 @@ + lhs << "["; + for (const auto b : rhs) { + char buf[8]; +- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(std::begin(buf), " {:02x}", b))); + } + lhs << " ]"; + +diff -r aui-7.1.2/aui.core/src/AUI/Common/AString.h current/aui.core/src/AUI/Common/AString.h +--- aui-7.1.2/aui.core/src/AUI/Common/AString.h ++++ current/aui.core/src/AUI/Common/AString.h +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include "AUI/Core.h" + #include "AUI/Traits/values.h" + #include +@@ -839,7 +840,6 @@ + } + #endif + +-template <> struct fmt::detail::is_string: std::false_type {}; + + template <> struct fmt::formatter: fmt::formatter { + auto format(const AString& s, format_context& ctx) const { +diff -r aui-7.1.2/aui.core/src/AUI/Traits/strings.h current/aui.core/src/AUI/Traits/strings.h +--- aui-7.1.2/aui.core/src/AUI/Traits/strings.h ++++ current/aui.core/src/AUI/Traits/strings.h +@@ -36,6 +36,13 @@ + return arg.toStdString(); + } + }; ++ ++ template ++ struct fmt>> { ++ static auto process(T arg) { ++ return static_cast>(arg); ++ } ++ }; + } + + /** +diff -r aui-7.1.2/aui.core/src/AUI/Traits/values.h current/aui.core/src/AUI/Traits/values.h +--- aui-7.1.2/aui.core/src/AUI/Traits/values.h ++++ current/aui.core/src/AUI/Traits/values.h +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -438,4 +439,11 @@ + }; + + using float_within_0_1 = ranged_number; +-} // namespace aui +\ No newline at end of file ++} // namespace aui ++ ++template ++struct fmt::formatter> : fmt::formatter { ++ auto format(aui::ranged_number val, fmt::format_context& ctx) const { ++ return fmt::formatter::format(static_cast(val), ctx); ++ } ++}; +diff -r aui-7.1.2/aui.crypt/CMakeLists.txt current/aui.crypt/CMakeLists.txt +--- aui-7.1.2/aui.crypt/CMakeLists.txt ++++ current/aui.crypt/CMakeLists.txt +@@ -1,9 +1,7 @@ + cmake_minimum_required(VERSION 3.10) + + +-unset(OPENSSL_CRYPTO_LIBRARY CACHE) +-unset(OPENSSL_SSL_LIBRARY CACHE) +-auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) ++find_package(OpenSSL REQUIRED) + + aui_module(aui.crypt EXPORT aui) + aui_enable_tests(aui.crypt) +diff -r aui-7.1.2/aui.image/CMakeLists.txt current/aui.image/CMakeLists.txt +--- aui-7.1.2/aui.image/CMakeLists.txt ++++ current/aui.image/CMakeLists.txt +@@ -1,16 +1,7 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(lunasvg https://github.com/aui-framework/lunasvg +- VERSION 272ceee) +- +- +-set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) +- +-foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) +- list(APPEND WEBP_CMAKE_ARGS "-DWEBP_BUILD_${_component}=OFF") +-endforeach() +- +-auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) ++find_package(lunasvg CONFIG REQUIRED) ++find_package(WebP REQUIRED) + + aui_module(aui.image WHOLEARCHIVE EXPORT aui) + add_subdirectory(3rdparty) +diff -r aui-7.1.2/cmake/aui.build.cmake current/cmake/aui.build.cmake +--- aui-7.1.2/cmake/aui.build.cmake ++++ current/cmake/aui.build.cmake +@@ -230,7 +230,7 @@ + endmacro() + + macro(aui_enable_tests AUI_MODULE_NAME) +- if (NOT CMAKE_CROSSCOMPILING) ++ if (0) + _aui_import_gtest() + if (NOT TARGET GTest::gtest) + message(FATAL_ERROR "GTest::gtest not found!") +@@ -328,7 +328,7 @@ + endmacro() + + macro(aui_enable_benchmarks AUI_MODULE_NAME) +- if (NOT CMAKE_CROSSCOMPILING) ++ if (0) + _aui_import_gtest() + _aui_import_google_benchmark() + if (NOT TARGET benchmark::benchmark) diff --git a/ports/aui-toolbox/portfile.cmake b/ports/aui-toolbox/portfile.cmake new file mode 100644 index 00000000000000..400786f1e18c38 --- /dev/null +++ b/ports/aui-toolbox/portfile.cmake @@ -0,0 +1,36 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aui-framework/aui + REF "v${VERSION}" + SHA512 decac6cebb6003791896e8d7a9fd7334351aa30205eac787cdbb51d1da657cda140178e0b8f5d236b42a4c1f37633141fb869784e5fc5c9718b5396e077afe7d + HEAD_REF master + PATCHES + fixes.patch + fix-arm64.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DAUIB_COMPONENTS=toolbox + -DAUI_INSTALL_RUNTIME_DEPENDENCIES=OFF + -DAUIB_NO_PRECOMPILED=TRUE + -DAUIB_DISABLE=ON +) + +vcpkg_cmake_install() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/aui.toolbox${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + vcpkg_copy_tools(TOOL_NAMES aui.toolbox AUTO_CLEAN) +endif() + +file(GLOB _aui_toolbox_leftovers "${CURRENT_PACKAGES_DIR}/*") +foreach(_entry IN LISTS _aui_toolbox_leftovers) + if(NOT _entry STREQUAL "${CURRENT_PACKAGES_DIR}/tools") + file(REMOVE_RECURSE "${_entry}") + endif() +endforeach() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aui-toolbox/vcpkg.json b/ports/aui-toolbox/vcpkg.json new file mode 100644 index 00000000000000..8a607cf4029674 --- /dev/null +++ b/ports/aui-toolbox/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "aui-toolbox", + "version": "7.1.2", + "description": "Host-side asset and shader compiler (aui.toolbox) for the AUI declarative UI toolkit", + "homepage": "https://github.com/aui-framework/aui", + "license": "MPL-2.0", + "supports": "native & !(linux & arm64)", + "dependencies": [ + "fmt", + "glm", + { + "name": "libbacktrace", + "platform": "linux" + }, + "libwebp", + "lunasvg", + "openssl", + "range-v3", + { + "name": "vcpkg-cmake", + "host": true + }, + "zlib" + ] +} From d59ed7f2296c1fa27a546899eec1d3dcfa1f1984 Mon Sep 17 00:00:00 2001 From: Saikari Date: Fri, 21 Aug 2026 01:07:21 +0300 Subject: [PATCH 04/21] vdb --- versions/a-/aui-toolbox.json | 9 +++++++++ versions/baseline.json | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 versions/a-/aui-toolbox.json diff --git a/versions/a-/aui-toolbox.json b/versions/a-/aui-toolbox.json new file mode 100644 index 00000000000000..d45aa45177254d --- /dev/null +++ b/versions/a-/aui-toolbox.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "94999170b22da1a98487d0cf99b61ce505571a57", + "version": "7.1.2", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 116fd8cd247a82..2b29e6e1ad4c92 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -420,6 +420,10 @@ "baseline": "7.1.2", "port-version": 0 }, + "aui-toolbox": { + "baseline": "7.1.2", + "port-version": 0 + }, "aurora": { "baseline": "2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933", "port-version": 2 From 3ffca80c6975b01b70dac42235f90daddde9d2ae Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 17:23:01 +0300 Subject: [PATCH 05/21] aui: add test port --- scripts/test_ports/vcpkg-ci-aui/portfile.cmake | 12 ++++++++++++ .../vcpkg-ci-aui/project/CMakeLists.txt | 13 +++++++++++++ .../vcpkg-ci-aui/project/assets/img/icon.svg | 3 +++ .../test_ports/vcpkg-ci-aui/project/src/main.cpp | 7 +++++++ scripts/test_ports/vcpkg-ci-aui/vcpkg.json | 16 ++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 scripts/test_ports/vcpkg-ci-aui/portfile.cmake create mode 100644 scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt create mode 100644 scripts/test_ports/vcpkg-ci-aui/project/assets/img/icon.svg create mode 100644 scripts/test_ports/vcpkg-ci-aui/project/src/main.cpp create mode 100644 scripts/test_ports/vcpkg-ci-aui/vcpkg.json diff --git a/scripts/test_ports/vcpkg-ci-aui/portfile.cmake b/scripts/test_ports/vcpkg-ci-aui/portfile.cmake new file mode 100644 index 00000000000000..c2d85fea7cf408 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-aui/portfile.cmake @@ -0,0 +1,12 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_find_acquire_program(PKGCONFIG) + +vcpkg_host_path_list(PREPEND ENV{PATH} "${CURRENT_HOST_INSTALLED_DIR}/tools/aui-toolbox") + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" +) +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt new file mode 100644 index 00000000000000..0b90f27ea5aec7 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.16) +project(aui-test VERSION 0.0.1 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +find_package(aui CONFIG REQUIRED COMPONENTS core views curl json crypt updater) + +aui_executable(${PROJECT_NAME}) +aui_link(${PROJECT_NAME} PRIVATE aui::core aui::views aui::updater) +aui_compile_assets(${PROJECT_NAME}) +aui_app(TARGET ${PROJECT_NAME} NAME "AUI CI Test" VENDOR "vcpkg" + ICON "assets/img/icon.svg") diff --git a/scripts/test_ports/vcpkg-ci-aui/project/assets/img/icon.svg b/scripts/test_ports/vcpkg-ci-aui/project/assets/img/icon.svg new file mode 100644 index 00000000000000..663109c1db79e9 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-aui/project/assets/img/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/scripts/test_ports/vcpkg-ci-aui/project/src/main.cpp b/scripts/test_ports/vcpkg-ci-aui/project/src/main.cpp new file mode 100644 index 00000000000000..ed1d641a836a72 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-aui/project/src/main.cpp @@ -0,0 +1,7 @@ +#include +#include + +AUI_ENTRY { + AString s = AString::number(42); + return 0; +} diff --git a/scripts/test_ports/vcpkg-ci-aui/vcpkg.json b/scripts/test_ports/vcpkg-ci-aui/vcpkg.json new file mode 100644 index 00000000000000..8c9348ddcc3a2e --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-aui/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "vcpkg-ci-aui", + "version-string": "ci", + "description": "Validates aui", + "dependencies": [ + "aui", + { + "name": "aui-toolbox", + "host": true + }, + { + "name": "vcpkg-cmake", + "host": true + } + ] +} From 5287e392165607369bc8d6a4927dbe3a1209f773 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 17:29:41 +0300 Subject: [PATCH 06/21] soxr: install .pc file --- .../soxr/004_install-pkgconfig-windows.patch | 22 +++++ ports/soxr/portfile.cmake | 81 ++++++++++--------- ports/soxr/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/s-/soxr.json | 5 ++ 5 files changed, 70 insertions(+), 42 deletions(-) create mode 100644 ports/soxr/004_install-pkgconfig-windows.patch diff --git a/ports/soxr/004_install-pkgconfig-windows.patch b/ports/soxr/004_install-pkgconfig-windows.patch new file mode 100644 index 00000000000000..996c6109573f89 --- /dev/null +++ b/ports/soxr/004_install-pkgconfig-windows.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bb01a0d..82ef7f7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -87,7 +87,7 @@ + if (BUILD_FRAMEWORK) + set_target_properties (${PROJECT_NAME} PROPERTIES FRAMEWORK TRUE) +-elseif (NOT WIN32) ++else () + set (TARGET_PCS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc) + configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${TARGET_PCS}) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) + endif () +@@ -111,7 +111,7 @@ + if (BUILD_FRAMEWORK) + set_target_properties (${LSR} PROPERTIES FRAMEWORK TRUE) +- elseif (NOT WIN32) ++ else () + set (TARGET_PCS "${TARGET_PCS} ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc") + configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${LSR}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${LSR}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) + endif () diff --git a/ports/soxr/portfile.cmake b/ports/soxr/portfile.cmake index e29f253a5b28fd..343f51c700ba1e 100644 --- a/ports/soxr/portfile.cmake +++ b/ports/soxr/portfile.cmake @@ -1,40 +1,41 @@ -vcpkg_from_sourceforge( - OUT_SOURCE_PATH SOURCE_PATH - REPO soxr - FILENAME "soxr-0.1.3-Source.tar.xz" - SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 - PATCHES - 001_initialize-resampler.patch - 002_disable_warning.patch - 003_detect_arm.patch -) - -vcpkg_check_features( - OUT_FEATURE_OPTIONS FEATURE_OPTIONS - FEATURES - openmp WITH_OPENMP - lsr-bindings WITH_LSR_BINDINGS -) - -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" BUILD_SHARED_RUNTIME) - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - -DBUILD_TESTS=OFF - -DBUILD_EXAMPLES=OFF - -DBUILD_SHARED_RUNTIME=${BUILD_SHARED_RUNTIME} - -DCMAKE_DISABLE_FIND_PACKAGE_LibAVUtil=TRUE - ${FEATURE_OPTIONS} -) - -vcpkg_cmake_install() - -file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/doc") - -vcpkg_fixup_pkgconfig() +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO soxr + FILENAME "soxr-0.1.3-Source.tar.xz" + SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 + PATCHES + 001_initialize-resampler.patch + 002_disable_warning.patch + 003_detect_arm.patch + 004_install-pkgconfig-windows.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openmp WITH_OPENMP + lsr-bindings WITH_LSR_BINDINGS +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" BUILD_SHARED_RUNTIME) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_SHARED_RUNTIME=${BUILD_SHARED_RUNTIME} + -DCMAKE_DISABLE_FIND_PACKAGE_LibAVUtil=TRUE + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/doc") + +vcpkg_fixup_pkgconfig() diff --git a/ports/soxr/vcpkg.json b/ports/soxr/vcpkg.json index a2b8a91929d05f..d1bbe42b2f6f53 100644 --- a/ports/soxr/vcpkg.json +++ b/ports/soxr/vcpkg.json @@ -1,7 +1,7 @@ { "name": "soxr", "version": "0.1.3", - "port-version": 8, + "port-version": 9, "description": "High quality audio resampling", "homepage": "https://sourceforge.net/projects/soxr/", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 2b29e6e1ad4c92..c628920be94679 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9614,7 +9614,7 @@ }, "soxr": { "baseline": "0.1.3", - "port-version": 8 + "port-version": 9 }, "spaceland": { "baseline": "7.8.2", diff --git a/versions/s-/soxr.json b/versions/s-/soxr.json index 5cd6749fb1ec43..bde9837cd0a31e 100644 --- a/versions/s-/soxr.json +++ b/versions/s-/soxr.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "38edca408abad1f7d8e84363d2b8e31d982d6952", + "version": "0.1.3", + "port-version": 9 + }, { "git-tree": "89f01ea88aee3a0468ba3bf335a7a537a105cae1", "version": "0.1.3", From 9c8814ac044d3c6821ad0a2d768085c127b87d93 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 18:00:52 +0300 Subject: [PATCH 07/21] aui: clean patch files, cmake.in, try resolve NDK build --- ports/aui/aui-config.cmake.in | 2 - ports/aui/debundle.patch | 117 ++++++++++++++-------------------- ports/aui/fix-fmt12.patch | 19 ++---- ports/aui/fix-glm.patch | 15 +---- ports/aui/vcpkg.json | 5 +- 5 files changed, 59 insertions(+), 99 deletions(-) diff --git a/ports/aui/aui-config.cmake.in b/ports/aui/aui-config.cmake.in index f19a6b4d2b491b..74b824ff736ec2 100644 --- a/ports/aui/aui-config.cmake.in +++ b/ports/aui/aui-config.cmake.in @@ -80,8 +80,6 @@ foreach(_target IN LISTS _aui_needed_targets) find_dependency(OpenGL) elseif(_target MATCHES "^oboe::") find_dependency(oboe CONFIG) - elseif(_target MATCHES "^GTest::") - find_dependency(GTest) elseif(_target MATCHES "^PkgConfig::") if(NOT DEFINED PKG_CONFIG_FOUND) find_package(PkgConfig QUIET) diff --git a/ports/aui/debundle.patch b/ports/aui/debundle.patch index 5ed7f509512a65..3507fd2223cdd9 100644 --- a/ports/aui/debundle.patch +++ b/ports/aui/debundle.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6902d56..3a9f94c 100644 +index 6902d56..d1d37e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,9 +64,7 @@ function(define_aui_component AUI_COMPONENT_NAME) @@ -13,7 +13,7 @@ index 6902d56..3a9f94c 100644 # define all components define_aui_component(core) -@@ -86,11 +84,11 @@ define_aui_component(json) +@@ -86,7 +84,7 @@ define_aui_component(json) define_aui_component(audio) define_aui_component(updater) @@ -22,11 +22,6 @@ index 6902d56..3a9f94c 100644 define_aui_component(uitests) endif() --if (AUI_BUILD_EXAMPLES) -+if (AUI_BUILD_EXAMPLES) - add_subdirectory(examples) - endif() - @@ -195,7 +193,6 @@ auib_precompiled_binary() # [auib_precompiled_binary] @@ -119,7 +114,7 @@ index 5cffdb9..4479ca7 100644 mDecodedSamples.write(reinterpret_cast(&sample), sizeof(sample)); } diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt -index 6aa1b07..9115f5d 100644 +index 6aa1b07..0eaa67f 100644 --- a/aui.core/CMakeLists.txt +++ b/aui.core/CMakeLists.txt @@ -11,9 +11,8 @@ aui_enable_benchmarks(aui.core) @@ -177,15 +172,6 @@ index 6aa1b07..9115f5d 100644 # forward platform info foreach(_var AUI_PLATFORM_WIN -@@ -126,7 +130,7 @@ foreach(_var AUI_PLATFORM_WIN - AUI_COMPILER_CLANG - AUI_COMPILER_GCC - AUI_COMPILER_MSVC -- -+ - AUI_ARCH_X86 - AUI_ARCH_X86_64 - AUI_ARCH_ARM_64 @@ -147,13 +151,9 @@ endif() @@ -229,7 +215,7 @@ index 5141c8e..1da335a 100644 aui_module(aui.curl EXPORT aui WHOLEARCHIVE) aui_enable_tests(aui.curl) diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt -index 033e7ad..ac9f3d1 100644 +index 033e7ad..e9494fe 100644 --- a/aui.image/CMakeLists.txt +++ b/aui.image/CMakeLists.txt @@ -1,7 +1,6 @@ @@ -241,7 +227,7 @@ index 033e7ad..ac9f3d1 100644 set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) -@@ -10,7 +9,7 @@ foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) +@@ -10,9 +9,11 @@ foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) list(APPEND WEBP_CMAKE_ARGS "-DWEBP_BUILD_${_component}=OFF") endforeach() @@ -249,7 +235,48 @@ index 033e7ad..ac9f3d1 100644 +find_package(WebP CONFIG REQUIRED) aui_module(aui.image WHOLEARCHIVE EXPORT aui) - add_subdirectory(3rdparty) +-add_subdirectory(3rdparty) +-aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) ++find_package(unofficial-libnsgif CONFIG REQUIRED) ++find_package(Stb REQUIRED) ++aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux unofficial::libnsgif::nsgif) ++target_include_directories(aui.image PRIVATE ${Stb_INCLUDE_DIR}) + aui_enable_tests(aui.image) +diff --git a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp +index e9ca38f..4597d68 100644 +--- a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp ++++ b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp +@@ -17,7 +17,9 @@ + #include "AUI/Image/AImage.h" + #include "AUI/Util/ARaiiHelper.h" + #include "AUI/Logging/ALogger.h" +-#include "nsgif.h" ++extern "C" { ++#include ++} + + static nsgif_bitmap_t* create_callback(int width, int height) { + return new char[4 * width * height]; +diff --git a/aui.sqlite/CMakeLists.txt b/aui.sqlite/CMakeLists.txt +index 6afd58f..8514048 100644 +--- a/aui.sqlite/CMakeLists.txt ++++ b/aui.sqlite/CMakeLists.txt +@@ -1,12 +1,11 @@ + cmake_minimum_required(VERSION 3.10) + + +-file(GLOB_RECURSE SQLITE3_SRCS 3rdparty/*.c) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) + +-aui_module(aui.sqlite ADDITIONAL_SRCS ${SQLITE3_SRCS} +- EXPORT aui ++aui_module(aui.sqlite EXPORT aui + PLUGIN) +-target_include_directories(aui.sqlite PRIVATE 3rdparty/sqlite3) ++aui_link(aui.sqlite PRIVATE unofficial::sqlite3::sqlite3) + + aui_link(aui.sqlite PUBLIC aui::core) + aui_link(aui.sqlite PUBLIC aui::data) diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt index dfe6b18..575d849 100644 --- a/aui.views/CMakeLists.txt @@ -298,53 +325,3 @@ index dfe6b18..575d849 100644 endif () if (NOT AUI_PLATFORM_WINDOWS) -diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt -index ac9f3d1..e9494fe 100644 ---- a/aui.image/CMakeLists.txt -+++ b/aui.image/CMakeLists.txt -@@ -12,6 +12,8 @@ endforeach() - find_package(WebP CONFIG REQUIRED) - - aui_module(aui.image WHOLEARCHIVE EXPORT aui) --add_subdirectory(3rdparty) --aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) -+find_package(unofficial-libnsgif CONFIG REQUIRED) -+find_package(Stb REQUIRED) -+aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux unofficial::libnsgif::nsgif) -+target_include_directories(aui.image PRIVATE ${Stb_INCLUDE_DIR}) - aui_enable_tests(aui.image) -diff --git a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp -index e9ca38f..4597d68 100644 ---- a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp -+++ b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp -@@ -17,7 +17,9 @@ - #include "AUI/Image/AImage.h" - #include "AUI/Util/ARaiiHelper.h" - #include "AUI/Logging/ALogger.h" --#include "nsgif.h" -+extern "C" { -+#include -+} - - static nsgif_bitmap_t* create_callback(int width, int height) { - return new char[4 * width * height]; -diff --git a/aui.sqlite/CMakeLists.txt b/aui.sqlite/CMakeLists.txt -index 6afd58f..8514048 100644 ---- a/aui.sqlite/CMakeLists.txt -+++ b/aui.sqlite/CMakeLists.txt -@@ -1,12 +1,11 @@ - cmake_minimum_required(VERSION 3.10) - - --file(GLOB_RECURSE SQLITE3_SRCS 3rdparty/*.c) -+find_package(unofficial-sqlite3 CONFIG REQUIRED) - --aui_module(aui.sqlite ADDITIONAL_SRCS ${SQLITE3_SRCS} -- EXPORT aui -+aui_module(aui.sqlite EXPORT aui - PLUGIN) --target_include_directories(aui.sqlite PRIVATE 3rdparty/sqlite3) -+aui_link(aui.sqlite PRIVATE unofficial::sqlite3::sqlite3) - - aui_link(aui.sqlite PUBLIC aui::core) - aui_link(aui.sqlite PUBLIC aui::data) diff --git a/ports/aui/fix-fmt12.patch b/ports/aui/fix-fmt12.patch index b0c8fe2b43e074..63da064f8fdcf2 100644 --- a/ports/aui/fix-fmt12.patch +++ b/ports/aui/fix-fmt12.patch @@ -1,5 +1,5 @@ diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h -index 0f826537..217f0ba0 100644 +index 0f82653..217f0ba 100644 --- a/aui.core/src/AUI/Common/AByteBufferView.h +++ b/aui.core/src/AUI/Common/AByteBufferView.h @@ -117,7 +117,7 @@ inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { @@ -12,7 +12,7 @@ index 0f826537..217f0ba0 100644 lhs << " ]"; diff --git a/aui.core/src/AUI/Common/AString.h b/aui.core/src/AUI/Common/AString.h -index cbf9d120..33362df9 100644 +index cbf9d12..33362df 100644 --- a/aui.core/src/AUI/Common/AString.h +++ b/aui.core/src/AUI/Common/AString.h @@ -14,6 +14,7 @@ @@ -32,7 +32,7 @@ index cbf9d120..33362df9 100644 template <> struct fmt::formatter: fmt::formatter { auto format(const AString& s, format_context& ctx) const { diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h -index ef92c34b..46eebfad 100644 +index ef92c34..46eebfa 100644 --- a/aui.core/src/AUI/Traits/strings.h +++ b/aui.core/src/AUI/Traits/strings.h @@ -36,6 +36,13 @@ namespace aui { @@ -50,7 +50,7 @@ index ef92c34b..46eebfad 100644 /** diff --git a/aui.core/src/AUI/Traits/values.h b/aui.core/src/AUI/Traits/values.h -index 65f8d112..2b44e6c6 100644 +index 65f8d11..2b44e6c 100644 --- a/aui.core/src/AUI/Traits/values.h +++ b/aui.core/src/AUI/Traits/values.h @@ -18,6 +18,7 @@ @@ -76,7 +76,7 @@ index 65f8d112..2b44e6c6 100644 + } +}; diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h -index 84a5ec1d..6221585e 100644 +index 84a5ec1..2d25ae3 100644 --- a/aui.views/src/AUI/Util/AMetric.h +++ b/aui.views/src/AUI/Util/AMetric.h @@ -16,6 +16,7 @@ @@ -87,15 +87,6 @@ index 84a5ec1d..6221585e 100644 class AString; -@@ -140,7 +141,7 @@ public: - operator float() const { - return getValuePx(); - } -- -+ - AMetric operator-() const { - return {-mValue, mUnit}; - } @@ -259,4 +260,10 @@ inline std::ostream& operator<<(std::ostream& o, const AMetric& value) { break; } diff --git a/ports/aui/fix-glm.patch b/ports/aui/fix-glm.patch index dd252f22689b2a..b081610dbe7f12 100644 --- a/ports/aui/fix-glm.patch +++ b/ports/aui/fix-glm.patch @@ -1,5 +1,5 @@ diff --git a/aui.views/src/AUI/GL/OpenGLRenderer.cpp b/aui.views/src/AUI/GL/OpenGLRenderer.cpp -index 42fafa0b..b33409b3 100644 +index 42fafa0..b33409b 100644 --- a/aui.views/src/AUI/GL/OpenGLRenderer.cpp +++ b/aui.views/src/AUI/GL/OpenGLRenderer.cpp @@ -33,6 +33,7 @@ @@ -11,7 +11,7 @@ index 42fafa0b..b33409b3 100644 #include "AUI/Traits/bit.h" #include diff --git a/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp b/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp -index 05ed0b01..39fc6519 100644 +index 05ed0b0..39fc651 100644 --- a/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp +++ b/aui.views/src/AUI/Platform/AGLEmbedAuiWrap.cpp @@ -16,6 +16,7 @@ @@ -23,7 +23,7 @@ index 05ed0b01..39fc6519 100644 void AGLEmbedAuiWrap::render(ARenderContext context) { windowMakeCurrent(); diff --git a/aui.views/src/AUI/Render/IRenderer.h b/aui.views/src/AUI/Render/IRenderer.h -index f7268651..d2d2f5ba 100644 +index f726865..f173190 100644 --- a/aui.views/src/AUI/Render/IRenderer.h +++ b/aui.views/src/AUI/Render/IRenderer.h @@ -12,6 +12,7 @@ @@ -34,12 +34,3 @@ index f7268651..d2d2f5ba 100644 #include #include #include -@@ -414,7 +415,7 @@ public: - const glm::vec2& size, - AAngleRadians begin, - AAngleRadians end) = 0; -- -+ - /** - * @brief Sets the color which is multiplied with any brush. - * @param color color diff --git a/ports/aui/vcpkg.json b/ports/aui/vcpkg.json index dce1994c44c0c5..162ff180a26766 100644 --- a/ports/aui/vcpkg.json +++ b/ports/aui/vcpkg.json @@ -22,7 +22,10 @@ "platform": "linux" }, "freetype", - "glew", + { + "name": "glew", + "platform": "windows | linux | osx" + }, "glm", { "name": "gtk3", From e72300b2d841acbb97da692ae61312701c800c3a Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 18:02:18 +0300 Subject: [PATCH 08/21] vdb --- versions/a-/aui.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 77d0b2a7604085..5605e3f3ef515c 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "db7f4da4caa080836d4c4addd3874eafa022cc7c", + "git-tree": "6e90b56b4f1f90f8c81f92a2f23b8211b063a7d0", "version": "7.1.2", "port-version": 0 } From 4e91cdbc85d11ae56893b882b0b193acb985f957 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 18:32:22 +0300 Subject: [PATCH 09/21] aui: try fix NDK build to find oboe --- ports/aui/aui-config.cmake.in | 12 ++++++++++-- ports/aui/debundle.patch | 16 ++++++++++++---- versions/a-/aui.json | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ports/aui/aui-config.cmake.in b/ports/aui/aui-config.cmake.in index 74b824ff736ec2..2553bcf1d1b6ae 100644 --- a/ports/aui/aui-config.cmake.in +++ b/ports/aui/aui-config.cmake.in @@ -78,8 +78,16 @@ foreach(_target IN LISTS _aui_needed_targets) find_dependency(Fontconfig) elseif(_target MATCHES "^OpenGL::") find_dependency(OpenGL) - elseif(_target MATCHES "^oboe::") - find_dependency(oboe CONFIG) + elseif(_target MATCHES "^oboe::" OR _target STREQUAL "oboe") + find_path(OBOE_INCLUDE_DIR NAMES oboe/Oboe.h REQUIRED) + find_library(OBOE_LIBRARY NAMES oboe REQUIRED) + if(NOT TARGET oboe::oboe) + add_library(oboe::oboe UNKNOWN IMPORTED) + set_target_properties(oboe::oboe PROPERTIES + IMPORTED_LOCATION "${OBOE_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${OBOE_INCLUDE_DIR}" + ) + endif() elseif(_target MATCHES "^PkgConfig::") if(NOT DEFINED PKG_CONFIG_FOUND) find_package(PkgConfig QUIET) diff --git a/ports/aui/debundle.patch b/ports/aui/debundle.patch index 3507fd2223cdd9..4757695fbbd589 100644 --- a/ports/aui/debundle.patch +++ b/ports/aui/debundle.patch @@ -31,10 +31,10 @@ index 6902d56..d1d37e1 100644 # [configure file example] configure_file(cmake/aui-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aui-config.cmake @ONLY) diff --git a/aui.audio/CMakeLists.txt b/aui.audio/CMakeLists.txt -index 21e4415..fb0302a 100644 +index 21e4415..7beaeca 100644 --- a/aui.audio/CMakeLists.txt +++ b/aui.audio/CMakeLists.txt -@@ -1,30 +1,25 @@ +@@ -1,30 +1,33 @@ cmake_minimum_required(VERSION 3.10) aui_module(aui.audio WHOLEARCHIVE EXPORT aui) @@ -56,7 +56,15 @@ index 21e4415..fb0302a 100644 - PUBLIC_HEADER DESTINATION "aui.audio/include" - INCLUDES DESTINATION "aui.audio/include" - ) -+ find_package(oboe CONFIG REQUIRED) ++ find_path(OBOE_INCLUDE_DIR NAMES oboe/Oboe.h REQUIRED) ++ find_library(OBOE_LIBRARY NAMES oboe REQUIRED) ++ if(NOT TARGET oboe::oboe) ++ add_library(oboe::oboe UNKNOWN IMPORTED) ++ set_target_properties(oboe::oboe PROPERTIES ++ IMPORTED_LOCATION "${OBOE_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES "${OBOE_INCLUDE_DIR}" ++ ) ++ endif() + aui_link(aui.audio PUBLIC oboe::oboe $ $) elseif (AUI_PLATFORM_LINUX) - aui_link(aui.audio PUBLIC pulse) @@ -76,7 +84,7 @@ index 21e4415..fb0302a 100644 if (AUI_PLATFORM_IOS OR AUI_PLATFORM_MACOS) auib_use_system_libs_begin() -@@ -42,9 +37,9 @@ if (AUI_PLATFORM_MACOS) +@@ -42,9 +45,9 @@ if (AUI_PLATFORM_MACOS) "-framework QuartzCore") endif() diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 5605e3f3ef515c..5aa5dc55d65019 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "6e90b56b4f1f90f8c81f92a2f23b8211b063a7d0", + "git-tree": "cda86586d4f1591e17841847169bc0f8b65979ac", "version": "7.1.2", "port-version": 0 } From 57fb7212645f9dad96e32229027e84b7342b08bf Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 18:50:26 +0300 Subject: [PATCH 10/21] aui: improve test port for NDK --- scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt index 0b90f27ea5aec7..f8a0fec22c359f 100644 --- a/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt +++ b/scripts/test_ports/vcpkg-ci-aui/project/CMakeLists.txt @@ -10,4 +10,5 @@ aui_executable(${PROJECT_NAME}) aui_link(${PROJECT_NAME} PRIVATE aui::core aui::views aui::updater) aui_compile_assets(${PROJECT_NAME}) aui_app(TARGET ${PROJECT_NAME} NAME "AUI CI Test" VENDOR "vcpkg" - ICON "assets/img/icon.svg") + ICON "assets/img/icon.svg" + ANDROID_PACKAGE "org.vcpkg.auitest") From 4ca45610f05a3a0137678ffdf68cb934dcb93f94 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 19:07:21 +0300 Subject: [PATCH 11/21] aui: remove supports to validate arm64 linux os is unsupported due cascade failed dependencies --- ports/aui/vcpkg.json | 1 - versions/a-/aui.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/aui/vcpkg.json b/ports/aui/vcpkg.json index 162ff180a26766..28edb84a47f90b 100644 --- a/ports/aui/vcpkg.json +++ b/ports/aui/vcpkg.json @@ -4,7 +4,6 @@ "description": "Declarative UI toolkit for modern C++20", "homepage": "https://github.com/aui-framework/aui", "license": "MPL-2.0", - "supports": "!(linux & arm64)", "dependencies": [ { "name": "aui-toolbox", diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 5aa5dc55d65019..a5443bb974d7a8 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cda86586d4f1591e17841847169bc0f8b65979ac", + "git-tree": "2758437ce6ae8d1e6581d5bb82bed45db333cd96", "version": "7.1.2", "port-version": 0 } From 844a5f3c08b06b805e79729b44807e0e7efbe82b Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 19:23:33 +0300 Subject: [PATCH 12/21] simplify fix-arm64.patch --- ports/aui-toolbox/fix-arm64.patch | 9 +++------ ports/aui/fix-arm64.patch | 9 +++------ versions/a-/aui-toolbox.json | 2 +- versions/a-/aui.json | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ports/aui-toolbox/fix-arm64.patch b/ports/aui-toolbox/fix-arm64.patch index 2b61e63964eb07..647f2f37d36c7b 100644 --- a/ports/aui-toolbox/fix-arm64.patch +++ b/ports/aui-toolbox/fix-arm64.patch @@ -1,16 +1,13 @@ diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake -index 90c53d45..0000000 100644 +index 90c53d4..780c872 100644 --- a/cmake/aui.build.cmake +++ b/cmake/aui.build.cmake -@@ -140,7 +140,10 @@ +@@ -140,7 +140,7 @@ else() set(AUI_COMPILER_MSVC 0 CACHE INTERNAL "Compiler") endif() -if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)") -+string(TOLOWER "${CMAKE_GENERATOR_PLATFORM}" AUI_GENERATOR_PLATFORM_LOWER) -+string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" AUI_SYSTEM_PROCESSOR_LOWER) -+ -+if (AUI_GENERATOR_PLATFORM_LOWER MATCHES "arm64" OR AUI_SYSTEM_PROCESSOR_LOWER MATCHES "(aarch64|arm64)") ++if (CMAKE_GENERATOR_PLATFORM MATCHES "(aarch64|arm64|AARCH64|ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|AARCH64|ARM64)") set(AUI_ARCH_X86_64 0 CACHE INTERNAL "Arch") set(AUI_ARCH_X86 0 CACHE INTERNAL "Arch") set(AUI_ARCH_ARM_64 1 CACHE INTERNAL "Arch") diff --git a/ports/aui/fix-arm64.patch b/ports/aui/fix-arm64.patch index 2b61e63964eb07..647f2f37d36c7b 100644 --- a/ports/aui/fix-arm64.patch +++ b/ports/aui/fix-arm64.patch @@ -1,16 +1,13 @@ diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake -index 90c53d45..0000000 100644 +index 90c53d4..780c872 100644 --- a/cmake/aui.build.cmake +++ b/cmake/aui.build.cmake -@@ -140,7 +140,10 @@ +@@ -140,7 +140,7 @@ else() set(AUI_COMPILER_MSVC 0 CACHE INTERNAL "Compiler") endif() -if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)") -+string(TOLOWER "${CMAKE_GENERATOR_PLATFORM}" AUI_GENERATOR_PLATFORM_LOWER) -+string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" AUI_SYSTEM_PROCESSOR_LOWER) -+ -+if (AUI_GENERATOR_PLATFORM_LOWER MATCHES "arm64" OR AUI_SYSTEM_PROCESSOR_LOWER MATCHES "(aarch64|arm64)") ++if (CMAKE_GENERATOR_PLATFORM MATCHES "(aarch64|arm64|AARCH64|ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64|AARCH64|ARM64)") set(AUI_ARCH_X86_64 0 CACHE INTERNAL "Arch") set(AUI_ARCH_X86 0 CACHE INTERNAL "Arch") set(AUI_ARCH_ARM_64 1 CACHE INTERNAL "Arch") diff --git a/versions/a-/aui-toolbox.json b/versions/a-/aui-toolbox.json index d45aa45177254d..ab91b5883ac354 100644 --- a/versions/a-/aui-toolbox.json +++ b/versions/a-/aui-toolbox.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "94999170b22da1a98487d0cf99b61ce505571a57", + "git-tree": "b979d9f5c676a0a468e80c174f0f449f13aef97b", "version": "7.1.2", "port-version": 0 } diff --git a/versions/a-/aui.json b/versions/a-/aui.json index a5443bb974d7a8..092885f2921397 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2758437ce6ae8d1e6581d5bb82bed45db333cd96", + "git-tree": "4139786a1ab49c1ee88494d7dbe95a083e5d3478", "version": "7.1.2", "port-version": 0 } From ad9f19db7098e8a5f775b46e6cef98bd37b5fb75 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 19:33:36 +0300 Subject: [PATCH 13/21] aui: improve component dependency handling and error messaging --- ports/aui-toolbox/portfile.cmake | 21 +++++++++-- ports/aui/aui-config.cmake.in | 60 +++++++++++++++++++++++--------- versions/a-/aui-toolbox.json | 2 +- versions/a-/aui.json | 2 +- 4 files changed, 64 insertions(+), 21 deletions(-) diff --git a/ports/aui-toolbox/portfile.cmake b/ports/aui-toolbox/portfile.cmake index 400786f1e18c38..ed9283b70bcca0 100644 --- a/ports/aui-toolbox/portfile.cmake +++ b/ports/aui-toolbox/portfile.cmake @@ -25,12 +25,29 @@ vcpkg_cmake_install() if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/aui.toolbox${VCPKG_TARGET_EXECUTABLE_SUFFIX}") vcpkg_copy_tools(TOOL_NAMES aui.toolbox AUTO_CLEAN) endif() - file(GLOB _aui_toolbox_leftovers "${CURRENT_PACKAGES_DIR}/*") foreach(_entry IN LISTS _aui_toolbox_leftovers) - if(NOT _entry STREQUAL "${CURRENT_PACKAGES_DIR}/tools") + if(NOT _entry STREQUAL "${CURRENT_PACKAGES_DIR}/tools" AND NOT _entry STREQUAL "${CURRENT_PACKAGES_DIR}/share") file(REMOVE_RECURSE "${_entry}") endif() endforeach() +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/aui-toolbox") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/aui-toolbox/aui-toolbox-config.cmake" +[=[ +get_filename_component(_aui_toolbox_root "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) +find_program(AUI_TOOLBOX_EXE NAMES aui.toolbox + HINTS + "${_aui_toolbox_root}/tools/aui-toolbox" + "${_aui_toolbox_root}/tools/aui" + "${_aui_toolbox_root}/bin" + NO_DEFAULT_PATH +) +if(AUI_TOOLBOX_EXE) + set(aui-toolbox_FOUND TRUE) +else() + set(aui-toolbox_FOUND FALSE) +endif() +]=]) + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aui/aui-config.cmake.in b/ports/aui/aui-config.cmake.in index 2553bcf1d1b6ae..9937a1f15d712d 100644 --- a/ports/aui/aui-config.cmake.in +++ b/ports/aui/aui-config.cmake.in @@ -151,7 +151,6 @@ function(_aui_check_component_deps _component) endforeach() endfunction() -set(${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE) set(_aui_pending_components ${AUI_FIND_COMPONENTS}) set(_aui_processed_components "") while(_aui_pending_components) @@ -167,7 +166,13 @@ while(_aui_pending_components) set(_module_target_name aui::${_module}) if (NOT ${_module} IN_LIST AUI_ALL_COMPONENTS) - message(FATAL_ERROR "Unknown component ${_module}") + set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND FALSE) + if (${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED AND ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module}) + message(FATAL_ERROR "Unknown component ${_module}") + else() + message(STATUS "Unknown component ${_module}") + endif() + continue() endif() if (_module STREQUAL toolbox) continue() @@ -177,13 +182,8 @@ while(_aui_pending_components) if (EXISTS ${_module_dir}) _aui_check_component_deps(${_module}) if(NOT _aui_deps_ok) + set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND FALSE) message(STATUS "AUI component '${_module}' skipped: missing transitive dependencies") - if(NOT _all) - set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) - if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module}) - message(FATAL_ERROR "Component ${_module} requires unavailable dependencies") - endif() - endif() continue() endif() if (WIN32) @@ -271,17 +271,33 @@ while(_aui_pending_components) endif() set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND FALSE) - if (NOT _all) - set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) - if (${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED AND ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module}) - message(FATAL_ERROR "Component ${_module} is not found") - else() - message(STATUS "Component ${_module} is not found") +endwhile() + +if(NOT _all) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE) + foreach(_module ${AUI_FIND_COMPONENTS}) + if(NOT ${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND) + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module} OR ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "Component ${_module} is not found") + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_module}) + message(FATAL_ERROR "Component ${_module} is not found") + else() + message(STATUS "Component ${_module} is not found") + endif() + endif() endif() + endforeach() +else() + if("core" IN_LIST AUI_AVAILABLE_COMPONENTS AND ${CMAKE_FIND_PACKAGE_NAME}_core_FOUND AND ${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TARGETS) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE) + else() + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "AUI could not be found because no core/available components could be loaded") endif() -endwhile() +endif() -if (${CMAKE_FIND_PACKAGE_NAME}_FOUND AND NOT TARGET aui) +if (${CMAKE_FIND_PACKAGE_NAME}_FOUND AND ${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TARGETS AND NOT TARGET aui) add_library(aui INTERFACE IMPORTED) set_target_properties(aui PROPERTIES INTERFACE_LINK_LIBRARIES "${${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TARGETS}") @@ -296,4 +312,14 @@ endmacro() include("${AUI_BUILD_AUI_ROOT}/share/aui/cmake/aui.build.cmake") -find_program(AUI_TOOLBOX_EXE NAMES aui.toolbox) +if(NOT AUI_TOOLBOX_EXE) + find_program(AUI_TOOLBOX_EXE NAMES aui.toolbox + HINTS + "$ENV{AUI_TOOLBOX_EXE}" + "${AUI_ROOT_DIR}/tools/aui-toolbox" + "${AUI_ROOT_DIR}/tools/aui" + "${AUI_ROOT_DIR}/bin" + "${_VCPKG_INSTALLED_DIR}/${VCPKG_HOST_TRIPLET}/tools/aui-toolbox" + "${_VCPKG_INSTALLED_DIR}/${_HOST_TRIPLET}/tools/aui-toolbox" + ) +endif() diff --git a/versions/a-/aui-toolbox.json b/versions/a-/aui-toolbox.json index ab91b5883ac354..731145daf938df 100644 --- a/versions/a-/aui-toolbox.json +++ b/versions/a-/aui-toolbox.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b979d9f5c676a0a468e80c174f0f449f13aef97b", + "git-tree": "e278557efb0c6c43e50925174bc8c9954658ca39", "version": "7.1.2", "port-version": 0 } diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 092885f2921397..bbdae95a88ad61 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4139786a1ab49c1ee88494d7dbe95a083e5d3478", + "git-tree": "f7d62e81176778ffa5a80a6885c29cca7713a1d4", "version": "7.1.2", "port-version": 0 } From 3af1775afe5a52b29080b0032507c4b507a3ab9b Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 19:38:18 +0300 Subject: [PATCH 14/21] aui: use only imported target dbus-1 and gtk+-3.0 --- ports/aui/debundle.patch | 16 ++++++++-------- versions/a-/aui.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/aui/debundle.patch b/ports/aui/debundle.patch index 4757695fbbd589..c8de2b9752ad84 100644 --- a/ports/aui/debundle.patch +++ b/ports/aui/debundle.patch @@ -286,7 +286,7 @@ index 6afd58f..8514048 100644 aui_link(aui.sqlite PUBLIC aui::core) aui_link(aui.sqlite PUBLIC aui::data) diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt -index dfe6b18..575d849 100644 +index dfe6b18..e8a40cf 100644 --- a/aui.views/CMakeLists.txt +++ b/aui.views/CMakeLists.txt @@ -9,10 +9,7 @@ find_package(OpenGL) @@ -312,19 +312,19 @@ index dfe6b18..575d849 100644 endif () aui_module(aui.views EXPORT aui) -@@ -32,17 +27,17 @@ if (OPENGL_FOUND OR ANDROID OR IOS) +@@ -32,17 +27,12 @@ if (OPENGL_FOUND OR ANDROID OR IOS) auib_use_system_libs_begin() find_package(PkgConfig REQUIRED) - pkg_check_modules(DBUS REQUIRED dbus-1) -+ pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1) - include_directories(${DBUS_INCLUDE_DIRS}) - link_directories(${DBUS_LIBRARY_DIRS}) - +- include_directories(${DBUS_INCLUDE_DIRS}) +- link_directories(${DBUS_LIBRARY_DIRS}) +- - pkg_check_modules(GTK3 REQUIRED gtk+-3.0) +- include_directories(${GTK3_INCLUDE_DIRS}) +- link_directories(${GTK3_LIBRARY_DIRS}) ++ pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1) + pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) - include_directories(${GTK3_INCLUDE_DIRS}) - link_directories(${GTK3_LIBRARY_DIRS}) auib_use_system_libs_end() diff --git a/versions/a-/aui.json b/versions/a-/aui.json index bbdae95a88ad61..cc1e38e797cf95 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f7d62e81176778ffa5a80a6885c29cca7713a1d4", + "git-tree": "1e7ccfdf05c80864dafd2f2cd7e2ced52d0cdf58", "version": "7.1.2", "port-version": 0 } From b7556b6f873d5f79f53b22d9e5d87f31232c8216 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 19:48:47 +0300 Subject: [PATCH 15/21] aui: drop VCPKG_POLICY_EMPTY_INCLUDE_FOLDER policy --- ports/aui/aui-config.cmake.in | 7 ++----- ports/aui/debundle.patch | 27 +++++++++++++++++++++++++++ ports/aui/portfile.cmake | 4 +--- versions/a-/aui.json | 2 +- 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/ports/aui/aui-config.cmake.in b/ports/aui/aui-config.cmake.in index 9937a1f15d712d..e2fc1d8ef246fc 100644 --- a/ports/aui/aui-config.cmake.in +++ b/ports/aui/aui-config.cmake.in @@ -178,8 +178,6 @@ while(_aui_pending_components) continue() endif() if (${_module} IN_LIST AUI_AVAILABLE_COMPONENTS) - set(_module_dir "${AUI_ROOT_DIR}/aui.${_module}") - if (EXISTS ${_module_dir}) _aui_check_component_deps(${_module}) if(NOT _aui_deps_ok) set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND FALSE) @@ -219,7 +217,7 @@ while(_aui_pending_components) set(_lib_debug ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_LIBRARY_DEBUG}) set(_implib ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_IMPLIBRARY}) set(_implib_debug ${${CMAKE_FIND_PACKAGE_NAME}_${_module}_IMPLIBRARY_DEBUG}) - set(_include ${AUI_ROOT_DIR}/aui.${_module}/include) + set(_include "${AUI_ROOT_DIR}/include") if ((_lib OR _implib) AND EXISTS ${_include}) set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND TRUE) if (NOT _lib) @@ -239,7 +237,7 @@ while(_aui_pending_components) # libs (debug/lib), all other configurations the release ones. set(_aui_props IMPORTED_LOCATION "${_lib}" - INTERFACE_INCLUDE_DIRECTORIES "$<$:${AUI_ROOT_DIR}/debug/aui.${_module}/include>$<$>:${AUI_ROOT_DIR}/aui.${_module}/include>" + INTERFACE_INCLUDE_DIRECTORIES "${AUI_ROOT_DIR}/include" INTERFACE_LINK_DIRECTORIES "${AUI_ROOT_DIR}/lib") if(_implib) list(APPEND _aui_props IMPORTED_IMPLIB "${_implib}") @@ -267,7 +265,6 @@ while(_aui_pending_components) endforeach() continue() endif() - endif() endif() set(${CMAKE_FIND_PACKAGE_NAME}_${_module}_FOUND FALSE) diff --git a/ports/aui/debundle.patch b/ports/aui/debundle.patch index c8de2b9752ad84..0069f17ffd82b4 100644 --- a/ports/aui/debundle.patch +++ b/ports/aui/debundle.patch @@ -333,3 +333,30 @@ index dfe6b18..e8a40cf 100644 endif () if (NOT AUI_PLATFORM_WINDOWS) +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d4..7a8e8e8 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -1072,18 +1072,18 @@ function(aui_module AUI_MODULE_NAME) + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" + RUNTIME DESTINATION "bin" +- PUBLIC_HEADER DESTINATION "${AUI_MODULE_NAME}/include" +- INCLUDES DESTINATION "${AUI_MODULE_NAME}/include" ++ PUBLIC_HEADER DESTINATION "include" ++ INCLUDES DESTINATION "include" + ) + + install( + DIRECTORY src/ +- DESTINATION "${AUI_MODULE_NAME}/include/" ++ DESTINATION "include/" + FILES_MATCHING PATTERN "*.h" + PATTERN "*.hpp" + + ) +- target_include_directories(${AUI_MODULE_NAME} INTERFACE $) ++ target_include_directories(${AUI_MODULE_NAME} INTERFACE $) + endif() + if (NOT BUILD_AS_IMPORTED_NAME STREQUAL ${AUI_MODULE_NAME}) + add_library(${BUILD_AS_IMPORTED_NAME} ALIAS ${AUI_MODULE_NAME}) diff --git a/ports/aui/portfile.cmake b/ports/aui/portfile.cmake index 9b4af55b5e37b8..398db24ea90e18 100644 --- a/ports/aui/portfile.cmake +++ b/ports/aui/portfile.cmake @@ -1,6 +1,3 @@ -# Support aui.core/include/ include folders -set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aui-framework/aui @@ -55,6 +52,7 @@ vcpkg_cmake_configure( vcpkg_host_path_list(PREPEND ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin" "${CURRENT_INSTALLED_DIR}/debug/bin") vcpkg_cmake_install() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/aui.toolbox${VCPKG_TARGET_EXECUTABLE_SUFFIX}") vcpkg_copy_tools(TOOL_NAMES aui.toolbox AUTO_CLEAN) diff --git a/versions/a-/aui.json b/versions/a-/aui.json index cc1e38e797cf95..52c273b469af3f 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1e7ccfdf05c80864dafd2f2cd7e2ced52d0cdf58", + "git-tree": "638d71d75d0a4c68446a8603509cb75e706c9b2c", "version": "7.1.2", "port-version": 0 } From 481b5c61e69c591e2c5d5b75bf371a23ca715a69 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 19:57:34 +0300 Subject: [PATCH 16/21] aui: rework fix-fmt12 patch to follow upstream --- ports/aui/fix-fmt12.patch | 93 +++++++++++++++++---------------------- versions/a-/aui.json | 2 +- 2 files changed, 42 insertions(+), 53 deletions(-) diff --git a/ports/aui/fix-fmt12.patch b/ports/aui/fix-fmt12.patch index 63da064f8fdcf2..9e1a692899f10b 100644 --- a/ports/aui/fix-fmt12.patch +++ b/ports/aui/fix-fmt12.patch @@ -1,18 +1,22 @@ diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h -index 0f82653..217f0ba 100644 +index 0f82653..e9aca0a 100644 --- a/aui.core/src/AUI/Common/AByteBufferView.h +++ b/aui.core/src/AUI/Common/AByteBufferView.h -@@ -117,7 +117,7 @@ inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { +@@ -117,7 +117,12 @@ inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { lhs << "["; for (const auto b : rhs) { char buf[8]; -- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); -+ lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(std::begin(buf), " {:02x}", b))); ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ #else ++ auto end = fmt::format_to(buf, " {:02x}", b); ++ lhs.write(buf, end - buf); ++ #endif } lhs << " ]"; diff --git a/aui.core/src/AUI/Common/AString.h b/aui.core/src/AUI/Common/AString.h -index cbf9d12..33362df 100644 +index cbf9d12..2623866 100644 --- a/aui.core/src/AUI/Common/AString.h +++ b/aui.core/src/AUI/Common/AString.h @@ -14,6 +14,7 @@ @@ -23,71 +27,41 @@ index cbf9d12..33362df 100644 #include "AUI/Core.h" #include "AUI/Traits/values.h" #include -@@ -839,7 +840,6 @@ namespace aui::win32 { +@@ -839,7 +840,9 @@ namespace aui::win32 { } #endif --template <> struct fmt::detail::is_string: std::false_type {}; ++#if defined(FMT_VERSION) && (FMT_VERSION < 100000) + template <> struct fmt::detail::is_string: std::false_type {}; ++#endif template <> struct fmt::formatter: fmt::formatter { auto format(const AString& s, format_context& ctx) const { diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h -index ef92c34..46eebfa 100644 +index ef92c34..7d5d5d7 100644 --- a/aui.core/src/AUI/Traits/strings.h +++ b/aui.core/src/AUI/Traits/strings.h -@@ -36,6 +36,13 @@ namespace aui { - return arg.toStdString(); - } - }; -+ -+ template -+ struct fmt>> { -+ static auto process(T arg) { -+ return static_cast>(arg); -+ } -+ }; - } +@@ -17,6 +17,7 @@ + #include "types.h" - /** -diff --git a/aui.core/src/AUI/Traits/values.h b/aui.core/src/AUI/Traits/values.h -index 65f8d11..2b44e6c 100644 ---- a/aui.core/src/AUI/Traits/values.h -+++ b/aui.core/src/AUI/Traits/values.h -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -438,4 +439,11 @@ private: - }; + #include ++#include + + namespace aui { - using float_within_0_1 = ranged_number; --} // namespace aui -\ No newline at end of file -+} // namespace aui -+ -+template -+struct fmt::formatter> : fmt::formatter { -+ auto format(aui::ranged_number val, fmt::format_context& ctx) const { -+ return fmt::formatter::format(static_cast(val), ctx); -+ } -+}; diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h -index 84a5ec1..2d25ae3 100644 +index 84a5ec1..cc7a2f1 100644 --- a/aui.views/src/AUI/Util/AMetric.h +++ b/aui.views/src/AUI/Util/AMetric.h @@ -16,6 +16,7 @@ #include #include #include "AUI/Util/Assert.h" -+#include ++#include class AString; -@@ -259,4 +260,10 @@ inline std::ostream& operator<<(std::ostream& o, const AMetric& value) { +@@ -259,4 +260,25 @@ inline std::ostream& operator<<(std::ostream& o, const AMetric& value) { break; } return o; @@ -95,8 +69,23 @@ index 84a5ec1..2d25ae3 100644 \ No newline at end of file +} + -+template <> struct fmt::formatter : fmt::formatter { -+ auto format(AMetric val, fmt::format_context& ctx) const { -+ return fmt::formatter::format(static_cast(val), ctx); ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template <> struct fmt::formatter { ++ constexpr auto parse(format_parse_context& ctx) { ++ return ctx.begin(); // No custom formatting options needed ++ } ++ ++ template ++ auto format(const AMetric& metric, FormatContext& ctx) const { ++ std::string_view suffix; ++ switch (metric.getUnit()) { ++ case AMetric::T_PX: suffix = "px"; break; ++ case AMetric::T_DP: suffix = "dp"; break; ++ case AMetric::T_PT: suffix = "pt"; break; ++ default: break; ++ } ++ ++ return fmt::format_to(ctx.out(), "{}{}", metric.getRawValue(), suffix); + } +}; ++#endif diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 52c273b469af3f..685dcd9ffc8843 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "638d71d75d0a4c68446a8603509cb75e706c9b2c", + "git-tree": "538f7f874d2a646781392809954d27794219a483", "version": "7.1.2", "port-version": 0 } From e5c1ca3a964e0ffeba3690f369e821e4014a64ed Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 20:03:08 +0300 Subject: [PATCH 17/21] aui: improve fix-fmt12 patch --- ports/aui/fix-fmt12.patch | 15 +++++++-------- versions/a-/aui.json | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ports/aui/fix-fmt12.patch b/ports/aui/fix-fmt12.patch index 9e1a692899f10b..e6637a5344b1ec 100644 --- a/ports/aui/fix-fmt12.patch +++ b/ports/aui/fix-fmt12.patch @@ -1,17 +1,16 @@ diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h -index 0f82653..e9aca0a 100644 +index 0f82653..314ee56 100644 --- a/aui.core/src/AUI/Common/AByteBufferView.h +++ b/aui.core/src/AUI/Common/AByteBufferView.h -@@ -117,7 +117,12 @@ inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { +@@ -116,8 +116,9 @@ public: + inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { lhs << "["; for (const auto b : rhs) { - char buf[8]; -+ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) - lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); -+ #else -+ auto end = fmt::format_to(buf, " {:02x}", b); +- char buf[8]; +- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ char buf[16]; ++ auto end = fmt::format_to(buf, " {:02x}", static_cast(b)); + lhs.write(buf, end - buf); -+ #endif } lhs << " ]"; diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 685dcd9ffc8843..2420a5bba8c8ad 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "538f7f874d2a646781392809954d27794219a483", + "git-tree": "31a81284c08983704a51697ac333d9d4df029f7f", "version": "7.1.2", "port-version": 0 } From f0498d4acec0cc227b99e4e4ea22d4f595f1a34c Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 20:29:45 +0300 Subject: [PATCH 18/21] aui-toolbox: refactor to do mirroring from aui to aui-toolbox patches --- ports/aui-toolbox/debundle.patch | 193 +++++++++++++++++++ ports/aui-toolbox/disable-auib.patch | 21 +++ ports/aui-toolbox/disable-tests.patch | 22 +++ ports/aui-toolbox/fix-fmt12.patch | 128 +++++++++++++ ports/aui-toolbox/fixes.patch | 256 -------------------------- ports/aui-toolbox/portfile.cmake | 5 +- ports/aui-toolbox/vcpkg.json | 3 + ports/aui/disable-auib.patch | 24 +-- ports/aui/fix-fmt12.patch | 42 ++++- versions/a-/aui-toolbox.json | 2 +- versions/a-/aui.json | 2 +- 11 files changed, 425 insertions(+), 273 deletions(-) create mode 100644 ports/aui-toolbox/debundle.patch create mode 100644 ports/aui-toolbox/disable-auib.patch create mode 100644 ports/aui-toolbox/disable-tests.patch create mode 100644 ports/aui-toolbox/fix-fmt12.patch delete mode 100644 ports/aui-toolbox/fixes.patch diff --git a/ports/aui-toolbox/debundle.patch b/ports/aui-toolbox/debundle.patch new file mode 100644 index 00000000000000..30556738d1dc0c --- /dev/null +++ b/ports/aui-toolbox/debundle.patch @@ -0,0 +1,193 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6902d56..d1d37e1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,9 +64,7 @@ function(define_aui_component AUI_COMPONENT_NAME) + add_subdirectory("aui.${AUI_COMPONENT_NAME}") + endfunction() + +-auib_import(ZLIB https://github.com/aui-framework/zlib +- VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a +- CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) ++find_package(ZLIB REQUIRED) + + # define all components + define_aui_component(core) +@@ -86,7 +84,7 @@ define_aui_component(json) + define_aui_component(audio) + define_aui_component(updater) + +-if (NOT ANDROID AND NOT IOS) ++if (0) + define_aui_component(uitests) + endif() + +@@ -195,7 +193,6 @@ auib_precompiled_binary() + # [auib_precompiled_binary] + + # test aui.boot on ci/cd +-add_subdirectory(test/) + + # [configure file example] + configure_file(cmake/aui-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aui-config.cmake @ONLY) +diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt +index 6aa1b07..0eaa67f 100644 +--- a/aui.core/CMakeLists.txt ++++ b/aui.core/CMakeLists.txt +@@ -11,9 +11,8 @@ aui_enable_benchmarks(aui.core) + + + get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-if (GLM_INCLUDE_DIR) +- message(STATUS "Using custom GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") +-else() ++find_package(glm REQUIRED) ++if (0) # vendored glm replaced by vcpkg's glm + set(GLM_INCLUDE_DIR "${SELF_DIR}/3rdparty/glm") + + install( +@@ -21,7 +20,8 @@ else() + DESTINATION "aui.core/include/" + ) + endif() +-target_include_directories(aui.core PUBLIC $) ++target_link_libraries(aui.core PUBLIC glm::glm-header-only) ++target_compile_definitions(aui.core PUBLIC GLM_ENABLE_EXPERIMENTAL=1) + + target_compile_definitions(aui.core PRIVATE UNICODE=1) + target_compile_definitions(aui.core PUBLIC NOMINMAX=1) +@@ -49,8 +49,7 @@ if (NOT WIN32) + endif() + + if (AUI_PLATFORM_LINUX) +- auib_import(backtrace https://github.com/aui-framework/libbacktrace +- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ find_package(unofficial-libbacktrace CONFIG REQUIRED) + set(_use_backtrace TRUE) + else() + +@@ -84,7 +83,7 @@ endif() + + if(_use_backtrace) + message(STATUS "Stacktrace backend: backtrace") +- aui_link(aui.core PRIVATE backtrace) ++ aui_link(aui.core PRIVATE unofficial::libbacktrace::libbacktrace) + target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) + elseif(_use_unwind) + message(STATUS "Stacktrace backend: unwind") +@@ -111,7 +110,12 @@ if (ANDROID) + endif() + + aui_link(aui.core PRIVATE ZLIB::ZLIB) +-add_subdirectory(3rdparty/minizip) ++find_package(minizip CONFIG REQUIRED) ++if(TARGET MINIZIP::minizip) ++ aui_link(aui.core PRIVATE MINIZIP::minizip) ++else() ++ aui_link(aui.core PRIVATE MINIZIP::minizipstatic) ++endif() + + # forward platform info + foreach(_var AUI_PLATFORM_WIN +@@ -147,13 +151,9 @@ endif() + + + # [auib_import examples] +-auib_import(fmt https://github.com/fmtlib/fmt +- VERSION 9.1.0 +- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) ++find_package(fmt CONFIG REQUIRED) + +-auib_import(range-v3 https://github.com/ericniebler/range-v3 +- VERSION 0.12.0 +- CMAKE_ARGS -DRANGE_V3_DOCS=OFF -DRANGE_V3_TESTS=OFF -DRANGE_V3_EXAMPLES=OFF -DRANGE_V3_PERF=OFF -DRANGE_V3_HEADER_CHECKS=OFF) ++find_package(range-v3 CONFIG REQUIRED) + # [auib_import examples] + + aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) +diff --git a/aui.crypt/CMakeLists.txt b/aui.crypt/CMakeLists.txt +index c5354f2..778d45e 100644 +--- a/aui.crypt/CMakeLists.txt ++++ b/aui.crypt/CMakeLists.txt +@@ -1,9 +1,7 @@ + cmake_minimum_required(VERSION 3.10) + + +-unset(OPENSSL_CRYPTO_LIBRARY CACHE) +-unset(OPENSSL_SSL_LIBRARY CACHE) +-auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) ++find_package(OpenSSL REQUIRED) + + aui_module(aui.crypt EXPORT aui) + aui_enable_tests(aui.crypt) +diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt +index 033e7ad..a6f292c 100644 +--- a/aui.image/CMakeLists.txt ++++ b/aui.image/CMakeLists.txt +@@ -1,18 +1,13 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(lunasvg https://github.com/aui-framework/lunasvg +- VERSION 272ceee) ++find_package(lunasvg CONFIG REQUIRED) + + +-set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) +- +-foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) +- list(APPEND WEBP_CMAKE_ARGS "-DWEBP_BUILD_${_component}=OFF") +-endforeach() +- +-auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) ++find_package(WebP CONFIG REQUIRED) + + aui_module(aui.image WHOLEARCHIVE EXPORT aui) +-add_subdirectory(3rdparty) +-aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) ++find_package(unofficial-libnsgif CONFIG REQUIRED) ++find_package(Stb REQUIRED) ++aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux unofficial::libnsgif::nsgif) ++target_include_directories(aui.image PRIVATE ${Stb_INCLUDE_DIR}) + aui_enable_tests(aui.image) +diff --git a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp +index e9ca38f..4597d68 100644 +--- a/aui.image/src/AUI/Image/gif/GifImageFactory.cpp ++++ b/aui.image/src/AUI/Image/gif/GifImageFactory.cpp +@@ -17,7 +17,9 @@ + #include "AUI/Image/AImage.h" + #include "AUI/Util/ARaiiHelper.h" + #include "AUI/Logging/ALogger.h" +-#include "nsgif.h" ++extern "C" { ++#include ++} + + static nsgif_bitmap_t* create_callback(int width, int height) { + return new char[4 * width * height]; +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d4..7a8e8e8 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -1072,18 +1072,18 @@ function(aui_module AUI_MODULE_NAME) + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" + RUNTIME DESTINATION "bin" +- PUBLIC_HEADER DESTINATION "${AUI_MODULE_NAME}/include" +- INCLUDES DESTINATION "${AUI_MODULE_NAME}/include" ++ PUBLIC_HEADER DESTINATION "include" ++ INCLUDES DESTINATION "include" + ) + + install( + DIRECTORY src/ +- DESTINATION "${AUI_MODULE_NAME}/include/" ++ DESTINATION "include/" + FILES_MATCHING PATTERN "*.h" + PATTERN "*.hpp" + + ) +- target_include_directories(${AUI_MODULE_NAME} INTERFACE $) ++ target_include_directories(${AUI_MODULE_NAME} INTERFACE $) + endif() + if (NOT BUILD_AS_IMPORTED_NAME STREQUAL ${AUI_MODULE_NAME}) + add_library(${BUILD_AS_IMPORTED_NAME} ALIAS ${AUI_MODULE_NAME}) diff --git a/ports/aui-toolbox/disable-auib.patch b/ports/aui-toolbox/disable-auib.patch new file mode 100644 index 00000000000000..901da345cefb4f --- /dev/null +++ b/ports/aui-toolbox/disable-auib.patch @@ -0,0 +1,21 @@ +diff --git a/aui.boot.cmake b/aui.boot.cmake +index 6baab15..72a838b 100644 +--- a/aui.boot.cmake ++++ b/aui.boot.cmake +@@ -204,13 +204,13 @@ endif() + + + # create all required dirs +-if (NOT EXISTS ${AUIB_CACHE_DIR}) ++if (0) + file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}) + endif() +-if (NOT EXISTS ${AUIB_CACHE_DIR}/prefix) ++if (0) + file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/prefix) + endif() +-if (NOT EXISTS ${AUIB_CACHE_DIR}/repo) ++if (0) + file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/repo) + endif() + diff --git a/ports/aui-toolbox/disable-tests.patch b/ports/aui-toolbox/disable-tests.patch new file mode 100644 index 00000000000000..ef2d760e97f009 --- /dev/null +++ b/ports/aui-toolbox/disable-tests.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d45..c741359d 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -230,7 +230,7 @@ macro(_aui_import_gtest) + endmacro() + + macro(aui_enable_tests AUI_MODULE_NAME) +- if (NOT CMAKE_CROSSCOMPILING) ++ if (0) + _aui_import_gtest() + if (NOT TARGET GTest::gtest) + message(FATAL_ERROR "GTest::gtest not found!") +@@ -328,7 +328,7 @@ macro(_aui_import_google_benchmark) + endmacro() + + macro(aui_enable_benchmarks AUI_MODULE_NAME) +- if (NOT CMAKE_CROSSCOMPILING) ++ if (0) + _aui_import_gtest() + _aui_import_google_benchmark() + if (NOT TARGET benchmark::benchmark) diff --git a/ports/aui-toolbox/fix-fmt12.patch b/ports/aui-toolbox/fix-fmt12.patch new file mode 100644 index 00000000000000..f7ad830b2cfdd9 --- /dev/null +++ b/ports/aui-toolbox/fix-fmt12.patch @@ -0,0 +1,128 @@ +diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h +index 0f82653..314ee56 100644 +--- a/aui.core/src/AUI/Common/AByteBufferView.h ++++ b/aui.core/src/AUI/Common/AByteBufferView.h +@@ -116,8 +116,9 @@ public: + inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { + lhs << "["; + for (const auto b : rhs) { +- char buf[8]; +- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ char buf[16]; ++ auto end = fmt::format_to(buf, " {:02x}", static_cast(b)); ++ lhs.write(buf, end - buf); + } + lhs << " ]"; + +diff --git a/aui.core/src/AUI/Common/AString.h b/aui.core/src/AUI/Common/AString.h +index cbf9d12..2623866 100644 +--- a/aui.core/src/AUI/Common/AString.h ++++ b/aui.core/src/AUI/Common/AString.h +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include "AUI/Core.h" + #include "AUI/Traits/values.h" + #include +@@ -839,7 +840,9 @@ namespace aui::win32 { + } + #endif + ++#if defined(FMT_VERSION) && (FMT_VERSION < 100000) + template <> struct fmt::detail::is_string: std::false_type {}; ++#endif + + template <> struct fmt::formatter: fmt::formatter { + auto format(const AString& s, format_context& ctx) const { +diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h +index ef92c34..1f09f43 100644 +--- a/aui.core/src/AUI/Traits/strings.h ++++ b/aui.core/src/AUI/Traits/strings.h +@@ -17,12 +17,14 @@ + #include "types.h" + + #include ++#include + + namespace aui { + + namespace detail { ++ // Private argument preprocessor for aui::format / ""_format (does NOT modify namespace fmt). + template +- struct fmt { ++ struct aui_format_arg { + template + static decltype(auto) process(T2&& arg) { + return std::forward(arg); +@@ -30,12 +32,19 @@ namespace aui { + }; + + template +- struct fmt>> { ++ struct aui_format_arg>> { + template + static decltype(auto) process(T2&& arg) { + return arg.toStdString(); + } + }; ++ ++ template ++ struct aui_format_arg>> { ++ static auto process(T arg) { ++ return static_cast>(arg); ++ } ++ }; + } + + /** +@@ -46,7 +55,7 @@ namespace aui { + */ + template + inline AString format(std::string_view f, Args&&... args) { +- return fmt::format(fmt::runtime(f), detail::fmt>::process(std::forward(args))...); ++ return fmt::format(fmt::runtime(f), detail::aui_format_arg>::process(std::forward(args))...); + } + } + +diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h +index 84a5ec1..cc7a2f1 100644 +--- a/aui.views/src/AUI/Util/AMetric.h ++++ b/aui.views/src/AUI/Util/AMetric.h +@@ -16,6 +16,7 @@ + #include + #include + #include "AUI/Util/Assert.h" ++#include + + class AString; + +@@ -259,4 +260,25 @@ inline std::ostream& operator<<(std::ostream& o, const AMetric& value) { + break; + } + return o; +-} +\ No newline at end of file ++} ++ ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template <> struct fmt::formatter { ++ constexpr auto parse(format_parse_context& ctx) { ++ return ctx.begin(); // No custom formatting options needed ++ } ++ ++ template ++ auto format(const AMetric& metric, FormatContext& ctx) const { ++ std::string_view suffix; ++ switch (metric.getUnit()) { ++ case AMetric::T_PX: suffix = "px"; break; ++ case AMetric::T_DP: suffix = "dp"; break; ++ case AMetric::T_PT: suffix = "pt"; break; ++ default: break; ++ } ++ ++ return fmt::format_to(ctx.out(), "{}{}", metric.getRawValue(), suffix); ++ } ++}; ++#endif diff --git a/ports/aui-toolbox/fixes.patch b/ports/aui-toolbox/fixes.patch deleted file mode 100644 index 8ae751f17f2553..00000000000000 --- a/ports/aui-toolbox/fixes.patch +++ /dev/null @@ -1,256 +0,0 @@ -Only in aui-7.1.2: .git -diff -r aui-7.1.2/CMakeLists.txt current/CMakeLists.txt ---- aui-7.1.2/CMakeLists.txt -+++ current/CMakeLists.txt -@@ -64,9 +64,7 @@ - add_subdirectory("aui.${AUI_COMPONENT_NAME}") - endfunction() - --auib_import(ZLIB https://github.com/aui-framework/zlib -- VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a -- CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) -+find_package(ZLIB REQUIRED) - - # define all components - define_aui_component(core) -@@ -86,11 +84,11 @@ - define_aui_component(audio) - define_aui_component(updater) - --if (NOT ANDROID AND NOT IOS) -+if (0) - define_aui_component(uitests) - endif() - --if (AUI_BUILD_EXAMPLES) -+if (AUI_BUILD_EXAMPLES) - add_subdirectory(examples) - endif() - -@@ -195,7 +193,6 @@ - # [auib_precompiled_binary] - - # test aui.boot on ci/cd --add_subdirectory(test/) - - # [configure file example] - configure_file(cmake/aui-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aui-config.cmake @ONLY) -diff -r aui-7.1.2/aui.boot.cmake current/aui.boot.cmake ---- aui-7.1.2/aui.boot.cmake -+++ current/aui.boot.cmake -@@ -203,16 +203,6 @@ - endif() - - --# create all required dirs --if (NOT EXISTS ${AUIB_CACHE_DIR}) -- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}) --endif() --if (NOT EXISTS ${AUIB_CACHE_DIR}/prefix) -- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/prefix) --endif() --if (NOT EXISTS ${AUIB_CACHE_DIR}/repo) -- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/repo) --endif() - - - function(_auib_copy_runtime_dependencies DEP_INSTALL_PREFIX) -diff -r aui-7.1.2/aui.core/CMakeLists.txt current/aui.core/CMakeLists.txt ---- aui-7.1.2/aui.core/CMakeLists.txt -+++ current/aui.core/CMakeLists.txt -@@ -11,9 +11,8 @@ - - - get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) --if (GLM_INCLUDE_DIR) -- message(STATUS "Using custom GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") --else() -+find_package(glm REQUIRED) -+if (0) # vendored glm replaced by vcpkg's glm - set(GLM_INCLUDE_DIR "${SELF_DIR}/3rdparty/glm") - - install( -@@ -21,7 +20,8 @@ - DESTINATION "aui.core/include/" - ) - endif() --target_include_directories(aui.core PUBLIC $) -+target_link_libraries(aui.core PUBLIC glm::glm-header-only) -+target_compile_definitions(aui.core PUBLIC GLM_ENABLE_EXPERIMENTAL=1) - - target_compile_definitions(aui.core PRIVATE UNICODE=1) - target_compile_definitions(aui.core PUBLIC NOMINMAX=1) -@@ -49,8 +49,7 @@ - endif() - - if (AUI_PLATFORM_LINUX) -- auib_import(backtrace https://github.com/aui-framework/libbacktrace -- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) -+ find_package(unofficial-libbacktrace CONFIG REQUIRED) - set(_use_backtrace TRUE) - else() - -@@ -84,7 +83,7 @@ - - if(_use_backtrace) - message(STATUS "Stacktrace backend: backtrace") -- aui_link(aui.core PRIVATE backtrace) -+ aui_link(aui.core PRIVATE unofficial::libbacktrace::libbacktrace) - target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) - elseif(_use_unwind) - message(STATUS "Stacktrace backend: unwind") -@@ -126,7 +125,7 @@ - AUI_COMPILER_CLANG - AUI_COMPILER_GCC - AUI_COMPILER_MSVC -- -+ - AUI_ARCH_X86 - AUI_ARCH_X86_64 - AUI_ARCH_ARM_64 -@@ -147,13 +146,9 @@ - - - # [auib_import examples] --auib_import(fmt https://github.com/fmtlib/fmt -- VERSION 9.1.0 -- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) -+find_package(fmt CONFIG REQUIRED) - --auib_import(range-v3 https://github.com/ericniebler/range-v3 -- VERSION 0.12.0 -- CMAKE_ARGS -DRANGE_V3_DOCS=OFF -DRANGE_V3_TESTS=OFF -DRANGE_V3_EXAMPLES=OFF -DRANGE_V3_PERF=OFF -DRANGE_V3_HEADER_CHECKS=OFF) -+find_package(range-v3 CONFIG REQUIRED) - # [auib_import examples] - - aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) -diff -r aui-7.1.2/aui.core/src/AUI/Common/AByteBufferView.h current/aui.core/src/AUI/Common/AByteBufferView.h ---- aui-7.1.2/aui.core/src/AUI/Common/AByteBufferView.h -+++ current/aui.core/src/AUI/Common/AByteBufferView.h -@@ -117,7 +117,7 @@ - lhs << "["; - for (const auto b : rhs) { - char buf[8]; -- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); -+ lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(std::begin(buf), " {:02x}", b))); - } - lhs << " ]"; - -diff -r aui-7.1.2/aui.core/src/AUI/Common/AString.h current/aui.core/src/AUI/Common/AString.h ---- aui-7.1.2/aui.core/src/AUI/Common/AString.h -+++ current/aui.core/src/AUI/Common/AString.h -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include "AUI/Core.h" - #include "AUI/Traits/values.h" - #include -@@ -839,7 +840,6 @@ - } - #endif - --template <> struct fmt::detail::is_string: std::false_type {}; - - template <> struct fmt::formatter: fmt::formatter { - auto format(const AString& s, format_context& ctx) const { -diff -r aui-7.1.2/aui.core/src/AUI/Traits/strings.h current/aui.core/src/AUI/Traits/strings.h ---- aui-7.1.2/aui.core/src/AUI/Traits/strings.h -+++ current/aui.core/src/AUI/Traits/strings.h -@@ -36,6 +36,13 @@ - return arg.toStdString(); - } - }; -+ -+ template -+ struct fmt>> { -+ static auto process(T arg) { -+ return static_cast>(arg); -+ } -+ }; - } - - /** -diff -r aui-7.1.2/aui.core/src/AUI/Traits/values.h current/aui.core/src/AUI/Traits/values.h ---- aui-7.1.2/aui.core/src/AUI/Traits/values.h -+++ current/aui.core/src/AUI/Traits/values.h -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -438,4 +439,11 @@ - }; - - using float_within_0_1 = ranged_number; --} // namespace aui -\ No newline at end of file -+} // namespace aui -+ -+template -+struct fmt::formatter> : fmt::formatter { -+ auto format(aui::ranged_number val, fmt::format_context& ctx) const { -+ return fmt::formatter::format(static_cast(val), ctx); -+ } -+}; -diff -r aui-7.1.2/aui.crypt/CMakeLists.txt current/aui.crypt/CMakeLists.txt ---- aui-7.1.2/aui.crypt/CMakeLists.txt -+++ current/aui.crypt/CMakeLists.txt -@@ -1,9 +1,7 @@ - cmake_minimum_required(VERSION 3.10) - - --unset(OPENSSL_CRYPTO_LIBRARY CACHE) --unset(OPENSSL_SSL_LIBRARY CACHE) --auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) -+find_package(OpenSSL REQUIRED) - - aui_module(aui.crypt EXPORT aui) - aui_enable_tests(aui.crypt) -diff -r aui-7.1.2/aui.image/CMakeLists.txt current/aui.image/CMakeLists.txt ---- aui-7.1.2/aui.image/CMakeLists.txt -+++ current/aui.image/CMakeLists.txt -@@ -1,16 +1,7 @@ - cmake_minimum_required(VERSION 3.10) - --auib_import(lunasvg https://github.com/aui-framework/lunasvg -- VERSION 272ceee) -- -- --set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) -- --foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) -- list(APPEND WEBP_CMAKE_ARGS "-DWEBP_BUILD_${_component}=OFF") --endforeach() -- --auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) -+find_package(lunasvg CONFIG REQUIRED) -+find_package(WebP REQUIRED) - - aui_module(aui.image WHOLEARCHIVE EXPORT aui) - add_subdirectory(3rdparty) -diff -r aui-7.1.2/cmake/aui.build.cmake current/cmake/aui.build.cmake ---- aui-7.1.2/cmake/aui.build.cmake -+++ current/cmake/aui.build.cmake -@@ -230,7 +230,7 @@ - endmacro() - - macro(aui_enable_tests AUI_MODULE_NAME) -- if (NOT CMAKE_CROSSCOMPILING) -+ if (0) - _aui_import_gtest() - if (NOT TARGET GTest::gtest) - message(FATAL_ERROR "GTest::gtest not found!") -@@ -328,7 +328,7 @@ - endmacro() - - macro(aui_enable_benchmarks AUI_MODULE_NAME) -- if (NOT CMAKE_CROSSCOMPILING) -+ if (0) - _aui_import_gtest() - _aui_import_google_benchmark() - if (NOT TARGET benchmark::benchmark) diff --git a/ports/aui-toolbox/portfile.cmake b/ports/aui-toolbox/portfile.cmake index ed9283b70bcca0..92379a2f07c4d1 100644 --- a/ports/aui-toolbox/portfile.cmake +++ b/ports/aui-toolbox/portfile.cmake @@ -7,7 +7,10 @@ vcpkg_from_github( SHA512 decac6cebb6003791896e8d7a9fd7334351aa30205eac787cdbb51d1da657cda140178e0b8f5d236b42a4c1f37633141fb869784e5fc5c9718b5396e077afe7d HEAD_REF master PATCHES - fixes.patch + debundle.patch + disable-tests.patch + disable-auib.patch + fix-fmt12.patch fix-arm64.patch ) diff --git a/ports/aui-toolbox/vcpkg.json b/ports/aui-toolbox/vcpkg.json index 8a607cf4029674..147c9d0b3218dd 100644 --- a/ports/aui-toolbox/vcpkg.json +++ b/ports/aui-toolbox/vcpkg.json @@ -12,10 +12,13 @@ "name": "libbacktrace", "platform": "linux" }, + "libnsgif", "libwebp", "lunasvg", + "minizip", "openssl", "range-v3", + "stb", { "name": "vcpkg-cmake", "host": true diff --git a/ports/aui/disable-auib.patch b/ports/aui/disable-auib.patch index 546f0b8bde6c7d..901da345cefb4f 100644 --- a/ports/aui/disable-auib.patch +++ b/ports/aui/disable-auib.patch @@ -1,21 +1,21 @@ diff --git a/aui.boot.cmake b/aui.boot.cmake -index 6baab15..9c39cca 100644 +index 6baab15..72a838b 100644 --- a/aui.boot.cmake +++ b/aui.boot.cmake -@@ -203,16 +203,6 @@ if(${CMAKE_VERSION} VERSION_LESS "3.21.0") - endif() +@@ -204,13 +204,13 @@ endif() --# create all required dirs + # create all required dirs -if (NOT EXISTS ${AUIB_CACHE_DIR}) -- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}) --endif() ++if (0) + file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}) + endif() -if (NOT EXISTS ${AUIB_CACHE_DIR}/prefix) -- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/prefix) --endif() ++if (0) + file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/prefix) + endif() -if (NOT EXISTS ${AUIB_CACHE_DIR}/repo) -- file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/repo) --endif() - ++if (0) + file(MAKE_DIRECTORY ${AUIB_CACHE_DIR}/repo) + endif() - function(_auib_copy_runtime_dependencies DEP_INSTALL_PREFIX) diff --git a/ports/aui/fix-fmt12.patch b/ports/aui/fix-fmt12.patch index e6637a5344b1ec..f7ad830b2cfdd9 100644 --- a/ports/aui/fix-fmt12.patch +++ b/ports/aui/fix-fmt12.patch @@ -37,10 +37,10 @@ index cbf9d12..2623866 100644 template <> struct fmt::formatter: fmt::formatter { auto format(const AString& s, format_context& ctx) const { diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h -index ef92c34..7d5d5d7 100644 +index ef92c34..1f09f43 100644 --- a/aui.core/src/AUI/Traits/strings.h +++ b/aui.core/src/AUI/Traits/strings.h -@@ -17,6 +17,7 @@ +@@ -17,12 +17,14 @@ #include "types.h" #include @@ -48,6 +48,44 @@ index ef92c34..7d5d5d7 100644 namespace aui { + namespace detail { ++ // Private argument preprocessor for aui::format / ""_format (does NOT modify namespace fmt). + template +- struct fmt { ++ struct aui_format_arg { + template + static decltype(auto) process(T2&& arg) { + return std::forward(arg); +@@ -30,12 +32,19 @@ namespace aui { + }; + + template +- struct fmt>> { ++ struct aui_format_arg>> { + template + static decltype(auto) process(T2&& arg) { + return arg.toStdString(); + } + }; ++ ++ template ++ struct aui_format_arg>> { ++ static auto process(T arg) { ++ return static_cast>(arg); ++ } ++ }; + } + + /** +@@ -46,7 +55,7 @@ namespace aui { + */ + template + inline AString format(std::string_view f, Args&&... args) { +- return fmt::format(fmt::runtime(f), detail::fmt>::process(std::forward(args))...); ++ return fmt::format(fmt::runtime(f), detail::aui_format_arg>::process(std::forward(args))...); + } + } + diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h index 84a5ec1..cc7a2f1 100644 --- a/aui.views/src/AUI/Util/AMetric.h diff --git a/versions/a-/aui-toolbox.json b/versions/a-/aui-toolbox.json index 731145daf938df..bbb827ddef664b 100644 --- a/versions/a-/aui-toolbox.json +++ b/versions/a-/aui-toolbox.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e278557efb0c6c43e50925174bc8c9954658ca39", + "git-tree": "40d9dfb8bb9a6f413c82d43c6e4bbe61ec082e7e", "version": "7.1.2", "port-version": 0 } diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 2420a5bba8c8ad..6738bd230d33f1 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "31a81284c08983704a51697ac333d9d4df029f7f", + "git-tree": "db0fa048dba517e02c4f1dbc03f543a8133f5c47", "version": "7.1.2", "port-version": 0 } From 8d57ee8d0a9d53b72ceaf7531d9945949406caa5 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 23 Aug 2026 20:41:59 +0300 Subject: [PATCH 19/21] aui: finish rework fix-fmt12 patch to follow upstream --- ports/aui-toolbox/fix-fmt12.patch | 148 ++++++++++++++++++++++-------- ports/aui/fix-fmt12.patch | 148 ++++++++++++++++++++++-------- versions/a-/aui-toolbox.json | 2 +- versions/a-/aui.json | 2 +- 4 files changed, 218 insertions(+), 82 deletions(-) diff --git a/ports/aui-toolbox/fix-fmt12.patch b/ports/aui-toolbox/fix-fmt12.patch index f7ad830b2cfdd9..dd88506553fe52 100644 --- a/ports/aui-toolbox/fix-fmt12.patch +++ b/ports/aui-toolbox/fix-fmt12.patch @@ -1,16 +1,19 @@ diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h -index 0f82653..314ee56 100644 +index 0f82653..176170c 100644 --- a/aui.core/src/AUI/Common/AByteBufferView.h +++ b/aui.core/src/AUI/Common/AByteBufferView.h -@@ -116,8 +116,9 @@ public: +@@ -116,8 +116,13 @@ public: inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { lhs << "["; for (const auto b : rhs) { - char buf[8]; -- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); + char buf[16]; ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ #else + auto end = fmt::format_to(buf, " {:02x}", static_cast(b)); + lhs.write(buf, end - buf); ++ #endif } lhs << " ]"; @@ -37,10 +40,10 @@ index cbf9d12..2623866 100644 template <> struct fmt::formatter: fmt::formatter { auto format(const AString& s, format_context& ctx) const { diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h -index ef92c34..1f09f43 100644 +index ef92c34..7d5d5d7 100644 --- a/aui.core/src/AUI/Traits/strings.h +++ b/aui.core/src/AUI/Traits/strings.h -@@ -17,12 +17,14 @@ +@@ -17,6 +17,7 @@ #include "types.h" #include @@ -48,46 +51,111 @@ index ef92c34..1f09f43 100644 namespace aui { - namespace detail { -+ // Private argument preprocessor for aui::format / ""_format (does NOT modify namespace fmt). - template -- struct fmt { -+ struct aui_format_arg { - template - static decltype(auto) process(T2&& arg) { - return std::forward(arg); -@@ -30,12 +32,19 @@ namespace aui { - }; +diff --git a/aui.curl/src/AUI/Curl/ACurlMulti.cpp b/aui.curl/src/AUI/Curl/ACurlMulti.cpp +index f6faf9b..b6774cc 100644 +--- a/aui.curl/src/AUI/Curl/ACurlMulti.cpp ++++ b/aui.curl/src/AUI/Curl/ACurlMulti.cpp +@@ -53,7 +53,11 @@ void ACurlMulti::run(bool infinite) { + AThread::interruptionPoint(); - template -- struct fmt>> { -+ struct aui_format_arg>> { - template - static decltype(auto) process(T2&& arg) { - return arg.toStdString(); - } - }; + if (status) { ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + throw ACurl::Exception("curl poll failed: {}"_format(status)); ++ #else ++ throw ACurl::Exception(fmt::format("curl poll failed: {}", static_cast(status))); ++ #endif + } + + int messagesLeft; +diff --git a/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp b/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp +index 0847241..58f6e0f 100644 +--- a/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp ++++ b/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp +@@ -95,7 +95,11 @@ _ Parser::parseShader() { + break; + + default: ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + reportUnexpectedErrorAndSkip("expected using, class, struct, input, output, inter, uniform, entry keywords"_format(keywordType)); ++ #else ++ reportUnexpectedErrorAndSkip(fmt::format("expected using, class, struct, input, output, inter, uniform, entry keywords {}", keywordType)); ++ #endif + } + break; + } +diff --git a/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h b/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h +index c75dc8b..bdebaae 100644 +--- a/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h ++++ b/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h +@@ -101,4 +101,10 @@ public: + static Type fromName(const AString& name); + }; + +- ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template <> struct fmt::formatter : fmt::formatter { ++ auto format(KeywordToken::Type type, fmt::format_context& ctx) const { ++ return fmt::formatter::format(KeywordToken(type).getName(), ctx); ++ } ++}; ++#endif +diff --git a/aui.views/src/AUI/ASS/Property/Opacity.h b/aui.views/src/AUI/ASS/Property/Opacity.h +index 53d4786..dfde6ce 100644 +--- a/aui.views/src/AUI/ASS/Property/Opacity.h ++++ b/aui.views/src/AUI/ASS/Property/Opacity.h +@@ -19,6 +19,15 @@ + #include + #include "IProperty.h" + ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template <> struct fmt::formatter : fmt::formatter { ++ auto format(const aui::float_within_0_1& v, fmt::format_context& ctx) const { ++ return fmt::formatter::format(static_cast(v), ctx); ++ } ++}; ++#endif + -+ template -+ struct aui_format_arg>> { -+ static auto process(T arg) { -+ return static_cast>(arg); -+ } -+ }; - } ++ + namespace ass { /** -@@ -46,7 +55,7 @@ namespace aui { - */ - template - inline AString format(std::string_view f, Args&&... args) { -- return fmt::format(fmt::runtime(f), detail::fmt>::process(std::forward(args))...); -+ return fmt::format(fmt::runtime(f), detail::aui_format_arg>::process(std::forward(args))...); +diff --git a/aui.views/src/AUI/ASS/unset.h b/aui.views/src/AUI/ASS/unset.h +index 62a2fb8..fa5780c 100644 +--- a/aui.views/src/AUI/ASS/unset.h ++++ b/aui.views/src/AUI/ASS/unset.h +@@ -182,4 +182,28 @@ std::ostream& operator<<(std::ostream& o, const ass::unset_wrap& wrap) { + o << ""; } - } - + return o; +-} +\ No newline at end of file ++} ++ ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template ++struct fmt::formatter, Char> { ++ fmt::formatter inner; ++ ++ // Parse format specs like {:>10}, {:.2f}, etc. ++ template ++ constexpr auto parse(ParseContext& ctx) { ++ return inner.parse(ctx); ++ } ++ ++ // Format either the value (if set) or the "" fallback ++ template ++ auto format(const ass::unset_wrap& value, FormatContext& ctx) const { ++ if (value) { ++ return inner.format(*value, ctx); ++ } else { ++ static constexpr auto fallback = std::basic_string_view(FMT_STRING("")); ++ return fmt::format_to(ctx.out(), "{}", fallback); ++ } ++ } ++}; ++#endif diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h -index 84a5ec1..cc7a2f1 100644 +index 84a5ec1..f58e160 100644 --- a/aui.views/src/AUI/Util/AMetric.h +++ b/aui.views/src/AUI/Util/AMetric.h @@ -16,6 +16,7 @@ @@ -119,7 +187,7 @@ index 84a5ec1..cc7a2f1 100644 + case AMetric::T_PX: suffix = "px"; break; + case AMetric::T_DP: suffix = "dp"; break; + case AMetric::T_PT: suffix = "pt"; break; -+ default: break; ++ default: suffix = ""; break; + } + + return fmt::format_to(ctx.out(), "{}{}", metric.getRawValue(), suffix); diff --git a/ports/aui/fix-fmt12.patch b/ports/aui/fix-fmt12.patch index f7ad830b2cfdd9..dd88506553fe52 100644 --- a/ports/aui/fix-fmt12.patch +++ b/ports/aui/fix-fmt12.patch @@ -1,16 +1,19 @@ diff --git a/aui.core/src/AUI/Common/AByteBufferView.h b/aui.core/src/AUI/Common/AByteBufferView.h -index 0f82653..314ee56 100644 +index 0f82653..176170c 100644 --- a/aui.core/src/AUI/Common/AByteBufferView.h +++ b/aui.core/src/AUI/Common/AByteBufferView.h -@@ -116,8 +116,9 @@ public: +@@ -116,8 +116,13 @@ public: inline std::ostream& operator<<(std::ostream& lhs, const AByteBufferView& rhs) { lhs << "["; for (const auto b : rhs) { - char buf[8]; -- lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); + char buf[16]; ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + lhs.write(buf, std::distance(std::begin(buf), fmt::format_to(buf, " {:02x}", b))); ++ #else + auto end = fmt::format_to(buf, " {:02x}", static_cast(b)); + lhs.write(buf, end - buf); ++ #endif } lhs << " ]"; @@ -37,10 +40,10 @@ index cbf9d12..2623866 100644 template <> struct fmt::formatter: fmt::formatter { auto format(const AString& s, format_context& ctx) const { diff --git a/aui.core/src/AUI/Traits/strings.h b/aui.core/src/AUI/Traits/strings.h -index ef92c34..1f09f43 100644 +index ef92c34..7d5d5d7 100644 --- a/aui.core/src/AUI/Traits/strings.h +++ b/aui.core/src/AUI/Traits/strings.h -@@ -17,12 +17,14 @@ +@@ -17,6 +17,7 @@ #include "types.h" #include @@ -48,46 +51,111 @@ index ef92c34..1f09f43 100644 namespace aui { - namespace detail { -+ // Private argument preprocessor for aui::format / ""_format (does NOT modify namespace fmt). - template -- struct fmt { -+ struct aui_format_arg { - template - static decltype(auto) process(T2&& arg) { - return std::forward(arg); -@@ -30,12 +32,19 @@ namespace aui { - }; +diff --git a/aui.curl/src/AUI/Curl/ACurlMulti.cpp b/aui.curl/src/AUI/Curl/ACurlMulti.cpp +index f6faf9b..b6774cc 100644 +--- a/aui.curl/src/AUI/Curl/ACurlMulti.cpp ++++ b/aui.curl/src/AUI/Curl/ACurlMulti.cpp +@@ -53,7 +53,11 @@ void ACurlMulti::run(bool infinite) { + AThread::interruptionPoint(); - template -- struct fmt>> { -+ struct aui_format_arg>> { - template - static decltype(auto) process(T2&& arg) { - return arg.toStdString(); - } - }; + if (status) { ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + throw ACurl::Exception("curl poll failed: {}"_format(status)); ++ #else ++ throw ACurl::Exception(fmt::format("curl poll failed: {}", static_cast(status))); ++ #endif + } + + int messagesLeft; +diff --git a/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp b/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp +index 0847241..58f6e0f 100644 +--- a/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp ++++ b/aui.toolbox/src/ShadingLanguage/Lang/Parser.cpp +@@ -95,7 +95,11 @@ _ Parser::parseShader() { + break; + + default: ++ #if defined(FMT_VERSION) && (FMT_VERSION < 100000) + reportUnexpectedErrorAndSkip("expected using, class, struct, input, output, inter, uniform, entry keywords"_format(keywordType)); ++ #else ++ reportUnexpectedErrorAndSkip(fmt::format("expected using, class, struct, input, output, inter, uniform, entry keywords {}", keywordType)); ++ #endif + } + break; + } +diff --git a/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h b/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h +index c75dc8b..bdebaae 100644 +--- a/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h ++++ b/aui.toolbox/src/ShadingLanguage/Lang/Token/KeywordToken.h +@@ -101,4 +101,10 @@ public: + static Type fromName(const AString& name); + }; + +- ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template <> struct fmt::formatter : fmt::formatter { ++ auto format(KeywordToken::Type type, fmt::format_context& ctx) const { ++ return fmt::formatter::format(KeywordToken(type).getName(), ctx); ++ } ++}; ++#endif +diff --git a/aui.views/src/AUI/ASS/Property/Opacity.h b/aui.views/src/AUI/ASS/Property/Opacity.h +index 53d4786..dfde6ce 100644 +--- a/aui.views/src/AUI/ASS/Property/Opacity.h ++++ b/aui.views/src/AUI/ASS/Property/Opacity.h +@@ -19,6 +19,15 @@ + #include + #include "IProperty.h" + ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template <> struct fmt::formatter : fmt::formatter { ++ auto format(const aui::float_within_0_1& v, fmt::format_context& ctx) const { ++ return fmt::formatter::format(static_cast(v), ctx); ++ } ++}; ++#endif + -+ template -+ struct aui_format_arg>> { -+ static auto process(T arg) { -+ return static_cast>(arg); -+ } -+ }; - } ++ + namespace ass { /** -@@ -46,7 +55,7 @@ namespace aui { - */ - template - inline AString format(std::string_view f, Args&&... args) { -- return fmt::format(fmt::runtime(f), detail::fmt>::process(std::forward(args))...); -+ return fmt::format(fmt::runtime(f), detail::aui_format_arg>::process(std::forward(args))...); +diff --git a/aui.views/src/AUI/ASS/unset.h b/aui.views/src/AUI/ASS/unset.h +index 62a2fb8..fa5780c 100644 +--- a/aui.views/src/AUI/ASS/unset.h ++++ b/aui.views/src/AUI/ASS/unset.h +@@ -182,4 +182,28 @@ std::ostream& operator<<(std::ostream& o, const ass::unset_wrap& wrap) { + o << ""; } - } - + return o; +-} +\ No newline at end of file ++} ++ ++#if defined(FMT_VERSION) && (FMT_VERSION >= 100000) ++template ++struct fmt::formatter, Char> { ++ fmt::formatter inner; ++ ++ // Parse format specs like {:>10}, {:.2f}, etc. ++ template ++ constexpr auto parse(ParseContext& ctx) { ++ return inner.parse(ctx); ++ } ++ ++ // Format either the value (if set) or the "" fallback ++ template ++ auto format(const ass::unset_wrap& value, FormatContext& ctx) const { ++ if (value) { ++ return inner.format(*value, ctx); ++ } else { ++ static constexpr auto fallback = std::basic_string_view(FMT_STRING("")); ++ return fmt::format_to(ctx.out(), "{}", fallback); ++ } ++ } ++}; ++#endif diff --git a/aui.views/src/AUI/Util/AMetric.h b/aui.views/src/AUI/Util/AMetric.h -index 84a5ec1..cc7a2f1 100644 +index 84a5ec1..f58e160 100644 --- a/aui.views/src/AUI/Util/AMetric.h +++ b/aui.views/src/AUI/Util/AMetric.h @@ -16,6 +16,7 @@ @@ -119,7 +187,7 @@ index 84a5ec1..cc7a2f1 100644 + case AMetric::T_PX: suffix = "px"; break; + case AMetric::T_DP: suffix = "dp"; break; + case AMetric::T_PT: suffix = "pt"; break; -+ default: break; ++ default: suffix = ""; break; + } + + return fmt::format_to(ctx.out(), "{}{}", metric.getRawValue(), suffix); diff --git a/versions/a-/aui-toolbox.json b/versions/a-/aui-toolbox.json index bbb827ddef664b..6f9cdaeefdcebf 100644 --- a/versions/a-/aui-toolbox.json +++ b/versions/a-/aui-toolbox.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "40d9dfb8bb9a6f413c82d43c6e4bbe61ec082e7e", + "git-tree": "7bbe5d6b3d782577d64e7686780d977e088f2e00", "version": "7.1.2", "port-version": 0 } diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 6738bd230d33f1..7b69f8ea07903b 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "db0fa048dba517e02c4f1dbc03f543a8133f5c47", + "git-tree": "cc8397a3e12b08b33899a8000d8e03451dcd78b9", "version": "7.1.2", "port-version": 0 } From 5d17bea293b4675f9c28b8876b40f1ccd13a407c Mon Sep 17 00:00:00 2001 From: Saikari Date: Thu, 27 Aug 2026 18:19:15 +0300 Subject: [PATCH 20/21] aui-toolbox: remove_recurse 3rdparty --- ports/aui-toolbox/portfile.cmake | 2 ++ versions/a-/aui-toolbox.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/aui-toolbox/portfile.cmake b/ports/aui-toolbox/portfile.cmake index 92379a2f07c4d1..7ff73a1f2e9d18 100644 --- a/ports/aui-toolbox/portfile.cmake +++ b/ports/aui-toolbox/portfile.cmake @@ -14,6 +14,8 @@ vcpkg_from_github( fix-arm64.patch ) +file(REMOVE_RECURSE "${SOURCE_PATH}/aui.audio/3rdparty" "${SOURCE_PATH}/aui.core/3rdparty" "${SOURCE_PATH}/aui.image/3rdparty" "${SOURCE_PATH}/aui.sqlite/3rdparty") + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS diff --git a/versions/a-/aui-toolbox.json b/versions/a-/aui-toolbox.json index 6f9cdaeefdcebf..23f960e7a6f38d 100644 --- a/versions/a-/aui-toolbox.json +++ b/versions/a-/aui-toolbox.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7bbe5d6b3d782577d64e7686780d977e088f2e00", + "git-tree": "f26df47f4fc22a0920fcdf6311fdf52dadffb9bf", "version": "7.1.2", "port-version": 0 } From 6b3a8b13f6965ed10eba8e5820cb81c882962f62 Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 31 Aug 2026 02:47:07 +0300 Subject: [PATCH 21/21] Resolve review --- ports/aui/aui-config.cmake.in | 4 +- ports/aui/fix-public-headers.patch | 141 +++++++++++++++++++++++++++++ ports/aui/portfile.cmake | 16 +++- ports/aui/usage | 12 +++ versions/a-/aui.json | 2 +- 5 files changed, 171 insertions(+), 4 deletions(-) create mode 100644 ports/aui/fix-public-headers.patch create mode 100644 ports/aui/usage diff --git a/ports/aui/aui-config.cmake.in b/ports/aui/aui-config.cmake.in index e2fc1d8ef246fc..9f477047335e31 100644 --- a/ports/aui/aui-config.cmake.in +++ b/ports/aui/aui-config.cmake.in @@ -300,14 +300,14 @@ if (${CMAKE_FIND_PACKAGE_NAME}_FOUND AND ${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TAR INTERFACE_LINK_LIBRARIES "${${CMAKE_FIND_PACKAGE_NAME}_IMPORTED_TARGETS}") endif() -set(AUI_BUILD_AUI_ROOT "${AUI_ROOT_DIR}") +set(AUI_BUILD_AUI_ROOT "${AUI_ROOT_DIR}/share/aui") macro(auib_use_system_libs_begin) endmacro() macro(auib_use_system_libs_end) endmacro() -include("${AUI_BUILD_AUI_ROOT}/share/aui/cmake/aui.build.cmake") +include("${AUI_BUILD_AUI_ROOT}/cmake/aui.build.cmake") if(NOT AUI_TOOLBOX_EXE) find_program(AUI_TOOLBOX_EXE NAMES aui.toolbox diff --git a/ports/aui/fix-public-headers.patch b/ports/aui/fix-public-headers.patch new file mode 100644 index 00000000000000..ce61939166f259 --- /dev/null +++ b/ports/aui/fix-public-headers.patch @@ -0,0 +1,141 @@ +diff --git a/aui.core/src/AUI/api.h b/aui.core/src/AUI/api.h +index 7be8bd6..5aae23d 100644 +--- a/aui.core/src/AUI/api.h ++++ b/aui.core/src/AUI/api.h +@@ -11,6 +11,84 @@ + + #pragma once + ++#if !defined(AUI_PLATFORM_WIN) && !defined(AUI_PLATFORM_LINUX) && !defined(AUI_PLATFORM_APPLE) && !defined(AUI_PLATFORM_ANDROID) && !defined(AUI_PLATFORM_EMSCRIPTEN) ++ #if defined(_WIN32) ++ #define AUI_PLATFORM_WIN 1 ++ #elif defined(__ANDROID__) ++ #define AUI_PLATFORM_ANDROID 1 ++ #define AUI_PLATFORM_UNIX 1 ++ #elif defined(__APPLE__) ++ #define AUI_PLATFORM_APPLE 1 ++ #define AUI_PLATFORM_UNIX 1 ++ #include ++ #if TARGET_OS_IPHONE ++ #define AUI_PLATFORM_IOS 1 ++ #else ++ #define AUI_PLATFORM_MACOS 1 ++ #endif ++ #elif defined(__EMSCRIPTEN__) ++ #define AUI_PLATFORM_EMSCRIPTEN 1 ++ #elif defined(__linux__) ++ #define AUI_PLATFORM_LINUX 1 ++ #define AUI_PLATFORM_UNIX 1 ++ #elif defined(__unix__) ++ #define AUI_PLATFORM_UNIX 1 ++ #endif ++#endif ++#ifndef AUI_PLATFORM_WIN ++ #define AUI_PLATFORM_WIN 0 ++#endif ++#ifndef AUI_PLATFORM_LINUX ++ #define AUI_PLATFORM_LINUX 0 ++#endif ++#ifndef AUI_PLATFORM_APPLE ++ #define AUI_PLATFORM_APPLE 0 ++#endif ++#ifndef AUI_PLATFORM_MACOS ++ #define AUI_PLATFORM_MACOS 0 ++#endif ++#ifndef AUI_PLATFORM_IOS ++ #define AUI_PLATFORM_IOS 0 ++#endif ++#ifndef AUI_PLATFORM_ANDROID ++ #define AUI_PLATFORM_ANDROID 0 ++#endif ++#ifndef AUI_PLATFORM_EMSCRIPTEN ++ #define AUI_PLATFORM_EMSCRIPTEN 0 ++#endif ++#ifndef AUI_PLATFORM_UNIX ++ #define AUI_PLATFORM_UNIX 0 ++#endif ++#if !defined(AUI_ARCH_X86) && !defined(AUI_ARCH_X86_64) && !defined(AUI_ARCH_ARM_V7) && !defined(AUI_ARCH_ARM_64) ++ #if defined(__x86_64__) || defined(_M_X64) || defined(__amd64__) ++ #define AUI_ARCH_X86_64 1 ++ #elif defined(__i386__) || defined(_M_IX86) ++ #define AUI_ARCH_X86 1 ++ #elif defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) ++ #define AUI_ARCH_ARM_64 1 ++ #elif defined(__arm__) || defined(_M_ARM) ++ #define AUI_ARCH_ARM_V7 1 ++ #endif ++#endif ++#ifndef AUI_ARCH_X86 ++ #define AUI_ARCH_X86 0 ++#endif ++#ifndef AUI_ARCH_X86_64 ++ #define AUI_ARCH_X86_64 0 ++#endif ++#ifndef AUI_ARCH_ARM_V7 ++ #define AUI_ARCH_ARM_V7 0 ++#endif ++#ifndef AUI_ARCH_ARM_64 ++ #define AUI_ARCH_ARM_64 0 ++#endif ++#ifndef AUI_DEBUG ++ #if defined(NDEBUG) ++ #define AUI_DEBUG 0 ++ #else ++ #define AUI_DEBUG 1 ++ #endif ++#endif + #ifdef AUI_STATIC + #define AUI_IMPORT + #define AUI_EXPORT +@@ -23,6 +101,51 @@ + #define AUI_EXPORT __attribute__((visibility("default"))) + #endif + #endif ++#ifndef API_AUI_CORE ++#define API_AUI_CORE AUI_IMPORT ++#endif ++#ifndef API_AUI_VIEWS ++#define API_AUI_VIEWS AUI_IMPORT ++#endif ++#ifndef API_AUI_AUDIO ++#define API_AUI_AUDIO AUI_IMPORT ++#endif ++#ifndef API_AUI_CRYPT ++#define API_AUI_CRYPT AUI_IMPORT ++#endif ++#ifndef API_AUI_CURL ++#define API_AUI_CURL AUI_IMPORT ++#endif ++#ifndef API_AUI_DATA ++#define API_AUI_DATA AUI_IMPORT ++#endif ++#ifndef API_AUI_IMAGE ++#define API_AUI_IMAGE AUI_IMPORT ++#endif ++#ifndef API_AUI_JSON ++#define API_AUI_JSON AUI_IMPORT ++#endif ++#ifndef API_AUI_MYSQL ++#define API_AUI_MYSQL AUI_IMPORT ++#endif ++#ifndef API_AUI_NETWORK ++#define API_AUI_NETWORK AUI_IMPORT ++#endif ++#ifndef API_AUI_SQLITE ++#define API_AUI_SQLITE AUI_IMPORT ++#endif ++#ifndef API_AUI_UITESTS ++#define API_AUI_UITESTS AUI_IMPORT ++#endif ++#ifndef API_AUI_UPDATER ++#define API_AUI_UPDATER AUI_IMPORT ++#endif ++#ifndef API_AUI_XML ++#define API_AUI_XML AUI_IMPORT ++#endif ++#ifndef GLM_ENABLE_EXPERIMENTAL ++#define GLM_ENABLE_EXPERIMENTAL 1 ++#endif + + + #if !__cpp_rtti diff --git a/ports/aui/portfile.cmake b/ports/aui/portfile.cmake index 398db24ea90e18..9b791fdc623bb5 100644 --- a/ports/aui/portfile.cmake +++ b/ports/aui/portfile.cmake @@ -12,9 +12,11 @@ vcpkg_from_github( fix-glm.patch fix-macos.patch fix-arm64.patch -) + fix-public-headers.patch + ) file(REMOVE_RECURSE "${SOURCE_PATH}/aui.audio/3rdparty" "${SOURCE_PATH}/aui.core/3rdparty" "${SOURCE_PATH}/aui.image/3rdparty" "${SOURCE_PATH}/aui.sqlite/3rdparty") +file(REMOVE "${SOURCE_PATH}/platform/android/project/gradle/wrapper/gradle-wrapper.jar") file(COPY "${CMAKE_CURRENT_LIST_DIR}/aui-config.cmake.in" DESTINATION "${SOURCE_PATH}/cmake") @@ -53,6 +55,12 @@ vcpkg_host_path_list(PREPEND ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin" "${CURRENT vcpkg_cmake_install() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/AUI/api.h" + "#pragma once" + "#pragma once\n\n#ifndef AUI_STATIC\n#define AUI_STATIC\n#endif" + ) +endif() if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/aui.toolbox${VCPKG_TARGET_EXECUTABLE_SUFFIX}") vcpkg_copy_tools(TOOL_NAMES aui.toolbox AUTO_CLEAN) @@ -85,5 +93,11 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") file(RENAME "${CURRENT_PACKAGES_DIR}/cmake" "${CURRENT_PACKAGES_DIR}/share/aui/cmake") endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/cmake") +if(EXISTS "${CURRENT_PACKAGES_DIR}/platform") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/aui") + file(RENAME "${CURRENT_PACKAGES_DIR}/platform" "${CURRENT_PACKAGES_DIR}/share/aui/platform") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/platform") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) diff --git a/ports/aui/usage b/ports/aui/usage new file mode 100644 index 00000000000000..a65ea88ae9fbfd --- /dev/null +++ b/ports/aui/usage @@ -0,0 +1,12 @@ +The package aui provides CMake targets: + + find_package(aui CONFIG REQUIRED COMPONENTS core views ...) + + # Configure an application using AUI helper functions: + aui_executable(${PROJECT_NAME}) + # Link against AUI component targets + aui_link(${PROJECT_NAME} PRIVATE aui::core aui::views) + aui_compile_assets(${PROJECT_NAME}) + aui_app(TARGET ${PROJECT_NAME} NAME "My App" VENDOR "vcpkg" + ICON "assets/img/icon.svg" + ANDROID_PACKAGE "org.vcpkg.auitest") diff --git a/versions/a-/aui.json b/versions/a-/aui.json index 7b69f8ea07903b..4a7756914b03f8 100644 --- a/versions/a-/aui.json +++ b/versions/a-/aui.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "cc8397a3e12b08b33899a8000d8e03451dcd78b9", + "git-tree": "30673fde524070c2155f0a2c43628123dfaf7ab6", "version": "7.1.2", "port-version": 0 }