Fix build with ALSA compatibility port

This commit is contained in:
Max Brazhnikov 2010-08-05 18:10:06 +00:00
parent cdb1a5c08b
commit c5065a0269
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258826
2 changed files with 28 additions and 1 deletions

View file

@ -39,10 +39,17 @@ QT_COMPONENTS= corelib opengl dbus qt3support designer network svg qtestlib \
USE_OPENLDAP= yes
MAKE_JOBS_SAFE= yes
OPTIONS= PULSEAUDIO "KMix control for PulseAudio" off
OPTIONS= PULSEAUDIO "KMix control for PulseAudio" off \
ALSA "Build with ALSA compatibility library" off
.include <bsd.port.options.mk>
.if !defined(WITH_ALSA)
EXTRA_PATCHES+= ${FILESDIR}/extrapatch-CMakeLists.txt
.else
LIB_DEPENDS+= asound.2:${PORTSDIR}/audio/alsa-lib
.endif
.if defined(WITH_PULSEAUDIO)
CMAKE_ARGS+= -DWITH_PulseAudio:BOOL=ON
LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio

View file

@ -0,0 +1,20 @@
--- ./CMakeLists.txt.orig 2010-07-07 21:12:23.000000000 +0400
+++ ./CMakeLists.txt 2010-08-05 19:14:21.501854303 +0400
@@ -6,7 +6,6 @@
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
-find_package(Alsa)
set(PULSEAUDIO_MINIMUM_VERSION "0.9.12")
macro_optional_find_package(PulseAudio)
@@ -15,7 +14,8 @@
macro_optional_find_package(MusicBrainz)
macro_log_feature(MUSICBRAINZ_FOUND "MusicBrainz" "A library that provides access to metadata lookup on the MusicBrainz server" "http://www.musicbrainz.org" FALSE "" "Music metadata lookup for KDE multimedia applications. You need version 2.x of libmusicbrainz.")
-alsa_configure_file(${CMAKE_BINARY_DIR}/config-alsa.h)
+find_file(CONFIG_ALSA_H_CMAKE config-alsa.h.cmake ${CMAKE_MODULE_PATH})
+configure_file(${CONFIG_ALSA_H_CMAKE} ${CMAKE_BINARY_DIR}/config-alsa.h)
macro_optional_find_package(FFmpeg)
macro_log_feature(FFMPEG_FOUND "FFmpeg" "FFmpeg libraries" "FFmpeg" FALSE "http://www.ffmpeg.org" "FFmpeg required for FFMpegVideoPreview backend")