diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/ableton-link | |
Diffstat (limited to 'vcpkg/ports/ableton-link')
7 files changed, 335 insertions, 0 deletions
diff --git a/vcpkg/ports/ableton-link/correct_cmake_include_directory.patch b/vcpkg/ports/ableton-link/correct_cmake_include_directory.patch new file mode 100644 index 0000000..0250fb9 --- /dev/null +++ b/vcpkg/ports/ableton-link/correct_cmake_include_directory.patch @@ -0,0 +1,20 @@ +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/vcpkg/ports/ableton-link/no-werror.patch b/vcpkg/ports/ableton-link/no-werror.patch new file mode 100644 index 0000000..f81b7c8 --- /dev/null +++ b/vcpkg/ports/ableton-link/no-werror.patch @@ -0,0 +1,28 @@ +diff --git a/cmake_include/ConfigureCompileFlags.cmake b/cmake_include/ConfigureCompileFlags.cmake +index 63bdfec..80879f9 100644 +--- a/cmake_include/ConfigureCompileFlags.cmake ++++ b/cmake_include/ConfigureCompileFlags.cmake +@@ -25,7 +25,6 @@ if(UNIX) + set(build_flags_COMMON_LIST + ${build_flags_COMMON_LIST} + "-Weverything" +- "-Werror" + "-Wno-c++98-compat" + "-Wno-c++98-compat-pedantic" + "-Wno-deprecated" +@@ -44,7 +43,6 @@ if(UNIX) + elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) + set(build_flags_COMMON_LIST + ${build_flags_COMMON_LIST} +- "-Werror" + "-Wno-multichar" + ) + endif() +@@ -87,7 +85,6 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) + ${build_flags_COMMON_LIST} + "/MP" + "/Wall" +- "/WX" + "/EHsc" + + ############################# diff --git a/vcpkg/ports/ableton-link/portfile.cmake b/vcpkg/ports/ableton-link/portfile.cmake new file mode 100644 index 0000000..4bfcc1a --- /dev/null +++ b/vcpkg/ports/ableton-link/portfile.cmake @@ -0,0 +1,84 @@ +#header-only library +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Ableton/link + REF "Link-${VERSION}" + SHA512 889aa8cf56df19631a15cc4e245f3b7165a1d08aa199446de3b209c5be58904c11776899e9202900e73cc90ea63d366c6c3b2628657dac96db5a16a5217b3df7 + 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 +) +# 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 + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +FEATURES + "discoverytest" LinkDiscoveryTest + "coretest" LinkCoreTest + "hut" LinkHut + "hutsilent" LinkHutSilent +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/ci") +file(REMOVE_RECURSE "${SOURCE_PATH}/modules") +file(REMOVE_RECURSE "${SOURCE_PATH}/third_party") + +set(NEED_CATCH2 OFF) +if ("coretest" IN_LIST FEATURES) + set(NEED_CATCH2 ON) +endif() +if ("discoverytest" IN_LIST FEATURES) + set(NEED_CATCH2 ON) +endif() + +set(NEED_ASIOSDK OFF) +if ("hut" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + # Need Steinberg ASIO audio driver SDK (only this low-latency audio driver makes the developer tool 'hut' useful on Windows) + set(NEED_ASIOSDK ON) + endif() +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DNEED_CATCH2=${NEED_CATCH2} + -DLINK_BUILD_ASIO=${NEED_ASIOSDK} +) + +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() + +# We must not correct the CMake include path before build +vcpkg_apply_patches( + SOURCE_PATH "${SOURCE_PATH}" + PATCHES + correct_cmake_include_directory.patch +) + +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/vcpkg/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch b/vcpkg/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch new file mode 100644 index 0000000..77e3dc5 --- /dev/null +++ b/vcpkg/ports/ableton-link/replace_asiosdk_download_by_vcpkg_asiosdk.patch @@ -0,0 +1,48 @@ +diff --git "a/examples/CMakeLists.txt" "b/examples/CMakeLists.txt" + +--- "a/examples/CMakeLists.txt" ++++ "b/examples/CMakeLists.txt" +@@ -9,28 +9,22 @@ project(LinkExamples) + # + + if(WIN32) +- function(configure_asio asio_sdk_path_OUT) +- # ASIO-related path/file variables +- set(asio_download_root "https://download.steinberg.net/sdk_downloads") +- set(asio_file_name "asiosdk_2.3.3_2019-06-14.zip") +- set(asio_dir_name "asiosdk_2.3.3_2019-06-14") +- set(asio_working_dir "${CMAKE_BINARY_DIR}/modules") +- set(asio_output_path "${asio_working_dir}/${asio_file_name}") +- +- message(STATUS "Downloading ASIO SDK") +- file(DOWNLOAD "${asio_download_root}/${asio_file_name}" ${asio_output_path}) +- file(SHA1 ${asio_output_path} asio_zip_hash) +- message(" ASIO SDK SHA1: ${asio_zip_hash}") +- +- message(" Extracting ASIO SDK") +- execute_process(COMMAND ${CMAKE_COMMAND} -E tar "xf" ${asio_output_path} --format=zip +- WORKING_DIRECTORY ${asio_working_dir} +- INPUT_FILE ${asio_output_path} +- ) ++ if(LINK_BUILD_ASIO) ++ function(configure_asio asio_sdk_path_OUT) ++ # ASIO-related path/file variables ++ find_package(ASIOSDK) ++ if(NOT ASIOSDK_FOUND) ++ message(FATAL_ERROR "Steinberg ASIO audio driver SDK not found") ++ else() ++ message(STATUS "Steinberg ASIO audio driver SDK root dir: ${ASIOSDK_ROOT_DIR}") ++ endif() ++ set(asio_working_dir "${ASIOSDK_ROOT_DIR}") ++ set(asio_output_path "${CMAKE_BINARY_DIR}/modules/asiosdk") + +- # Set the ASIO SDK path for the caller +- set(${asio_sdk_path_OUT} "${asio_working_dir}/${asio_dir_name}" PARENT_SCOPE) +- endfunction() ++ # Set the ASIO SDK path for the caller ++ set(${asio_sdk_path_OUT} "${asio_working_dir}" PARENT_SCOPE) ++ endfunction() ++ endif() + endif() + + # _ _ _ diff --git a/vcpkg/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch b/vcpkg/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch new file mode 100644 index 0000000..d9f1e0f --- /dev/null +++ b/vcpkg/ports/ableton-link/replace_local_asiostandalone_by_vcpkg_asio.patch @@ -0,0 +1,19 @@ +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 --git a/vcpkg/ports/ableton-link/replace_local_catch_by_vcpkg_catch2.patch b/vcpkg/ports/ableton-link/replace_local_catch_by_vcpkg_catch2.patch new file mode 100644 index 0000000..01d7160 --- /dev/null +++ b/vcpkg/ports/ableton-link/replace_local_catch_by_vcpkg_catch2.patch @@ -0,0 +1,88 @@ +--- ableton-link.orig/cmake_include/CatchConfig.cmake
++++ ableton-link/cmake_include/CatchConfig.cmake
+@@ -1,6 +1,12 @@
+-add_library(Catch::Catch IMPORTED INTERFACE)
++if (NEED_CATCH2 MATCHES "ON")
++ add_library(Catch::Catch IMPORTED INTERFACE)
+
+-set_property(TARGET Catch::Catch APPEND PROPERTY
+- INTERFACE_INCLUDE_DIRECTORIES
+- ${CMAKE_CURRENT_LIST_DIR}/../third_party/catch
+-)
++ find_package(Catch2 CONFIG REQUIRED)
++ if(Catch2_FOUND)
++ message(STATUS "Dependency Catch2 found in ${Catch2_DIR}")
++ set_property(TARGET Catch::Catch APPEND PROPERTY
++ INTERFACE_INCLUDE_DIRECTORIES
++ ${Catch2_DIR}/../../include
++ )
++ endif()
++endif()
+
+
+--- "a/src/CMakeLists.txt"
++++ "b/src/CMakeLists.txt"
+@@ -77,4 +77,9 @@ function(configure_link_test_executable target)
+ function(configure_link_test_executable target)
+- target_link_libraries(${target} Catch::Catch Ableton::Link)
++ if (NEED_CATCH2 MATCHES "ON")
++ target_link_libraries(${target} Catch2::Catch2WithMain Ableton::Link)
+ target_compile_definitions(${target} PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING=1)
++ else()
++ target_link_libraries(${target} Ableton::Link)
++ target_compile_definitions(${target} PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING=0)
++ endif()
+ endfunction()
+
+
+--- "a/src/ableton/link/tst_LinearRegression.cpp"
++++ "b/src/ableton/link/tst_LinearRegression.cpp"
+@@ -22,6 +22,8 @@
+ #include <array>
+ #include <vector>
+
++using Catch::Approx;
++
+ namespace ableton
+ {
+ namespace link
+
+
+--- "a/src/ableton/link/tst_Beats.cpp"
++++ "b/src/ableton/link/tst_Beats.cpp"
+@@ -20,6 +20,8 @@
+ #include <ableton/link/Beats.hpp>
+ #include <ableton/test/CatchWrapper.hpp>
+
++using Catch::Approx;
++
+ namespace ableton
+ {
+ namespace link
+
+
+--- "a/src/ableton/link/tst_Median.cpp"
++++ "b/src/ableton/link/tst_Median.cpp"
+@@ -22,6 +22,8 @@
+ #include <array>
+ #include <vector>
+
++using Catch::Approx;
++
+ namespace ableton
+ {
+ namespace link
+
+
+--- "a/src/ableton/link/tst_Tempo.cpp"
++++ "b/src/ableton/link/tst_Tempo.cpp"
+@@ -20,6 +20,8 @@
+ #include <ableton/link/Tempo.hpp>
+ #include <ableton/test/CatchWrapper.hpp>
+
++using Catch::Approx;
++
+ namespace ableton
+ {
+ namespace link
+
diff --git a/vcpkg/ports/ableton-link/vcpkg.json b/vcpkg/ports/ableton-link/vcpkg.json new file mode 100644 index 0000000..9e95237 --- /dev/null +++ b/vcpkg/ports/ableton-link/vcpkg.json @@ -0,0 +1,48 @@ +{ + "name": "ableton-link", + "version": "3.1.2", + "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/", + "license": "GPL-2.0-or-later", + "dependencies": [ + "asio", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "coretest": { + "description": "Build LinkCoreTest suite", + "supports": "!uwp", + "dependencies": [ + "catch2" + ] + }, + "discoverytest": { + "description": "Build LinkDiscoveryTest suite", + "supports": "!uwp", + "dependencies": [ + "catch2" + ] + }, + "hut": { + "description": "Build LinkHut command line tool", + "dependencies": [ + { + "name": "asiosdk", + "platform": "windows" + } + ] + }, + "hutsilent": { + "description": "Build LinkHutSilent command line tool", + "supports": "!uwp" + } + } +} |