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 /media-video/kmplayer/files
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
Diffstat (limited to 'media-video/kmplayer/files')
-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
5 files changed, 227 insertions, 0 deletions
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
+