From 0684d0b518a3f2a93393936ae79433e9828ae08998c09138ffe51308bcbd1bcc Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sun, 7 Feb 2021 08:48:19 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/alkimia?expand=0&rev=30 --- 0001-Use-new-KNS-install-location.patch | 44 +++++++++++++++++++++++++ alkimia.changes | 6 ++++ alkimia.spec | 12 ++++--- 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 0001-Use-new-KNS-install-location.patch diff --git a/0001-Use-new-KNS-install-location.patch b/0001-Use-new-KNS-install-location.patch new file mode 100644 index 0000000..3220eb7 --- /dev/null +++ b/0001-Use-new-KNS-install-location.patch @@ -0,0 +1,44 @@ +From 9f2ec226ec0952e45d4cc5de2643f3865f7334c0 Mon Sep 17 00:00:00 2001 +From: Alexander Lohnau +Date: Sun, 1 Nov 2020 13:08:04 +0100 +Subject: [PATCH] Use new KNS install location + +--- + src/CMakeLists.txt | 6 +++++- + src/alkonlinequotesprofile.cpp | 3 +++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3a19d34..f5f2768 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -163,7 +163,11 @@ if(BUILD_QT4) + set(APPDATA_INSTALL_DIR ${SHARE_INSTALL_DIR}/kde4/apps) + set(FQ_LOCAL_INSTALL_PATH ${CMAKE_BINARY_DIR}/share/apps/alkimia${ALKIMIA_PATH_SUFFIX}/misc) + else() +- set(KNSRC_INSTALL_DIR ${CONFIG_INSTALL_DIR}) ++ if(KF5NewStuff_VERSION VERSION_GREATER "5.56.0") ++ set(KNSRC_INSTALL_DIR ${KDE_INSTALL_KNSRCDIR}) ++ else() ++ set(KNSRC_INSTALL_DIR ${CONFIG_INSTALL_DIR}) ++ endif() + set(APPDATA_INSTALL_DIR ${SHARE_INSTALL_DIR}) + set(FQ_LOCAL_INSTALL_PATH ${CMAKE_BINARY_DIR}/share/alkimia${ALKIMIA_PATH_SUFFIX}/misc) + endif() +diff --git a/src/alkonlinequotesprofile.cpp b/src/alkonlinequotesprofile.cpp +index cc4b70a..d778383 100644 +--- a/src/alkonlinequotesprofile.cpp ++++ b/src/alkonlinequotesprofile.cpp +@@ -323,6 +323,9 @@ QString AlkOnlineQuotesProfile::name() const + QString AlkOnlineQuotesProfile::hotNewStuffConfigFile() const + { + QString configFile = KStandardDirs::locate("config", d->m_GHNSFile); ++ if (configFile.isEmpty()) { ++ configFile = KStandardDirs::locate("data", "knsrcfiles/" + d->m_GHNSFile); ++ } + if (configFile.isEmpty()) { + configFile = QString("%1/%2").arg(KNSRC_DIR, d->m_GHNSFile); + } +-- +2.30.0 + diff --git a/alkimia.changes b/alkimia.changes index 7cb2904..4995f0f 100644 --- a/alkimia.changes +++ b/alkimia.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 7 08:45:57 UTC 2021 - Christophe Giboudeaux + +- Add upstream patch: + * 0001-Use-new-KNS-install-location.patch + ------------------------------------------------------------------- Fri Feb 05 08:16:29 UTC 2021 - Wang Jun diff --git a/alkimia.spec b/alkimia.spec index fc6ee5f..cee497b 100644 --- a/alkimia.spec +++ b/alkimia.spec @@ -26,6 +26,8 @@ License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ URL: https://kmymoney.org/ Source0: https://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch0: 0001-Use-new-KNS-install-location.patch BuildRequires: doxygen BuildRequires: extra-cmake-modules BuildRequires: gmp-devel @@ -63,11 +65,11 @@ The development files for libalkimia. %lang_package %prep -%setup -q +%autosetup -p1 %build %cmake_kf5 -d build -- -DBUILD_WITH_WEBKIT=0 -DBUILD_APPLETS=0 -DENABLE_FINANCEQUOTE=1 -%make_jobs +%cmake_build %install %kf5_makeinstall -C build @@ -89,15 +91,15 @@ mv %{buildroot}/alkimia5/misc/financequote.pl %{buildroot}%{_datadir}/alkimia5/m %{_kf5_applicationsdir}/org.kde.onlinequoteseditor5.desktop %{_kf5_bindir}/onlinequoteseditor5 %{_kf5_iconsdir}/hicolor/*/apps/onlinequoteseditor5.* +%{_kf5_knsrcfilesdir}/alkimia-quotes.knsrc +%{_kf5_knsrcfilesdir}/kmymoney-quotes.knsrc +%{_kf5_knsrcfilesdir}/skrooge-quotes.knsrc %dir %{_kf5_qmldir}/org/ %dir %{_kf5_qmldir}/org/kde %dir %{_kf5_qmldir}/org/kde/alkimia %{_kf5_qmldir}/org/kde/alkimia/libqmlalkimia.so %{_kf5_qmldir}/org/kde/alkimia/qmldir %{_kf5_sharedir}/alkimia5/ -%{_kf5_sysconfdir}/xdg/alkimia-quotes.knsrc -%{_kf5_sysconfdir}/xdg/kmymoney-quotes.knsrc -%{_kf5_sysconfdir}/xdg/skrooge-quotes.knsrc %files -n libalkimia5-devel %license COPYING.LIB