From 00882b01df9afc0fb2c8a91f6e8b78a03c52570d Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 6 May 2018 00:25:13 +1000 Subject: [PATCH] phonon_gstreamer: add recipe for 4.9.0 version --- .../patches/phonon_gstreamer-4.9.0.patchset | 72 +++++++++++++++ .../phonon_gstreamer-4.9.0.recipe | 89 +++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 kde-frameworks/phonon_gstreamer/patches/phonon_gstreamer-4.9.0.patchset create mode 100644 kde-frameworks/phonon_gstreamer/phonon_gstreamer-4.9.0.recipe diff --git a/kde-frameworks/phonon_gstreamer/patches/phonon_gstreamer-4.9.0.patchset b/kde-frameworks/phonon_gstreamer/patches/phonon_gstreamer-4.9.0.patchset new file mode 100644 index 000000000..9c683f0c6 --- /dev/null +++ b/kde-frameworks/phonon_gstreamer/patches/phonon_gstreamer-4.9.0.patchset @@ -0,0 +1,72 @@ +From 1dfe85e8b6ff4eda3cb92e16ef919bd8473cb4c7 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 26 Apr 2018 21:36:05 +1000 +Subject: Fix build for Haiku + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 11824ae..1c0649b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,8 +25,8 @@ if(PHONON_BUILD_PHONON4QT5) + set(QT_QTOPENGL_FOUND Qt5OpenGL_FOUND) + + set(REQUIRED_QT_VERSION 5.2.0) +- macro_optional_find_package(Qt5X11Extras ${REQUIRED_QT_VERSION}) +- macro_log_feature(Qt5X11Extras_FOUND "Qt5X11Extras" "Qt5X11Extras is needed for the x11renderer" "http://doc.qt.io/qt-5/qtx11extras-index.html" FALSE "${REQUIRED_QT_VERSION}") ++# macro_optional_find_package(Qt5X11Extras ${REQUIRED_QT_VERSION}) ++# macro_log_feature(Qt5X11Extras_FOUND "Qt5X11Extras" "Qt5X11Extras is needed for the x11renderer" "http://doc.qt.io/qt-5/qtx11extras-index.html" FALSE "${REQUIRED_QT_VERSION}") + else () + macro_log_feature(QT_QTOPENGL_FOUND "Qt4 OpenGL" "Qt4 OpenGL support is required to compile the gstreamer backend for Phonon" "" FALSE) + endif() +diff --git a/gstreamer/CMakeLists.txt b/gstreamer/CMakeLists.txt +index cb01285..e7f6ca0 100644 +--- a/gstreamer/CMakeLists.txt ++++ b/gstreamer/CMakeLists.txt +@@ -20,8 +20,7 @@ include_directories( + ${GSTREAMER_PLUGIN_AUDIO_INCLUDE_DIR} + ${GSTREAMER_PLUGIN_PBUTILS_INCLUDE_DIR} + ${GLIB2_INCLUDE_DIR} +- ${LIBXML2_INCLUDE_DIR} +- ${X11_X11_INCLUDE_PATH}) ++ ${LIBXML2_INCLUDE_DIR}) + + if(${PHONON_VERSION} VERSION_GREATER "4.6.49") # Pre-release 4.7 starts at 4.6.50 + message(STATUS "Building against Phonon 4.7 API") +@@ -88,13 +87,13 @@ if (OPENGL_FOUND) + list(APPEND phonon_gstreamer_SRCS glrenderer.cpp) + endif () + +-set(BUILD_X11RENDERER TRUE) ++set(BUILD_X11RENDERER FALSE) + if (PHONON_BUILD_PHONON4QT5) + if (Qt5X11Extras_FOUND) +- set(BUILD_X11RENDERER TRUE) ++ set(BUILD_X11RENDERER FALSE) + endif() + elseif (NOT WIN32) +- set(BUILD_X11RENDERER TRUE) ++ set(BUILD_X11RENDERER FALSE) + endif() + + if (BUILD_X11RENDERER) +diff --git a/gstreamer/videowidget.cpp b/gstreamer/videowidget.cpp +index bd27b21..e94764f 100644 +--- a/gstreamer/videowidget.cpp ++++ b/gstreamer/videowidget.cpp +@@ -80,10 +80,12 @@ VideoWidget::~VideoWidget() + + void VideoWidget::updateWindowID() + { ++#ifndef Q_OS_HAIKU + X11Renderer *render = dynamic_cast(m_renderer); + if (render) { + render->setOverlay(); + } ++#endif + } + + void Gstreamer::VideoWidget::syncX() +-- +2.16.2 + diff --git a/kde-frameworks/phonon_gstreamer/phonon_gstreamer-4.9.0.recipe b/kde-frameworks/phonon_gstreamer/phonon_gstreamer-4.9.0.recipe new file mode 100644 index 000000000..5d69b0354 --- /dev/null +++ b/kde-frameworks/phonon_gstreamer/phonon_gstreamer-4.9.0.recipe @@ -0,0 +1,89 @@ +SUMMARY="GStreamer backend for Phonon library" +DESCRIPTION="A GStreamer backend for the Phonon multimedia library." +HOMEPAGE="https://github.com/KDE/phonon-gstreamer/" +COPYRIGHT="2010-2018 KDE Organisation" +LICENSE="GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://github.com/KDE/phonon-gstreamer/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="c8ef300731656681a2b9b7ba1bd59cee587040359f0f71c8e175a1c90ff6de10" +SOURCE_DIR="phonon-gstreamer-$portVersion" +PATCHES="phonon_gstreamer-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + phonon_gstreamer$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libgstapp_1.0$secondaryArchSuffix + lib:libgstaudio_1.0$secondaryArchSuffix + lib:libgstbadaudio_1.0$secondaryArchSuffix + lib:libgstbadvideo_1.0$secondaryArchSuffix + lib:libgstreamer_1.0$secondaryArchSuffix + lib:libgstvideo_1.0$secondaryArchSuffix + lib:libphonon4qt5$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5DBus$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + " + +SUPPLEMENTS=" + phonon$secondaryArchSuffix + " + +BUILD_REQUIRES=" + extra_cmake_modules >= 5.45 + haiku${secondaryArchSuffix}_devel + devel:libglib_2.0$secondaryArchSuffix + devel:libgstapp_1.0$secondaryArchSuffix + devel:libgstaudio_1.0$secondaryArchSuffix + devel:libgstbadaudio_1.0$secondaryArchSuffix + devel:libgstbadvideo_1.0$secondaryArchSuffix + devel:libgstbase_1.0$secondaryArchSuffix + devel:libgstpbutils_1.0$secondaryArchSuffix + devel:libgstreamer_1.0$secondaryArchSuffix + devel:libgstvideo_1.0$secondaryArchSuffix + devel:libphonon4qt5$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libQt5DBus$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5Widgets$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:g++$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build + cd build + + cmake .. $cmakeDirArgs \ + -DPHONON_BUILD_PHONON4QT5=ON \ + -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=OFF \ + -DBACKEND_INSTALL_DIR=$addOnsDir/Qt5/phonon \ + -DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \ + -DECM_DIR=/system/data/cmake/Modules/ECM/cmake + make $jobArgs +} + +INSTALL() +{ + mkdir -p $addOnsDir/Qt5/phonon4qt5_backend + cp -f build/gstreamer/phonon_gstreamer.so $addOnsDir/Qt5/phonon4qt5_backend +} + +TEST() +{ + cd build + make test +}