media-video/dcpomatic: Switch between rtaudio output options.
authorMichael Weber <xmw@gentoo.org>
Thu, 25 May 2017 22:29:24 +0000 (00:29 +0200)
committerMichael Weber <xmw@gentoo.org>
Thu, 25 May 2017 22:29:47 +0000 (00:29 +0200)
Package-Manager: Portage-2.3.6, Repoman-2.3.2

media-video/dcpomatic/dcpomatic-2.11.7.ebuild
media-video/dcpomatic/metadata.xml

index d254592d7b487b6f32e6d928fb916f4cdf654eef..d8f8113508ba3cfc597f1e0a36db0183fcb372a6 100644 (file)
@@ -14,7 +14,9 @@ SRC_URI="http://${PN}.com/downloads/${PV}/${P}.tar.bz2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="+gtk"
+IUSE="+alsa +gtk jack pulseaudio"
+
+REQUIRED_USE="^^ ( alsa jack pulseaudio )"
 
 RDEPEND="dev-cpp/cairomm
        dev-cpp/glibmm:2
@@ -32,7 +34,7 @@ RDEPEND="dev-cpp/cairomm
        media-libs/libsamplerate
        media-libs/libsndfile
        >=media-libs/libsub-1.2.1:1.0
-       media-libs/rtaudio
+       media-libs/rtaudio[alsa?,jack?,pulseaudio?]
        >=media-video/ffmpeg-3:=
        net-libs/libssh
        net-misc/curl
@@ -90,6 +92,14 @@ src_prepare() {
                epatch "${FILESDIR}"/${PN}-2.10.2-imagemagick-7.patch
        fi
 
+       if use alsa ; then
+               sed -e "s|RtAudio::LINUX_PULSE|RtAudio::LINUX_ALSA|"\
+                       -i src/wx/wx_util.h || die
+       elif use jack ; then
+               sed -e "s|RtAudio::LINUX_PULSE|RtAudio::UNIX_JACK|"\
+                       -i src/wx/wx_util.h || die
+       fi
+
        default
 }
 
index bc4c75f8360f1bf316b957bea63a4ded3980cc50..1fe7fe154da0f1b2b444a4a0127a25e37ce45abd 100644 (file)
@@ -10,4 +10,9 @@ DCP-o-matic is a free, open-source program to create Digital Cinema Packages (DC
 
 It can take files in many different formats, including MP4, Apple ProRes, MOV, AVI, VOB (from DVDs), M2TS (from Blu-Ray), WMV, MKV, JPEG, PNG, TIFF and lots of others.
 </longdescription>
+<use>
+       <flag name="alsa">Utilize alsa output of media-libs/rtaudio.</flag>
+       <flag name="jack">Utilize jack output of media-libs/rtaudio.</flag>
+       <flag name="pulseaudio">Utilize pulseaudio output of media-libs/rtaudio.</flag>
+</use>
 </pkgmetadata>