commit:     665689c83d6d1b862699258f4edda4a26d8c2725
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Thu May 25 22:29:24 2017 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Thu May 25 22:29:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=665689c8

media-video/dcpomatic: Switch between rtaudio output options.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 media-video/dcpomatic/dcpomatic-2.11.7.ebuild | 14 ++++++++++++--
 media-video/dcpomatic/metadata.xml            |  5 +++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/media-video/dcpomatic/dcpomatic-2.11.7.ebuild 
b/media-video/dcpomatic/dcpomatic-2.11.7.ebuild
index d254592d7b4..d8f8113508b 100644
--- a/media-video/dcpomatic/dcpomatic-2.11.7.ebuild
+++ b/media-video/dcpomatic/dcpomatic-2.11.7.ebuild
@@ -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
 }
 

diff --git a/media-video/dcpomatic/metadata.xml 
b/media-video/dcpomatic/metadata.xml
index bc4c75f8360..1fe7fe154da 100644
--- a/media-video/dcpomatic/metadata.xml
+++ b/media-video/dcpomatic/metadata.xml
@@ -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>

Reply via email to