From 499996f93cc2348710d2f8a90b35423dedf5fa5d Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 16 Dec 2018 20:13:20 +0100 Subject: media-libs/phonon: Fix PulseAudio support with Qt 5.12, EAPI-7 bump Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner --- .../files/phonon-4.10.1-pulseaudio-qt-5.12.patch | 28 +++++++++++ media-libs/phonon/phonon-4.10.1-r1.ebuild | 58 ++++++++++++++++++++++ media-libs/phonon/phonon-9999.ebuild | 7 +-- 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 media-libs/phonon/files/phonon-4.10.1-pulseaudio-qt-5.12.patch create mode 100644 media-libs/phonon/phonon-4.10.1-r1.ebuild (limited to 'media-libs/phonon') diff --git a/media-libs/phonon/files/phonon-4.10.1-pulseaudio-qt-5.12.patch b/media-libs/phonon/files/phonon-4.10.1-pulseaudio-qt-5.12.patch new file mode 100644 index 000000000000..4b1dc5b6fbc4 --- /dev/null +++ b/media-libs/phonon/files/phonon-4.10.1-pulseaudio-qt-5.12.patch @@ -0,0 +1,28 @@ +From eef6dae58a19da4c6af90a0b7cce6378e527683d Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Mon, 10 Dec 2018 21:10:13 +0100 +Subject: Fix PulseAudio support with Qt 5.12 + +QAbstractEventDispatcher::instance()->metaObject()->className() now returns "QXcbGlibEventDispatcher", so the glib event loop test fails + +Differential Revision: https://phabricator.kde.org/D17486 +--- + phonon/pulsesupport.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/phonon/pulsesupport.cpp b/phonon/pulsesupport.cpp +index b7009b1..d324084 100644 +--- a/phonon/pulsesupport.cpp ++++ b/phonon/pulsesupport.cpp +@@ -840,7 +840,8 @@ PulseSupport::PulseSupport() + } + + // We require a glib event loop +- if (!QByteArray(QAbstractEventDispatcher::instance()->metaObject()->className()).contains("EventDispatcherGlib")) { ++ if (!QByteArray(QAbstractEventDispatcher::instance()->metaObject()->className()).contains("EventDispatcherGlib") && ++ !QByteArray(QAbstractEventDispatcher::instance()->metaObject()->className()).contains("GlibEventDispatcher")) { + qWarning("WARNING: Disabling PulseAudio integration for lack of GLib event loop."); + return; + } +-- +cgit v1.1 diff --git a/media-libs/phonon/phonon-4.10.1-r1.ebuild b/media-libs/phonon/phonon-4.10.1-r1.ebuild new file mode 100644 index 000000000000..011e7d0ba881 --- /dev/null +++ b/media-libs/phonon/phonon-4.10.1-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} != *9999* ]]; then + SRC_URI="mirror://kde/stable/phonon/${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-fbsd" +else + EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" ) + inherit git-r3 +fi + +inherit cmake-utils qmake-utils + +DESCRIPTION="KDE multimedia API" +HOMEPAGE="https://phonon.kde.org/" + +LICENSE="|| ( LGPL-2.1 LGPL-3 )" +SLOT="0" +IUSE="debug designer gstreamer pulseaudio +vlc" + +RDEPEND=" + !!dev-qt/qtphonon:4 + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + designer? ( dev-qt/designer:5 ) + pulseaudio? ( + dev-libs/glib:2 + >=media-sound/pulseaudio-0.9.21[glib] + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + kde-frameworks/extra-cmake-modules:5 + virtual/pkgconfig +" +PDEPEND=" + gstreamer? ( >=media-libs/phonon-gstreamer-4.9.0[qt5(+)] ) + vlc? ( >=media-libs/phonon-vlc-0.9.0[qt5(+)] ) +" + +PATCHES=( "${FILESDIR}/${P}-pulseaudio-qt-5.12.patch" ) + +src_configure() { + local mycmakeargs=( + -DPHONON_BUILD_PHONON4QT5=ON + -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE + -DPHONON_BUILD_DESIGNER_PLUGIN=$(usex designer) + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Declarative=ON + -DWITH_GLIB2=$(usex pulseaudio) + -DWITH_PulseAudio=$(usex pulseaudio) + -DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)"/qmake + ) + cmake-utils_src_configure +} diff --git a/media-libs/phonon/phonon-9999.ebuild b/media-libs/phonon/phonon-9999.ebuild index 478b0d3bb95d..abf73992ab1f 100644 --- a/media-libs/phonon/phonon-9999.ebuild +++ b/media-libs/phonon/phonon-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 if [[ ${PV} != *9999* ]]; then SRC_URI="mirror://kde/stable/phonon/${PV}/${P}.tar.xz" @@ -32,7 +32,8 @@ RDEPEND=" >=media-sound/pulseaudio-0.9.21[glib] ) " -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" kde-frameworks/extra-cmake-modules:5 virtual/pkgconfig " -- cgit v1.2.3-65-gdbad