summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-11-25 16:59:28 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2017-11-25 17:09:22 +0100
commit8fd49ffe76fa579aa86de0fb62fef54d2b27e4e0 (patch)
treed4df975e998b68b1f47eb56505a27172427e6bb9
parentdev-ada/gnatcoll: use gnatls-6.3.0 instead of gnatls (diff)
downloadgentoo-8fd49ffe76fa579aa86de0fb62fef54d2b27e4e0.tar.gz
gentoo-8fd49ffe76fa579aa86de0fb62fef54d2b27e4e0.tar.bz2
gentoo-8fd49ffe76fa579aa86de0fb62fef54d2b27e4e0.zip
media-video/kmplayer: Fix desktop file, cmake warnings
Reported-by: <kavol@email.cz> Closes: https://bugs.gentoo.org/638798 Package-Manager: Portage-2.3.16, Repoman-2.3.6
-rw-r--r--media-video/kmplayer/Manifest2
-rw-r--r--media-video/kmplayer/files/kmplayer-0.12.0b-cmake.patch50
-rw-r--r--media-video/kmplayer/files/kmplayer-0.12.0b-desktop.patch47
-rw-r--r--media-video/kmplayer/files/kmplayer-0.12.0b-devpixelratio.patch36
-rw-r--r--media-video/kmplayer/files/kmplayer-0.12.0b-qfile.patch33
-rw-r--r--media-video/kmplayer/files/kmplayer-0.12.0b-schedulerepaint.patch61
-rw-r--r--media-video/kmplayer/kmplayer-0.12.0b-r1.ebuild95
7 files changed, 323 insertions, 1 deletions
diff --git a/media-video/kmplayer/Manifest b/media-video/kmplayer/Manifest
index bbaf660c05ed..e5889b7e6368 100644
--- a/media-video/kmplayer/Manifest
+++ b/media-video/kmplayer/Manifest
@@ -1 +1 @@
-DIST kmplayer-0.12.0b.tar.bz2 599496 SHA256 5e98cea9bd958860d90003d37037172a95ed8b699133e8f1e6033147aaefed73 SHA512 d34c496d0c24c6d5c1bb675b83fac60da5c9672e4076aed72bac2e9b333e88d031076e7e386ec7b61ae8ece88870f6187c61f483f425aa78edd1e443c7f2e882 WHIRLPOOL 4ce75858bd6f385572f1c39e1aef47ad9526986b8c99de228d9e77168e804b2aeeca2933bb95c8be0f3a2200154473fd99a02af2d449a3861c845715f772570c
+DIST kmplayer-0.12.0b.tar.bz2 599496 BLAKE2B c27b54cf05c52ffbb78c8f623b7cab066901f647c14364da1de2fcedd96329439521ad329fc15be58491b570de17fd151c95f266738e049501a5a22ba8dd9c93 SHA512 d34c496d0c24c6d5c1bb675b83fac60da5c9672e4076aed72bac2e9b333e88d031076e7e386ec7b61ae8ece88870f6187c61f483f425aa78edd1e443c7f2e882
diff --git a/media-video/kmplayer/files/kmplayer-0.12.0b-cmake.patch b/media-video/kmplayer/files/kmplayer-0.12.0b-cmake.patch
new file mode 100644
index 000000000000..a99b1149f8c3
--- /dev/null
+++ b/media-video/kmplayer/files/kmplayer-0.12.0b-cmake.patch
@@ -0,0 +1,50 @@
+From 2a5df7b875a8c5acb99be05baf84e5c9800d52a3 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Sat, 13 May 2017 18:57:15 +0200
+Subject: cmake: fix endif syntax
+
+it does not match the if condition, so just remove it (also to ease
+reading it)
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 057fcc4..14a55d2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -81,7 +81,7 @@ add_subdirectory(src)
+ add_subdirectory(icons)
+ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc" AND KF5DocTools_VERSION)
+ add_subdirectory(doc)
+-endif(KF5DocTools_VERSION)
++endif()
+ add_subdirectory(data)
+
+ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
+
+From 41a284a0f5f728556280b9f942961631566ad7ff Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Sat, 13 May 2017 19:04:47 +0200
+Subject: cmake: use NO_POLICY_SCOPE for KDECompilerSettings
+
+just like done for all the other projects
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 14a55d2..5a58a35 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,7 +15,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_D
+
+ include(KDEInstallDirs)
+ include(KDECMakeSettings)
+-include(KDECompilerSettings)
++include(KDECompilerSettings NO_POLICY_SCOPE)
+ include(ECMInstallIcons)
+ #include(ECMSetupVersion)
+ include(FeatureSummary)
+--
+cgit v0.11.2
diff --git a/media-video/kmplayer/files/kmplayer-0.12.0b-desktop.patch b/media-video/kmplayer/files/kmplayer-0.12.0b-desktop.patch
new file mode 100644
index 000000000000..c84944effc29
--- /dev/null
+++ b/media-video/kmplayer/files/kmplayer-0.12.0b-desktop.patch
@@ -0,0 +1,47 @@
+From 2126d76b8f16381e576de779b94b5b4555e562c2 Mon Sep 17 00:00:00 2001
+From: Luigi Toscano <luigi.toscano@tiscali.it>
+Date: Sat, 13 May 2017 21:13:43 +0200
+Subject: Fix .desktop: Qt5 apps accept qwindowtitle, not caption
+
+---
+ src/org.kde.kmplayer.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/org.kde.kmplayer.desktop b/src/org.kde.kmplayer.desktop
+index fcc5255..2b5435c 100644
+--- a/src/org.kde.kmplayer.desktop
++++ b/src/org.kde.kmplayer.desktop
+@@ -1,6 +1,6 @@
+ [Desktop Entry]
+ Type=Application
+-Exec=kmplayer -caption %c %i %U
++Exec=kmplayer -qwindowtitle %c %i %U
+ Icon=kmplayer
+ X-DocPath=kmplayer/index.html
+ Comment=KDE interface for MPlayer
+
+From 6b7757397c6181664d58d0a9e09cc329f279cc72 Mon Sep 17 00:00:00 2001
+From: Luigi Toscano <luigi.toscano@tiscali.it>
+Date: Sat, 13 May 2017 21:13:36 +0200
+Subject: Add org namespace to the desktop file
+
+Required by the Desktop Entry Specification for desktop file
+with Type=Application.
+---
+ src/CMakeLists.txt | 2 +-
+ src/kmplayer_part.desktop | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 7a05382..f675d9a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@ install(TARGETS kdeinit_kmplayer ${INSTALL_TARGETS_DEFAULT_ARGS} )
+
+ install(TARGETS kmplayer ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+-install(FILES kmplayer.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
++install(FILES org.kde.kmplayer.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+
+ #qt5_add_dbus_interface(kmplayer_SRCS org.kde.Konqueror.Main.xml kmplayer_interface)
+
diff --git a/media-video/kmplayer/files/kmplayer-0.12.0b-devpixelratio.patch b/media-video/kmplayer/files/kmplayer-0.12.0b-devpixelratio.patch
new file mode 100644
index 000000000000..0dea98084e3e
--- /dev/null
+++ b/media-video/kmplayer/files/kmplayer-0.12.0b-devpixelratio.patch
@@ -0,0 +1,36 @@
+From 93fa2c2587fa8b2f1b0da4ab7f7f2978f105fac2 Mon Sep 17 00:00:00 2001
+From: Koos Vriezen <koos.vriezen@gmail.com>
+Date: Sun, 30 Oct 2016 12:58:05 +0100
+Subject: Update pixel_device_ratio before painting instead on app startup
+
+Only used for adding a few pixels to text bounds. So if dragging the app
+from a low res to a hires display, that could cause text being tuncated.
+---
+ src/viewarea.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/viewarea.cpp b/src/viewarea.cpp
+index e407c95..77a260f 100644
+--- a/src/viewarea.cpp
++++ b/src/viewarea.cpp
+@@ -1892,9 +1892,6 @@ KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (QWidget *, View * view, bool paint_bg)
+ m_minimal (false),
+ m_updaters_enabled (true),
+ m_paint_background (paint_bg) {
+-#if QT_VERSION >= 0x050600
+- pixel_device_ratio = devicePixelRatioF();
+-#endif
+ if (!paint_bg)
+ setAttribute (Qt::WA_NoSystemBackground, true);
+ QPalette palette;
+@@ -2030,6 +2027,7 @@ KDE_NO_EXPORT void ViewArea::mouseMoveEvent (QMouseEvent * e) {
+
+ KDE_NO_EXPORT void ViewArea::syncVisual () {
+ #if QT_VERSION >= 0x050600
++ pixel_device_ratio = devicePixelRatioF();
+ int w = (int)(width() * devicePixelRatioF());
+ int h = (int)(height() * devicePixelRatioF());
+ #else
+--
+cgit v0.11.2
+
diff --git a/media-video/kmplayer/files/kmplayer-0.12.0b-qfile.patch b/media-video/kmplayer/files/kmplayer-0.12.0b-qfile.patch
new file mode 100644
index 000000000000..32b645cd0a00
--- /dev/null
+++ b/media-video/kmplayer/files/kmplayer-0.12.0b-qfile.patch
@@ -0,0 +1,33 @@
+From 7dce8e00c8e48cc08d3cc39909681643aa36ed62 Mon Sep 17 00:00:00 2001
+From: Luigi Toscano <luigi.toscano@tiscali.it>
+Date: Mon, 8 May 2017 18:07:40 +0200
+Subject: Use QFile to copy a file instead of /bin/cp
+
+The code has been there probably way before QFile gained the copy
+functionality.
+---
+ src/kmplayerpartbase.cpp | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/src/kmplayerpartbase.cpp b/src/kmplayerpartbase.cpp
+index fd7b363..f718496 100644
+--- a/src/kmplayerpartbase.cpp
++++ b/src/kmplayerpartbase.cpp
+@@ -124,12 +124,8 @@ PartBase::PartBase (QWidget * wparent, QObject * parent, KSharedConfigPtr config
+ QString bmfile = KStandardDirs::locate ("data", "kmplayer/bookmarks.xml");
+ QString localbmfile = KStandardDirs::locateLocal ("data", "kmplayer/bookmarks.xml");
+ if (localbmfile != bmfile) {
+- QProcess p;
+- QStringList args;
+- args << QFile::encodeName (bmfile) << QFile::encodeName (localbmfile);
+- p.start ("/bin/cp", args);
+- kDebug () << "cp " << args.join (" ");
+- p.waitForFinished ();
++ bool bmfileCopied = QFile(bmfile).copy(localbmfile);
++ kDebug() << "bookmarks.xml copied successfully?" << bmfileCopied;
+ }
+ m_bookmark_manager = KBookmarkManager::managerForFile (localbmfile, "kmplayer");
+ m_bookmark_owner = new BookmarkOwner (this);
+--
+cgit v0.11.2
+
diff --git a/media-video/kmplayer/files/kmplayer-0.12.0b-schedulerepaint.patch b/media-video/kmplayer/files/kmplayer-0.12.0b-schedulerepaint.patch
new file mode 100644
index 000000000000..02bf9f38b561
--- /dev/null
+++ b/media-video/kmplayer/files/kmplayer-0.12.0b-schedulerepaint.patch
@@ -0,0 +1,61 @@
+From 5517262a2a328518dd42a8aa0e37a34152a06282 Mon Sep 17 00:00:00 2001
+From: Koos Vriezen <koos.vriezen@gmail.com>
+Date: Sun, 30 Oct 2016 12:50:03 +0100
+Subject: scheduleRepaint should be called with pixel coordinates
+
+---
+ src/viewarea.cpp | 31 ++++++++++++++++++++++++++-----
+ 1 file changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/src/viewarea.cpp b/src/viewarea.cpp
+index 24f68cf..e4df941 100644
+--- a/src/viewarea.cpp
++++ b/src/viewarea.cpp
+@@ -2117,9 +2117,20 @@ KDE_NO_EXPORT void ViewArea::syncVisual () {
+
+ KDE_NO_EXPORT void ViewArea::paintEvent (QPaintEvent * pe) {
+ #ifdef KMPLAYER_WITH_CAIRO
+- if (surface->node)
+- scheduleRepaint (IRect (pe->rect ().x (), pe->rect ().y (), pe->rect ().width (), pe->rect ().height ()));
+- else
++ if (surface->node) {
++#if QT_VERSION >= 0x050600
++ int x = (int)(pe->rect().x() * devicePixelRatioF());
++ int y = (int)(pe->rect().y() * devicePixelRatioF());
++ int w = (int)(pe->rect().width() * devicePixelRatioF());
++ int h = (int)(pe->rect().height() * devicePixelRatioF());
++#else
++ int x = pe->rect().x();
++ int y = pe->rect().y();
++ int w = pe->rect().width();
++ int h = pe->rect().height();
++#endif
++ scheduleRepaint(IRect(x, y, w, h));
++ } else
+ #endif
+ if (m_fullscreen || m_paint_background)
+ {
+@@ -2647,8 +2658,18 @@ void VideoOutput::setGeometry (const IRect &rect) {
+ void VideoOutput::setAspect (float a) {
+ m_aspect = a;
+ QRect r = geometry ();
+- m_view->viewArea ()->scheduleRepaint (
+- IRect (r.x (), r.y (), r.width (), r.height ()));
++#if QT_VERSION >= 0x050600
++ int x = (int)(r.x() * devicePixelRatioF());
++ int y = (int)(r.y() * devicePixelRatioF());
++ int w = (int)(r.width() * devicePixelRatioF());
++ int h = (int)(r.height() * devicePixelRatioF());
++#else
++ int x = r.x();
++ int y = r.y();
++ int w = r.width();
++ int h = r.height();
++#endif
++ m_view->viewArea()->scheduleRepaint(IRect(x, y, w, h));
+ }
+
+ KDE_NO_EXPORT void VideoOutput::map () {
+--
+cgit v0.11.2
+
diff --git a/media-video/kmplayer/kmplayer-0.12.0b-r1.ebuild b/media-video/kmplayer/kmplayer-0.12.0b-r1.ebuild
new file mode 100644
index 000000000000..431832396391
--- /dev/null
+++ b/media-video/kmplayer/kmplayer-0.12.0b-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="true"
+inherit kde5
+
+DESCRIPTION="Video player plugin for Konqueror and basic MPlayer frontend"
+HOMEPAGE="https://kmplayer.kde.org"
+SRC_URI="mirror://kde/stable/${PN}/${EGIT_BRANCH}/${P}.tar.bz2"
+
+LICENSE="GPL-2 FDL-1.2 LGPL-2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="cairo npp"
+
+CDEPEND="
+ $(add_frameworks_dep kbookmarks)
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdelibs4support)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kmediaplayer)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep ktextwidgets)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kxmlgui)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtsvg)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtx11extras)
+ $(add_qt_dep qtxml)
+ media-libs/phonon[qt5(+)]
+ x11-libs/libX11
+ x11-libs/libxcb
+ cairo? ( x11-libs/cairo[xcb] )
+ npp? (
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ www-plugins/adobe-flash:*
+ >=x11-libs/gtk+-2.10.14:2
+ )
+"
+DEPEND="${CDEPEND}
+ sys-devel/gettext
+"
+RDEPEND="${CDEPEND}
+ media-video/mplayer
+ !media-video/kmplayer:4
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-schedulerepaint.patch
+ "${FILESDIR}"/${P}-devpixelratio.patch
+ "${FILESDIR}"/${P}-qfile.patch
+ "${FILESDIR}"/${P}-cmake.patch
+ "${FILESDIR}"/${P}-desktop.patch
+ "${FILESDIR}"/${P}-qt-5.9.patch
+)
+
+src_prepare() {
+ # Prerequisite for ${P}-desktop.patch:
+ mv src/kmplayer.desktop src/org.kde.kmplayer.desktop || die
+ kde5_src_prepare
+
+ if use npp; then
+ sed -i src/kmplayer_part.desktop \
+ -e ":^MimeType: s:=:=application/x-shockwave-flash;:" || die
+ fi
+}
+
+src_configure() {
+ # 0.12: expat build broken, check in later releases
+ local mycmakeargs=(
+ -DKMPLAYER_BUILT_WITH_EXPAT=OFF
+ -DKMPLAYER_BUILT_WITH_CAIRO=$(usex cairo)
+ -DKMPLAYER_BUILT_WITH_NPP=$(usex npp)
+ )
+
+ kde5_src_configure
+}
+
+src_install() {
+ kde5_src_install
+
+ if use npp; then
+ kwriteconfig5 --file "${ED}/usr/share/config/kmplayerrc" --group "application/x-shockwave-flash" --key player npp
+ kwriteconfig5 --file "${ED}/usr/share/config/kmplayerrc" --group "application/x-shockwave-flash" --key plugin /usr/lib/nsbrowser/plugins/libflashplayer.so
+ fi
+}