mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:28:59 +08:00
[vcpkg baseline][rtaudio] Add feature alsa and fix dependency (#21613)
* [vcpkg baseline][rtaudio] Add feature alsa and fix dependency * version * Remove not needed apt item
This commit is contained in:
parent
4a7855818a
commit
68a2521617
19
ports/rtaudio/fix-alsa.patch
Normal file
19
ports/rtaudio/fix-alsa.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index a59e8bb..1334f5a 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -123,12 +123,12 @@ endif()
|
||||||
|
# ALSA
|
||||||
|
if (RTAUDIO_API_ALSA)
|
||||||
|
set(NEED_PTHREAD ON)
|
||||||
|
- find_package(ALSA)
|
||||||
|
+ find_package(ALSA REQUIRED)
|
||||||
|
if (NOT ALSA_FOUND)
|
||||||
|
message(FATAL_ERROR "ALSA API requested but no ALSA dev libraries found")
|
||||||
|
endif()
|
||||||
|
list(APPEND INCDIRS ${ALSA_INCLUDE_DIR})
|
||||||
|
- list(APPEND LINKLIBS ${ALSA_LIBRARY})
|
||||||
|
+ list(APPEND LINKLIBS ${ALSA_LIBRARY} dl)
|
||||||
|
list(APPEND PKGCONFIG_REQUIRES "alsa")
|
||||||
|
list(APPEND API_DEFS "-D__LINUX_ALSA__")
|
||||||
|
list(APPEND API_LIST "alsa")
|
@ -1,31 +1,22 @@
|
|||||||
vcpkg_fail_port_install(ON_TARGET "UWP")
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO thestk/rtaudio
|
REPO thestk/rtaudio
|
||||||
REF bc7ad66581947f810ff4460396bbbd1846b1e7c8
|
REF bc7ad66581947f810ff4460396bbbd1846b1e7c8
|
||||||
SHA512 ef5a41df15a8486550fb791ac21fcee4ecbf726fe9e91a56fcdd437cd554ea242f08c1061a9c6d5c261d721d86fbbcb32ce64db030976150862ed42a40137fc7
|
SHA512 ef5a41df15a8486550fb791ac21fcee4ecbf726fe9e91a56fcdd437cd554ea242f08c1061a9c6d5c261d721d86fbbcb32ce64db030976150862ed42a40137fc7
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
|
PATCHES fix-alsa.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VCPKG_HOST_IS_LINUX)
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" RTAUDIO_STATIC_MSVCRT)
|
||||||
message(WARNING "rtaudio requires ALSA on Linux; this is available on ubuntu via apt install libasound2-dev")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
|
||||||
set(RTAUDIO_STATIC_MSVCRT ON)
|
|
||||||
else()
|
|
||||||
set(RTAUDIO_STATIC_MSVCRT OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
FEATURES
|
FEATURES
|
||||||
asio RTAUDIO_API_ASIO
|
asio RTAUDIO_API_ASIO
|
||||||
|
alsa RTAUDIO_API_ALSA
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
PREFER_NINJA
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT}
|
-DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT}
|
||||||
-DRTAUDIO_API_JACK=OFF
|
-DRTAUDIO_API_JACK=OFF
|
||||||
@ -35,10 +26,9 @@ vcpkg_cmake_configure(
|
|||||||
|
|
||||||
vcpkg_cmake_install()
|
vcpkg_cmake_install()
|
||||||
vcpkg_cmake_config_fixup()
|
vcpkg_cmake_config_fixup()
|
||||||
|
vcpkg_fixup_pkgconfig()
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
|
|
||||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "rtaudio",
|
"name": "rtaudio",
|
||||||
"version-date": "2021-08-15",
|
"version-date": "2021-08-15",
|
||||||
"port-version": 1,
|
"port-version": 2,
|
||||||
"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.",
|
"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",
|
"homepage": "https://github.com/thestk/rtaudio",
|
||||||
"supports": "!uwp",
|
"supports": "!uwp",
|
||||||
@ -16,6 +16,12 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"features": {
|
"features": {
|
||||||
|
"alsa": {
|
||||||
|
"description": "Build ALSA API",
|
||||||
|
"dependencies": [
|
||||||
|
"alsa"
|
||||||
|
]
|
||||||
|
},
|
||||||
"asio": {
|
"asio": {
|
||||||
"description": "Build with ASIO backend"
|
"description": "Build with ASIO backend"
|
||||||
}
|
}
|
||||||
|
@ -36,9 +36,6 @@ APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako"
|
|||||||
# Additionally required by some packages to install additional python packages
|
# Additionally required by some packages to install additional python packages
|
||||||
APT_PACKAGES="$APT_PACKAGES python3-pip"
|
APT_PACKAGES="$APT_PACKAGES python3-pip"
|
||||||
|
|
||||||
# Additionally required by rtaudio
|
|
||||||
APT_PACKAGES="$APT_PACKAGES libasound2-dev"
|
|
||||||
|
|
||||||
# Additionally required by qtwebengine
|
# Additionally required by qtwebengine
|
||||||
APT_PACKAGES="$APT_PACKAGES nodejs"
|
APT_PACKAGES="$APT_PACKAGES nodejs"
|
||||||
|
|
||||||
|
@ -6042,7 +6042,7 @@
|
|||||||
},
|
},
|
||||||
"rtaudio": {
|
"rtaudio": {
|
||||||
"baseline": "2021-08-15",
|
"baseline": "2021-08-15",
|
||||||
"port-version": 1
|
"port-version": 2
|
||||||
},
|
},
|
||||||
"rtlsdr": {
|
"rtlsdr": {
|
||||||
"baseline": "2020-04-16",
|
"baseline": "2020-04-16",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "603a92374a5c37c3efb3bc48aaee17b64046f7be",
|
||||||
|
"version-date": "2021-08-15",
|
||||||
|
"port-version": 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "89b766b5d1b97a4e306dd358db18a2a5d0505824",
|
"git-tree": "89b766b5d1b97a4e306dd358db18a2a5d0505824",
|
||||||
"version-date": "2021-08-15",
|
"version-date": "2021-08-15",
|
||||||
|
Loading…
Reference in New Issue
Block a user