From 22c598b9bff9f297217e13e2c1e9d76674b79031 Mon Sep 17 00:00:00 2001 From: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com> Date: Sun, 25 Jan 2026 09:31:50 +0100 Subject: [PATCH] [ableton-link] Update to 3.1.5 (#48997) Co-authored-by: Billy Robert O'Neal III --- .../correct_cmake_include_directory.patch | 20 ------- ports/ableton-link/fix_android_build.patch | 16 ++++++ ports/ableton-link/portfile.cmake | 52 ++++++++++--------- ...ce_asiosdk_download_by_vcpkg_asiosdk.patch | 23 ++++++++ ...e_local_asiostandalone_by_vcpkg_asio.patch | 41 ++++++++------- ports/ableton-link/vcpkg.json | 11 +++- scripts/ci.feature.baseline.txt | 4 -- versions/a-/ableton-link.json | 5 ++ versions/baseline.json | 2 +- 9 files changed, 104 insertions(+), 70 deletions(-) delete mode 100644 ports/ableton-link/correct_cmake_include_directory.patch create mode 100644 ports/ableton-link/fix_android_build.patch diff --git a/ports/ableton-link/correct_cmake_include_directory.patch b/ports/ableton-link/correct_cmake_include_directory.patch deleted file mode 100644 index 0250fb942d..0000000000 --- a/ports/ableton-link/correct_cmake_include_directory.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git "a/AbletonLinkConfig.cmake" "b/AbletonLinkConfig.cmake" -index 43b66e7..1e84fa5 100644 ---- "a/AbletonLinkConfig.cmake" -+++ "b/AbletonLinkConfig.cmake" -@@ -5,7 +5,7 @@ endif() - add_library(Ableton::Link IMPORTED INTERFACE) - set_property(TARGET Ableton::Link APPEND PROPERTY - INTERFACE_INCLUDE_DIRECTORIES -- ${CMAKE_CURRENT_LIST_DIR}/include -+ ${CMAKE_CURRENT_LIST_DIR}/../../include/ableton - ) - - # Force C++11 support for consuming targets -@@ -46,5 +46,5 @@ set_property(TARGET Ableton::Link APPEND PROPERTY - - set_property(TARGET Ableton::Link APPEND PROPERTY - INTERFACE_SOURCES -- ${CMAKE_CURRENT_LIST_DIR}/include/ableton/Link.hpp -+ ${CMAKE_CURRENT_LIST_DIR}/../../include/ableton/Link.hpp - ) diff --git a/ports/ableton-link/fix_android_build.patch b/ports/ableton-link/fix_android_build.patch new file mode 100644 index 0000000000..30aeebb6d9 --- /dev/null +++ b/ports/ableton-link/fix_android_build.patch @@ -0,0 +1,16 @@ +diff --git "a/AbletonLinkConfig.cmake" "b/AbletonLinkConfig.cmake" +index 43b66e7..1e84fa5 100644 +--- "a/cmake_include/ConfigureAbletonLink.cmake" ++++ "b/cmake_include/ConfigureAbletonLink.cmake" +@@ -30,6 +30,11 @@ function(ConfigureAbletonLink PATH_TO_LINK) + INTERFACE_COMPILE_DEFINITIONS + LINK_PLATFORM_WINDOWS=1 + ) ++ elseif(CMAKE_SYSTEM_NAME MATCHES "Android") ++ set_property(TARGET Ableton::Link APPEND PROPERTY ++ INTERFACE_COMPILE_DEFINITIONS ++ LINK_PLATFORM_LINUX=1 ++ ) + elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD|GNU") + set_property(TARGET Ableton::Link APPEND PROPERTY + INTERFACE_COMPILE_DEFINITIONS diff --git a/ports/ableton-link/portfile.cmake b/ports/ableton-link/portfile.cmake index 4bfcc1a315..795601233c 100644 --- a/ports/ableton-link/portfile.cmake +++ b/ports/ableton-link/portfile.cmake @@ -5,17 +5,19 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Ableton/link REF "Link-${VERSION}" - SHA512 889aa8cf56df19631a15cc4e245f3b7165a1d08aa199446de3b209c5be58904c11776899e9202900e73cc90ea63d366c6c3b2628657dac96db5a16a5217b3df7 + SHA512 21ab3f47b1b2a7961cae238ca846adf0190341e8379a33938824acc49d3b95d8823b61bc321b1dfcbb3864f740425ac81d8c5c581e882394e1edac230f4c34e4 HEAD_REF master PATCHES replace_local_asiostandalone_by_vcpkg_asio.patch replace_asiosdk_download_by_vcpkg_asiosdk.patch replace_local_catch_by_vcpkg_catch2.patch no-werror.patch + fix_android_build.patch ) + # Note that the dependencies ASIO and ASIOSDK are completely different things: # -ASIO (ASyncronous IO) is a cross-platform C++ library for network and low-level I/O programming -# -ASIOSDK is the SDK for the Steinberg ASIO (Audio Stream Input/Output) driver, for profesional Windows audio applications +# -ASIOSDK is the SDK for the Steinberg ASIO (Audio Stream Input/Output) driver, for professional Windows audio applications vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -50,35 +52,35 @@ vcpkg_cmake_configure( OPTIONS -DNEED_CATCH2=${NEED_CATCH2} -DLINK_BUILD_ASIO=${NEED_ASIOSDK} + ${FEATURE_OPTIONS} ) -if ("coretest" IN_LIST FEATURES) - vcpkg_cmake_build(TARGET LinkCoreTest) - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/LinkCoreTest${VCPKG_TARGET_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") -endif() -if ("discoverytest" IN_LIST FEATURES) - vcpkg_cmake_build(TARGET LinkDiscoveryTest) - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/LinkDiscoveryTest${VCPKG_TARGET_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") -endif() -if ("hut" IN_LIST FEATURES) - vcpkg_cmake_build(TARGET LinkHut) - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/LinkHut${VCPKG_TARGET_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") -endif() -if ("hutsilent" IN_LIST FEATURES) - vcpkg_cmake_build(TARGET LinkHutSilent) - file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/LinkHutSilent${VCPKG_TARGET_EXECUTABLE_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") -endif() +# Helper function to build and install helper executables +function(install_test_executable FEATURE_NAME TARGET_NAME) + if(${FEATURE_NAME} IN_LIST FEATURES) + vcpkg_cmake_build(TARGET ${TARGET_NAME}) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/${TARGET_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + if(NOT VCPKG_BUILD_TYPE) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/${TARGET_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + DESTINATION "${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}") + endif() + endif() +endfunction() + +# Install test executables +install_test_executable("coretest" "LinkCoreTest") +install_test_executable("discoverytest" "LinkDiscoveryTest") +install_test_executable("hut" "LinkHut") +install_test_executable("hutsilent" "LinkHutSilent") # We must not correct the CMake include path before build -vcpkg_apply_patches( - SOURCE_PATH "${SOURCE_PATH}" - PATCHES - correct_cmake_include_directory.patch -) +file(READ "${SOURCE_PATH}/cmake_include/ConfigureAbletonLink.cmake" CONFIG_CONTENT) +string(REPLACE "\${PATH_TO_LINK}/include/ableton/Link.hpp" "\${PATH_TO_LINK}/../../include/ableton/Link.hpp" CONFIG_CONTENT "${CONFIG_CONTENT}") +string(REPLACE "\${PATH_TO_LINK}/include" "\${PATH_TO_LINK}/../../include/ableton" CONFIG_CONTENT "${CONFIG_CONTENT}") +file(WRITE "${SOURCE_PATH}/cmake_include/ConfigureAbletonLink.cmake" "${CONFIG_CONTENT}") file(INSTALL "${SOURCE_PATH}/AbletonLinkConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/abletonlink") file(INSTALL "${SOURCE_PATH}/cmake_include/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/abletonlink/cmake_include/") file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include" PATTERN "CMakeLists.txt" EXCLUDE) - -# Handle copyright file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch b/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch index 77e3dc52fe..4d74ce93bc 100644 --- a/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch +++ b/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch @@ -46,3 +46,26 @@ diff --git "a/examples/CMakeLists.txt" "b/examples/CMakeLists.txt" endif() # _ _ _ +@@ -102,7 +96,20 @@ function(configure_linkhut_audio_sources target) + -DLINKHUT_AUDIO_PLATFORM_JACK=1 + ) + else() +- target_link_libraries(${target} asound portaudio) ++ if(LinkHut) ++ find_package(ALSA REQUIRED) ++ find_package(portaudio CONFIG REQUIRED) ++ if(CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(PORTAUDIO_LIB "${portaudio_DIR}/../../debug/lib/libportaudio.a") ++ else() ++ set(PORTAUDIO_LIB "${portaudio_DIR}/../../lib/libportaudio.a") ++ endif() ++ # PortAudio built with JACK support needs JACK library ++ find_library(JACK_LIB NAMES jack) ++ if(JACK_LIB) ++ target_link_libraries(${target} ALSA::ALSA ${PORTAUDIO_LIB} ${JACK_LIB}) ++ endif() ++ endif() + target_compile_definitions(${target} PRIVATE + -DLINKHUT_AUDIO_PLATFORM_PORTAUDIO=1 + ) + \ No newline at end of file diff --git a/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch b/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch index d9f1e0f48f..7bb9f7a71d 100644 --- a/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch +++ b/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch @@ -1,19 +1,22 @@ -diff a/cmake_include/AsioStandaloneConfig.cmake b/AsioStandaloneConfig.cmake - ---- a/cmake_include/AsioStandaloneConfig.cmake -+++ b/cmake_include/AsioStandaloneConfig.cmake -@@ -1,6 +1,10 @@ - add_library(AsioStandalone::AsioStandalone IMPORTED INTERFACE) - --set_property(TARGET AsioStandalone::AsioStandalone APPEND PROPERTY -- INTERFACE_INCLUDE_DIRECTORIES -- ${CMAKE_CURRENT_LIST_DIR}/../modules/asio-standalone/asio/include --) -+find_package(asio REQUIRED) -+if(asio_FOUND) -+ message(STATUS "Dependency asio found in ${asio_DIR}") -+ set_property(TARGET AsioStandalone::AsioStandalone APPEND PROPERTY -+ INTERFACE_INCLUDE_DIRECTORIES -+ ${asio_DIR}/../../include -+ ) -+endif() +diff a/cmake_include/ConfigureAsioStandalone.cmake b/ConfigureAsioStandalone.cmake + +--- a/cmake_include/ConfigureAsioStandalone.cmake ++++ b/cmake_include/ConfigureAsioStandalone.cmake +@@ -2,9 +2,13 @@ function(ConfigureAsioStandalone PATH_TO_LINK) + + add_library(AsioStandalone::AsioStandalone IMPORTED INTERFACE) + +- set_property(TARGET AsioStandalone::AsioStandalone APPEND PROPERTY +- INTERFACE_INCLUDE_DIRECTORIES +- ${PATH_TO_LINK}/modules/asio-standalone/asio/include +- ) ++ find_package(asio REQUIRED) ++ if(asio_FOUND) ++ message(STATUS "Dependency asio found in ${asio_DIR}") ++ set_property(TARGET AsioStandalone::AsioStandalone APPEND PROPERTY ++ INTERFACE_INCLUDE_DIRECTORIES ++ ${asio_DIR}/../../include ++ ) ++ endif() + + endfunction() diff --git a/ports/ableton-link/vcpkg.json b/ports/ableton-link/vcpkg.json index 9e95237a00..9ed2e768ef 100644 --- a/ports/ableton-link/vcpkg.json +++ b/ports/ableton-link/vcpkg.json @@ -1,6 +1,6 @@ { "name": "ableton-link", - "version": "3.1.2", + "version": "3.1.5", "description": "Ableton Link, a technology that synchronizes musical beat, tempo, and phase across multiple applications running on one or more devices.", "homepage": "https://www.ableton.com/en/link/", "documentation": "http://ableton.github.io/link/", @@ -33,10 +33,19 @@ }, "hut": { "description": "Build LinkHut command line tool", + "supports": "!android", "dependencies": [ + { + "name": "alsa", + "platform": "linux | android | freebsd | openbsd" + }, { "name": "asiosdk", "platform": "windows" + }, + { + "name": "portaudio", + "platform": "linux | android | freebsd | openbsd" } ] }, diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index 8871f2b76c..a8e1bc5f01 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -274,9 +274,6 @@ vtk[atlmfc,cgns,cuda,debugleaks,fontconfig,gdal,geojson,libharu,libtheora,mpi,ne # cascade 3fd:x64-uwp = cascade -ableton-link[hut]:arm64-uwp = cascade -ableton-link[hut]:arm64-windows = cascade -ableton-link[hut]:x64-uwp = cascade ace[xml-utils]:x64-linux = cascade ace[xml-utils](osx) = cascade activemq-cpp:arm64-windows = cascade @@ -1445,7 +1442,6 @@ zyre:arm64-uwp = cascade zyre:x64-uwp = cascade # failures -ableton-link[hut](linux) = feature-fails # libportaudiocpp0 must be installed in ci. See https://github.com/microsoft/vcpkg/pull/32144 adios2[cuda]:x64-windows-static = feature-fails # try_run() invoked in cross-compiling mode adios2[mpi]:x86-windows = feature-fails adios2[python](!uwp) = feature-fails # Could NOT find Python (missing: Python_NumPy_INCLUDE_DIRS NumPy) diff --git a/versions/a-/ableton-link.json b/versions/a-/ableton-link.json index d120450bbf..55d8f035b8 100644 --- a/versions/a-/ableton-link.json +++ b/versions/a-/ableton-link.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "aadc49c8dbd3d627de1a8e9de5f65c45efcae3d9", + "version": "3.1.5", + "port-version": 0 + }, { "git-tree": "6b47180236436bf9d91f8f42f011480011283298", "version": "3.1.2", diff --git a/versions/baseline.json b/versions/baseline.json index 6618bfc17a..bcb7deb12f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9,7 +9,7 @@ "port-version": 1 }, "ableton-link": { - "baseline": "3.1.2", + "baseline": "3.1.5", "port-version": 0 }, "abseil": {