media-libs/phonon-gstreamer: Fix build with Qt 5.11_beta3
authorAndreas Sturmlechner <asturm@gentoo.org>
Fri, 13 Apr 2018 21:53:17 +0000 (23:53 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Fri, 13 Apr 2018 23:01:38 +0000 (01:01 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

media-libs/phonon-gstreamer/files/phonon-gstreamer-4.9.0-qt-5.11.patch [new file with mode: 0644]
media-libs/phonon-gstreamer/phonon-gstreamer-4.9.0-r2.ebuild

diff --git a/media-libs/phonon-gstreamer/files/phonon-gstreamer-4.9.0-qt-5.11.patch b/media-libs/phonon-gstreamer/files/phonon-gstreamer-4.9.0-qt-5.11.patch
new file mode 100644 (file)
index 0000000..1e50005
--- /dev/null
@@ -0,0 +1,62 @@
+From 38532b45ea32d5355cc19ff32ef69c2f462cad5d Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Fri, 13 Apr 2018 23:47:34 +0200
+Subject: [PATCH] Fix build with Qt 5.11_beta3 (dropping qt5_use_modules)
+
+Also replace automoc4_add_library with add_library.
+---
+ gstreamer/CMakeLists.txt | 26 +++++++++++++++-----------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/gstreamer/CMakeLists.txt b/gstreamer/CMakeLists.txt
+index cb01285c..4536d042 100644
+--- a/gstreamer/CMakeLists.txt
++++ b/gstreamer/CMakeLists.txt
+@@ -104,18 +104,26 @@ if (BUILD_X11RENDERER)
+   add_definitions(-DBUILD_X11RENDERER)
+ endif()
+-automoc4_add_library(phonon_gstreamer MODULE ${phonon_gstreamer_SRCS})
++add_library(phonon_gstreamer MODULE ${phonon_gstreamer_SRCS})
+ set_target_properties(phonon_gstreamer PROPERTIES
+  PREFIX ""
+  AUTOMOC_MOC_OPTIONS ${AUTOMOC_MOC_OPTIONS}
+ )
+-qt5_use_modules(phonon_gstreamer Core Widgets)
+-
+-if(Qt5X11Extras_FOUND)
+-  qt5_use_modules(phonon_gstreamer X11Extras)
+-  target_link_libraries(phonon_gstreamer Qt5::X11Extras)
+-endif(Qt5X11Extras_FOUND)
++if(PHONON_BUILD_PHONON4QT5)
++    target_link_libraries(phonon_gstreamer Qt5::Core Qt5::Widgets)
++    if(Qt5X11Extras_FOUND)
++        target_link_libraries(phonon_gstreamer Qt5::X11Extras)
++    endif()
++    if(OPENGL_FOUND)
++        target_link_libraries(phonon_gstreamer Qt5::OpenGL ${OPENGL_gl_LIBRARY})
++    endif()
++else()
++    target_link_libraries(phonon_gstreamer ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
++    if(OPENGL_FOUND)
++        target_link_libraries(phonon_gstreamer ${QT_QTOPENGL_LIBRARY} ${OPENGL_gl_LIBRARY})
++    endif()
++endif()
+ target_link_libraries(phonon_gstreamer
+   ${PHONON_LIBRARY}
+@@ -126,10 +134,6 @@ target_link_libraries(phonon_gstreamer
+ if(USE_INSTALL_PLUGIN)
+    target_link_libraries(phonon_gstreamer ${GSTREAMER_PLUGIN_PBUTILS_LIBRARIES})
+ endif(USE_INSTALL_PLUGIN)
+-if(OPENGL_FOUND)
+-  qt5_use_modules(phonon_gstreamer OpenGL)
+-  target_link_libraries(phonon_gstreamer ${OPENGL_gl_LIBRARY})
+-endif(OPENGL_FOUND)
+ install(TARGETS phonon_gstreamer DESTINATION ${BACKEND_INSTALL_DIR})
+-- 
+2.17.0
+
index cf14d133e9dfec92b4e70ac071badf8307ecdcd6..67c68221168a931167bf53d1fc2305ba8f6c1019 100644 (file)
@@ -42,6 +42,8 @@ DEPEND="${RDEPEND}
        virtual/pkgconfig
 "
 
+PATCHES=( "${FILESDIR}/${P}-qt-5.11.patch" )
+
 src_configure() {
        local mycmakeargs=( -DPHONON_BUILD_PHONON4QT5=ON )
        cmake-utils_src_configure