From c1d7e285cc8a81e4f6a92d5935f0d43c5692f1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20P=C4=85czkowski?= Date: Tue, 18 May 2021 15:44:32 -0700 Subject: [rtaudio] add asio feature (#17617) --- ports/rtaudio/portfile.cmake | 8 +++++++- ports/rtaudio/remove-unused-variable.patch | 20 ++++++++++++++++++++ ports/rtaudio/vcpkg.json | 9 +++++++-- versions/baseline.json | 2 +- versions/r-/rtaudio.json | 5 +++++ 5 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 ports/rtaudio/remove-unused-variable.patch diff --git a/ports/rtaudio/portfile.cmake b/ports/rtaudio/portfile.cmake index 588fb6b8f..6c0c9c447 100644 --- a/ports/rtaudio/portfile.cmake +++ b/ports/rtaudio/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( REF 34a3752e0c8249dc1780d196cd24e745425f0c77 SHA512 00fea107f409f6dc43154aaf69aeffa1a3385031778b5f7d1ae1cc8337ed4ab92a7917cc9eade848dedd746016b6eff6234088619cb8d6a9a3f26a63efde493e HEAD_REF master + PATCHES remove-unused-variable.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) @@ -14,10 +15,15 @@ else() set(RTAUDIO_STATIC_MSVCRT OFF) endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + asio RTAUDIO_API_ASIO +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT} + OPTIONS -DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT} ${FEATURE_OPTIONS} ) vcpkg_install_cmake() diff --git a/ports/rtaudio/remove-unused-variable.patch b/ports/rtaudio/remove-unused-variable.patch new file mode 100644 index 000000000..504ddad97 --- /dev/null +++ b/ports/rtaudio/remove-unused-variable.patch @@ -0,0 +1,20 @@ +diff --git a/include/asiolist.cpp b/include/asiolist.cpp +index e4c73c2..333a662 100644 +--- a/include/asiolist.cpp ++++ b/include/asiolist.cpp +@@ -166,7 +166,6 @@ AsioDriverList::AsioDriverList () + LPASIODRVSTRUCT pdl; + LONG cr; + DWORD index = 0; +- BOOL fin = FALSE; + + numdrv = 0; + lpdrvlist = 0; +@@ -184,7 +183,6 @@ AsioDriverList::AsioDriverList () + #endif + lpdrvlist = newDrvStruct (hkEnum,keyname,0,lpdrvlist); + } +- else fin = TRUE; + } + if (hkEnum) RegCloseKey(hkEnum); + diff --git a/ports/rtaudio/vcpkg.json b/ports/rtaudio/vcpkg.json index 897e01d2c..212d58458 100644 --- a/ports/rtaudio/vcpkg.json +++ b/ports/rtaudio/vcpkg.json @@ -1,7 +1,12 @@ { "name": "rtaudio", - "version-date": "2021-01-25", + "version-date": "2021-04-30", "description": "A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO and WASAPI) operating systems.", "homepage": "https://github.com/thestk/rtaudio", - "supports": "!uwp" + "supports": "!uwp", + "features": { + "asio": { + "description": "Build with ASIO backend" + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index bc1fa46a7..43b0125e9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5413,7 +5413,7 @@ "port-version": 1 }, "rtaudio": { - "baseline": "2021-01-25", + "baseline": "2021-04-30", "port-version": 0 }, "rtlsdr": { diff --git a/versions/r-/rtaudio.json b/versions/r-/rtaudio.json index 8bf247d12..7881830e6 100644 --- a/versions/r-/rtaudio.json +++ b/versions/r-/rtaudio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "59166c851bb292b52492034aa3167e1be5142663", + "version-date": "2021-04-30", + "port-version": 0 + }, { "git-tree": "088d877f612f5f77cb47a93b0854491baebb5178", "version-date": "2021-01-25", -- cgit v1.2.3