summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-09-04 21:31:55 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-09-06 18:45:32 +0200
commit70cdf6b58b6fa16f6ff6c44c373fe502eb2598ad (patch)
tree4abb004785e87abda69ddace437f4b662ffc6bdb /kde-plasma
parentdev-tcltk/tclpython: remove old version (diff)
downloadgentoo-70cdf6b58b6fa16f6ff6c44c373fe502eb2598ad.tar.gz
gentoo-70cdf6b58b6fa16f6ff6c44c373fe502eb2598ad.tar.bz2
gentoo-70cdf6b58b6fa16f6ff6c44c373fe502eb2598ad.zip
kde-plasma/kdeplasma-addons: Fix Flickr/NASA POTD
Upstream commits: d5f9e6af9f9cda210b15d5c10b370006c86bd7ad e647215349c4a7ab1849560f210c434f4fe6c5bf e7c51a046583213467d5a4d453334d6e98d61512 Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma')
-rw-r--r--kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.19.5-fix-potd.patch64
-rw-r--r--kde-plasma/kdeplasma-addons/kdeplasma-addons-5.19.5-r1.ebuild78
2 files changed, 142 insertions, 0 deletions
diff --git a/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.19.5-fix-potd.patch b/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.19.5-fix-potd.patch
new file mode 100644
index 000000000000..8cc7f7fb91a0
--- /dev/null
+++ b/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.19.5-fix-potd.patch
@@ -0,0 +1,64 @@
+From d5f9e6af9f9cda210b15d5c10b370006c86bd7ad Mon Sep 17 00:00:00 2001
+From: Guo Yunhe <i@guoyunhe.me>
+Date: Thu, 23 Apr 2020 22:36:34 +0300
+Subject: [PATCH] Fix POTD in lock screen
+
+Summary:
+2. Flickr and APOD(NASA) providers cannot cache pictures in `PNG` but
+`JPEG` works. So I simply changed the cache format to `JPEG`. Most POTD
+are photos. JPEG saves more spaces.
+
+Subscribers: plasma-devel
+
+Tags: #plasma
+
+Differential Revision: https://phabricator.kde.org/D29140
+
+Merge Request: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/3
+
+BUG: 389962
+
+FIXED-IN: 5.20
+
+* asturm 2020-09-04: Backported to 5.19.5, including merged commits e7c51a04 and
+* e6472153, shortened summary to relevant bits, dropped unrelated hunks.
+---
+ dataengines/potd/PoTD-list.txt | 1 +
+ dataengines/potd/cachedprovider.cpp | 14 +++----
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/dataengines/potd/PoTD-list.txt b/dataengines/potd/PoTD-list.txt
+index 53b0fe02a..c74316614 100644
+--- a/dataengines/potd/PoTD-list.txt
++++ b/dataengines/potd/PoTD-list.txt
+@@ -5,6 +5,7 @@ LIST OF POSSIBLE PROVIDERS
+ http://antwrp.gsfc.nasa.gov/apod/astropix.html
+ Each day can be reached via the URL http://antwrp.gsfc.nasa.gov/apod/apYYMMDD.html
+ where YY is the 2 digits year, MM is the 2 digits month and DD is the 2 digits day.
++Note: sometimes, the webpage shows a YouTube video and picture cannot be fetched.
+
+ * Flickr Interestingness ---------------------------- DONE
+ http://www.flickr.com/explore/interesting/
+diff --git a/dataengines/potd/cachedprovider.cpp b/dataengines/potd/cachedprovider.cpp
+index 476a7c253..d6fb63fe9 100644
+--- a/dataengines/potd/cachedprovider.cpp
++++ b/dataengines/potd/cachedprovider.cpp
+@@ -51,13 +51,13 @@ SaveImageThread::SaveImageThread(const QString &identifier, const QImage &image)
+ void SaveImageThread::run()
+ {
+ const QString path = CachedProvider::identifierToPath( m_identifier );
+- m_image.save(path, "PNG");
++ m_image.save(path, "JPEG");
+ emit done( m_identifier, path, m_image );
+ }
+
+ QString CachedProvider::identifierToPath( const QString &identifier )
+ {
+- const QString dataDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1String("/plasma_engine_potd/");
++ const QString dataDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/plasma_engine_potd/");
+ QDir d;
+ d.mkpath(dataDir);
+ return dataDir + identifier;
+--
+GitLab
+
diff --git a/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.19.5-r1.ebuild b/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.19.5-r1.ebuild
new file mode 100644
index 000000000000..509b4e256841
--- /dev/null
+++ b/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.19.5-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KFMIN=5.71.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.14.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Extra Plasma applets and engines"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="+comic share webengine"
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/karchive-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kholidays-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/knewstuff-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kpackage-${KFMIN}:5
+ >=kde-frameworks/krunner-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kunitconversion-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ >=kde-frameworks/sonnet-${KFMIN}:5
+ comic? ( >=kde-frameworks/kross-${KFMIN}:5 )
+ share? ( >=kde-frameworks/purpose-${KFMIN}:5 )
+ webengine? ( >=dev-qt/qtwebengine-${QTMIN}:5 )
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtquickcontrols-${QTMIN}:5
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=kde-plasma/plasma-workspace-${PVCUT}:5
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-potd.patch" # in Plasma/5.20
+ "${FILESDIR}/${PN}-5.19.3-kross-optional.patch" # downstream patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package comic KF5Kross)
+ $(cmake_use_find_package share KF5Purpose)
+ $(cmake_use_find_package webengine Qt5WebEngine)
+ )
+
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ ecm_pkg_postinst
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ has_version sys-fs/quota || \
+ elog "For using disk quota applet, install sys-fs/quota."
+ fi
+}