From 0e73f717e871c3d0860cf75299e7094b9a6bf05d Mon Sep 17 00:00:00 2001 From: Saikari Date: Fri, 18 Jul 2025 21:35:31 +0300 Subject: [PATCH 01/27] aui: add new packgage --- packages/a/aui/patches/v7.1.2/debundle.diff | 535 ++++++++++++++++++++ packages/a/aui/xmake.lua | 95 ++++ packages/g/glew/port/xmake.lua | 1 + packages/g/gtest/xmake.lua | 3 +- 4 files changed, 633 insertions(+), 1 deletion(-) create mode 100644 packages/a/aui/patches/v7.1.2/debundle.diff create mode 100644 packages/a/aui/xmake.lua diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff new file mode 100644 index 00000000000..d38ca40ec22 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -0,0 +1,535 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6902d56a..98ebd001 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,9 +64,13 @@ 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) ++if (AUIB_DISABLE) ++ find_package(ZLIB REQUIRED) ++else () ++ auib_import(ZLIB https://github.com/aui-framework/zlib ++ VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a ++ CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) ++endif () + + # define all components + define_aui_component(core) +@@ -195,7 +199,9 @@ auib_precompiled_binary() + # [auib_precompiled_binary] + + # test aui.boot on ci/cd +-add_subdirectory(test/) ++if (NOT AUIB_DISABLE) ++ add_subdirectory(test/) ++endif () + + # [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 21e44153..e3154d7f 100644 +--- a/aui.audio/CMakeLists.txt ++++ b/aui.audio/CMakeLists.txt +@@ -5,26 +5,36 @@ add_subdirectory(3rdparty/ogg) + 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 $ $) ++ if (AUIB_DISABLE) ++ find_package(oboe CONFIG REQUIRED) ++ aui_link(aui.audio PUBLIC oboe::oboe $ $) ++ else () ++ 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" +- ) ++ 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" ++ ) ++ endif () + elseif (AUI_PLATFORM_LINUX) + aui_link(aui.audio PUBLIC pulse) + 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) ++if (AUIB_DISABLE) ++ find_package(opus CONFIG REQUIRED) ++ aui_link(aui.audio PRIVATE Opus::opus) ++else () ++ auib_import(Opus https://github.com/xiph/opus.git VERSION v1.4) ++ aui_link(aui.audio PRIVATE Opus::opus) ++endif () + + if (AUI_PLATFORM_IOS OR AUI_PLATFORM_MACOS) + auib_use_system_libs_begin() +@@ -42,9 +52,15 @@ if (AUI_PLATFORM_MACOS) + "-framework QuartzCore") + endif() + +-auib_import(soxr https://github.com/aui-framework/soxr +- ADD_SUBDIRECTORY +- VERSION adacc686124ac3568432f3dca388878963a005ee +- ) ++if (AUIB_DISABLE) ++ include(FindPkgConfig) ++ pkg_check_modules(soxr REQUIRED IMPORTED_TARGET soxr) ++ aui_link(aui.audio PRIVATE PkgConfig::soxr) ++else () ++ auib_import(soxr https://github.com/aui-framework/soxr ++ ADD_SUBDIRECTORY ++ VERSION adacc686124ac3568432f3dca388878963a005ee ++ ) + +-aui_link(aui.audio PRIVATE soxr) ++ aui_link(aui.audio PRIVATE soxr) ++endif () +diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt +index 6aa1b072..01e3fe81 100644 +--- a/aui.core/CMakeLists.txt ++++ b/aui.core/CMakeLists.txt +@@ -6,7 +6,9 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) + option(AUI_ENABLE_DEATH_TESTS "Enable GTest death tests" ON) + + aui_module(aui.core EXPORT aui) +-aui_enable_tests(aui.core) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.core) ++endif () + aui_enable_benchmarks(aui.core) + + +@@ -49,8 +51,12 @@ if (NOT WIN32) + endif() + + if (AUI_PLATFORM_LINUX) +- auib_import(backtrace https://github.com/aui-framework/libbacktrace +- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ if (AUIB_DISABLE) ++ find_package(libbacktrace CONFIG REQUIRED) ++ else () ++ auib_import(backtrace https://github.com/aui-framework/libbacktrace ++ VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ endif () + set(_use_backtrace TRUE) + else() + +@@ -84,7 +90,11 @@ endif() + + if(_use_backtrace) + message(STATUS "Stacktrace backend: backtrace") +- aui_link(aui.core PRIVATE backtrace) ++ if (AUIB_DISABLE) ++ aui_link(aui.core PRIVATE libbacktrace::libbacktrace) ++ else () ++ aui_link(aui.core PRIVATE backtrace) ++ endif () + target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) + elseif(_use_unwind) + message(STATUS "Stacktrace backend: unwind") +@@ -146,17 +156,22 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) + endif() + + +-# [auib_import examples] +-auib_import(fmt https://github.com/fmtlib/fmt +- VERSION 9.1.0 +- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) +- +-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) +-# [auib_import examples] +- +-aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) ++if (AUIB_DISABLE) ++ find_package(fmt CONFIG REQUIRED) ++ find_package(range-v3 CONFIG REQUIRED) ++ aui_link(aui.core PUBLIC fmt::fmt range-v3::range-v3) ++else () ++ # [auib_import examples] ++ auib_import(fmt https://github.com/fmtlib/fmt ++ VERSION 9.1.0 ++ CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) ++ 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) ++ # [auib_import examples] ++ ++ aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) ++endif () + + # segfault functionality + if (NOT MSVC AND AUI_CATCH_UNHANDLED) +diff --git a/aui.crypt/CMakeLists.txt b/aui.crypt/CMakeLists.txt +index c5354f2e..9c194be4 100644 +--- a/aui.crypt/CMakeLists.txt ++++ b/aui.crypt/CMakeLists.txt +@@ -3,10 +3,16 @@ 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) ++if (AUIB_DISABLE) ++ find_package(OpenSSL CONFIG REQUIRED) ++else () ++ auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) ++endif () + + aui_module(aui.crypt EXPORT aui) +-aui_enable_tests(aui.crypt) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.crypt) ++endif () + aui_link(aui.crypt PUBLIC aui::core) + target_include_directories(aui.crypt PRIVATE ${OPENSSL_INCLUDE_DIR}) + aui_link(aui.crypt PRIVATE OpenSSL::SSL OpenSSL::Crypto) +diff --git a/aui.curl/CMakeLists.txt b/aui.curl/CMakeLists.txt +index 5141c8ee..00be58b4 100644 +--- a/aui.curl/CMakeLists.txt ++++ b/aui.curl/CMakeLists.txt +@@ -1,9 +1,15 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip +- ARCHIVE) ++if (AUIB_DISABLE) ++ find_package(CURL CONFIG REQUIRED) ++else () ++ auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip ++ ARCHIVE) ++endif () + + aui_module(aui.curl EXPORT aui WHOLEARCHIVE) +-aui_enable_tests(aui.curl) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.curl) ++endif () + aui_link(aui.curl PUBLIC aui::core aui::json) + aui_link(aui.curl PRIVATE CURL::libcurl aui::crypt) +diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt +index 033e7ad5..a272f2b9 100644 +--- a/aui.image/CMakeLists.txt ++++ b/aui.image/CMakeLists.txt +@@ -1,8 +1,11 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(lunasvg https://github.com/aui-framework/lunasvg +- VERSION 272ceee) +- ++if (AUIB_DISABLE) ++ find_package(lunasvg CONFIG REQUIRED) ++else () ++ auib_import(lunasvg https://github.com/aui-framework/lunasvg ++ VERSION 272ceee) ++endif () + + set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) + +@@ -10,9 +13,16 @@ 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}) ++if (AUIB_DISABLE) ++ find_package(WebP CONFIG REQUIRED) ++else () ++ auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) ++endif () + + aui_module(aui.image WHOLEARCHIVE EXPORT aui) + add_subdirectory(3rdparty) + aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) +-aui_enable_tests(aui.image) ++ ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.image) ++endif () +diff --git a/aui.json/CMakeLists.txt b/aui.json/CMakeLists.txt +index d0190bd5..980456da 100644 +--- a/aui.json/CMakeLists.txt ++++ b/aui.json/CMakeLists.txt +@@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 3.10) + aui_module(aui.json EXPORT aui) + + aui_link(aui.json PRIVATE aui::core) +-aui_enable_tests(aui.json) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.json) ++endif () + aui_enable_benchmarks(aui.json) + if (TARGET Benchmarks) + # curl needed to download the benchmark data +diff --git a/aui.network/CMakeLists.txt b/aui.network/CMakeLists.txt +index bb668703..1f85acd3 100644 +--- a/aui.network/CMakeLists.txt ++++ b/aui.network/CMakeLists.txt +@@ -9,4 +9,6 @@ if(WIN32) + target_compile_definitions(aui.network PRIVATE PIO_APC_ROUTINE_DEFINED=1) + endif() + +-aui_enable_tests(aui.network) +\ No newline at end of file ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.network) ++endif() +\ No newline at end of file +diff --git a/aui.sqlite/CMakeLists.txt b/aui.sqlite/CMakeLists.txt +index 6afd58f4..78a2a593 100644 +--- a/aui.sqlite/CMakeLists.txt ++++ b/aui.sqlite/CMakeLists.txt +@@ -11,4 +11,6 @@ target_include_directories(aui.sqlite PRIVATE 3rdparty/sqlite3) + aui_link(aui.sqlite PUBLIC aui::core) + aui_link(aui.sqlite PUBLIC aui::data) + +-aui_enable_tests(aui.sqlite) +\ No newline at end of file ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.sqlite) ++endif () +\ No newline at end of file +diff --git a/aui.toolbox/CMakeLists.txt b/aui.toolbox/CMakeLists.txt +index c17cb1da..aa088ce4 100644 +--- a/aui.toolbox/CMakeLists.txt ++++ b/aui.toolbox/CMakeLists.txt +@@ -7,4 +7,6 @@ endif() + + aui_executable(aui.toolbox WIN32_SUBSYSTEM_CONSOLE EXPORT aui) + aui_link(aui.toolbox PRIVATE aui::core aui::crypt aui::image) +-aui_enable_tests(aui.toolbox) +\ No newline at end of file ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.toolbox) ++endif () +\ No newline at end of file +diff --git a/aui.uitests/CMakeLists.txt b/aui.uitests/CMakeLists.txt +index 5070f0a3..e4188094 100644 +--- a/aui.uitests/CMakeLists.txt ++++ b/aui.uitests/CMakeLists.txt +@@ -8,9 +8,13 @@ aui_module(aui.uitests EXPORT aui) + + aui_link(aui.uitests PRIVATE aui::core aui::views) + +-if (TARGET GTest::gmock) +- aui_link(aui.uitests PRIVATE GTest::gmock) +-endif() ++if (AUIB_DISABLE) ++ aui_link(aui.uitests PRIVATE gmock::gmock) ++else () ++ if (TARGET GTest::gmock) ++ aui_link(aui.uitests PRIVATE GTest::gmock) ++ endif() ++endif () + + aui_enable_tests(aui.uitests) + aui_enable_benchmarks(aui.uitests) +diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt +index dfe6b18b..ac4d3cf6 100644 +--- a/aui.views/CMakeLists.txt ++++ b/aui.views/CMakeLists.txt +@@ -9,10 +9,14 @@ 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 +- ) ++ if (AUIB_DISABLE) ++ find_package(freetype CONFIG REQUIRED) ++ else () ++ 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 ++ ) ++ endif () + + if (NOT TARGET Freetype::Freetype) + message(FATAL_ERROR "Freetype not imported") +@@ -20,9 +24,13 @@ 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) ++ if (AUIB_DISABLE) ++ find_package(glew CONFIG REQUIRED) ++ else () ++ auib_import(GLEW https://github.com/aui-framework/glew-cmake ++ CMAKE_WORKING_DIR "build/cmake" ++ VERSION a80a1dc) ++ endif () + endif () + + aui_module(aui.views EXPORT aui) +@@ -92,17 +100,33 @@ if (OPENGL_FOUND OR ANDROID OR IOS) + aui_link(aui.views PRIVATE Freetype::Freetype) + aui_link(aui.views PRIVATE OpenGL::GL) + +- if (AUI_PLATFORM_LINUX) +- # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them +- set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") ++ if (AUIB_DISABLE) ++ if (AUI_PLATFORM_LINUX) ++ ++ # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them ++ set_target_properties(glew::glew PROPERTIES INTERFACE_LINK_LIBRARIES "") + +- auib_use_system_libs_begin() +- find_package(X11 REQUIRED) +- find_package(Fontconfig REQUIRED) +- auib_use_system_libs_end() ++ auib_use_system_libs_begin() ++ find_package(X11 REQUIRED) ++ find_package(Fontconfig REQUIRED) ++ auib_use_system_libs_end() + ++ endif () ++ aui_link(aui.views PUBLIC glew::glew) ++ else () ++ if (AUI_PLATFORM_LINUX) ++ ++ # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them ++ set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") ++ ++ auib_use_system_libs_begin() ++ find_package(X11 REQUIRED) ++ find_package(Fontconfig REQUIRED) ++ auib_use_system_libs_end() ++ ++ endif () ++ aui_link(aui.views PUBLIC GLEW::GLEW) + endif () +- aui_link(aui.views PUBLIC GLEW::GLEW) + + if (WIN32) + aui_link(aui.views PRIVATE dwmapi) +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d45..f980b2a3 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -218,23 +218,33 @@ function(aui_add_properties AUI_MODULE_NAME) + endfunction(aui_add_properties) + + # gtest +-macro(_aui_import_gtest) +- if (NOT TARGET GTest::gtest) +- auib_import(GTest https://github.com/google/googletest +- VERSION v1.14.0 +- CMAKE_ARGS -Dgtest_force_shared_crt=TRUE +- LINK STATIC) +- set_property(TARGET GTest::gtest PROPERTY IMPORTED_GLOBAL TRUE) +- set_property(TARGET GTest::gmock PROPERTY IMPORTED_GLOBAL TRUE) +- endif() ++macro(_aui_import_gtest AUIB_DISABLE) ++ if (AUIB_DISABLE) ++ find_package(gtest CONFIG REQUIRED) ++ get_target_property(GTEST_TARGET_IMPORTED_GLOBAL gtest::gtest IMPORTED_GLOBAL) ++ if (NOT GTEST_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(gtest::gtest PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ find_package(gmock CONFIG REQUIRED) ++ get_target_property(GMOCK_TARGET_IMPORTED_GLOBAL gmock::gmock IMPORTED_GLOBAL) ++ if (NOT GMOCK_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(gmock::gmock PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ else () ++ if (NOT TARGET GTest::gtest) ++ auib_import(GTest https://github.com/google/googletest ++ VERSION v1.14.0 ++ CMAKE_ARGS -Dgtest_force_shared_crt=TRUE ++ LINK STATIC) ++ set_property(TARGET GTest::gtest PROPERTY IMPORTED_GLOBAL TRUE) ++ set_property(TARGET GTest::gmock PROPERTY IMPORTED_GLOBAL TRUE) ++ endif() ++ endif () + endmacro() + + macro(aui_enable_tests AUI_MODULE_NAME) + if (NOT CMAKE_CROSSCOMPILING) +- _aui_import_gtest() +- if (NOT TARGET GTest::gtest) +- message(FATAL_ERROR "GTest::gtest not found!") +- endif() ++ _aui_import_gtest(ON) + + enable_testing() + get_property(_source_dir TARGET ${AUI_MODULE_NAME} PROPERTY SOURCE_DIR) +@@ -268,7 +278,11 @@ macro(aui_enable_tests AUI_MODULE_NAME) + #gtest_add_tests(TARGET ${TESTS_MODULE_NAME}) + set_property(TARGET ${TESTS_MODULE_NAME} PROPERTY CXX_STANDARD 20) + target_include_directories(${TESTS_MODULE_NAME} PUBLIC tests) +- target_link_libraries(${TESTS_MODULE_NAME} PUBLIC GTest::gmock) ++ if (AUIB_DISABLE) ++ target_link_libraries(${TESTS_MODULE_NAME} PUBLIC gmock::gmock) ++ else () ++ target_link_libraries(${TESTS_MODULE_NAME} PUBLIC GTest::gmock) ++ endif () + + target_compile_definitions(${TESTS_MODULE_NAME} PUBLIC AUI_TESTS_MODULE=1) + +@@ -317,20 +331,32 @@ endmacro() + + # google benchmark + +-macro(_aui_import_google_benchmark) +- if (NOT TARGET benchmark::benchmark) +- auib_import(benchmark https://github.com/google/benchmark +- VERSION v1.8.3 +- CMAKE_ARGS -DBENCHMARK_ENABLE_GTEST_TESTS=OFF +- LINK STATIC) +- set_property(TARGET benchmark::benchmark PROPERTY IMPORTED_GLOBAL TRUE) +- endif() ++macro(_aui_import_google_benchmark AUIB_DISABLE) ++ if (AUIB_DISABLE) ++ find_package(benchmark CONFIG REQUIRED) ++ get_target_property(BENCHMARK_TARGET_IMPORTED_GLOBAL benchmark::benchmark IMPORTED_GLOBAL) ++ if (NOT BENCHMARK_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(benchmark::benchmark PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ get_target_property(BENCHMARK_MAIN_TARGET_IMPORTED_GLOBAL benchmark::benchmark_main IMPORTED_GLOBAL) ++ if (NOT BENCHMARK_MAIN_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(benchmark::benchmark_main PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ else () ++ if (NOT TARGET benchmark::benchmark) ++ auib_import(benchmark https://github.com/google/benchmark ++ VERSION v1.8.3 ++ CMAKE_ARGS -DBENCHMARK_ENABLE_GTEST_TESTS=OFF ++ LINK STATIC) ++ set_property(TARGET benchmark::benchmark PROPERTY IMPORTED_GLOBAL TRUE) ++ endif() ++ endif () + endmacro() + + macro(aui_enable_benchmarks AUI_MODULE_NAME) + if (NOT CMAKE_CROSSCOMPILING) +- _aui_import_gtest() +- _aui_import_google_benchmark() ++ _aui_import_gtest(ON) ++ _aui_import_google_benchmark(ON) + if (NOT TARGET benchmark::benchmark) + message(FATAL_ERROR "benchmark::benchmark not found!") + endif() diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua new file mode 100644 index 00000000000..32d9a85f139 --- /dev/null +++ b/packages/a/aui/xmake.lua @@ -0,0 +1,95 @@ +package("aui") + set_homepage("https://github.com/aui-framework/aui") + set_description("Declarative UI toolkit for modern C++20") + set_license("MPL-2.0") + + add_urls("https://github.com/aui-framework/aui/archive/refs/tags/$(version).tar.gz", + "https://github.com/aui-framework/aui.git") + + add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "38b541580f5d19535262f66962b929469e57c5a6c68a664360a98b29939275a7") + + add_deps("cmake") + if is_subhost("windows") then + add_deps("pkgconf") + else + add_deps("pkg-config") + end + add_deps("zlib") + -- aui.audio + add_deps("libopus", "soxr") + if is_plat("linux") then + add_syslinks("pulse") + elseif is_plat("android") then + add_deps("oboe") + elseif is_plat("windows", "mingw") then + add_syslinks("winmm", "dsound", "dxguid") + elseif is_plat("macosx", "iphoneos") then + add_frameworks("CoreAudio", "AVFoundation", "AudioToolbox") + if is_plat("macosx") then + add_frameworks("AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore") + end + end + -- aui.core + add_deps("fmt", "range-v3") + if is_plat("linux") then + add_deps("libbacktrace") + add_syslinks("threads", "dl") + elseif is_plat("windows", "mingw") then + add_syslinks("dbghelp", "shlwapi", "kernel32", "psapi") + elseif is_plat("android") then + add_syslinks("log") + end + -- aui.crypt + add_deps("openssl3") + if is_plat("windows", "mingw") then + add_syslinks("wsock32", "ws2_32") + end + -- aui.curl + add_deps("libcurl") + -- aui.image + add_deps("lunasvg", "libwebp") + -- aui.views + add_deps("freetype") + if is_plat("windows", "mingw", "linux", "macosx") then + add_deps("glew") + if is_plat("linux") then + add_deps("libx11", "dbus", "gtk3", "fontconfig") + end + end + if is_plat("windows", "mingw") then + add_syslinks("dwmapi", "winmm", "shlwapi") + elseif is_plat("android") then + add_syslinks("EGL", "GLESv2", "GLESv3") + elseif is_plat("iphoneos") then + add_frameworks("OpenGLES") + elseif is_plat("macosx") then + add_frameworks("AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore", "UniformTypeIdentifiers") + end + --aui.uitests + add_deps("gtest", "benchmark") + --aui.network + if is_plat("windows", "mingw") then + add_syslinks("wsock32", "ws2_32", "iphlpapi") + end + + on_install("!bsd and !wasm", function (package) + local configs = { + "-DAUIB_DISABLE=ON" + } + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) + table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) + import("package.tools.cmake").install(package, configs) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + #include + #include + #include + void test() { + auto buf = AByteBuffer::fromStream(AUrl(":test.txt").open()); + } + ]]}, {configs = {languages = "c++20"}})) + end) diff --git a/packages/g/glew/port/xmake.lua b/packages/g/glew/port/xmake.lua index 0678de98911..20508fe5921 100644 --- a/packages/g/glew/port/xmake.lua +++ b/packages/g/glew/port/xmake.lua @@ -5,6 +5,7 @@ if is_plat("linux") then end target("glew") + add_rules("utils.install.cmake_importfiles") set_kind("$(kind)") if is_plat("windows", "mingw") then set_basename(is_kind("shared") and "glew32" or "glew32s") diff --git a/packages/g/gtest/xmake.lua b/packages/g/gtest/xmake.lua index 4b926d2da68..f8e9bba79d4 100644 --- a/packages/g/gtest/xmake.lua +++ b/packages/g/gtest/xmake.lua @@ -26,7 +26,7 @@ package("gtest") add_configs("main", {description = "Link to the gtest_main entry point.", default = false, type = "boolean"}) add_configs("gmock", {description = "Link to the googlemock library.", default = true, type = "boolean"}) - if is_plat("linux") then + if is_plat("linux", "bsd") then add_syslinks("pthread") end @@ -42,6 +42,7 @@ package("gtest") std = "cxx17" end io.writefile("xmake.lua", format([[ + add_rules("utils.install.cmake_importfiles") set_languages("%s") target("gtest") set_kind("$(kind)") From 2e08e660b1b695a5fc1182f2f4c2c77727538928 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 11:48:00 +0300 Subject: [PATCH 02/27] Use exactly fmt 9.1.0 as in SRC --- packages/a/aui/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 32d9a85f139..b7cb1ea4289 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -31,7 +31,7 @@ package("aui") end end -- aui.core - add_deps("fmt", "range-v3") + add_deps("fmt 9.1.0", "range-v3") if is_plat("linux") then add_deps("libbacktrace") add_syslinks("threads", "dl") From 92f012e76f8ecfcb0899fee5f3bd2c4df262d656 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 13:10:02 +0300 Subject: [PATCH 03/27] Workaround lunasvg cmake that point to --- packages/a/aui/patches/v7.1.2/debundle.diff | 21 +++++++++++++++++++++ packages/a/aui/xmake.lua | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index d38ca40ec22..afc0e701f14 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -266,6 +266,27 @@ index 033e7ad5..a272f2b9 100644 +if (NOT AUIB_DISABLE) + aui_enable_tests(aui.image) +endif () +diff --git a/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp b/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp +index 7b638202..c4449d5b 100644 +--- a/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp ++++ b/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp +@@ -15,7 +15,15 @@ + + #include "SvgImageFactory.h" + #include "AUI/Common/AByteBuffer.h" +-#include ++#if defined(__has_include) ++ #if __has_include() ++ #include ++ #else ++ #include ++ #endif ++#else ++ #include ++#endif + + + SvgImageFactory::SvgImageFactory(AByteBufferView buf) { diff --git a/aui.json/CMakeLists.txt b/aui.json/CMakeLists.txt index d0190bd5..980456da 100644 --- a/aui.json/CMakeLists.txt diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index b7cb1ea4289..a82d445485e 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "38b541580f5d19535262f66962b929469e57c5a6c68a664360a98b29939275a7") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "f5f21bb8813c342a62cde01a7023b106c896236043ab68ea073aefbea51382a9") add_deps("cmake") if is_subhost("windows") then From 1e17fd377dce39321dbd90205755176568fd5524 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 13:44:54 +0300 Subject: [PATCH 04/27] fixup ws errors and prepend include folder --- packages/a/aui/patches/v7.1.2/debundle.diff | 48 +++++++++------------ packages/a/aui/xmake.lua | 28 +++++++++--- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index afc0e701f14..0de004928fd 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -106,7 +106,7 @@ index 21e44153..e3154d7f 100644 + aui_link(aui.audio PRIVATE soxr) +endif () diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt -index 6aa1b072..01e3fe81 100644 +index 6aa1b072..6552c008 100644 --- a/aui.core/CMakeLists.txt +++ b/aui.core/CMakeLists.txt @@ -6,7 +6,9 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) @@ -148,7 +148,7 @@ index 6aa1b072..01e3fe81 100644 target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) elseif(_use_unwind) message(STATUS "Stacktrace backend: unwind") -@@ -146,17 +156,22 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) +@@ -146,17 +156,23 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) endif() @@ -156,13 +156,6 @@ index 6aa1b072..01e3fe81 100644 -auib_import(fmt https://github.com/fmtlib/fmt - VERSION 9.1.0 - CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) -- --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) --# [auib_import examples] -- --aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) +if (AUIB_DISABLE) + find_package(fmt CONFIG REQUIRED) + find_package(range-v3 CONFIG REQUIRED) @@ -172,11 +165,17 @@ index 6aa1b072..01e3fe81 100644 + auib_import(fmt https://github.com/fmtlib/fmt + VERSION 9.1.0 + CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) + +-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) +-# [auib_import examples] + 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) + # [auib_import examples] -+ + +-aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) + aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) +endif () @@ -229,25 +228,25 @@ index 5141c8ee..00be58b4 100644 aui_link(aui.curl PUBLIC aui::core aui::json) aui_link(aui.curl PRIVATE CURL::libcurl aui::crypt) diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt -index 033e7ad5..a272f2b9 100644 +index 033e7ad5..1f8d8915 100644 --- a/aui.image/CMakeLists.txt +++ b/aui.image/CMakeLists.txt -@@ -1,8 +1,11 @@ +@@ -1,8 +1,12 @@ cmake_minimum_required(VERSION 3.10) -auib_import(lunasvg https://github.com/aui-framework/lunasvg - VERSION 272ceee) -- +if (AUIB_DISABLE) + find_package(lunasvg CONFIG REQUIRED) +else () + auib_import(lunasvg https://github.com/aui-framework/lunasvg + VERSION 272ceee) + +endif () set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) -@@ -10,9 +13,16 @@ foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) +@@ -10,9 +14,15 @@ foreach(_component ${WEBP_COMPONENTS_TO_DISABLE}) list(APPEND WEBP_CMAKE_ARGS "-DWEBP_BUILD_${_component}=OFF") endforeach() @@ -262,7 +261,6 @@ index 033e7ad5..a272f2b9 100644 add_subdirectory(3rdparty) aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) -aui_enable_tests(aui.image) -+ +if (NOT AUIB_DISABLE) + aui_enable_tests(aui.image) +endif () @@ -366,7 +364,7 @@ index 5070f0a3..e4188094 100644 aui_enable_tests(aui.uitests) aui_enable_benchmarks(aui.uitests) diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt -index dfe6b18b..ac4d3cf6 100644 +index dfe6b18b..556261df 100644 --- a/aui.views/CMakeLists.txt +++ b/aui.views/CMakeLists.txt @@ -9,10 +9,14 @@ find_package(OpenGL) @@ -405,7 +403,7 @@ index dfe6b18b..ac4d3cf6 100644 endif () aui_module(aui.views EXPORT aui) -@@ -92,17 +100,33 @@ if (OPENGL_FOUND OR ANDROID OR IOS) +@@ -92,17 +100,29 @@ if (OPENGL_FOUND OR ANDROID OR IOS) aui_link(aui.views PRIVATE Freetype::Freetype) aui_link(aui.views PRIVATE OpenGL::GL) @@ -414,32 +412,28 @@ index dfe6b18b..ac4d3cf6 100644 - set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") + if (AUIB_DISABLE) + if (AUI_PLATFORM_LINUX) -+ + # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them + set_target_properties(glew::glew PROPERTIES INTERFACE_LINK_LIBRARIES "") - -- auib_use_system_libs_begin() -- find_package(X11 REQUIRED) -- find_package(Fontconfig REQUIRED) -- auib_use_system_libs_end() + auib_use_system_libs_begin() + find_package(X11 REQUIRED) + find_package(Fontconfig REQUIRED) + auib_use_system_libs_end() - + endif () + aui_link(aui.views PUBLIC glew::glew) + else () + if (AUI_PLATFORM_LINUX) -+ + # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them + set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") -+ + +- auib_use_system_libs_begin() +- find_package(X11 REQUIRED) +- find_package(Fontconfig REQUIRED) +- auib_use_system_libs_end() + auib_use_system_libs_begin() + find_package(X11 REQUIRED) + find_package(Fontconfig REQUIRED) + auib_use_system_libs_end() -+ + + endif () + aui_link(aui.views PUBLIC GLEW::GLEW) endif () diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index a82d445485e..c04f24b2107 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "f5f21bb8813c342a62cde01a7023b106c896236043ab68ea073aefbea51382a9") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "880a5b280e7df8d038c2dc90e1afe6c38902afeabdc6906e71aac517c11d118d") add_deps("cmake") if is_subhost("windows") then @@ -17,6 +17,7 @@ package("aui") end add_deps("zlib") -- aui.audio + add_includedirs("aui.audio/include") add_deps("libopus", "soxr") if is_plat("linux") then add_syslinks("pulse") @@ -31,6 +32,7 @@ package("aui") end end -- aui.core + add_includedirs("aui.core/include") add_deps("fmt 9.1.0", "range-v3") if is_plat("linux") then add_deps("libbacktrace") @@ -41,15 +43,31 @@ package("aui") add_syslinks("log") end -- aui.crypt + add_includedirs("aui.crypt/include") add_deps("openssl3") if is_plat("windows", "mingw") then add_syslinks("wsock32", "ws2_32") end -- aui.curl + add_includedirs("aui.curl/include") add_deps("libcurl") -- aui.image + add_includedirs("aui.image/include") add_deps("lunasvg", "libwebp") + -- aui.json + add_includedirs("aui.json/include") + -- aui.network + add_includedirs("aui.network/include") + if is_plat("windows", "mingw") then + add_syslinks("wsock32", "ws2_32", "iphlpapi") + end + -- aui.toolbox + add_includedirs("aui.toolbox/include") + -- aui.uitests + add_includedirs("aui.uitests/include") + add_deps("gtest", "benchmark") -- aui.views + add_includedirs("aui.views/include") add_deps("freetype") if is_plat("windows", "mingw", "linux", "macosx") then add_deps("glew") @@ -66,12 +84,8 @@ package("aui") elseif is_plat("macosx") then add_frameworks("AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore", "UniformTypeIdentifiers") end - --aui.uitests - add_deps("gtest", "benchmark") - --aui.network - if is_plat("windows", "mingw") then - add_syslinks("wsock32", "ws2_32", "iphlpapi") - end + -- aui.xml + add_includedirs("aui.xml/include") on_install("!bsd and !wasm", function (package) local configs = { From ae469fb5c07c08a5c4f0de5f87d384a69f01e212 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 14:00:25 +0300 Subject: [PATCH 05/27] Disable precompiled download --- packages/a/aui/xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index c04f24b2107..2fc24fea7a1 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -89,6 +89,7 @@ package("aui") on_install("!bsd and !wasm", function (package) local configs = { + "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" } table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) From ce1a9ff6a328c690210269d0d88a9da8e1dc62df Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 14:48:55 +0300 Subject: [PATCH 06/27] Enforce AUI_STATIC definition --- packages/a/aui/xmake.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 2fc24fea7a1..d3fac10fc25 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -87,6 +87,12 @@ package("aui") -- aui.xml add_includedirs("aui.xml/include") + on_load(function (package) + if not package:config("shared") then + package:add("defines", "AUI_STATIC") + end + end) + on_install("!bsd and !wasm", function (package) local configs = { "-DAUIB_NO_PRECOMPILED=TRUE", From 226bedfe50fe2b63aa50b3df22f07e29ea02cf85 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 15:54:38 +0300 Subject: [PATCH 07/27] try to fixup MSVC build --- packages/a/aui/patches/v7.1.2/debundle.diff | 50 +++++++++++++++++++++ packages/a/aui/xmake.lua | 4 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index 0de004928fd..34f7c6afbf9 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -181,6 +181,56 @@ index 6aa1b072..6552c008 100644 # segfault functionality if (NOT MSVC AND AUI_CATCH_UNHANDLED) +diff --git a/aui.core/src/AUI/Reflect/AClass.h b/aui.core/src/AUI/Reflect/AClass.h +index 7cbf3cfc..acccb19e 100644 +--- a/aui.core/src/AUI/Reflect/AClass.h ++++ b/aui.core/src/AUI/Reflect/AClass.h +@@ -36,7 +36,13 @@ public: + name = name.substr(0, name.length() - 2); + return name; + #elif AUI_COMPILER_CLANG ++ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) + AString s = __PRETTY_FUNCTION__; ++ #elif defined(__FUNCSIG__) ++ AString s = __FUNCSIG__; ++ #else ++ AString s = __FUNCTION__; ++ #endif + auto b = s.find("=") + 1; + auto e = s.find("&", b); + e = std::min(s.find("]", b), e); +@@ -44,7 +50,13 @@ public: + result = result.trim(); + return result; + #else ++ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) + AString s = __PRETTY_FUNCTION__; ++ #elif defined(__FUNCSIG__) ++ AString s = __FUNCSIG__; ++ #else ++ AString s = __FUNCTION__; ++ #endif + auto b = s.find("with T = ") + 9; + return { s.begin() + b, s.end() - 1 }; + #endif +diff --git a/aui.core/src/AUI/Reflect/AEnumerate.h b/aui.core/src/AUI/Reflect/AEnumerate.h +index 99d9d281..9419a4b3 100644 +--- a/aui.core/src/AUI/Reflect/AEnumerate.h ++++ b/aui.core/src/AUI/Reflect/AEnumerate.h +@@ -39,7 +39,13 @@ namespace aui::enumerate::basic { + + AString result(begin, end); + #else ++ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) + AString s = __PRETTY_FUNCTION__; ++ #elif defined(__FUNCSIG__) ++ AString s = __FUNCSIG__; ++ #else ++ AString s = __FUNCTION__; ++ #endif + #if AUI_COMPILER_CLANG + auto end = s.rfind(']'); + #else diff --git a/aui.crypt/CMakeLists.txt b/aui.crypt/CMakeLists.txt index c5354f2e..9c194be4 100644 --- a/aui.crypt/CMakeLists.txt diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index d3fac10fc25..20b148aab81 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "880a5b280e7df8d038c2dc90e1afe6c38902afeabdc6906e71aac517c11d118d") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "416f16ef7040aae0f50b750ddca1cb34a0493d4b209b911581ff0f38143ed793") add_deps("cmake") if is_subhost("windows") then @@ -91,6 +91,8 @@ package("aui") if not package:config("shared") then package:add("defines", "AUI_STATIC") end + package:add("defines", "AUI_DEBUG=" .. (package:is_debug() and "1" or "0")) + package:add("defines", "API_AUI_CORE=AUI_IMPORT") end) on_install("!bsd and !wasm", function (package) From 46df933aad64ad32b5d633949876f4b1d0a3c2be Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 16:13:08 +0300 Subject: [PATCH 08/27] be generous, gift shell32 to windows/mingw --- packages/a/aui/patches/v7.1.2/debundle.diff | 11 +++++++++-- packages/a/aui/xmake.lua | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index 34f7c6afbf9..d303464bb0b 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -106,7 +106,7 @@ index 21e44153..e3154d7f 100644 + aui_link(aui.audio PRIVATE soxr) +endif () diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt -index 6aa1b072..6552c008 100644 +index 6aa1b072..5cb497f6 100644 --- a/aui.core/CMakeLists.txt +++ b/aui.core/CMakeLists.txt @@ -6,7 +6,9 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) @@ -135,7 +135,7 @@ index 6aa1b072..6552c008 100644 set(_use_backtrace TRUE) else() -@@ -84,7 +90,11 @@ endif() +@@ -84,13 +90,17 @@ endif() if(_use_backtrace) message(STATUS "Stacktrace backend: backtrace") @@ -148,6 +148,13 @@ index 6aa1b072..6552c008 100644 target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) elseif(_use_unwind) message(STATUS "Stacktrace backend: unwind") + target_compile_definitions(aui.core PRIVATE AUI_USE_UNWIND=1) + elseif(WIN32) +- aui_link(aui.core PRIVATE dbghelp shlwapi.lib) ++ aui_link(aui.core PRIVATE dbghelp shell32 shlwapi.lib) + message(STATUS "Stacktrace backend: dbghelp") + else() + message(STATUS "Stacktrace backend: none") @@ -146,17 +156,23 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) endif() diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 20b148aab81..0e6e6da5a0c 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "416f16ef7040aae0f50b750ddca1cb34a0493d4b209b911581ff0f38143ed793") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "927c6f6ee6e0998f2e79d6d8cfc9dea8de62b301cf1baa1c84c325d5d654275b") add_deps("cmake") if is_subhost("windows") then @@ -38,7 +38,7 @@ package("aui") add_deps("libbacktrace") add_syslinks("threads", "dl") elseif is_plat("windows", "mingw") then - add_syslinks("dbghelp", "shlwapi", "kernel32", "psapi") + add_syslinks("dbghelp", "shell32", "shlwapi", "kernel32", "psapi") elseif is_plat("android") then add_syslinks("log") end From 9d44439e224f5e3b89d560d4f27541cebc822b97 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 16:51:44 +0300 Subject: [PATCH 09/27] try fix Windows@ARM64 --- packages/a/aui/patches/v7.1.2/debundle.diff | 4 ++-- packages/a/aui/xmake.lua | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index d303464bb0b..c2a9c43706e 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -31,7 +31,7 @@ index 6902d56a..98ebd001 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 21e44153..e3154d7f 100644 +index 21e44153..afbc367b 100644 --- a/aui.audio/CMakeLists.txt +++ b/aui.audio/CMakeLists.txt @@ -5,26 +5,36 @@ add_subdirectory(3rdparty/ogg) @@ -75,7 +75,7 @@ index 21e44153..e3154d7f 100644 -auib_import(Opus https://github.com/xiph/opus.git VERSION v1.4) -aui_link(aui.audio PRIVATE Opus::opus) +if (AUIB_DISABLE) -+ find_package(opus CONFIG REQUIRED) ++ find_package(Opus CONFIG REQUIRED) + aui_link(aui.audio PRIVATE Opus::opus) +else () + auib_import(Opus https://github.com/xiph/opus.git VERSION v1.4) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 0e6e6da5a0c..3204198c0fe 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "927c6f6ee6e0998f2e79d6d8cfc9dea8de62b301cf1baa1c84c325d5d654275b") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "61aa96174f63aceb93cd39ae5f81be08bb28a8345f87db77f3f3ea89f218fb12") add_deps("cmake") if is_subhost("windows") then @@ -100,6 +100,9 @@ package("aui") "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" } + if package:is_plat("windows") and package:is_arch("arm64") then + io.replace("cmake/aui.build.cmake", [[if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)")]], [[if (1)]], {plain = true}) + end table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) import("package.tools.cmake").install(package, configs) From d4ff764519ce2ade8c609742709cc01e8577d887 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 19:52:48 +0300 Subject: [PATCH 10/27] fixup --- packages/a/aui/patches/v7.1.2/debundle.diff | 43 +++++++++++++++++++-- packages/a/aui/xmake.lua | 2 +- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index c2a9c43706e..0ff81e8d64c 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -421,7 +421,7 @@ index 5070f0a3..e4188094 100644 aui_enable_tests(aui.uitests) aui_enable_benchmarks(aui.uitests) diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt -index dfe6b18b..556261df 100644 +index dfe6b18b..c5c1fb27 100644 --- a/aui.views/CMakeLists.txt +++ b/aui.views/CMakeLists.txt @@ -9,10 +9,14 @@ find_package(OpenGL) @@ -443,7 +443,7 @@ index dfe6b18b..556261df 100644 if (NOT TARGET Freetype::Freetype) message(FATAL_ERROR "Freetype not imported") -@@ -20,9 +24,13 @@ if (OPENGL_FOUND OR ANDROID OR IOS) +@@ -20,29 +24,40 @@ if (OPENGL_FOUND OR ANDROID OR IOS) if (AUI_PLATFORM_WIN OR AUI_PLATFORM_LINUX OR AUI_PLATFORM_MACOS) @@ -460,7 +460,44 @@ index dfe6b18b..556261df 100644 endif () aui_module(aui.views EXPORT aui) -@@ -92,17 +100,29 @@ if (OPENGL_FOUND OR ANDROID OR IOS) + aui_enable_tests(aui.views) + + if (AUI_PLATFORM_LINUX) +- auib_use_system_libs_begin() +- find_package(PkgConfig REQUIRED) ++ if (AUIB_DISABLE) ++ include(FindPkgConfig) ++ pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1) ++ pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) ++ aui_link(aui.views PRIVATE X11::X11 X11::Xrandr X11::Xcursor X11::Xi PkgConfig::DBUS PkgConfig::GTK3 Fontconfig::Fontconfig) ++ else () ++ auib_use_system_libs_begin() ++ find_package(PkgConfig REQUIRED) + +- pkg_check_modules(DBUS REQUIRED dbus-1) +- include_directories(${DBUS_INCLUDE_DIRS}) +- link_directories(${DBUS_LIBRARY_DIRS}) ++ pkg_check_modules(DBUS REQUIRED dbus-1) ++ 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(GTK3 REQUIRED gtk+-3.0) ++ include_directories(${GTK3_INCLUDE_DIRS}) ++ link_directories(${GTK3_LIBRARY_DIRS}) + +- auib_use_system_libs_end() ++ 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 ${DBUS_LIBRARIES} ${GTK3_LIBRARIES} Fontconfig::Fontconfig) ++ endif () + endif () + + if (NOT AUI_PLATFORM_WINDOWS) +@@ -92,17 +107,29 @@ if (OPENGL_FOUND OR ANDROID OR IOS) aui_link(aui.views PRIVATE Freetype::Freetype) aui_link(aui.views PRIVATE OpenGL::GL) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 3204198c0fe..8ec8a290493 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "61aa96174f63aceb93cd39ae5f81be08bb28a8345f87db77f3f3ea89f218fb12") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "ce03744c15417dee1192940e77fe95da96689f39e26a2bf34cb38bdf15640b79") add_deps("cmake") if is_subhost("windows") then From d9e2e03ed1d95570bb384d5f7769410b786ea6ff Mon Sep 17 00:00:00 2001 From: Saikari Date: Sat, 19 Jul 2025 20:50:39 +0300 Subject: [PATCH 11/27] linux: fix pulse --- packages/a/aui/patches/v7.1.2/debundle.diff | 17 +++++++++++++---- packages/a/aui/xmake.lua | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff index 0ff81e8d64c..5b0ec0300fe 100644 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ b/packages/a/aui/patches/v7.1.2/debundle.diff @@ -31,10 +31,10 @@ index 6902d56a..98ebd001 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 21e44153..afbc367b 100644 +index 21e44153..f6732e73 100644 --- a/aui.audio/CMakeLists.txt +++ b/aui.audio/CMakeLists.txt -@@ -5,26 +5,36 @@ add_subdirectory(3rdparty/ogg) +@@ -5,26 +5,44 @@ add_subdirectory(3rdparty/ogg) aui_link(aui.audio PUBLIC aui::core) if (AUI_PLATFORM_ANDROID) @@ -67,7 +67,16 @@ index 21e44153..afbc367b 100644 + ) + endif () elseif (AUI_PLATFORM_LINUX) - aui_link(aui.audio PUBLIC pulse) +- aui_link(aui.audio PUBLIC pulse) ++ if (AUIB_DISABLE) ++ auib_use_system_libs_begin() ++ find_package(PkgConfig) ++ pkg_check_modules(PULSEAUDIO REQUIRED IMPORTED_TARGET libpulse) ++ aui_link(aui.audio PUBLIC PkgConfig::PULSEAUDIO) ++ auib_use_system_libs_end() ++ else () ++ aui_link(aui.audio PUBLIC pulse) ++ endif () elseif (AUI_PLATFORM_WIN) aui_link(aui.audio PUBLIC Winmm dsound.lib dxguid.lib) endif() @@ -84,7 +93,7 @@ index 21e44153..afbc367b 100644 if (AUI_PLATFORM_IOS OR AUI_PLATFORM_MACOS) auib_use_system_libs_begin() -@@ -42,9 +52,15 @@ if (AUI_PLATFORM_MACOS) +@@ -42,9 +60,15 @@ if (AUI_PLATFORM_MACOS) "-framework QuartzCore") endif() diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 8ec8a290493..7a4a74add91 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,7 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "ce03744c15417dee1192940e77fe95da96689f39e26a2bf34cb38bdf15640b79") + add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "1eb3da88e82503e6a9a893c112b4dd97909341905fe0e28d3fb5a4d2a50075ea") add_deps("cmake") if is_subhost("windows") then From 5884ccee51bceb21a01c0da49d6249c88789cb0e Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 20 Jul 2025 16:45:45 +0300 Subject: [PATCH 12/27] wrap into components --- packages/a/aui/xmake.lua | 161 +++++++++++++++++++++++++-------------- 1 file changed, 104 insertions(+), 57 deletions(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 7a4a74add91..8d60b77663a 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -16,76 +16,123 @@ package("aui") add_deps("pkg-config") end add_deps("zlib") + + on_load(function (package) + package:add("components", "audio", "core", "crypt", "curl", "image", "json", "network", "toolbox", "uitests", "views", "xml") + end) + -- aui.audio - add_includedirs("aui.audio/include") - add_deps("libopus", "soxr") - if is_plat("linux") then - add_syslinks("pulse") - elseif is_plat("android") then - add_deps("oboe") - elseif is_plat("windows", "mingw") then - add_syslinks("winmm", "dsound", "dxguid") - elseif is_plat("macosx", "iphoneos") then - add_frameworks("CoreAudio", "AVFoundation", "AudioToolbox") - if is_plat("macosx") then - add_frameworks("AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore") + on_component("audio", function (package, component) + component:add("includedirs", "aui.audio/include") + component:add("links", "aui.audio") + component:add("deps", "libopus", "soxr") + if package:is_plat("linux") then + component:add("syslinks", "pulse") + elseif package:is_plat("android") then + component:add("deps", "oboe") + elseif package:is_plat("windows", "mingw") then + component:add("syslinks", "winmm", "dsound", "dxguid") + elseif package:is_plat("macosx", "iphoneos") then + component:add("frameworks", "CoreAudio", "AVFoundation", "AudioToolbox") + if package:is_plat("macosx") then + component:add("frameworks", "AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore") + end end - end + end) + -- aui.core - add_includedirs("aui.core/include") - add_deps("fmt 9.1.0", "range-v3") - if is_plat("linux") then - add_deps("libbacktrace") - add_syslinks("threads", "dl") - elseif is_plat("windows", "mingw") then - add_syslinks("dbghelp", "shell32", "shlwapi", "kernel32", "psapi") - elseif is_plat("android") then - add_syslinks("log") - end + on_component("core", function (package, component) + component:add("includedirs", "aui.core/include") + component:add("links", "aui.core") + component:add("deps", "fmt 9.1.0", "range-v3") + if package:is_plat("linux") then + component:add("deps", "libbacktrace") + component:add("syslinks", "threads", "dl") + elseif package:is_plat("windows", "mingw") then + component:add("syslinks", "dbghelp", "shell32", "shlwapi", "kernel32", "psapi") + elseif package:is_plat("android") then + component:add("syslinks", "log") + end + end) + -- aui.crypt - add_includedirs("aui.crypt/include") - add_deps("openssl3") - if is_plat("windows", "mingw") then - add_syslinks("wsock32", "ws2_32") - end + on_component("crypt", function (package, component) + component:add("includedirs", "aui.crypt/include") + component:add("links", "aui.crypt") + component:add("deps", "openssl3") + if package:is_plat("windows", "mingw") then + component:add("syslinks", "wsock32", "ws2_32") + end + end) + -- aui.curl - add_includedirs("aui.curl/include") - add_deps("libcurl") + on_component("curl", function (package, component) + component:add("includedirs", "aui.curl/include") + component:add("links", "aui.curl") + component:add("deps", "libcurl") + end) + -- aui.image - add_includedirs("aui.image/include") - add_deps("lunasvg", "libwebp") + on_component("image", function (package, component) + component:add("includedirs", "aui.image/include") + component:add("links", "aui.image") + component:add("deps", "lunasvg", "libwebp") + end) + -- aui.json - add_includedirs("aui.json/include") + on_component("json", function (package, component) + component:add("includedirs", "aui.json/include") + component:add("links", "aui.json") + end) + -- aui.network - add_includedirs("aui.network/include") - if is_plat("windows", "mingw") then - add_syslinks("wsock32", "ws2_32", "iphlpapi") - end + on_component("network", function (package, component) + component:add("includedirs", "aui.network/include") + component:add("links", "aui.network") + if package:is_plat("windows", "mingw") then + component:add("syslinks", "wsock32", "ws2_32", "iphlpapi") + end + end) + -- aui.toolbox - add_includedirs("aui.toolbox/include") + on_component("toolbox", function (package, component) + component:add("includedirs", "aui.toolbox/include") + end) + -- aui.uitests - add_includedirs("aui.uitests/include") - add_deps("gtest", "benchmark") + on_component("uitests", function (package, component) + component:add("includedirs", "aui.uitests/include") + component:add("links", "aui.uitests") + component:add("deps", "gtest", "benchmark") + end) + -- aui.views - add_includedirs("aui.views/include") - add_deps("freetype") - if is_plat("windows", "mingw", "linux", "macosx") then - add_deps("glew") - if is_plat("linux") then - add_deps("libx11", "dbus", "gtk3", "fontconfig") + on_component("views", function (package, component) + component:add("includedirs", "aui.views/include") + component:add("links", "aui.views") + component:add("deps", "freetype") + if package:is_plat("windows", "mingw", "linux", "macosx") then + component:add("deps", "glew") end - end - if is_plat("windows", "mingw") then - add_syslinks("dwmapi", "winmm", "shlwapi") - elseif is_plat("android") then - add_syslinks("EGL", "GLESv2", "GLESv3") - elseif is_plat("iphoneos") then - add_frameworks("OpenGLES") - elseif is_plat("macosx") then - add_frameworks("AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore", "UniformTypeIdentifiers") - end + if package:is_plat("linux") then + component:add("deps", "libx11", "dbus", "gtk3", "fontconfig") + end + if package:is_plat("windows", "mingw") then + component:add("syslinks", "dwmapi", "winmm", "shlwapi") + elseif package:is_plat("android") then + component:add("syslinks", "EGL", "GLESv2", "GLESv3") + elseif package:is_plat("iphoneos") then + component:add("frameworks", "OpenGLES") + elseif package:is_plat("macosx") then + component:add("frameworks", "AppKit", "Cocoa", "CoreData", "Foundation", "QuartzCore", "UniformTypeIdentifiers") + end + end) + -- aui.xml - add_includedirs("aui.xml/include") + on_component("xml", function (package, component) + component:add("includedirs", "aui.xml/include") + component:add("links", "aui.xml") + end) on_load(function (package) if not package:config("shared") then From d9c3cff2118274999468c1c4977d9a20e135143c Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 20 Jul 2025 16:54:25 +0300 Subject: [PATCH 13/27] fixup --- packages/a/aui/xmake.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 8d60b77663a..7a12d2ffb35 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -17,10 +17,6 @@ package("aui") end add_deps("zlib") - on_load(function (package) - package:add("components", "audio", "core", "crypt", "curl", "image", "json", "network", "toolbox", "uitests", "views", "xml") - end) - -- aui.audio on_component("audio", function (package, component) component:add("includedirs", "aui.audio/include") @@ -135,6 +131,7 @@ package("aui") end) on_load(function (package) + package:add("components", "audio", "core", "crypt", "curl", "image", "json", "network", "toolbox", "uitests", "views", "xml") if not package:config("shared") then package:add("defines", "AUI_STATIC") end From e9cd03cf355ff712ea23d825d1100aa14029d10e Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 20 Jul 2025 17:02:09 +0300 Subject: [PATCH 14/27] retry --- packages/a/aui/xmake.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 7a12d2ffb35..4209fd4f9c8 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -21,11 +21,11 @@ package("aui") on_component("audio", function (package, component) component:add("includedirs", "aui.audio/include") component:add("links", "aui.audio") - component:add("deps", "libopus", "soxr") + package:add("deps", "libopus", "soxr") if package:is_plat("linux") then component:add("syslinks", "pulse") elseif package:is_plat("android") then - component:add("deps", "oboe") + package:add("deps", "oboe") elseif package:is_plat("windows", "mingw") then component:add("syslinks", "winmm", "dsound", "dxguid") elseif package:is_plat("macosx", "iphoneos") then @@ -40,9 +40,9 @@ package("aui") on_component("core", function (package, component) component:add("includedirs", "aui.core/include") component:add("links", "aui.core") - component:add("deps", "fmt 9.1.0", "range-v3") + package:add("deps", "fmt 9.1.0", "range-v3") if package:is_plat("linux") then - component:add("deps", "libbacktrace") + package:add("deps", "libbacktrace") component:add("syslinks", "threads", "dl") elseif package:is_plat("windows", "mingw") then component:add("syslinks", "dbghelp", "shell32", "shlwapi", "kernel32", "psapi") @@ -55,7 +55,7 @@ package("aui") on_component("crypt", function (package, component) component:add("includedirs", "aui.crypt/include") component:add("links", "aui.crypt") - component:add("deps", "openssl3") + package:add("deps", "openssl3") if package:is_plat("windows", "mingw") then component:add("syslinks", "wsock32", "ws2_32") end @@ -65,14 +65,14 @@ package("aui") on_component("curl", function (package, component) component:add("includedirs", "aui.curl/include") component:add("links", "aui.curl") - component:add("deps", "libcurl") + package:add("deps", "libcurl") end) -- aui.image on_component("image", function (package, component) component:add("includedirs", "aui.image/include") component:add("links", "aui.image") - component:add("deps", "lunasvg", "libwebp") + package:add("deps", "lunasvg", "libwebp") end) -- aui.json @@ -99,19 +99,19 @@ package("aui") on_component("uitests", function (package, component) component:add("includedirs", "aui.uitests/include") component:add("links", "aui.uitests") - component:add("deps", "gtest", "benchmark") + package:add("deps", "gtest", "benchmark") end) -- aui.views on_component("views", function (package, component) component:add("includedirs", "aui.views/include") component:add("links", "aui.views") - component:add("deps", "freetype") + package:add("deps", "freetype") if package:is_plat("windows", "mingw", "linux", "macosx") then - component:add("deps", "glew") + package:add("deps", "glew") end if package:is_plat("linux") then - component:add("deps", "libx11", "dbus", "gtk3", "fontconfig") + package:add("deps", "libx11", "dbus", "gtk3", "fontconfig") end if package:is_plat("windows", "mingw") then component:add("syslinks", "dwmapi", "winmm", "shlwapi") From 5bb2a5deff4956fedc929cc391c12c0cf2c6c4cc Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 20 Jul 2025 18:29:37 +0300 Subject: [PATCH 15/27] fixup --- packages/a/aui/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 4209fd4f9c8..0b40bd3d022 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -19,7 +19,7 @@ package("aui") -- aui.audio on_component("audio", function (package, component) - component:add("includedirs", "aui.audio/include") + package:add("includedirs", "aui.audio/include") component:add("links", "aui.audio") package:add("deps", "libopus", "soxr") if package:is_plat("linux") then From 75972c412c93a92d20a10a5751d5bba04cc798ab Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 20 Jul 2025 18:30:56 +0300 Subject: [PATCH 16/27] fixup --- packages/a/aui/xmake.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 0b40bd3d022..dd85e5b8b3c 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -38,7 +38,7 @@ package("aui") -- aui.core on_component("core", function (package, component) - component:add("includedirs", "aui.core/include") + package:add("includedirs", "aui.core/include") component:add("links", "aui.core") package:add("deps", "fmt 9.1.0", "range-v3") if package:is_plat("linux") then @@ -53,7 +53,7 @@ package("aui") -- aui.crypt on_component("crypt", function (package, component) - component:add("includedirs", "aui.crypt/include") + package:add("includedirs", "aui.crypt/include") component:add("links", "aui.crypt") package:add("deps", "openssl3") if package:is_plat("windows", "mingw") then @@ -63,27 +63,27 @@ package("aui") -- aui.curl on_component("curl", function (package, component) - component:add("includedirs", "aui.curl/include") + package:add("includedirs", "aui.curl/include") component:add("links", "aui.curl") package:add("deps", "libcurl") end) -- aui.image on_component("image", function (package, component) - component:add("includedirs", "aui.image/include") + package:add("includedirs", "aui.image/include") component:add("links", "aui.image") package:add("deps", "lunasvg", "libwebp") end) -- aui.json on_component("json", function (package, component) - component:add("includedirs", "aui.json/include") + package:add("includedirs", "aui.json/include") component:add("links", "aui.json") end) -- aui.network on_component("network", function (package, component) - component:add("includedirs", "aui.network/include") + package:add("includedirs", "aui.network/include") component:add("links", "aui.network") if package:is_plat("windows", "mingw") then component:add("syslinks", "wsock32", "ws2_32", "iphlpapi") @@ -92,19 +92,19 @@ package("aui") -- aui.toolbox on_component("toolbox", function (package, component) - component:add("includedirs", "aui.toolbox/include") + package:add("includedirs", "aui.toolbox/include") end) -- aui.uitests on_component("uitests", function (package, component) - component:add("includedirs", "aui.uitests/include") + package:add("includedirs", "aui.uitests/include") component:add("links", "aui.uitests") package:add("deps", "gtest", "benchmark") end) -- aui.views on_component("views", function (package, component) - component:add("includedirs", "aui.views/include") + package:add("includedirs", "aui.views/include") component:add("links", "aui.views") package:add("deps", "freetype") if package:is_plat("windows", "mingw", "linux", "macosx") then @@ -126,7 +126,7 @@ package("aui") -- aui.xml on_component("xml", function (package, component) - component:add("includedirs", "aui.xml/include") + package:add("includedirs", "aui.xml/include") component:add("links", "aui.xml") end) From 83464334390fe8572fc7f7d55b55ef6e3a70d898 Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 15:04:45 +0300 Subject: [PATCH 17/27] try improve windows shared build --- packages/a/aui/xmake.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index dd85e5b8b3c..e814af86c6f 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -144,12 +144,21 @@ package("aui") "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" } - if package:is_plat("windows") and package:is_arch("arm64") then - io.replace("cmake/aui.build.cmake", [[if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)")]], [[if (1)]], {plain = true}) + local opt = {} + if package:is_plat("windows") then + if package:config("shared") then + opt.packagedeps = {"glew"} + end + if package:has_tool("cxx", "cl", "clang_cl") then + opt.cxflags = {"/EHsc"} + end + if package:is_arch("arm64") then + io.replace("cmake/aui.build.cmake", [[if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)")]], [[if (1)]], {plain = true}) + end end table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) - import("package.tools.cmake").install(package, configs) + import("package.tools.cmake").install(package, configs, opt) end) on_test(function (package) From 8344da0e2ce20f0be525389f5c93002b6a04d252 Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 15:40:56 +0300 Subject: [PATCH 18/27] Add gtest to packagedeps along with glew to resolve Windows shared build --- packages/a/aui/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index e814af86c6f..f74f7f00c02 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -147,7 +147,7 @@ package("aui") local opt = {} if package:is_plat("windows") then if package:config("shared") then - opt.packagedeps = {"glew"} + opt.packagedeps = {"glew", "gtest"} end if package:has_tool("cxx", "cl", "clang_cl") then opt.cxflags = {"/EHsc"} From 560c33b53fedc02cff8952de7768e40f2ed5043a Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 15:45:58 +0300 Subject: [PATCH 19/27] https://aui-framework.github.io/develop/md_docs_2Runtime_01Dependency_01Resolution.html Disable runtime dependency resolution --- packages/a/aui/xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index f74f7f00c02..ddbbed80ab9 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -141,6 +141,7 @@ package("aui") on_install("!bsd and !wasm", function (package) local configs = { + "-DAUI_INSTALL_RUNTIME_DEPENDENCIES=OFF", "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" } From 328f0009a34773f14a3b29d91771e2d065946ea1 Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 16:36:22 +0300 Subject: [PATCH 20/27] Try fix MacOS --- .../v7.1.2/fix-osx-enforce-cpp-template.diff | 21 +++++++++++++++++++ packages/a/aui/xmake.lua | 1 + 2 files changed, 22 insertions(+) create mode 100644 packages/a/aui/patches/v7.1.2/fix-osx-enforce-cpp-template.diff diff --git a/packages/a/aui/patches/v7.1.2/fix-osx-enforce-cpp-template.diff b/packages/a/aui/patches/v7.1.2/fix-osx-enforce-cpp-template.diff new file mode 100644 index 00000000000..58d8549d683 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/fix-osx-enforce-cpp-template.diff @@ -0,0 +1,21 @@ +diff --git a/aui.views/src/AUI/GL/gl.h b/aui.views/src/AUI/GL/gl.h +index 64209c6..062af7b 100644 +--- a/aui.views/src/AUI/GL/gl.h ++++ b/aui.views/src/AUI/GL/gl.h +@@ -10,7 +10,9 @@ + */ + + #pragma once ++#if !AUI_PLATFORM_MACOS + extern "C" { ++#endif + #if AUI_PLATFORM_ANDROID + #include + #include +@@ -27,4 +29,6 @@ extern "C" { + #include + #include + #endif ++#if !AUI_PLATFORM_MACOS + } ++#endif diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index ddbbed80ab9..0b17e335fe3 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -8,6 +8,7 @@ package("aui") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "1eb3da88e82503e6a9a893c112b4dd97909341905fe0e28d3fb5a4d2a50075ea") + add_patches("v7.1.2", "patches/v7.1.2/fix-osx-enforce-cpp-template.diff", "eef4147a8b037552887777cd497c190ecc22514bb11fb3a3d6ea433a78cce61b") add_deps("cmake") if is_subhost("windows") then From f98d2437fad00152a9adb191ce0787a591966373 Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 17:23:41 +0300 Subject: [PATCH 21/27] Add gtest to packagedeps for MacOS X --- packages/a/aui/xmake.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 0b17e335fe3..6e588083f30 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -147,7 +147,11 @@ package("aui") "-DAUIB_DISABLE=ON" } local opt = {} - if package:is_plat("windows") then + if package:is_plat("macosx") then + if package:config("shared") then + opt.packagedeps = {"gtest"} + end + elseif package:is_plat("windows") then if package:config("shared") then opt.packagedeps = {"glew", "gtest"} end From c1cbdd527d66133bd9459f3d819f8ed4b6282f8c Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 22:22:45 +0300 Subject: [PATCH 22/27] Update xmake.lua --- packages/a/aui/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 6e588083f30..b7d23da89c9 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -140,7 +140,7 @@ package("aui") package:add("defines", "API_AUI_CORE=AUI_IMPORT") end) - on_install("!bsd and !wasm", function (package) + on_install("windows|!arm*", "macosx", function (package) local configs = { "-DAUI_INSTALL_RUNTIME_DEPENDENCIES=OFF", "-DAUIB_NO_PRECOMPILED=TRUE", From 84192d22768c710577d5f5a499e9bbc2942e76ec Mon Sep 17 00:00:00 2001 From: Saikari Date: Tue, 22 Jul 2025 23:14:03 +0300 Subject: [PATCH 23/27] Do not store redundant arm64 windows implementation --- packages/a/aui/xmake.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index b7d23da89c9..2aa2897eec5 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -158,9 +158,6 @@ package("aui") if package:has_tool("cxx", "cl", "clang_cl") then opt.cxflags = {"/EHsc"} end - if package:is_arch("arm64") then - io.replace("cmake/aui.build.cmake", [[if (CMAKE_GENERATOR_PLATFORM MATCHES "(arm64)|(ARM64)" OR CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64|arm64)")]], [[if (1)]], {plain = true}) - end end table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) From 17f26ed8f19144ed73e6ed5df289f4674273e188 Mon Sep 17 00:00:00 2001 From: Saikari Date: Wed, 23 Jul 2025 14:25:50 +0300 Subject: [PATCH 24/27] split patch into component patches --- .../a/aui/patches/v7.1.2/debundle-audio.diff | 84 +++ .../a/aui/patches/v7.1.2/debundle-build.diff | 107 +++ .../a/aui/patches/v7.1.2/debundle-core.diff | 83 +++ .../a/aui/patches/v7.1.2/debundle-crypt.diff | 23 + .../a/aui/patches/v7.1.2/debundle-curl.diff | 23 + .../a/aui/patches/v7.1.2/debundle-image.diff | 37 + .../patches/v7.1.2/debundle-json-network.diff | 29 + .../a/aui/patches/v7.1.2/debundle-main.diff | 32 + .../a/aui/patches/v7.1.2/debundle-sqlite.diff | 14 + .../aui/patches/v7.1.2/debundle-toolbox.diff | 14 + .../aui/patches/v7.1.2/debundle-uitests.diff | 21 + .../a/aui/patches/v7.1.2/debundle-views.diff | 115 +++ packages/a/aui/patches/v7.1.2/debundle.diff | 653 ------------------ .../patches/v7.1.2/fix-backport-lunasvg.diff | 21 + .../v7.1.2/fix-msvc-pretty-function.diff | 50 ++ packages/a/aui/xmake.lua | 26 +- 16 files changed, 678 insertions(+), 654 deletions(-) create mode 100644 packages/a/aui/patches/v7.1.2/debundle-audio.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-build.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-core.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-crypt.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-curl.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-image.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-json-network.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-main.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-sqlite.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-toolbox.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-uitests.diff create mode 100644 packages/a/aui/patches/v7.1.2/debundle-views.diff delete mode 100644 packages/a/aui/patches/v7.1.2/debundle.diff create mode 100644 packages/a/aui/patches/v7.1.2/fix-backport-lunasvg.diff create mode 100644 packages/a/aui/patches/v7.1.2/fix-msvc-pretty-function.diff diff --git a/packages/a/aui/patches/v7.1.2/debundle-audio.diff b/packages/a/aui/patches/v7.1.2/debundle-audio.diff new file mode 100644 index 00000000000..897d6afda94 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-audio.diff @@ -0,0 +1,84 @@ +diff --git a/aui.audio/CMakeLists.txt b/aui.audio/CMakeLists.txt +index 21e44153..f6732e73 100644 +--- a/aui.audio/CMakeLists.txt ++++ b/aui.audio/CMakeLists.txt +@@ -5,26 +5,44 @@ add_subdirectory(3rdparty/ogg) + 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 $ $) ++ if (AUIB_DISABLE) ++ find_package(oboe CONFIG REQUIRED) ++ aui_link(aui.audio PUBLIC oboe::oboe $ $) ++ else () ++ 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" +- ) ++ 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" ++ ) ++ endif () + elseif (AUI_PLATFORM_LINUX) +- aui_link(aui.audio PUBLIC pulse) ++ if (AUIB_DISABLE) ++ auib_use_system_libs_begin() ++ find_package(PkgConfig) ++ pkg_check_modules(PULSEAUDIO REQUIRED IMPORTED_TARGET libpulse) ++ aui_link(aui.audio PUBLIC PkgConfig::PULSEAUDIO) ++ auib_use_system_libs_end() ++ else () ++ aui_link(aui.audio PUBLIC pulse) ++ endif () + 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) ++if (AUIB_DISABLE) ++ find_package(Opus CONFIG REQUIRED) ++ aui_link(aui.audio PRIVATE Opus::opus) ++else () ++ auib_import(Opus https://github.com/xiph/opus.git VERSION v1.4) ++ aui_link(aui.audio PRIVATE Opus::opus) ++endif () + + if (AUI_PLATFORM_IOS OR AUI_PLATFORM_MACOS) + auib_use_system_libs_begin() +@@ -42,9 +60,15 @@ if (AUI_PLATFORM_MACOS) + "-framework QuartzCore") + endif() + +-auib_import(soxr https://github.com/aui-framework/soxr +- ADD_SUBDIRECTORY +- VERSION adacc686124ac3568432f3dca388878963a005ee +- ) ++if (AUIB_DISABLE) ++ include(FindPkgConfig) ++ pkg_check_modules(soxr REQUIRED IMPORTED_TARGET soxr) ++ aui_link(aui.audio PRIVATE PkgConfig::soxr) ++else () ++ auib_import(soxr https://github.com/aui-framework/soxr ++ ADD_SUBDIRECTORY ++ VERSION adacc686124ac3568432f3dca388878963a005ee ++ ) + +-aui_link(aui.audio PRIVATE soxr) ++ aui_link(aui.audio PRIVATE soxr) ++endif () diff --git a/packages/a/aui/patches/v7.1.2/debundle-build.diff b/packages/a/aui/patches/v7.1.2/debundle-build.diff new file mode 100644 index 00000000000..e2d4316f383 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-build.diff @@ -0,0 +1,107 @@ +diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake +index 90c53d45..f980b2a3 100644 +--- a/cmake/aui.build.cmake ++++ b/cmake/aui.build.cmake +@@ -218,23 +218,33 @@ function(aui_add_properties AUI_MODULE_NAME) + endfunction(aui_add_properties) + + # gtest +-macro(_aui_import_gtest) +- if (NOT TARGET GTest::gtest) +- auib_import(GTest https://github.com/google/googletest +- VERSION v1.14.0 +- CMAKE_ARGS -Dgtest_force_shared_crt=TRUE +- LINK STATIC) +- set_property(TARGET GTest::gtest PROPERTY IMPORTED_GLOBAL TRUE) +- set_property(TARGET GTest::gmock PROPERTY IMPORTED_GLOBAL TRUE) +- endif() ++macro(_aui_import_gtest AUIB_DISABLE) ++ if (AUIB_DISABLE) ++ find_package(gtest CONFIG REQUIRED) ++ get_target_property(GTEST_TARGET_IMPORTED_GLOBAL gtest::gtest IMPORTED_GLOBAL) ++ if (NOT GTEST_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(gtest::gtest PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ find_package(gmock CONFIG REQUIRED) ++ get_target_property(GMOCK_TARGET_IMPORTED_GLOBAL gmock::gmock IMPORTED_GLOBAL) ++ if (NOT GMOCK_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(gmock::gmock PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ else () ++ if (NOT TARGET GTest::gtest) ++ auib_import(GTest https://github.com/google/googletest ++ VERSION v1.14.0 ++ CMAKE_ARGS -Dgtest_force_shared_crt=TRUE ++ LINK STATIC) ++ set_property(TARGET GTest::gtest PROPERTY IMPORTED_GLOBAL TRUE) ++ set_property(TARGET GTest::gmock PROPERTY IMPORTED_GLOBAL TRUE) ++ endif() ++ endif () + endmacro() + + macro(aui_enable_tests AUI_MODULE_NAME) + if (NOT CMAKE_CROSSCOMPILING) +- _aui_import_gtest() +- if (NOT TARGET GTest::gtest) +- message(FATAL_ERROR "GTest::gtest not found!") +- endif() ++ _aui_import_gtest(ON) + + enable_testing() + get_property(_source_dir TARGET ${AUI_MODULE_NAME} PROPERTY SOURCE_DIR) +@@ -268,7 +278,11 @@ macro(aui_enable_tests AUI_MODULE_NAME) + #gtest_add_tests(TARGET ${TESTS_MODULE_NAME}) + set_property(TARGET ${TESTS_MODULE_NAME} PROPERTY CXX_STANDARD 20) + target_include_directories(${TESTS_MODULE_NAME} PUBLIC tests) +- target_link_libraries(${TESTS_MODULE_NAME} PUBLIC GTest::gmock) ++ if (AUIB_DISABLE) ++ target_link_libraries(${TESTS_MODULE_NAME} PUBLIC gmock::gmock) ++ else () ++ target_link_libraries(${TESTS_MODULE_NAME} PUBLIC GTest::gmock) ++ endif () + + target_compile_definitions(${TESTS_MODULE_NAME} PUBLIC AUI_TESTS_MODULE=1) + +@@ -317,20 +331,32 @@ endmacro() + + # google benchmark + +-macro(_aui_import_google_benchmark) +- if (NOT TARGET benchmark::benchmark) +- auib_import(benchmark https://github.com/google/benchmark +- VERSION v1.8.3 +- CMAKE_ARGS -DBENCHMARK_ENABLE_GTEST_TESTS=OFF +- LINK STATIC) +- set_property(TARGET benchmark::benchmark PROPERTY IMPORTED_GLOBAL TRUE) +- endif() ++macro(_aui_import_google_benchmark AUIB_DISABLE) ++ if (AUIB_DISABLE) ++ find_package(benchmark CONFIG REQUIRED) ++ get_target_property(BENCHMARK_TARGET_IMPORTED_GLOBAL benchmark::benchmark IMPORTED_GLOBAL) ++ if (NOT BENCHMARK_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(benchmark::benchmark PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ get_target_property(BENCHMARK_MAIN_TARGET_IMPORTED_GLOBAL benchmark::benchmark_main IMPORTED_GLOBAL) ++ if (NOT BENCHMARK_MAIN_TARGET_IMPORTED_GLOBAL) ++ set_target_properties(benchmark::benchmark_main PROPERTIES IMPORTED_GLOBAL TRUE) ++ endif () ++ else () ++ if (NOT TARGET benchmark::benchmark) ++ auib_import(benchmark https://github.com/google/benchmark ++ VERSION v1.8.3 ++ CMAKE_ARGS -DBENCHMARK_ENABLE_GTEST_TESTS=OFF ++ LINK STATIC) ++ set_property(TARGET benchmark::benchmark PROPERTY IMPORTED_GLOBAL TRUE) ++ endif() ++ endif () + endmacro() + + macro(aui_enable_benchmarks AUI_MODULE_NAME) + if (NOT CMAKE_CROSSCOMPILING) +- _aui_import_gtest() +- _aui_import_google_benchmark() ++ _aui_import_gtest(ON) ++ _aui_import_google_benchmark(ON) + if (NOT TARGET benchmark::benchmark) + message(FATAL_ERROR "benchmark::benchmark not found!") + endif() diff --git a/packages/a/aui/patches/v7.1.2/debundle-core.diff b/packages/a/aui/patches/v7.1.2/debundle-core.diff new file mode 100644 index 00000000000..b50456be222 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-core.diff @@ -0,0 +1,83 @@ +diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt +index 6aa1b07..5cb497f 100644 +--- a/aui.core/CMakeLists.txt ++++ b/aui.core/CMakeLists.txt +@@ -6,7 +6,9 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) + option(AUI_ENABLE_DEATH_TESTS "Enable GTest death tests" ON) + + aui_module(aui.core EXPORT aui) +-aui_enable_tests(aui.core) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.core) ++endif () + aui_enable_benchmarks(aui.core) + + +@@ -49,8 +51,12 @@ if (NOT WIN32) + endif() + + if (AUI_PLATFORM_LINUX) +- auib_import(backtrace https://github.com/aui-framework/libbacktrace +- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ if (AUIB_DISABLE) ++ find_package(libbacktrace CONFIG REQUIRED) ++ else () ++ auib_import(backtrace https://github.com/aui-framework/libbacktrace ++ VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) ++ endif () + set(_use_backtrace TRUE) + else() + +@@ -84,13 +90,17 @@ endif() + + if(_use_backtrace) + message(STATUS "Stacktrace backend: backtrace") +- aui_link(aui.core PRIVATE backtrace) ++ if (AUIB_DISABLE) ++ aui_link(aui.core PRIVATE libbacktrace::libbacktrace) ++ else () ++ aui_link(aui.core PRIVATE backtrace) ++ endif () + target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) + elseif(_use_unwind) + message(STATUS "Stacktrace backend: unwind") + target_compile_definitions(aui.core PRIVATE AUI_USE_UNWIND=1) + elseif(WIN32) +- aui_link(aui.core PRIVATE dbghelp shlwapi.lib) ++ aui_link(aui.core PRIVATE dbghelp shell32 shlwapi.lib) + message(STATUS "Stacktrace backend: dbghelp") + else() + message(STATUS "Stacktrace backend: none") +@@ -146,17 +156,23 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) + endif() + + +-# [auib_import examples] +-auib_import(fmt https://github.com/fmtlib/fmt +- VERSION 9.1.0 +- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) ++if (AUIB_DISABLE) ++ find_package(fmt CONFIG REQUIRED) ++ find_package(range-v3 CONFIG REQUIRED) ++ aui_link(aui.core PUBLIC fmt::fmt range-v3::range-v3) ++else () ++ # [auib_import examples] ++ auib_import(fmt https://github.com/fmtlib/fmt ++ VERSION 9.1.0 ++ CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) + +-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) +-# [auib_import examples] ++ 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) ++ # [auib_import examples] + +-aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) ++ aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) ++endif () + + # segfault functionality + if (NOT MSVC AND AUI_CATCH_UNHANDLED) diff --git a/packages/a/aui/patches/v7.1.2/debundle-crypt.diff b/packages/a/aui/patches/v7.1.2/debundle-crypt.diff new file mode 100644 index 00000000000..b7314b08d30 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-crypt.diff @@ -0,0 +1,23 @@ +diff --git a/aui.crypt/CMakeLists.txt b/aui.crypt/CMakeLists.txt +index c5354f2e..9c194be4 100644 +--- a/aui.crypt/CMakeLists.txt ++++ b/aui.crypt/CMakeLists.txt +@@ -3,10 +3,16 @@ 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) ++if (AUIB_DISABLE) ++ find_package(OpenSSL CONFIG REQUIRED) ++else () ++ auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) ++endif () + + aui_module(aui.crypt EXPORT aui) +-aui_enable_tests(aui.crypt) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.crypt) ++endif () + aui_link(aui.crypt PUBLIC aui::core) + target_include_directories(aui.crypt PRIVATE ${OPENSSL_INCLUDE_DIR}) + aui_link(aui.crypt PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/packages/a/aui/patches/v7.1.2/debundle-curl.diff b/packages/a/aui/patches/v7.1.2/debundle-curl.diff new file mode 100644 index 00000000000..47b92c17a4c --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-curl.diff @@ -0,0 +1,23 @@ +diff --git a/aui.curl/CMakeLists.txt b/aui.curl/CMakeLists.txt +index 5141c8ee..00be58b4 100644 +--- a/aui.curl/CMakeLists.txt ++++ b/aui.curl/CMakeLists.txt +@@ -1,9 +1,15 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip +- ARCHIVE) ++if (AUIB_DISABLE) ++ find_package(CURL CONFIG REQUIRED) ++else () ++ auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip ++ ARCHIVE) ++endif () + + aui_module(aui.curl EXPORT aui WHOLEARCHIVE) +-aui_enable_tests(aui.curl) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.curl) ++endif () + aui_link(aui.curl PUBLIC aui::core aui::json) + aui_link(aui.curl PRIVATE CURL::libcurl aui::crypt) diff --git a/packages/a/aui/patches/v7.1.2/debundle-image.diff b/packages/a/aui/patches/v7.1.2/debundle-image.diff new file mode 100644 index 00000000000..9c0b4c6f792 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-image.diff @@ -0,0 +1,37 @@ +diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt +index 033e7ad5..1f8d8915 100644 +--- a/aui.image/CMakeLists.txt ++++ b/aui.image/CMakeLists.txt +@@ -1,8 +1,12 @@ + cmake_minimum_required(VERSION 3.10) + +-auib_import(lunasvg https://github.com/aui-framework/lunasvg +- VERSION 272ceee) ++if (AUIB_DISABLE) ++ find_package(lunasvg CONFIG REQUIRED) ++else () ++ auib_import(lunasvg https://github.com/aui-framework/lunasvg ++ VERSION 272ceee) + ++endif () + + set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) + +@@ -10,9 +14,15 @@ 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}) ++if (AUIB_DISABLE) ++ find_package(WebP CONFIG REQUIRED) ++else () ++ auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) ++endif () + + aui_module(aui.image WHOLEARCHIVE EXPORT aui) + add_subdirectory(3rdparty) + aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) +-aui_enable_tests(aui.image) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.image) ++endif () diff --git a/packages/a/aui/patches/v7.1.2/debundle-json-network.diff b/packages/a/aui/patches/v7.1.2/debundle-json-network.diff new file mode 100644 index 00000000000..2f68feb87f5 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-json-network.diff @@ -0,0 +1,29 @@ +diff --git a/aui.json/CMakeLists.txt b/aui.json/CMakeLists.txt +index d0190bd5..980456da 100644 +--- a/aui.json/CMakeLists.txt ++++ b/aui.json/CMakeLists.txt +@@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 3.10) + aui_module(aui.json EXPORT aui) + + aui_link(aui.json PRIVATE aui::core) +-aui_enable_tests(aui.json) ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.json) ++endif () + aui_enable_benchmarks(aui.json) + if (TARGET Benchmarks) + # curl needed to download the benchmark data +diff --git a/aui.network/CMakeLists.txt b/aui.network/CMakeLists.txt +index bb668703..1f85acd3 100644 +--- a/aui.network/CMakeLists.txt ++++ b/aui.network/CMakeLists.txt +@@ -9,4 +9,6 @@ if(WIN32) + target_compile_definitions(aui.network PRIVATE PIO_APC_ROUTINE_DEFINED=1) + endif() + +-aui_enable_tests(aui.network) +\ No newline at end of file ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.network) ++endif() +\ No newline at end of file diff --git a/packages/a/aui/patches/v7.1.2/debundle-main.diff b/packages/a/aui/patches/v7.1.2/debundle-main.diff new file mode 100644 index 00000000000..c8cc90d1370 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-main.diff @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6902d56a..98ebd001 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,9 +64,13 @@ 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) ++if (AUIB_DISABLE) ++ find_package(ZLIB REQUIRED) ++else () ++ auib_import(ZLIB https://github.com/aui-framework/zlib ++ VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a ++ CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) ++endif () + + # define all components + define_aui_component(core) +@@ -195,7 +199,9 @@ auib_precompiled_binary() + # [auib_precompiled_binary] + + # test aui.boot on ci/cd +-add_subdirectory(test/) ++if (NOT AUIB_DISABLE) ++ add_subdirectory(test/) ++endif () + + # [configure file example] + configure_file(cmake/aui-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/aui-config.cmake @ONLY) diff --git a/packages/a/aui/patches/v7.1.2/debundle-sqlite.diff b/packages/a/aui/patches/v7.1.2/debundle-sqlite.diff new file mode 100644 index 00000000000..dc1958d4673 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-sqlite.diff @@ -0,0 +1,14 @@ +diff --git a/aui.sqlite/CMakeLists.txt b/aui.sqlite/CMakeLists.txt +index 6afd58f4..78a2a593 100644 +--- a/aui.sqlite/CMakeLists.txt ++++ b/aui.sqlite/CMakeLists.txt +@@ -11,4 +11,6 @@ target_include_directories(aui.sqlite PRIVATE 3rdparty/sqlite3) + aui_link(aui.sqlite PUBLIC aui::core) + aui_link(aui.sqlite PUBLIC aui::data) + +-aui_enable_tests(aui.sqlite) +\ No newline at end of file ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.sqlite) ++endif () +\ No newline at end of file diff --git a/packages/a/aui/patches/v7.1.2/debundle-toolbox.diff b/packages/a/aui/patches/v7.1.2/debundle-toolbox.diff new file mode 100644 index 00000000000..7bb9595f902 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-toolbox.diff @@ -0,0 +1,14 @@ +diff --git a/aui.toolbox/CMakeLists.txt b/aui.toolbox/CMakeLists.txt +index c17cb1da..aa088ce4 100644 +--- a/aui.toolbox/CMakeLists.txt ++++ b/aui.toolbox/CMakeLists.txt +@@ -7,4 +7,6 @@ endif() + + aui_executable(aui.toolbox WIN32_SUBSYSTEM_CONSOLE EXPORT aui) + aui_link(aui.toolbox PRIVATE aui::core aui::crypt aui::image) +-aui_enable_tests(aui.toolbox) +\ No newline at end of file ++if (NOT AUIB_DISABLE) ++ aui_enable_tests(aui.toolbox) ++endif () +\ No newline at end of file diff --git a/packages/a/aui/patches/v7.1.2/debundle-uitests.diff b/packages/a/aui/patches/v7.1.2/debundle-uitests.diff new file mode 100644 index 00000000000..d6aa867ed93 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-uitests.diff @@ -0,0 +1,21 @@ +diff --git a/aui.uitests/CMakeLists.txt b/aui.uitests/CMakeLists.txt +index 5070f0a3..e4188094 100644 +--- a/aui.uitests/CMakeLists.txt ++++ b/aui.uitests/CMakeLists.txt +@@ -8,9 +8,13 @@ aui_module(aui.uitests EXPORT aui) + + aui_link(aui.uitests PRIVATE aui::core aui::views) + +-if (TARGET GTest::gmock) +- aui_link(aui.uitests PRIVATE GTest::gmock) +-endif() ++if (AUIB_DISABLE) ++ aui_link(aui.uitests PRIVATE gmock::gmock) ++else () ++ if (TARGET GTest::gmock) ++ aui_link(aui.uitests PRIVATE GTest::gmock) ++ endif() ++endif () + + aui_enable_tests(aui.uitests) + aui_enable_benchmarks(aui.uitests) diff --git a/packages/a/aui/patches/v7.1.2/debundle-views.diff b/packages/a/aui/patches/v7.1.2/debundle-views.diff new file mode 100644 index 00000000000..420ba6f5398 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/debundle-views.diff @@ -0,0 +1,115 @@ +diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt +index dfe6b18b..c5c1fb27 100644 +--- a/aui.views/CMakeLists.txt ++++ b/aui.views/CMakeLists.txt +@@ -9,10 +9,14 @@ 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 +- ) ++ if (AUIB_DISABLE) ++ find_package(freetype CONFIG REQUIRED) ++ else () ++ 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 ++ ) ++ endif () + + if (NOT TARGET Freetype::Freetype) + message(FATAL_ERROR "Freetype not imported") +@@ -20,29 +24,40 @@ 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) ++ if (AUIB_DISABLE) ++ find_package(glew CONFIG REQUIRED) ++ else () ++ auib_import(GLEW https://github.com/aui-framework/glew-cmake ++ CMAKE_WORKING_DIR "build/cmake" ++ VERSION a80a1dc) ++ endif () + endif () + + aui_module(aui.views EXPORT aui) + aui_enable_tests(aui.views) + + if (AUI_PLATFORM_LINUX) +- auib_use_system_libs_begin() +- find_package(PkgConfig REQUIRED) ++ if (AUIB_DISABLE) ++ include(FindPkgConfig) ++ pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1) ++ pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) ++ aui_link(aui.views PRIVATE X11::X11 X11::Xrandr X11::Xcursor X11::Xi PkgConfig::DBUS PkgConfig::GTK3 Fontconfig::Fontconfig) ++ else () ++ auib_use_system_libs_begin() ++ find_package(PkgConfig REQUIRED) + +- pkg_check_modules(DBUS REQUIRED dbus-1) +- include_directories(${DBUS_INCLUDE_DIRS}) +- link_directories(${DBUS_LIBRARY_DIRS}) ++ pkg_check_modules(DBUS REQUIRED dbus-1) ++ 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(GTK3 REQUIRED gtk+-3.0) ++ include_directories(${GTK3_INCLUDE_DIRS}) ++ link_directories(${GTK3_LIBRARY_DIRS}) + +- auib_use_system_libs_end() ++ 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 ${DBUS_LIBRARIES} ${GTK3_LIBRARIES} Fontconfig::Fontconfig) ++ endif () + endif () + + if (NOT AUI_PLATFORM_WINDOWS) +@@ -92,17 +107,29 @@ if (OPENGL_FOUND OR ANDROID OR IOS) + aui_link(aui.views PRIVATE Freetype::Freetype) + aui_link(aui.views PRIVATE OpenGL::GL) + +- if (AUI_PLATFORM_LINUX) +- # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them +- set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") ++ if (AUIB_DISABLE) ++ if (AUI_PLATFORM_LINUX) ++ # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them ++ set_target_properties(glew::glew PROPERTIES INTERFACE_LINK_LIBRARIES "") ++ auib_use_system_libs_begin() ++ find_package(X11 REQUIRED) ++ find_package(Fontconfig REQUIRED) ++ auib_use_system_libs_end() ++ endif () ++ aui_link(aui.views PUBLIC glew::glew) ++ else () ++ if (AUI_PLATFORM_LINUX) ++ # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them ++ set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") + +- auib_use_system_libs_begin() +- find_package(X11 REQUIRED) +- find_package(Fontconfig REQUIRED) +- auib_use_system_libs_end() ++ auib_use_system_libs_begin() ++ find_package(X11 REQUIRED) ++ find_package(Fontconfig REQUIRED) ++ auib_use_system_libs_end() + ++ endif () ++ aui_link(aui.views PUBLIC GLEW::GLEW) + endif () +- aui_link(aui.views PUBLIC GLEW::GLEW) + + if (WIN32) + aui_link(aui.views PRIVATE dwmapi) diff --git a/packages/a/aui/patches/v7.1.2/debundle.diff b/packages/a/aui/patches/v7.1.2/debundle.diff deleted file mode 100644 index 5b0ec0300fe..00000000000 --- a/packages/a/aui/patches/v7.1.2/debundle.diff +++ /dev/null @@ -1,653 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6902d56a..98ebd001 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -64,9 +64,13 @@ 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) -+if (AUIB_DISABLE) -+ find_package(ZLIB REQUIRED) -+else () -+ auib_import(ZLIB https://github.com/aui-framework/zlib -+ VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a -+ CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) -+endif () - - # define all components - define_aui_component(core) -@@ -195,7 +199,9 @@ auib_precompiled_binary() - # [auib_precompiled_binary] - - # test aui.boot on ci/cd --add_subdirectory(test/) -+if (NOT AUIB_DISABLE) -+ add_subdirectory(test/) -+endif () - - # [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 21e44153..f6732e73 100644 ---- a/aui.audio/CMakeLists.txt -+++ b/aui.audio/CMakeLists.txt -@@ -5,26 +5,44 @@ add_subdirectory(3rdparty/ogg) - 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 $ $) -+ if (AUIB_DISABLE) -+ find_package(oboe CONFIG REQUIRED) -+ aui_link(aui.audio PUBLIC oboe::oboe $ $) -+ else () -+ 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" -- ) -+ 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" -+ ) -+ endif () - elseif (AUI_PLATFORM_LINUX) -- aui_link(aui.audio PUBLIC pulse) -+ if (AUIB_DISABLE) -+ auib_use_system_libs_begin() -+ find_package(PkgConfig) -+ pkg_check_modules(PULSEAUDIO REQUIRED IMPORTED_TARGET libpulse) -+ aui_link(aui.audio PUBLIC PkgConfig::PULSEAUDIO) -+ auib_use_system_libs_end() -+ else () -+ aui_link(aui.audio PUBLIC pulse) -+ endif () - 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) -+if (AUIB_DISABLE) -+ find_package(Opus CONFIG REQUIRED) -+ aui_link(aui.audio PRIVATE Opus::opus) -+else () -+ auib_import(Opus https://github.com/xiph/opus.git VERSION v1.4) -+ aui_link(aui.audio PRIVATE Opus::opus) -+endif () - - if (AUI_PLATFORM_IOS OR AUI_PLATFORM_MACOS) - auib_use_system_libs_begin() -@@ -42,9 +60,15 @@ if (AUI_PLATFORM_MACOS) - "-framework QuartzCore") - endif() - --auib_import(soxr https://github.com/aui-framework/soxr -- ADD_SUBDIRECTORY -- VERSION adacc686124ac3568432f3dca388878963a005ee -- ) -+if (AUIB_DISABLE) -+ include(FindPkgConfig) -+ pkg_check_modules(soxr REQUIRED IMPORTED_TARGET soxr) -+ aui_link(aui.audio PRIVATE PkgConfig::soxr) -+else () -+ auib_import(soxr https://github.com/aui-framework/soxr -+ ADD_SUBDIRECTORY -+ VERSION adacc686124ac3568432f3dca388878963a005ee -+ ) - --aui_link(aui.audio PRIVATE soxr) -+ aui_link(aui.audio PRIVATE soxr) -+endif () -diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt -index 6aa1b072..5cb497f6 100644 ---- a/aui.core/CMakeLists.txt -+++ b/aui.core/CMakeLists.txt -@@ -6,7 +6,9 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) - option(AUI_ENABLE_DEATH_TESTS "Enable GTest death tests" ON) - - aui_module(aui.core EXPORT aui) --aui_enable_tests(aui.core) -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.core) -+endif () - aui_enable_benchmarks(aui.core) - - -@@ -49,8 +51,12 @@ if (NOT WIN32) - endif() - - if (AUI_PLATFORM_LINUX) -- auib_import(backtrace https://github.com/aui-framework/libbacktrace -- VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) -+ if (AUIB_DISABLE) -+ find_package(libbacktrace CONFIG REQUIRED) -+ else () -+ auib_import(backtrace https://github.com/aui-framework/libbacktrace -+ VERSION a5a32e3cc8e22a9fc40689a884b032c52ee3f88e) -+ endif () - set(_use_backtrace TRUE) - else() - -@@ -84,13 +90,17 @@ endif() - - if(_use_backtrace) - message(STATUS "Stacktrace backend: backtrace") -- aui_link(aui.core PRIVATE backtrace) -+ if (AUIB_DISABLE) -+ aui_link(aui.core PRIVATE libbacktrace::libbacktrace) -+ else () -+ aui_link(aui.core PRIVATE backtrace) -+ endif () - target_compile_definitions(aui.core PRIVATE AUI_USE_BACKTRACE=1) - elseif(_use_unwind) - message(STATUS "Stacktrace backend: unwind") - target_compile_definitions(aui.core PRIVATE AUI_USE_UNWIND=1) - elseif(WIN32) -- aui_link(aui.core PRIVATE dbghelp shlwapi.lib) -+ aui_link(aui.core PRIVATE dbghelp shell32 shlwapi.lib) - message(STATUS "Stacktrace backend: dbghelp") - else() - message(STATUS "Stacktrace backend: none") -@@ -146,17 +156,23 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) - endif() - - --# [auib_import examples] --auib_import(fmt https://github.com/fmtlib/fmt -- VERSION 9.1.0 -- CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) -+if (AUIB_DISABLE) -+ find_package(fmt CONFIG REQUIRED) -+ find_package(range-v3 CONFIG REQUIRED) -+ aui_link(aui.core PUBLIC fmt::fmt range-v3::range-v3) -+else () -+ # [auib_import examples] -+ auib_import(fmt https://github.com/fmtlib/fmt -+ VERSION 9.1.0 -+ CMAKE_ARGS -DFMT_TEST=FALSE -DFMT_DOC=FALSE) - --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) --# [auib_import examples] -+ 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) -+ # [auib_import examples] - --aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) -+ aui_link(aui.core PUBLIC fmt::fmt-header-only range-v3::range-v3) -+endif () - - # segfault functionality - if (NOT MSVC AND AUI_CATCH_UNHANDLED) -diff --git a/aui.core/src/AUI/Reflect/AClass.h b/aui.core/src/AUI/Reflect/AClass.h -index 7cbf3cfc..acccb19e 100644 ---- a/aui.core/src/AUI/Reflect/AClass.h -+++ b/aui.core/src/AUI/Reflect/AClass.h -@@ -36,7 +36,13 @@ public: - name = name.substr(0, name.length() - 2); - return name; - #elif AUI_COMPILER_CLANG -+ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) - AString s = __PRETTY_FUNCTION__; -+ #elif defined(__FUNCSIG__) -+ AString s = __FUNCSIG__; -+ #else -+ AString s = __FUNCTION__; -+ #endif - auto b = s.find("=") + 1; - auto e = s.find("&", b); - e = std::min(s.find("]", b), e); -@@ -44,7 +50,13 @@ public: - result = result.trim(); - return result; - #else -+ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) - AString s = __PRETTY_FUNCTION__; -+ #elif defined(__FUNCSIG__) -+ AString s = __FUNCSIG__; -+ #else -+ AString s = __FUNCTION__; -+ #endif - auto b = s.find("with T = ") + 9; - return { s.begin() + b, s.end() - 1 }; - #endif -diff --git a/aui.core/src/AUI/Reflect/AEnumerate.h b/aui.core/src/AUI/Reflect/AEnumerate.h -index 99d9d281..9419a4b3 100644 ---- a/aui.core/src/AUI/Reflect/AEnumerate.h -+++ b/aui.core/src/AUI/Reflect/AEnumerate.h -@@ -39,7 +39,13 @@ namespace aui::enumerate::basic { - - AString result(begin, end); - #else -+ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) - AString s = __PRETTY_FUNCTION__; -+ #elif defined(__FUNCSIG__) -+ AString s = __FUNCSIG__; -+ #else -+ AString s = __FUNCTION__; -+ #endif - #if AUI_COMPILER_CLANG - auto end = s.rfind(']'); - #else -diff --git a/aui.crypt/CMakeLists.txt b/aui.crypt/CMakeLists.txt -index c5354f2e..9c194be4 100644 ---- a/aui.crypt/CMakeLists.txt -+++ b/aui.crypt/CMakeLists.txt -@@ -3,10 +3,16 @@ 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) -+if (AUIB_DISABLE) -+ find_package(OpenSSL CONFIG REQUIRED) -+else () -+ auib_import(OpenSSL https://github.com/aui-framework/openssl-cmake/archive/56ee19b7e11b418e0f29825414abdca96ff6b83e.zip ARCHIVE) -+endif () - - aui_module(aui.crypt EXPORT aui) --aui_enable_tests(aui.crypt) -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.crypt) -+endif () - aui_link(aui.crypt PUBLIC aui::core) - target_include_directories(aui.crypt PRIVATE ${OPENSSL_INCLUDE_DIR}) - aui_link(aui.crypt PRIVATE OpenSSL::SSL OpenSSL::Crypto) -diff --git a/aui.curl/CMakeLists.txt b/aui.curl/CMakeLists.txt -index 5141c8ee..00be58b4 100644 ---- a/aui.curl/CMakeLists.txt -+++ b/aui.curl/CMakeLists.txt -@@ -1,9 +1,15 @@ - cmake_minimum_required(VERSION 3.10) - --auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip -- ARCHIVE) -+if (AUIB_DISABLE) -+ find_package(CURL CONFIG REQUIRED) -+else () -+ auib_import(CURL https://github.com/aui-framework/curl/archive/refs/heads/master.zip -+ ARCHIVE) -+endif () - - aui_module(aui.curl EXPORT aui WHOLEARCHIVE) --aui_enable_tests(aui.curl) -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.curl) -+endif () - aui_link(aui.curl PUBLIC aui::core aui::json) - aui_link(aui.curl PRIVATE CURL::libcurl aui::crypt) -diff --git a/aui.image/CMakeLists.txt b/aui.image/CMakeLists.txt -index 033e7ad5..1f8d8915 100644 ---- a/aui.image/CMakeLists.txt -+++ b/aui.image/CMakeLists.txt -@@ -1,8 +1,12 @@ - cmake_minimum_required(VERSION 3.10) - --auib_import(lunasvg https://github.com/aui-framework/lunasvg -- VERSION 272ceee) -+if (AUIB_DISABLE) -+ find_package(lunasvg CONFIG REQUIRED) -+else () -+ auib_import(lunasvg https://github.com/aui-framework/lunasvg -+ VERSION 272ceee) - -+endif () - - set(WEBP_COMPONENTS_TO_DISABLE ANIM_UTILS CWEBP DWEBP GIF2WEBP IMG2WEBP VWEBP WEBPINFO LIBWEBPMUX WEBPMUX EXTRAS) - -@@ -10,9 +14,15 @@ 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}) -+if (AUIB_DISABLE) -+ find_package(WebP CONFIG REQUIRED) -+else () -+ auib_import(WebP https://github.com/webmproject/libwebp VERSION 1.3.1 CMAKE_ARGS ${WEBP_CMAKE_ARGS}) -+endif () - - aui_module(aui.image WHOLEARCHIVE EXPORT aui) - add_subdirectory(3rdparty) - aui_link(aui.image PRIVATE aui::core lunasvg::lunasvg WebP::webp WebP::webpdemux) --aui_enable_tests(aui.image) -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.image) -+endif () -diff --git a/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp b/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp -index 7b638202..c4449d5b 100644 ---- a/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp -+++ b/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp -@@ -15,7 +15,15 @@ - - #include "SvgImageFactory.h" - #include "AUI/Common/AByteBuffer.h" --#include -+#if defined(__has_include) -+ #if __has_include() -+ #include -+ #else -+ #include -+ #endif -+#else -+ #include -+#endif - - - SvgImageFactory::SvgImageFactory(AByteBufferView buf) { -diff --git a/aui.json/CMakeLists.txt b/aui.json/CMakeLists.txt -index d0190bd5..980456da 100644 ---- a/aui.json/CMakeLists.txt -+++ b/aui.json/CMakeLists.txt -@@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 3.10) - aui_module(aui.json EXPORT aui) - - aui_link(aui.json PRIVATE aui::core) --aui_enable_tests(aui.json) -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.json) -+endif () - aui_enable_benchmarks(aui.json) - if (TARGET Benchmarks) - # curl needed to download the benchmark data -diff --git a/aui.network/CMakeLists.txt b/aui.network/CMakeLists.txt -index bb668703..1f85acd3 100644 ---- a/aui.network/CMakeLists.txt -+++ b/aui.network/CMakeLists.txt -@@ -9,4 +9,6 @@ if(WIN32) - target_compile_definitions(aui.network PRIVATE PIO_APC_ROUTINE_DEFINED=1) - endif() - --aui_enable_tests(aui.network) -\ No newline at end of file -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.network) -+endif() -\ No newline at end of file -diff --git a/aui.sqlite/CMakeLists.txt b/aui.sqlite/CMakeLists.txt -index 6afd58f4..78a2a593 100644 ---- a/aui.sqlite/CMakeLists.txt -+++ b/aui.sqlite/CMakeLists.txt -@@ -11,4 +11,6 @@ target_include_directories(aui.sqlite PRIVATE 3rdparty/sqlite3) - aui_link(aui.sqlite PUBLIC aui::core) - aui_link(aui.sqlite PUBLIC aui::data) - --aui_enable_tests(aui.sqlite) -\ No newline at end of file -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.sqlite) -+endif () -\ No newline at end of file -diff --git a/aui.toolbox/CMakeLists.txt b/aui.toolbox/CMakeLists.txt -index c17cb1da..aa088ce4 100644 ---- a/aui.toolbox/CMakeLists.txt -+++ b/aui.toolbox/CMakeLists.txt -@@ -7,4 +7,6 @@ endif() - - aui_executable(aui.toolbox WIN32_SUBSYSTEM_CONSOLE EXPORT aui) - aui_link(aui.toolbox PRIVATE aui::core aui::crypt aui::image) --aui_enable_tests(aui.toolbox) -\ No newline at end of file -+if (NOT AUIB_DISABLE) -+ aui_enable_tests(aui.toolbox) -+endif () -\ No newline at end of file -diff --git a/aui.uitests/CMakeLists.txt b/aui.uitests/CMakeLists.txt -index 5070f0a3..e4188094 100644 ---- a/aui.uitests/CMakeLists.txt -+++ b/aui.uitests/CMakeLists.txt -@@ -8,9 +8,13 @@ aui_module(aui.uitests EXPORT aui) - - aui_link(aui.uitests PRIVATE aui::core aui::views) - --if (TARGET GTest::gmock) -- aui_link(aui.uitests PRIVATE GTest::gmock) --endif() -+if (AUIB_DISABLE) -+ aui_link(aui.uitests PRIVATE gmock::gmock) -+else () -+ if (TARGET GTest::gmock) -+ aui_link(aui.uitests PRIVATE GTest::gmock) -+ endif() -+endif () - - aui_enable_tests(aui.uitests) - aui_enable_benchmarks(aui.uitests) -diff --git a/aui.views/CMakeLists.txt b/aui.views/CMakeLists.txt -index dfe6b18b..c5c1fb27 100644 ---- a/aui.views/CMakeLists.txt -+++ b/aui.views/CMakeLists.txt -@@ -9,10 +9,14 @@ 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 -- ) -+ if (AUIB_DISABLE) -+ find_package(freetype CONFIG REQUIRED) -+ else () -+ 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 -+ ) -+ endif () - - if (NOT TARGET Freetype::Freetype) - message(FATAL_ERROR "Freetype not imported") -@@ -20,29 +24,40 @@ 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) -+ if (AUIB_DISABLE) -+ find_package(glew CONFIG REQUIRED) -+ else () -+ auib_import(GLEW https://github.com/aui-framework/glew-cmake -+ CMAKE_WORKING_DIR "build/cmake" -+ VERSION a80a1dc) -+ endif () - endif () - - aui_module(aui.views EXPORT aui) - aui_enable_tests(aui.views) - - if (AUI_PLATFORM_LINUX) -- auib_use_system_libs_begin() -- find_package(PkgConfig REQUIRED) -+ if (AUIB_DISABLE) -+ include(FindPkgConfig) -+ pkg_check_modules(DBUS REQUIRED IMPORTED_TARGET dbus-1) -+ pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) -+ aui_link(aui.views PRIVATE X11::X11 X11::Xrandr X11::Xcursor X11::Xi PkgConfig::DBUS PkgConfig::GTK3 Fontconfig::Fontconfig) -+ else () -+ auib_use_system_libs_begin() -+ find_package(PkgConfig REQUIRED) - -- pkg_check_modules(DBUS REQUIRED dbus-1) -- include_directories(${DBUS_INCLUDE_DIRS}) -- link_directories(${DBUS_LIBRARY_DIRS}) -+ pkg_check_modules(DBUS REQUIRED dbus-1) -+ 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(GTK3 REQUIRED gtk+-3.0) -+ include_directories(${GTK3_INCLUDE_DIRS}) -+ link_directories(${GTK3_LIBRARY_DIRS}) - -- auib_use_system_libs_end() -+ 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 ${DBUS_LIBRARIES} ${GTK3_LIBRARIES} Fontconfig::Fontconfig) -+ endif () - endif () - - if (NOT AUI_PLATFORM_WINDOWS) -@@ -92,17 +107,29 @@ if (OPENGL_FOUND OR ANDROID OR IOS) - aui_link(aui.views PRIVATE Freetype::Freetype) - aui_link(aui.views PRIVATE OpenGL::GL) - -- if (AUI_PLATFORM_LINUX) -- # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them -- set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") -+ if (AUIB_DISABLE) -+ if (AUI_PLATFORM_LINUX) -+ # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them -+ set_target_properties(glew::glew PROPERTIES INTERFACE_LINK_LIBRARIES "") -+ auib_use_system_libs_begin() -+ find_package(X11 REQUIRED) -+ find_package(Fontconfig REQUIRED) -+ auib_use_system_libs_end() -+ endif () -+ aui_link(aui.views PUBLIC glew::glew) -+ else () -+ if (AUI_PLATFORM_LINUX) -+ # glew defines unwanted dependencies to OpenGL which may vary from distro to distro; silence them -+ set_target_properties(GLEW::GLEW PROPERTIES INTERFACE_LINK_LIBRARIES "") - -- auib_use_system_libs_begin() -- find_package(X11 REQUIRED) -- find_package(Fontconfig REQUIRED) -- auib_use_system_libs_end() -+ auib_use_system_libs_begin() -+ find_package(X11 REQUIRED) -+ find_package(Fontconfig REQUIRED) -+ auib_use_system_libs_end() - -+ endif () -+ aui_link(aui.views PUBLIC GLEW::GLEW) - endif () -- aui_link(aui.views PUBLIC GLEW::GLEW) - - if (WIN32) - aui_link(aui.views PRIVATE dwmapi) -diff --git a/cmake/aui.build.cmake b/cmake/aui.build.cmake -index 90c53d45..f980b2a3 100644 ---- a/cmake/aui.build.cmake -+++ b/cmake/aui.build.cmake -@@ -218,23 +218,33 @@ function(aui_add_properties AUI_MODULE_NAME) - endfunction(aui_add_properties) - - # gtest --macro(_aui_import_gtest) -- if (NOT TARGET GTest::gtest) -- auib_import(GTest https://github.com/google/googletest -- VERSION v1.14.0 -- CMAKE_ARGS -Dgtest_force_shared_crt=TRUE -- LINK STATIC) -- set_property(TARGET GTest::gtest PROPERTY IMPORTED_GLOBAL TRUE) -- set_property(TARGET GTest::gmock PROPERTY IMPORTED_GLOBAL TRUE) -- endif() -+macro(_aui_import_gtest AUIB_DISABLE) -+ if (AUIB_DISABLE) -+ find_package(gtest CONFIG REQUIRED) -+ get_target_property(GTEST_TARGET_IMPORTED_GLOBAL gtest::gtest IMPORTED_GLOBAL) -+ if (NOT GTEST_TARGET_IMPORTED_GLOBAL) -+ set_target_properties(gtest::gtest PROPERTIES IMPORTED_GLOBAL TRUE) -+ endif () -+ find_package(gmock CONFIG REQUIRED) -+ get_target_property(GMOCK_TARGET_IMPORTED_GLOBAL gmock::gmock IMPORTED_GLOBAL) -+ if (NOT GMOCK_TARGET_IMPORTED_GLOBAL) -+ set_target_properties(gmock::gmock PROPERTIES IMPORTED_GLOBAL TRUE) -+ endif () -+ else () -+ if (NOT TARGET GTest::gtest) -+ auib_import(GTest https://github.com/google/googletest -+ VERSION v1.14.0 -+ CMAKE_ARGS -Dgtest_force_shared_crt=TRUE -+ LINK STATIC) -+ set_property(TARGET GTest::gtest PROPERTY IMPORTED_GLOBAL TRUE) -+ set_property(TARGET GTest::gmock PROPERTY IMPORTED_GLOBAL TRUE) -+ endif() -+ endif () - endmacro() - - macro(aui_enable_tests AUI_MODULE_NAME) - if (NOT CMAKE_CROSSCOMPILING) -- _aui_import_gtest() -- if (NOT TARGET GTest::gtest) -- message(FATAL_ERROR "GTest::gtest not found!") -- endif() -+ _aui_import_gtest(ON) - - enable_testing() - get_property(_source_dir TARGET ${AUI_MODULE_NAME} PROPERTY SOURCE_DIR) -@@ -268,7 +278,11 @@ macro(aui_enable_tests AUI_MODULE_NAME) - #gtest_add_tests(TARGET ${TESTS_MODULE_NAME}) - set_property(TARGET ${TESTS_MODULE_NAME} PROPERTY CXX_STANDARD 20) - target_include_directories(${TESTS_MODULE_NAME} PUBLIC tests) -- target_link_libraries(${TESTS_MODULE_NAME} PUBLIC GTest::gmock) -+ if (AUIB_DISABLE) -+ target_link_libraries(${TESTS_MODULE_NAME} PUBLIC gmock::gmock) -+ else () -+ target_link_libraries(${TESTS_MODULE_NAME} PUBLIC GTest::gmock) -+ endif () - - target_compile_definitions(${TESTS_MODULE_NAME} PUBLIC AUI_TESTS_MODULE=1) - -@@ -317,20 +331,32 @@ endmacro() - - # google benchmark - --macro(_aui_import_google_benchmark) -- if (NOT TARGET benchmark::benchmark) -- auib_import(benchmark https://github.com/google/benchmark -- VERSION v1.8.3 -- CMAKE_ARGS -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -- LINK STATIC) -- set_property(TARGET benchmark::benchmark PROPERTY IMPORTED_GLOBAL TRUE) -- endif() -+macro(_aui_import_google_benchmark AUIB_DISABLE) -+ if (AUIB_DISABLE) -+ find_package(benchmark CONFIG REQUIRED) -+ get_target_property(BENCHMARK_TARGET_IMPORTED_GLOBAL benchmark::benchmark IMPORTED_GLOBAL) -+ if (NOT BENCHMARK_TARGET_IMPORTED_GLOBAL) -+ set_target_properties(benchmark::benchmark PROPERTIES IMPORTED_GLOBAL TRUE) -+ endif () -+ get_target_property(BENCHMARK_MAIN_TARGET_IMPORTED_GLOBAL benchmark::benchmark_main IMPORTED_GLOBAL) -+ if (NOT BENCHMARK_MAIN_TARGET_IMPORTED_GLOBAL) -+ set_target_properties(benchmark::benchmark_main PROPERTIES IMPORTED_GLOBAL TRUE) -+ endif () -+ else () -+ if (NOT TARGET benchmark::benchmark) -+ auib_import(benchmark https://github.com/google/benchmark -+ VERSION v1.8.3 -+ CMAKE_ARGS -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -+ LINK STATIC) -+ set_property(TARGET benchmark::benchmark PROPERTY IMPORTED_GLOBAL TRUE) -+ endif() -+ endif () - endmacro() - - macro(aui_enable_benchmarks AUI_MODULE_NAME) - if (NOT CMAKE_CROSSCOMPILING) -- _aui_import_gtest() -- _aui_import_google_benchmark() -+ _aui_import_gtest(ON) -+ _aui_import_google_benchmark(ON) - if (NOT TARGET benchmark::benchmark) - message(FATAL_ERROR "benchmark::benchmark not found!") - endif() diff --git a/packages/a/aui/patches/v7.1.2/fix-backport-lunasvg.diff b/packages/a/aui/patches/v7.1.2/fix-backport-lunasvg.diff new file mode 100644 index 00000000000..08d5257d858 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/fix-backport-lunasvg.diff @@ -0,0 +1,21 @@ +diff --git a/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp b/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp +index 7b638202..c4449d5b 100644 +--- a/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp ++++ b/aui.image/src/AUI/Image/svg/SvgImageFactory.cpp +@@ -15,7 +15,15 @@ + + #include "SvgImageFactory.h" + #include "AUI/Common/AByteBuffer.h" +-#include ++#if defined(__has_include) ++ #if __has_include() ++ #include ++ #else ++ #include ++ #endif ++#else ++ #include ++#endif + + + SvgImageFactory::SvgImageFactory(AByteBufferView buf) { diff --git a/packages/a/aui/patches/v7.1.2/fix-msvc-pretty-function.diff b/packages/a/aui/patches/v7.1.2/fix-msvc-pretty-function.diff new file mode 100644 index 00000000000..5073151d397 --- /dev/null +++ b/packages/a/aui/patches/v7.1.2/fix-msvc-pretty-function.diff @@ -0,0 +1,50 @@ +diff --git a/aui.core/src/AUI/Reflect/AClass.h b/aui.core/src/AUI/Reflect/AClass.h +index 7cbf3cfc..acccb19e 100644 +--- a/aui.core/src/AUI/Reflect/AClass.h ++++ b/aui.core/src/AUI/Reflect/AClass.h +@@ -36,7 +36,13 @@ public: + name = name.substr(0, name.length() - 2); + return name; + #elif AUI_COMPILER_CLANG ++ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) + AString s = __PRETTY_FUNCTION__; ++ #elif defined(__FUNCSIG__) ++ AString s = __FUNCSIG__; ++ #else ++ AString s = __FUNCTION__; ++ #endif + auto b = s.find("=") + 1; + auto e = s.find("&", b); + e = std::min(s.find("]", b), e); +@@ -44,7 +50,13 @@ public: + result = result.trim(); + return result; + #else ++ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) + AString s = __PRETTY_FUNCTION__; ++ #elif defined(__FUNCSIG__) ++ AString s = __FUNCSIG__; ++ #else ++ AString s = __FUNCTION__; ++ #endif + auto b = s.find("with T = ") + 9; + return { s.begin() + b, s.end() - 1 }; + #endif +diff --git a/aui.core/src/AUI/Reflect/AEnumerate.h b/aui.core/src/AUI/Reflect/AEnumerate.h +index 99d9d281..9419a4b3 100644 +--- a/aui.core/src/AUI/Reflect/AEnumerate.h ++++ b/aui.core/src/AUI/Reflect/AEnumerate.h +@@ -39,7 +39,13 @@ namespace aui::enumerate::basic { + + AString result(begin, end); + #else ++ #if defined(__PRETTY_FUNCTION__) || defined(__GNUC__) || defined(__clang__) + AString s = __PRETTY_FUNCTION__; ++ #elif defined(__FUNCSIG__) ++ AString s = __FUNCSIG__; ++ #else ++ AString s = __FUNCTION__; ++ #endif + #if AUI_COMPILER_CLANG + auto end = s.rfind(']'); + #else diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 2aa2897eec5..7a371dea38f 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -7,7 +7,21 @@ package("aui") "https://github.com/aui-framework/aui.git") add_versions("v7.1.2", "a4cf965c50d75e20a319c9c8b231ad9c13c25a06ad303e1eb65d1ff141b1f85c") - add_patches("v7.1.2", "patches/v7.1.2/debundle.diff", "1eb3da88e82503e6a9a893c112b4dd97909341905fe0e28d3fb5a4d2a50075ea") + + add_patches("v7.1.2", "patches/v7.1.2/debundle-audio.diff", "464d798caaf366f3fadb689504584ad38b15af05c4f044c74c8290a151b082d9") + add_patches("v7.1.2", "patches/v7.1.2/debundle-build.diff", "92bfd68e28a703518c12cf51b898a6b75cacae1fec9384328562c47b003e9577") + add_patches("v7.1.2", "patches/v7.1.2/debundle-core.diff", "888ef698fc213dfdb624f5d9f5e39bcf92e395a70cf17e1540ed7a635b29e177") + add_patches("v7.1.2", "patches/v7.1.2/debundle-crypt.diff", "58045d168a8c7f2658554e0a3010579ec53b54e2c51f524a4fb61e5e4d6fc0a7") + add_patches("v7.1.2", "patches/v7.1.2/debundle-curl.diff", "937280a828ce0bc30a590606e7d65de55c9421d0650897c2d775e3731405a4b0") + add_patches("v7.1.2", "patches/v7.1.2/debundle-image.diff", "44bb7e78eab9629c92ef953ec1e0aca9e80712fe2488d6ffa804924d418ebf05") + add_patches("v7.1.2", "patches/v7.1.2/debundle-json-network.diff", "6d7d8da64cf85212e14757f7d24ac5ac6501dfd0ff3a4fcbe973c7c58c4f213c") + add_patches("v7.1.2", "patches/v7.1.2/debundle-main.diff", "f9f5400579465cf07087a91633571b8b01c73cdc8dcc3ef4144da16528d53f8a") + add_patches("v7.1.2", "patches/v7.1.2/debundle-sqlite.diff", "1728a4b9afc473acc81b16c544239e6f70a147c0623d894d59dd124e27c94311") + add_patches("v7.1.2", "patches/v7.1.2/debundle-toolbox.diff", "1ec1abf993eb7e583d32602e1ae8ee4d3358d156e9fac185c0d19ed85660bd3b") + add_patches("v7.1.2", "patches/v7.1.2/debundle-uitests.diff", "831a208eff22c5536ada4ea4a4e2496868977c2ee9b7d7e534bc6bdeae537d86") + add_patches("v7.1.2", "patches/v7.1.2/debundle-views.diff", "b691b46fc425f7c497de18b77b4ad2ac62cf61c983688f2402a50d727770e28f") + add_patches("v7.1.2", "patches/v7.1.2/fix-backport-lunasvg.diff", "daf24391b88e44bdb801b2c1ba36a695f95384d8157ccb23cfc635d5f30bea4a") + add_patches("v7.1.2", "patches/v7.1.2/fix-msvc-pretty-function.diff", "268f66f42594f0188fe50d33f5783e66f66024087097ebfdfef60c9768e151fd") add_patches("v7.1.2", "patches/v7.1.2/fix-osx-enforce-cpp-template.diff", "eef4147a8b037552887777cd497c190ecc22514bb11fb3a3d6ea433a78cce61b") add_deps("cmake") @@ -146,6 +160,16 @@ package("aui") "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" } + local glm = package:dep("glm") + if glm and not glm:is_system() then + local fetchinfo = glm:fetch() + if fetchinfo then + local includedirs = fetchinfo.includedirs or fetchinfo.sysincludedirs + if includedirs and #includedirs > 0 then + table.insert(configs, "-DGLM_INCLUDE_DIR=" .. table.concat(includedirs, " ")) + end + end + end local opt = {} if package:is_plat("macosx") then if package:config("shared") then From 552acec82e87631c1749077dd97e2fa92ffed1af Mon Sep 17 00:00:00 2001 From: Saikari Date: Wed, 23 Jul 2025 17:49:17 +0300 Subject: [PATCH 25/27] use glm from pkg-conf --- .../a/aui/patches/v7.1.2/debundle-core.diff | 20 ++++++++++++++----- packages/a/aui/xmake.lua | 17 ++++------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle-core.diff b/packages/a/aui/patches/v7.1.2/debundle-core.diff index b50456be222..b30cb91d03f 100644 --- a/packages/a/aui/patches/v7.1.2/debundle-core.diff +++ b/packages/a/aui/patches/v7.1.2/debundle-core.diff @@ -1,8 +1,8 @@ diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt -index 6aa1b07..5cb497f 100644 +index 6aa1b07..025bf35 100644 --- a/aui.core/CMakeLists.txt +++ b/aui.core/CMakeLists.txt -@@ -6,7 +6,9 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) +@@ -6,12 +6,18 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) option(AUI_ENABLE_DEATH_TESTS "Enable GTest death tests" ON) aui_module(aui.core EXPORT aui) @@ -13,7 +13,17 @@ index 6aa1b07..5cb497f 100644 aui_enable_benchmarks(aui.core) -@@ -49,8 +51,12 @@ if (NOT WIN32) + get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-if (GLM_INCLUDE_DIR) ++if (AUIB_DISABLE) ++ include(FindPkgConfig) ++ pkg_check_modules(GLM REQUIRED glm) ++ message(STATUS "Using pkg-config GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") ++elseif (GLM_INCLUDE_DIR) + message(STATUS "Using custom GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") + else() + set(GLM_INCLUDE_DIR "${SELF_DIR}/3rdparty/glm") +@@ -49,8 +55,12 @@ if (NOT WIN32) endif() if (AUI_PLATFORM_LINUX) @@ -28,7 +38,7 @@ index 6aa1b07..5cb497f 100644 set(_use_backtrace TRUE) else() -@@ -84,13 +90,17 @@ endif() +@@ -84,13 +94,17 @@ endif() if(_use_backtrace) message(STATUS "Stacktrace backend: backtrace") @@ -48,7 +58,7 @@ index 6aa1b07..5cb497f 100644 message(STATUS "Stacktrace backend: dbghelp") else() message(STATUS "Stacktrace backend: none") -@@ -146,17 +156,23 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) +@@ -146,17 +160,23 @@ if (AUI_SHARED_PTR_FIND_INSTANCES) endif() diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index 7a371dea38f..a965df102a5 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -10,7 +10,7 @@ package("aui") add_patches("v7.1.2", "patches/v7.1.2/debundle-audio.diff", "464d798caaf366f3fadb689504584ad38b15af05c4f044c74c8290a151b082d9") add_patches("v7.1.2", "patches/v7.1.2/debundle-build.diff", "92bfd68e28a703518c12cf51b898a6b75cacae1fec9384328562c47b003e9577") - add_patches("v7.1.2", "patches/v7.1.2/debundle-core.diff", "888ef698fc213dfdb624f5d9f5e39bcf92e395a70cf17e1540ed7a635b29e177") + add_patches("v7.1.2", "patches/v7.1.2/debundle-core.diff", "eceb483a998e2840534560940b2f2beddcf0a107f4cd388623011db9653ee567") add_patches("v7.1.2", "patches/v7.1.2/debundle-crypt.diff", "58045d168a8c7f2658554e0a3010579ec53b54e2c51f524a4fb61e5e4d6fc0a7") add_patches("v7.1.2", "patches/v7.1.2/debundle-curl.diff", "937280a828ce0bc30a590606e7d65de55c9421d0650897c2d775e3731405a4b0") add_patches("v7.1.2", "patches/v7.1.2/debundle-image.diff", "44bb7e78eab9629c92ef953ec1e0aca9e80712fe2488d6ffa804924d418ebf05") @@ -55,7 +55,7 @@ package("aui") on_component("core", function (package, component) package:add("includedirs", "aui.core/include") component:add("links", "aui.core") - package:add("deps", "fmt 9.1.0", "range-v3") + package:add("deps", "fmt 9.1.0", "range-v3", "glm") if package:is_plat("linux") then package:add("deps", "libbacktrace") component:add("syslinks", "threads", "dl") @@ -152,6 +152,7 @@ package("aui") end package:add("defines", "AUI_DEBUG=" .. (package:is_debug() and "1" or "0")) package:add("defines", "API_AUI_CORE=AUI_IMPORT") + package:add("defines", "GLM_ENABLE_EXPERIMENTAL=1") end) on_install("windows|!arm*", "macosx", function (package) @@ -159,17 +160,7 @@ package("aui") "-DAUI_INSTALL_RUNTIME_DEPENDENCIES=OFF", "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" - } - local glm = package:dep("glm") - if glm and not glm:is_system() then - local fetchinfo = glm:fetch() - if fetchinfo then - local includedirs = fetchinfo.includedirs or fetchinfo.sysincludedirs - if includedirs and #includedirs > 0 then - table.insert(configs, "-DGLM_INCLUDE_DIR=" .. table.concat(includedirs, " ")) - end - end - end + } local opt = {} if package:is_plat("macosx") then if package:config("shared") then From dce78aaa417ac0e1c22b21421dcd8869ffbe3786 Mon Sep 17 00:00:00 2001 From: Saikari Date: Wed, 23 Jul 2025 17:58:28 +0300 Subject: [PATCH 26/27] use INCLUDE_DIRS variable as INCLUDE_DIR is empty --- packages/a/aui/patches/v7.1.2/debundle-core.diff | 13 +++++++++++-- packages/a/aui/xmake.lua | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle-core.diff b/packages/a/aui/patches/v7.1.2/debundle-core.diff index b30cb91d03f..32d60132bc0 100644 --- a/packages/a/aui/patches/v7.1.2/debundle-core.diff +++ b/packages/a/aui/patches/v7.1.2/debundle-core.diff @@ -1,5 +1,5 @@ diff --git a/aui.core/CMakeLists.txt b/aui.core/CMakeLists.txt -index 6aa1b07..025bf35 100644 +index 6aa1b07..a2f5149 100644 --- a/aui.core/CMakeLists.txt +++ b/aui.core/CMakeLists.txt @@ -6,12 +6,18 @@ option(AUI_ENABLE_ASAN "Enable AddressSanitizer" OFF) @@ -18,11 +18,20 @@ index 6aa1b07..025bf35 100644 +if (AUIB_DISABLE) + include(FindPkgConfig) + pkg_check_modules(GLM REQUIRED glm) -+ message(STATUS "Using pkg-config GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") ++ message(STATUS "Using pkg-config GLM_INCLUDE_DIRS: ${GLM_INCLUDE_DIRS}") +elseif (GLM_INCLUDE_DIR) message(STATUS "Using custom GLM_INCLUDE_DIR: ${GLM_INCLUDE_DIR}") else() set(GLM_INCLUDE_DIR "${SELF_DIR}/3rdparty/glm") +@@ -21,7 +27,7 @@ else() + DESTINATION "aui.core/include/" + ) + endif() +-target_include_directories(aui.core PUBLIC $) ++target_include_directories(aui.core PUBLIC $) + + target_compile_definitions(aui.core PRIVATE UNICODE=1) + target_compile_definitions(aui.core PUBLIC NOMINMAX=1) @@ -49,8 +55,12 @@ if (NOT WIN32) endif() diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index a965df102a5..ca2d8a33498 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -10,7 +10,7 @@ package("aui") add_patches("v7.1.2", "patches/v7.1.2/debundle-audio.diff", "464d798caaf366f3fadb689504584ad38b15af05c4f044c74c8290a151b082d9") add_patches("v7.1.2", "patches/v7.1.2/debundle-build.diff", "92bfd68e28a703518c12cf51b898a6b75cacae1fec9384328562c47b003e9577") - add_patches("v7.1.2", "patches/v7.1.2/debundle-core.diff", "eceb483a998e2840534560940b2f2beddcf0a107f4cd388623011db9653ee567") + add_patches("v7.1.2", "patches/v7.1.2/debundle-core.diff", "0b3cf2140767e2f5232a3769301f1ca8af8c5e07ded55a8f8a98e627a597fd64") add_patches("v7.1.2", "patches/v7.1.2/debundle-crypt.diff", "58045d168a8c7f2658554e0a3010579ec53b54e2c51f524a4fb61e5e4d6fc0a7") add_patches("v7.1.2", "patches/v7.1.2/debundle-curl.diff", "937280a828ce0bc30a590606e7d65de55c9421d0650897c2d775e3731405a4b0") add_patches("v7.1.2", "patches/v7.1.2/debundle-image.diff", "44bb7e78eab9629c92ef953ec1e0aca9e80712fe2488d6ffa804924d418ebf05") @@ -160,7 +160,7 @@ package("aui") "-DAUI_INSTALL_RUNTIME_DEPENDENCIES=OFF", "-DAUIB_NO_PRECOMPILED=TRUE", "-DAUIB_DISABLE=ON" - } + } local opt = {} if package:is_plat("macosx") then if package:config("shared") then From 942a871d2332e2ddc033a5e7a5297bca1de5c5e0 Mon Sep 17 00:00:00 2001 From: Saikari Date: Wed, 23 Jul 2025 18:17:25 +0300 Subject: [PATCH 27/27] Promote compile definition GLM_ENABLE_EXPERIMENTAL=1 to top level CMake & use package defines to keep it --- packages/a/aui/patches/v7.1.2/debundle-main.diff | 7 ++++--- packages/a/aui/xmake.lua | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/a/aui/patches/v7.1.2/debundle-main.diff b/packages/a/aui/patches/v7.1.2/debundle-main.diff index c8cc90d1370..222602c5349 100644 --- a/packages/a/aui/patches/v7.1.2/debundle-main.diff +++ b/packages/a/aui/patches/v7.1.2/debundle-main.diff @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6902d56a..98ebd001 100644 +index 6902d56..a6d4b2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -64,9 +64,13 @@ function(define_aui_component AUI_COMPONENT_NAME) +@@ -64,9 +64,14 @@ function(define_aui_component AUI_COMPONENT_NAME) add_subdirectory("aui.${AUI_COMPONENT_NAME}") endfunction() @@ -11,6 +11,7 @@ index 6902d56a..98ebd001 100644 - CMAKE_ARGS -DZLIB_BUILD_EXAMPLES=OFF) +if (AUIB_DISABLE) + find_package(ZLIB REQUIRED) ++ add_compile_definitions(GLM_ENABLE_EXPERIMENTAL=1) +else () + auib_import(ZLIB https://github.com/aui-framework/zlib + VERSION 448a9c76a97202a21f68bd82e453dd743e944a3a @@ -19,7 +20,7 @@ index 6902d56a..98ebd001 100644 # define all components define_aui_component(core) -@@ -195,7 +199,9 @@ auib_precompiled_binary() +@@ -195,7 +200,9 @@ auib_precompiled_binary() # [auib_precompiled_binary] # test aui.boot on ci/cd diff --git a/packages/a/aui/xmake.lua b/packages/a/aui/xmake.lua index ca2d8a33498..130416a7ff0 100644 --- a/packages/a/aui/xmake.lua +++ b/packages/a/aui/xmake.lua @@ -15,7 +15,7 @@ package("aui") add_patches("v7.1.2", "patches/v7.1.2/debundle-curl.diff", "937280a828ce0bc30a590606e7d65de55c9421d0650897c2d775e3731405a4b0") add_patches("v7.1.2", "patches/v7.1.2/debundle-image.diff", "44bb7e78eab9629c92ef953ec1e0aca9e80712fe2488d6ffa804924d418ebf05") add_patches("v7.1.2", "patches/v7.1.2/debundle-json-network.diff", "6d7d8da64cf85212e14757f7d24ac5ac6501dfd0ff3a4fcbe973c7c58c4f213c") - add_patches("v7.1.2", "patches/v7.1.2/debundle-main.diff", "f9f5400579465cf07087a91633571b8b01c73cdc8dcc3ef4144da16528d53f8a") + add_patches("v7.1.2", "patches/v7.1.2/debundle-main.diff", "c1cac9dfbae14baaddb68837055a7a858c08786750a16cbbfe955a1f18e5878d") add_patches("v7.1.2", "patches/v7.1.2/debundle-sqlite.diff", "1728a4b9afc473acc81b16c544239e6f70a147c0623d894d59dd124e27c94311") add_patches("v7.1.2", "patches/v7.1.2/debundle-toolbox.diff", "1ec1abf993eb7e583d32602e1ae8ee4d3358d156e9fac185c0d19ed85660bd3b") add_patches("v7.1.2", "patches/v7.1.2/debundle-uitests.diff", "831a208eff22c5536ada4ea4a4e2496868977c2ee9b7d7e534bc6bdeae537d86")