summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-12-10 21:05:55 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-12-14 10:22:21 +0100
commitc0cbfd8a7ca869600a435dbac1a26c0ffb4396ae (patch)
tree855be28765c614e9b627931c6d1407d8632790e8 /kde-frameworks
parentkde-frameworks/kpty: drop 5.85.0* (diff)
downloadgentoo-c0cbfd8a7ca869600a435dbac1a26c0ffb4396ae.tar.gz
gentoo-c0cbfd8a7ca869600a435dbac1a26c0ffb4396ae.tar.bz2
gentoo-c0cbfd8a7ca869600a435dbac1a26c0ffb4396ae.zip
kde-frameworks/kunitconversion: drop 5.85.0*
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r--kde-frameworks/kunitconversion/Manifest1
-rw-r--r--kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-24h-currency-sync.patch91
-rw-r--r--kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-currency-values-init.patch235
-rw-r--r--kde-frameworks/kunitconversion/kunitconversion-5.85.0-r1.ebuild35
4 files changed, 0 insertions, 362 deletions
diff --git a/kde-frameworks/kunitconversion/Manifest b/kde-frameworks/kunitconversion/Manifest
index 056f2f89b2b6..75f3ea3c6270 100644
--- a/kde-frameworks/kunitconversion/Manifest
+++ b/kde-frameworks/kunitconversion/Manifest
@@ -1,3 +1,2 @@
-DIST kunitconversion-5.85.0.tar.xz 888652 BLAKE2B 8e5a773f0f8acdd1c24b81a8946b7190e52a3dbe5a63c48027f423be9fb735508394ccd01b3caa4bb7c920dc873a73a08c78afb335a158b598f8793c53d194a7 SHA512 f053ba454f4a5a44801a1f5b8c6562a7db71f4aef1c3b253610d20d3bb1b634347f9bb1483f607cbe1746f0b80a8625dcfb05bee5cbda467b799c9d3d5ca6668
DIST kunitconversion-5.88.0.tar.xz 889832 BLAKE2B 4917cc1223519ae19ee641c05af221d89400d8f05cf485b7f69c28e7b25c662a907c64f85e072740a88e8bc29171bacd28013373a2397680d1ec16c3de6c2072 SHA512 8ea6878c3f912d3dc71289425242a3e1db3266f5a8f5d06b89ddd5ba0e1dbf0c70e83c88b91ed6eff74d2e4aed7dec5b7a6e23ce89863f502be8adf89b307d62
DIST kunitconversion-5.89.0.tar.xz 892244 BLAKE2B e4d1f61c6fda9830bcc57f1283daf6819994333afa6927623ae0f7e52a277b557388b01b2ef452b751672c99f5e508aebc9fe686749ef71107e1645b6ad9d346 SHA512 71981dab15f23d8ccfeddcf46b23788dfcdd7b34c6d88ed7ca033ab3d3cff4ead986323c965f70baa925ca878a1c34b17d2e8a908a1020a99bf392247352843e
diff --git a/kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-24h-currency-sync.patch b/kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-24h-currency-sync.patch
deleted file mode 100644
index 056a2e8b1e5b..000000000000
--- a/kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-24h-currency-sync.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 6e41104426a3ae59bcb90be708abcc3092155436 Mon Sep 17 00:00:00 2001
-From: Andreas Cord-Landwehr <cordlandwehr@kde.org>
-Date: Tue, 24 Aug 2021 21:06:47 +0200
-Subject: [PATCH] Fix automatic currency file sync after 24h
-
-Conversion plugin in Krunner depends on automatic refresh of currency
-table. std::call_once does not work there, because process is never
-stopped.
-
-BUG: 441337
----
- autotests/convertertest.cpp | 16 ++++++++++++++++
- autotests/convertertest.h | 6 ++++++
- src/currency.cpp | 9 ++++++---
- 3 files changed, 28 insertions(+), 3 deletions(-)
-
-diff --git a/autotests/convertertest.cpp b/autotests/convertertest.cpp
-index aa0ccae..e36b7fe 100644
---- a/autotests/convertertest.cpp
-+++ b/autotests/convertertest.cpp
-@@ -8,9 +8,11 @@
- #include <QStandardPaths>
- #include <QThread>
- #include <QVector>
-+#include <currency_p.h>
- #include <kunitconversion/unitcategory.h>
-
- using namespace KUnitConversion;
-+using namespace std::chrono_literals;
-
- void ConverterTest::initTestCase()
- {
-@@ -113,4 +115,18 @@ void ConverterTest::testCurrency()
- qDeleteAll(threads);
- }
-
-+void ConverterTest::testCurrencyConversionTableUpdate()
-+{
-+ const QString cache = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/libkunitconversion/currency.xml");
-+
-+ // Missing conversion table must lead to update of table
-+ // note that this is the same code path as for last modified updates
-+ QFile::remove(cache);
-+ QVERIFY(Currency::lastConversionTableUpdate().isNull());
-+ Converter c;
-+ Value input = Value(1000, Eur);
-+ Value v = c.convert(input, QStringLiteral("$"));
-+ QVERIFY(!Currency::lastConversionTableUpdate().isNull());
-+}
-+
- QTEST_MAIN(ConverterTest)
-diff --git a/autotests/convertertest.h b/autotests/convertertest.h
-index 21d5213..d3d6303 100644
---- a/autotests/convertertest.h
-+++ b/autotests/convertertest.h
-@@ -23,6 +23,12 @@ private Q_SLOTS:
- void testConvert();
- void testInvalid();
- void testCurrency();
-+ /**
-+ * Checks that conversion tables are updated after timeout
-+ *
-+ * Regression test for https://bugs.kde.org/show_bug.cgi?id=441337
-+ */
-+ void testCurrencyConversionTableUpdate();
- };
-
- #endif // CONVERTERTEST_H
-diff --git a/src/currency.cpp b/src/currency.cpp
-index 038e928..ead7ce5 100644
---- a/src/currency.cpp
-+++ b/src/currency.cpp
-@@ -745,9 +745,12 @@ void CurrencyCategoryPrivate::syncConversionTable(std::chrono::seconds updateSki
- Value CurrencyCategoryPrivate::convert(const Value &value, const Unit &to)
- {
- // TODO KF6 remove this blocking call and change behavior that explicit call to syncConversionTable is mandatory before
-- // right now, if a sync is performed at application start, then this call will not block anymore for 24 hours
-- static std::once_flag updateFlag;
-- std::call_once(updateFlag, &CurrencyCategoryPrivate::syncConversionTable, this, 24h);
-+ // first access to converted data, also to make syncs more explicit
-+ static QMutex updateFlag;
-+ {
-+ QMutexLocker locker(&updateFlag);
-+ CurrencyCategoryPrivate::syncConversionTable(24h);
-+ }
-
- Value v = UnitCategoryPrivate::convert(value, to);
- return v;
---
-GitLab
-
diff --git a/kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-currency-values-init.patch b/kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-currency-values-init.patch
deleted file mode 100644
index 01ee8a6fa575..000000000000
--- a/kde-frameworks/kunitconversion/files/kunitconversion-5.85.0-fix-currency-values-init.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-From 2a57f9d1c6b2f8d9e2babcdaca66f1cf2a3c5849 Mon Sep 17 00:00:00 2001
-From: Andreas Cord-Landwehr <cordlandwehr@kde.org>
-Date: Sat, 28 Aug 2021 11:42:06 +0200
-Subject: [PATCH] Fix initialization of currency values
-
-If there is already a recent currency.xml file provided then use this to
-initialize the currency converter.
-
-BUG: 441337
----
- autotests/CMakeLists.txt | 8 ++++
- autotests/currencytableinittest.cpp | 33 +++++++++++++++
- autotests/currencytableinittest.h | 26 ++++++++++++
- autotests/currencytableinittest/currency.xml | 43 ++++++++++++++++++++
- autotests/currencytableinittest/data.qrc | 5 +++
- autotests/valuetest.cpp | 6 +++
- src/currency.cpp | 10 +++--
- 7 files changed, 128 insertions(+), 3 deletions(-)
- create mode 100644 autotests/currencytableinittest.cpp
- create mode 100644 autotests/currencytableinittest.h
- create mode 100644 autotests/currencytableinittest/currency.xml
- create mode 100644 autotests/currencytableinittest/data.qrc
-
-diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
-index ec457a5..8225bf2 100644
---- a/autotests/CMakeLists.txt
-+++ b/autotests/CMakeLists.txt
-@@ -8,3 +8,11 @@ ecm_add_tests(
- convertertest.cpp
- LINK_LIBRARIES KF5::UnitConversion KF5::I18n Qt5::Test
- )
-+
-+qt5_add_resources(CURRENCY_TEST_RESOURCES currencytableinittest/data.qrc)
-+ecm_add_test(
-+ currencytableinittest.cpp
-+ ${CURRENCY_TEST_RESOURCES}
-+ TEST_NAME currencytableinittest
-+ LINK_LIBRARIES KF5::UnitConversion KF5::I18n Qt5::Test
-+)
-diff --git a/autotests/currencytableinittest.cpp b/autotests/currencytableinittest.cpp
-new file mode 100644
-index 0000000..c83709a
---- /dev/null
-+++ b/autotests/currencytableinittest.cpp
-@@ -0,0 +1,33 @@
-+/*
-+ * SPDX-FileCopyrightText: 2021 Andreas Cord-Landwehr <cordlandwehr@kde.org>
-+ *
-+ * SPDX-License-Identifier: LGPL-2.0-or-later
-+ */
-+
-+#include "currencytableinittest.h"
-+#include <QStandardPaths>
-+#include <cmath>
-+
-+using namespace KUnitConversion;
-+
-+void CurrencyTableInitTest::testCategoryInit()
-+{
-+ QStandardPaths::setTestModeEnabled(true);
-+ const QString cache = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/libkunitconversion/currency.xml");
-+
-+ QVERIFY(QFile::exists(QLatin1String(":/currency.xml")));
-+ if (QFile::exists(cache)) {
-+ QFile::remove(cache);
-+ }
-+ // note: copy of file updates the file's modified timestamp and thus file is seen as recently downloaded file
-+ QVERIFY(QFile::copy(QLatin1String(":/currency.xml"), cache));
-+
-+ Converter c;
-+ Value input = Value(1000, Eur);
-+ Value v = c.convert(input, QStringLiteral("$"));
-+ qDebug() << "converted value to:" << v.number();
-+ QVERIFY(v.isValid());
-+ QVERIFY(!std::isnan(v.number()));
-+}
-+
-+QTEST_MAIN(CurrencyTableInitTest)
-diff --git a/autotests/currencytableinittest.h b/autotests/currencytableinittest.h
-new file mode 100644
-index 0000000..0b835d0
---- /dev/null
-+++ b/autotests/currencytableinittest.h
-@@ -0,0 +1,26 @@
-+/*
-+ * SPDX-FileCopyrightText: 2021 Andreas Cord-Landwehr <cordlandwehr@kde.org>
-+ *
-+ * SPDX-License-Identifier: LGPL-2.0-or-later
-+ */
-+
-+#ifndef CURRENCYTABLEINIT_TEST_H
-+#define CURRENCYTABLEINIT_TEST_H
-+
-+#include <QObject>
-+#include <QTest>
-+#include <kunitconversion/converter.h>
-+
-+using namespace KUnitConversion;
-+
-+class CurrencyTableInitTest : public QObject
-+{
-+ Q_OBJECT
-+private Q_SLOTS:
-+ /**
-+ * Check that the currency converter is correctly initialized when currency.xml is recent and available
-+ */
-+ void testCategoryInit();
-+};
-+
-+#endif
-diff --git a/autotests/currencytableinittest/currency.xml b/autotests/currencytableinittest/currency.xml
-new file mode 100644
-index 0000000..dca42d5
---- /dev/null
-+++ b/autotests/currencytableinittest/currency.xml
-@@ -0,0 +1,43 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">
-+ <gesmes:subject>Reference rates</gesmes:subject>
-+ <gesmes:Sender>
-+ <gesmes:name>European Central Bank</gesmes:name>
-+ </gesmes:Sender>
-+ <Cube>
-+ <Cube time='2021-08-24'>
-+ <Cube currency='USD' rate='1.1740'/>
-+ <Cube currency='JPY' rate='128.74'/>
-+ <Cube currency='BGN' rate='1.9558'/>
-+ <Cube currency='CZK' rate='25.533'/>
-+ <Cube currency='DKK' rate='7.4370'/>
-+ <Cube currency='GBP' rate='0.85578'/>
-+ <Cube currency='HUF' rate='349.69'/>
-+ <Cube currency='PLN' rate='4.5792'/>
-+ <Cube currency='RON' rate='4.9280'/>
-+ <Cube currency='SEK' rate='10.2090'/>
-+ <Cube currency='CHF' rate='1.0711'/>
-+ <Cube currency='ISK' rate='150.00'/>
-+ <Cube currency='NOK' rate='10.4003'/>
-+ <Cube currency='HRK' rate='7.4938'/>
-+ <Cube currency='RUB' rate='86.7484'/>
-+ <Cube currency='TRY' rate='9.8836'/>
-+ <Cube currency='AUD' rate='1.6203'/>
-+ <Cube currency='BRL' rate='6.2681'/>
-+ <Cube currency='CAD' rate='1.4822'/>
-+ <Cube currency='CNY' rate='7.6042'/>
-+ <Cube currency='HKD' rate='9.1448'/>
-+ <Cube currency='IDR' rate='16897.00'/>
-+ <Cube currency='ILS' rate='3.7789'/>
-+ <Cube currency='INR' rate='87.0625'/>
-+ <Cube currency='KRW' rate='1369.00'/>
-+ <Cube currency='MXN' rate='23.8606'/>
-+ <Cube currency='MYR' rate='4.9525'/>
-+ <Cube currency='NZD' rate='1.6893'/>
-+ <Cube currency='PHP' rate='58.783'/>
-+ <Cube currency='SGD' rate='1.5918'/>
-+ <Cube currency='THB' rate='38.595'/>
-+ <Cube currency='ZAR' rate='17.6902'/>
-+ </Cube>
-+ </Cube>
-+</gesmes:Envelope>
-\ No newline at end of file
-diff --git a/autotests/currencytableinittest/data.qrc b/autotests/currencytableinittest/data.qrc
-new file mode 100644
-index 0000000..19f9d69
---- /dev/null
-+++ b/autotests/currencytableinittest/data.qrc
-@@ -0,0 +1,5 @@
-+<RCC>
-+ <qresource prefix="/">
-+ <file>currency.xml</file>
-+ </qresource>
-+</RCC>
-diff --git a/autotests/valuetest.cpp b/autotests/valuetest.cpp
-index 0b348d7..53be1b7 100644
---- a/autotests/valuetest.cpp
-+++ b/autotests/valuetest.cpp
-@@ -55,6 +55,12 @@ void ValueTest::testInvalid()
-
- void ValueTest::testCurrencyNotDownloaded()
- {
-+ // ensure that no local conversion table is available
-+ const QString cache = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/libkunitconversion/currency.xml");
-+ if (!QFile::exists(cache)) {
-+ QFile::remove(cache);
-+ }
-+
- auto pounds = Value(100, Gbp);
- auto eur = pounds.convertTo(Eur);
- QVERIFY(!eur.isValid());
-diff --git a/src/currency.cpp b/src/currency.cpp
-index ead7ce5..43161e2 100644
---- a/src/currency.cpp
-+++ b/src/currency.cpp
-@@ -47,6 +47,7 @@ public:
- Value convert(const Value &value, const Unit &toUnit) override;
- bool hasOnlineConversionTable() const override;
- void syncConversionTable(std::chrono::seconds updateSkipSeconds) override;
-+ bool m_initialized{false}; //!< indicates if units are prepared from currency table
- };
-
- bool CurrencyCategoryPrivate::hasOnlineConversionTable() const
-@@ -668,12 +669,12 @@ QDateTime Currency::lastConversionTableUpdate()
- void CurrencyCategoryPrivate::syncConversionTable(std::chrono::seconds updateSkipPeriod)
- {
- // sync call is expected to be guarded as being called only once
-- auto updateCurrencyConversionTable = [this](const QString &cachePath) {
-+ auto updateCurrencyConversionTable = [this](const QString &cachePath, bool performNetworkSync) {
- qCDebug(LOG_KUNITCONVERSION) << "currency conversion table sync started";
- static QMutex mutex;
- QMutexLocker locker(&mutex);
- bool updateError{false};
-- if (isConnected()) {
-+ if (performNetworkSync && isConnected()) {
- // Bug 345750: QNetworkReply does not work without an event loop and doesn't implement waitForReadyRead()
- QEventLoop loop;
- QNetworkAccessManager manager;
-@@ -733,12 +734,15 @@ void CurrencyCategoryPrivate::syncConversionTable(std::chrono::seconds updateSki
- }
- }
- }
-+ m_initialized = !updateError;
- return !updateError;
- };
-
- QFileInfo info(cacheLocation());
- if (!info.exists() || info.lastModified().secsTo(QDateTime::currentDateTime()) > updateSkipPeriod.count()) {
-- updateCurrencyConversionTable(cacheLocation());
-+ updateCurrencyConversionTable(cacheLocation(), true);
-+ } else if (!m_initialized) {
-+ updateCurrencyConversionTable(cacheLocation(), false);
- }
- }
-
---
-GitLab
-
diff --git a/kde-frameworks/kunitconversion/kunitconversion-5.85.0-r1.ebuild b/kde-frameworks/kunitconversion/kunitconversion-5.85.0-r1.ebuild
deleted file mode 100644
index 587ab06b3418..000000000000
--- a/kde-frameworks/kunitconversion/kunitconversion-5.85.0-r1.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PVCUT=$(ver_cut 1-2)
-QTMIN=5.15.2
-inherit ecm kde.org
-
-DESCRIPTION="Framework for converting units"
-LICENSE="LGPL-2+"
-KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86"
-IUSE=""
-
-DEPEND="
- >=dev-qt/qtnetwork-${QTMIN}:5
- =kde-frameworks/ki18n-${PVCUT}*:5
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=( # KDE-bug 441337
- "${FILESDIR}"/${P}-fix-24h-currency-sync.patch
- "${FILESDIR}"/${P}-fix-currency-values-init.patch
-)
-
-src_test() {
- local myctestargs=(
- # convertertest: bug 623938 - needs internet connection
- # categorytest: bug 808216 - needs internet connection
- # currencytableinittest: bug 808216 - unknown, reported upstream
- -E "(convertertest|categorytest|currencytableinittest)"
- )
-
- LC_NUMERIC="C" ecm_src_test # bug 694804
-}