Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ports/rtaudio/fix-alsa.patch
Original file line number Diff line number Diff line change
@@ -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")
24 changes: 7 additions & 17 deletions ports/rtaudio/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
vcpkg_fail_port_install(ON_TARGET "UWP")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have "supports": "!uwp", in manifest file.


vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO thestk/rtaudio
REF bc7ad66581947f810ff4460396bbbd1846b1e7c8
SHA512 ef5a41df15a8486550fb791ac21fcee4ecbf726fe9e91a56fcdd437cd554ea242f08c1061a9c6d5c261d721d86fbbcb32ce64db030976150862ed42a40137fc7
HEAD_REF master
PATCHES fix-alsa.patch
)

if(VCPKG_HOST_IS_LINUX)
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()
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" RTAUDIO_STATIC_MSVCRT)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
asio RTAUDIO_API_ASIO
alsa RTAUDIO_API_ALSA
)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT}
-DRTAUDIO_API_JACK=OFF
Expand All @@ -35,10 +26,9 @@ vcpkg_cmake_configure(

vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
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)

vcpkg_fixup_pkgconfig()
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
8 changes: 7 additions & 1 deletion ports/rtaudio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtaudio",
"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.",
"homepage": "https://github.com/thestk/rtaudio",
"supports": "!uwp",
Expand All @@ -16,6 +16,12 @@
}
],
"features": {
"alsa": {
"description": "Build ALSA API",
"dependencies": [
"alsa"
]
},
"asio": {
"description": "Build with ASIO backend"
}
Expand Down
3 changes: 0 additions & 3 deletions scripts/azure-pipelines/linux/provision-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako"
# Additionally required by some packages to install additional python packages
APT_PACKAGES="$APT_PACKAGES python3-pip"

# Additionally required by rtaudio
APT_PACKAGES="$APT_PACKAGES libasound2-dev"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alsa provides the same library and same headers:

alsa:/debug/lib/libasound.a
alsa:/debug/lib/libatopology.a
alsa:/debug/lib/pkgconfig/alsa-topology.pc
alsa:/debug/lib/pkgconfig/alsa.pc
alsa:/include/alsa/asoundef.h
alsa:/include/alsa/asoundlib.h
alsa:/include/alsa/conf.h
alsa:/include/alsa/control.h
alsa:/include/alsa/control_external.h
alsa:/include/alsa/control_plugin.h
alsa:/include/alsa/error.h
alsa:/include/alsa/global.h
alsa:/include/alsa/hwdep.h
alsa:/include/alsa/input.h
alsa:/include/alsa/mixer.h
alsa:/include/alsa/mixer_abst.h
alsa:/include/alsa/output.h
alsa:/include/alsa/pcm.h
alsa:/include/alsa/pcm_external.h
alsa:/include/alsa/pcm_extplug.h
alsa:/include/alsa/pcm_ioplug.h
alsa:/include/alsa/pcm_old.h
alsa:/include/alsa/pcm_plugin.h
alsa:/include/alsa/pcm_rate.h
alsa:/include/alsa/rawmidi.h
alsa:/include/alsa/seq.h
alsa:/include/alsa/seq_event.h
alsa:/include/alsa/seq_midi_event.h
alsa:/include/alsa/seqmid.h
alsa:/include/alsa/sound/asoc.h
alsa:/include/alsa/sound/asound_fm.h
alsa:/include/alsa/sound/emu10k1.h
alsa:/include/alsa/sound/hdsp.h
alsa:/include/alsa/sound/hdspm.h
alsa:/include/alsa/sound/sb16_csp.h
alsa:/include/alsa/sound/sscape_ioctl.h
alsa:/include/alsa/sound/tlv.h
alsa:/include/alsa/sound/type_compat.h
alsa:/include/alsa/sound/uapi/asoc.h
alsa:/include/alsa/sound/uapi/asound_fm.h
alsa:/include/alsa/sound/uapi/emu10k1.h
alsa:/include/alsa/sound/uapi/hdsp.h
alsa:/include/alsa/sound/uapi/hdspm.h
alsa:/include/alsa/sound/uapi/sb16_csp.h
alsa:/include/alsa/sound/uapi/sscape_ioctl.h
alsa:/include/alsa/sound/uapi/tlv.h
alsa:/include/alsa/timer.h
alsa:/include/alsa/topology.h
alsa:/include/alsa/use-case.h
alsa:/include/alsa/version.h
alsa:/include/asoundlib.h
alsa:/include/sys/asoundlib.h
alsa:/lib/libasound.a
alsa:/lib/libatopology.a
alsa:/lib/pkgconfig/alsa-topology.pc
alsa:/lib/pkgconfig/alsa.pc
alsa:/share/alsa/aclocal/alsa.m4
alsa:/share/alsa/alsa.conf
alsa:/share/alsa/cards/AACI.conf
alsa:/share/alsa/cards/ATIIXP-MODEM.conf
alsa:/share/alsa/cards/ATIIXP-SPDMA.conf
alsa:/share/alsa/cards/ATIIXP.conf
alsa:/share/alsa/cards/AU8810.conf
alsa:/share/alsa/cards/AU8820.conf
alsa:/share/alsa/cards/AU8830.conf
alsa:/share/alsa/cards/Audigy.conf
alsa:/share/alsa/cards/Audigy2.conf
alsa:/share/alsa/cards/Aureon51.conf
alsa:/share/alsa/cards/Aureon71.conf
alsa:/share/alsa/cards/CA0106.conf
alsa:/share/alsa/cards/CMI8338-SWIEC.conf
alsa:/share/alsa/cards/CMI8338.conf
alsa:/share/alsa/cards/CMI8738-MC6.conf
alsa:/share/alsa/cards/CMI8738-MC8.conf
alsa:/share/alsa/cards/CMI8788.conf
alsa:/share/alsa/cards/CS46xx.conf
alsa:/share/alsa/cards/EMU10K1.conf
alsa:/share/alsa/cards/EMU10K1X.conf
alsa:/share/alsa/cards/ENS1370.conf
alsa:/share/alsa/cards/ENS1371.conf
alsa:/share/alsa/cards/ES1968.conf
alsa:/share/alsa/cards/Echo_Echo3G.conf
alsa:/share/alsa/cards/FM801.conf
alsa:/share/alsa/cards/FWSpeakers.conf
alsa:/share/alsa/cards/FireWave.conf
alsa:/share/alsa/cards/GUS.conf
alsa:/share/alsa/cards/HDA-Intel.conf
alsa:/share/alsa/cards/HdmiLpeAudio.conf
alsa:/share/alsa/cards/ICE1712.conf
alsa:/share/alsa/cards/ICE1724.conf
alsa:/share/alsa/cards/ICH-MODEM.conf
alsa:/share/alsa/cards/ICH.conf
alsa:/share/alsa/cards/ICH4.conf
alsa:/share/alsa/cards/Loopback.conf
alsa:/share/alsa/cards/Maestro3.conf
alsa:/share/alsa/cards/NFORCE.conf
alsa:/share/alsa/cards/PC-Speaker.conf
alsa:/share/alsa/cards/PMac.conf
alsa:/share/alsa/cards/PMacToonie.conf
alsa:/share/alsa/cards/PS3.conf
alsa:/share/alsa/cards/RME9636.conf
alsa:/share/alsa/cards/RME9652.conf
alsa:/share/alsa/cards/SB-XFi.conf
alsa:/share/alsa/cards/SI7018.conf
alsa:/share/alsa/cards/TRID4DWAVENX.conf
alsa:/share/alsa/cards/USB-Audio.conf
alsa:/share/alsa/cards/VIA686A.conf
alsa:/share/alsa/cards/VIA8233.conf
alsa:/share/alsa/cards/VIA8233A.conf
alsa:/share/alsa/cards/VIA8237.conf
alsa:/share/alsa/cards/VX222.conf
alsa:/share/alsa/cards/VXPocket.conf
alsa:/share/alsa/cards/VXPocket440.conf
alsa:/share/alsa/cards/YMF744.conf
alsa:/share/alsa/cards/aliases.conf
alsa:/share/alsa/cards/pistachio-card.conf
alsa:/share/alsa/cards/vc4-hdmi.conf
alsa:/share/alsa/copyright
alsa:/share/alsa/ctl/default.conf
alsa:/share/alsa/pcm/center_lfe.conf
alsa:/share/alsa/pcm/default.conf
alsa:/share/alsa/pcm/dmix.conf
alsa:/share/alsa/pcm/dpl.conf
alsa:/share/alsa/pcm/dsnoop.conf
alsa:/share/alsa/pcm/front.conf
alsa:/share/alsa/pcm/hdmi.conf
alsa:/share/alsa/pcm/iec958.conf
alsa:/share/alsa/pcm/modem.conf
alsa:/share/alsa/pcm/rear.conf
alsa:/share/alsa/pcm/side.conf
alsa:/share/alsa/pcm/surround21.conf
alsa:/share/alsa/pcm/surround40.conf
alsa:/share/alsa/pcm/surround41.conf
alsa:/share/alsa/pcm/surround50.conf
alsa:/share/alsa/pcm/surround51.conf
alsa:/share/alsa/pcm/surround71.conf
alsa:/share/alsa/vcpkg_abi_info.txt
alsa:/tools/alsa/bin/aserver
alsa:/tools/alsa/debug/bin/aserver


# Additionally required by qtwebengine
APT_PACKAGES="$APT_PACKAGES nodejs"

Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6042,7 +6042,7 @@
},
"rtaudio": {
"baseline": "2021-08-15",
"port-version": 1
"port-version": 2
},
"rtlsdr": {
"baseline": "2020-04-16",
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/rtaudio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "603a92374a5c37c3efb3bc48aaee17b64046f7be",
"version-date": "2021-08-15",
"port-version": 2
},
{
"git-tree": "89b766b5d1b97a4e306dd358db18a2a5d0505824",
"version-date": "2021-08-15",
Expand Down