commit:     d945698d38bd79ea0737872b8507f506341f1d2b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 10 19:45:26 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 10 19:45:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d945698d

kde-frameworks/knotifyconfig: Fix build with USE -phonon

Closes: https://bugs.gentoo.org/672866
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../knotifyconfig-5.53.0-phonon-optional.patch     | 48 ++++++++++++++++++++++
 .../knotifyconfig/knotifyconfig-5.53.0.ebuild      |  2 +
 2 files changed, 50 insertions(+)

diff --git 
a/kde-frameworks/knotifyconfig/files/knotifyconfig-5.53.0-phonon-optional.patch 
b/kde-frameworks/knotifyconfig/files/knotifyconfig-5.53.0-phonon-optional.patch
new file mode 100644
index 00000000000..0854b76da84
--- /dev/null
+++ 
b/kde-frameworks/knotifyconfig/files/knotifyconfig-5.53.0-phonon-optional.patch
@@ -0,0 +1,48 @@
+From 78a1dcc794f57be993ada7c6f129586ebb6b181e Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heire...@exherbo.org>
+Date: Mon, 10 Dec 2018 16:15:08 +0100
+Subject: Fix build without Phonon
+
+Summary:
+f6d55baf5aa88eaab6b2f96c025064f081d13cea replaced ${PHONON_LIBS} with
+Phonon's imported target. This breaks in the case when Phonon isn't
+found or disabled via -DCMAKE_DISABLE_FIND_PACKAGES_Phonon4Qt5=TRUE
+because the imported target isn't known. It worked previously because
+${PHONON_LIBS} was just empty when Phonon wasn't available.
+
+Test Plan:
+Building without phonon works now and and it still builds
+with phonon available and successfully links to it.
+
+Subscribers: kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D17479
+---
+ src/CMakeLists.txt | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3dd0039..b93cabc 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -27,9 +27,15 @@ target_link_libraries(KF5NotifyConfig
+         PRIVATE
+             KF5::I18n
+             KF5::KIOWidgets     # KUrlRequester
+-            Phonon::phonon4qt5
+             Qt5::DBus)
+ 
++if(HAVE_PHONON)
++    target_link_libraries(KF5NotifyConfig
++        PRIVATE
++            Phonon::phonon4qt5
++    )
++endif()
++
+ set_target_properties(KF5NotifyConfig PROPERTIES
+    VERSION      ${KNOTIFYCONFIG_VERSION_STRING}
+    SOVERSION    ${KNOTIFYCONFIG_SOVERSION}
+-- 
+cgit v1.1

diff --git a/kde-frameworks/knotifyconfig/knotifyconfig-5.53.0.ebuild 
b/kde-frameworks/knotifyconfig/knotifyconfig-5.53.0.ebuild
index 7c834ad4baf..65aca3a9a07 100644
--- a/kde-frameworks/knotifyconfig/knotifyconfig-5.53.0.ebuild
+++ b/kde-frameworks/knotifyconfig/knotifyconfig-5.53.0.ebuild
@@ -22,3 +22,5 @@ RDEPEND="
        phonon? ( media-libs/phonon[qt5(+)] )
 "
 DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-phonon-optional.patch" )

Reply via email to