Christophe Giboudeaux 2021-02-07 08:48:19 +00:00 committed by Git OBS Bridge
parent 1e75597dab
commit 0684d0b518
3 changed files with 57 additions and 5 deletions

View File

@ -0,0 +1,44 @@
From 9f2ec226ec0952e45d4cc5de2643f3865f7334c0 Mon Sep 17 00:00:00 2001
From: Alexander Lohnau <alexander.lohnau@gmx.de>
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Feb 7 08:45:57 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patch:
* 0001-Use-new-KNS-install-location.patch
-------------------------------------------------------------------
Fri Feb 05 08:16:29 UTC 2021 - Wang Jun <jgwang@suse.com>

View File

@ -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