mgorny      15/07/25 16:12:08

  Added:                kmix-4.14.3-alsa-optional.patch
  Log:
  Fix automagic dep on alsa. 
https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/173 by a17r.
  
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 
EFB4464E!)

Revision  Changes    Path
1.1                  kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-apps/kmix/files/kmix-4.14.3-alsa-optional.patch?rev=1.1&content-type=text/plain

Index: kmix-4.14.3-alsa-optional.patch
===================================================================
commit 233f93b01ff05349793a8a2786750a2195f257ab
Author: Andreas Sturmlechner <andreas.sturmlech...@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"




Reply via email to