summaryrefslogtreecommitdiff
path: root/media-sound/audacity/files/audacity-3.2.3-allow-overriding-alsa-jack.patch
blob: 53ac8edc33fbfd14b654d43aabe571c3501fd4fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From e46dbcb9763f4367705c66009703f15ff0ff5558 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Sat, 17 Dec 2022 21:13:56 +0100
Subject: [PATCH] portmixer: Allow overriding PA_HAS_{ALSA,JACK}

Not included for OSS as OSS is always included AFAICT.
---
 CMakeLists.txt                   | 3 +++
 lib-src/portmixer/CMakeLists.txt | 9 ++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42e765691..c18a939e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -624,6 +624,9 @@ cmd_option( ${_OPT}use_portmixer "Build PortMixer support into Audacity" On)
 if( ${_OPT}use_portmixer )
    set(USE_PORTMIXER Yes)
    add_subdirectory( "lib-src/portmixer" )
+else()
+  # Suppress bogus warnings about unused variables
+  set (unusedIgnore "${PA_HAS_ALSA}${PA_HAS_JACK}${PA_HAS_OSS}")
 endif()
 
 cmd_option( ${_OPT}use_nyquist "Build Nyquist support into Audacity" On)
diff --git a/lib-src/portmixer/CMakeLists.txt b/lib-src/portmixer/CMakeLists.txt
index 65a384fa0..1ddc8ed50 100644
--- a/lib-src/portmixer/CMakeLists.txt
+++ b/lib-src/portmixer/CMakeLists.txt
@@ -8,9 +8,12 @@ if (UNIX AND NOT APPLE)
    include(CheckIncludeFile)
    set(CMAKE_REQUIRED_LIBRARIES PortAudio::PortAudio)
 
-   check_include_file( "pa_jack.h" PA_HAS_JACK )
-
-   check_include_file( "pa_linux_alsa.h" PA_HAS_ALSA )
+   if ( NOT DEFINED PA_HAS_JACK )
+     check_include_file( "pa_jack.h" PA_HAS_JACK )
+   endif()
+   if ( NOT DEFINED PA_HAS_ALSA )
+     check_include_file( "pa_linux_alsa.h" PA_HAS_ALSA )
+   endif()
    if( PA_HAS_ALSA )
       find_package( ALSA REQUIRED QUIET )
    endif()
-- 
2.39.0