diff options
Diffstat (limited to 'kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch')
-rw-r--r-- | kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch b/kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch new file mode 100644 index 000000000000..4f620fbac828 --- /dev/null +++ b/kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch @@ -0,0 +1,47 @@ +commit 233f93b01ff05349793a8a2786750a2195f257ab +Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com> +Date: Sat Jul 11 15:48:35 2015 +0200 + + Fix build w/ optional alsa, make HAVE_LIBASOUND2 work + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c829005..17c106d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,8 +9,6 @@ include(MacroLibrary) + # Do not yet REQUIRE Phonon. Hint: As long as we do not find_package(), ${KDE4_PHONON_LIBS} will be empty below, but that should not hurt. + #find_package(Phonon REQUIRED) + +-find_package(Alsa) +- + set(PA_VER "0.9.16") + macro_optional_find_package(PulseAudio "${PA_VER}") + macro_log_feature(PULSEAUDIO_FOUND "PulseAudio" "PulseAudio Audio Server" +@@ -20,8 +18,11 @@ macro_optional_find_package(Canberra) + macro_log_feature(CANBERRA_FOUND "libcanberra" "libcanberra audio library" + "http://0pointer.de/lennart/projects/libcanberra/" FALSE "" "libcanberra is needed for kmix sound feedback") + +-alsa_configure_file(${CMAKE_BINARY_DIR}/config-alsa.h) +- ++find_package(Alsa) ++if(ALSA_FOUND) ++ alsa_configure_file(${CMAKE_BINARY_DIR}/config-alsa.h) ++ add_definitions(-DHAVE_LIBASOUND2) ++endif(ALSA_FOUND) + + add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS} ) + add_definitions(-DKDE_DEFAULT_DEBUG_AREA=67100) +diff --git a/backends/kmix-backends.cpp b/backends/kmix-backends.cpp +index 14ecfb3..1397099 100644 +--- a/backends/kmix-backends.cpp ++++ b/backends/kmix-backends.cpp +@@ -23,7 +23,9 @@ + /* This code is being #include'd from mixer.cpp */ + + #include <config.h> ++#ifdef HAVE_LIBASOUND2 + #include <config-alsa.h> ++#endif + + #include "mixer_backend.h" + #include "core/mixer.h" |