Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/libalkimia/files/, app-office/libalkimia/
Date: Tue, 30 Jun 2020 14:45:52
Message-Id: 1593528340.ee44cb64a265b662a785fdff790141ff8ab301dd.asturm@gentoo
1 commit: ee44cb64a265b662a785fdff790141ff8ab301dd
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 30 14:37:07 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 30 14:45:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee44cb64
7
8 app-office/libalkimia: 8.0.3 version bump
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 app-office/libalkimia/Manifest | 1 +
14 .../libalkimia/files/libalkimia-8.0.3-cmake.patch | 54 ++++++
15 .../files/libalkimia-8.0.3-no-financequote.patch | 181 +++++++++++++++++++++
16 app-office/libalkimia/libalkimia-8.0.3.ebuild | 68 ++++++++
17 4 files changed, 304 insertions(+)
18
19 diff --git a/app-office/libalkimia/Manifest b/app-office/libalkimia/Manifest
20 index 73a2de778c4..b597a2233c2 100644
21 --- a/app-office/libalkimia/Manifest
22 +++ b/app-office/libalkimia/Manifest
23 @@ -1 +1,2 @@
24 DIST alkimia-7.0.2.tar.xz 38420 BLAKE2B ea2cc8dd80e2b9b2501d26936aa7d2799d040e8cf86f9adb4785e676046f3c76d0cbe3267e4159582086d910be35020bbc634140d32cc7e5588d06cf75a115a3 SHA512 275ea48cd33caed9393a170efcc6053a581c1cc000862dd73a63bdb6de3e3c3ad2e492901a859e517033e1239e297a43088580553efe32f1d99a85051f5af3e4
25 +DIST alkimia-8.0.3.tar.xz 212780 BLAKE2B 4863bd2fba7e92518618da250b08772e288697eab9e45980c72c4a29d51f3df94899ead344a9dd5f16ea73cab8dc5596c696156f7da678a030623e77c766949c SHA512 04debd3adeba6380ffe7e9d3949e927dca12ecd7f83dea7b7ba6295b158272c636978c89800757166889e632fed09f3e8b3ce19adc9b91e3369e3b16a5b6cb1e
26
27 diff --git a/app-office/libalkimia/files/libalkimia-8.0.3-cmake.patch b/app-office/libalkimia/files/libalkimia-8.0.3-cmake.patch
28 new file mode 100644
29 index 00000000000..1b99061e6bf
30 --- /dev/null
31 +++ b/app-office/libalkimia/files/libalkimia-8.0.3-cmake.patch
32 @@ -0,0 +1,54 @@
33 +From d413b91839ca0e66beb56a71625e3194df1a6599 Mon Sep 17 00:00:00 2001
34 +From: Andreas Sturmlechner <asturm@g.o>
35 +Date: Wed, 12 Jun 2019 19:44:12 +0200
36 +Subject: [PATCH 1/2] Use non-deprecated KDE_INSTALL_TARGETS_DEFAULT_ARGS for
37 + alkimia target
38 +
39 +---
40 + src/CMakeLists.txt | 2 +-
41 + 1 file changed, 1 insertion(+), 1 deletion(-)
42 +
43 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
44 +index 7c0f0f7..0774032 100644
45 +--- a/src/CMakeLists.txt
46 ++++ b/src/CMakeLists.txt
47 +@@ -147,7 +147,7 @@ set(INCLUDE_INSTALL_DIR include/alkimia/${ALKIMIA_INCLUDE_SUFFIX})
48 +
49 + install(TARGETS alkimia
50 + EXPORT alkimiaTargets
51 +- ${INSTALL_TARGETS_DEFAULT_ARGS}
52 ++ ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
53 + )
54 +
55 + if(BUILD_QT4)
56 +--
57 +2.23.0
58 +
59 +
60 +From 1fd611bcc060e779ac62f5f69d956c6dee2b3383 Mon Sep 17 00:00:00 2001
61 +From: Andreas Sturmlechner <asturm@g.o>
62 +Date: Wed, 12 Jun 2019 16:43:54 +0200
63 +Subject: [PATCH 2/2] Fix pkgconfig libdir path
64 +
65 +---
66 + src/libalkimia.pc.in | 4 ++--
67 + 1 file changed, 2 insertions(+), 2 deletions(-)
68 +
69 +diff --git a/src/libalkimia.pc.in b/src/libalkimia.pc.in
70 +index c2087c9..6ada277 100644
71 +--- a/src/libalkimia.pc.in
72 ++++ b/src/libalkimia.pc.in
73 +@@ -4,8 +4,8 @@
74 + # General installation directories
75 + prefix=@CMAKE_INSTALL_PREFIX@
76 + exec_prefix=@CMAKE_INSTALL_PREFIX@
77 +-libdir=@KDE4_LIB_DIR@
78 +-includedir=@INCLUDE_INSTALL_DIR@
79 ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
80 ++includedir=${prefix}/@INCLUDE_INSTALL_DIR@
81 +
82 + # Human-readable name
83 + Name: Alkimia
84 +--
85 +2.23.0
86 +
87
88 diff --git a/app-office/libalkimia/files/libalkimia-8.0.3-no-financequote.patch b/app-office/libalkimia/files/libalkimia-8.0.3-no-financequote.patch
89 new file mode 100644
90 index 00000000000..a9435906276
91 --- /dev/null
92 +++ b/app-office/libalkimia/files/libalkimia-8.0.3-no-financequote.patch
93 @@ -0,0 +1,181 @@
94 +From 4f79ab942936c2985136575e9244aae4d9b81323 Mon Sep 17 00:00:00 2001
95 +From: Ralf Habacker <ralf.habacker@×××××××.de>
96 +Date: Fri, 24 Jan 2020 09:47:28 +0100
97 +Subject: [PATCH] Add option ENABLE_FINANCEQUOTE and set to false by default on
98 + Windows
99 +
100 +Financequote needs perl, which isn't supported on Windows yet.
101 +---
102 + CMakeLists.txt | 10 ++++++++++
103 + src/CMakeLists.txt | 15 ++++++++++-----
104 + src/alkonlinequote.cpp | 7 ++++++-
105 + src/alkonlinequotesprofile.cpp | 7 ++++++-
106 + tools/onlinequoteseditor/mainwindow.cpp | 2 ++
107 + 5 files changed, 34 insertions(+), 7 deletions(-)
108 +
109 +diff --git a/CMakeLists.txt b/CMakeLists.txt
110 +index ae48620..02bea7c 100644
111 +--- a/CMakeLists.txt
112 ++++ b/CMakeLists.txt
113 +@@ -10,6 +10,16 @@ option(BUILD_QT4 "Build for Qt4" OFF)
114 + option(BUILD_DOXYGEN_DOCS "Build api docs" ON)
115 + option(BUILD_APPLETS "Build plasma applets" ON)
116 +
117 ++if(WIN32)
118 ++ set(ENABLE_FINANCEQUOTE_DEFAULT 0)
119 ++else()
120 ++ set(ENABLE_FINANCEQUOTE_DEFAULT 1)
121 ++endif()
122 ++option(ENABLE_FINANCEQUOTE "Enable finance quote support (requires perl)" ENABLE_FINANCEQUOTE_DEFAULT)
123 ++if(ENABLE_FINANCEQUOTE)
124 ++ add_definitions(-DENABLE_FINANCEQUOTE)
125 ++endif()
126 ++
127 + find_package(ECM 0.0.11 REQUIRED NO_MODULE)
128 +
129 + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
130 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
131 +index 2692a79..b863fa1 100644
132 +--- a/src/CMakeLists.txt
133 ++++ b/src/CMakeLists.txt
134 +@@ -49,7 +49,6 @@ set(ALKIMIA_LIB_SOVERSION "${alkimia_VERSION_MAJOR}")
135 +
136 + set(alkimia_LIB_SRCS
137 + alkcompany.cpp
138 +- alkfinancequoteprocess.cpp
139 + alkonlinequote.cpp
140 + alkonlinequotesource.cpp
141 + alkonlinequotesprofile.cpp
142 +@@ -61,7 +60,6 @@ set(alkimia_LIB_SRCS
143 +
144 + set(alkimia_LIB_HEADERS
145 + alkcompany.h
146 +- alkfinancequoteprocess.h
147 + alkonlinequote.h
148 + alkonlinequotesource.h
149 + alkonlinequotesprofile.h
150 +@@ -70,6 +68,11 @@ set(alkimia_LIB_HEADERS
151 + alkwebpage.h
152 + )
153 +
154 ++if(ENABLE_FINANCEQUOTE)
155 ++ list(APPEND alkimia_LIB_SRCS alkfinancequoteprocess.cpp)
156 ++ list(APPEND alkimia_LIB_HEADERS alkfinancequoteprocess.h)
157 ++endif()
158 ++
159 + set(alkimia_UI
160 + alkonlinequoteswidget.ui
161 + )
162 +@@ -177,9 +180,11 @@ install(FILES
163 + make_directory(${FQ_LOCAL_INSTALL_PATH})
164 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/financequote.pl ${FQ_LOCAL_INSTALL_PATH}/financequote.pl IMMEDIATE COPYONLY)
165 +
166 +-install(PROGRAMS financequote.pl
167 +- DESTINATION ${APPDATA_INSTALL_DIR}/alkimia${ALKIMIA_PATH_SUFFIX}/misc
168 +-)
169 ++if(ENABLE_FINANCEQUOTE)
170 ++ install(PROGRAMS financequote.pl
171 ++ DESTINATION ${APPDATA_INSTALL_DIR}/alkimia${ALKIMIA_PATH_SUFFIX}/misc
172 ++ )
173 ++endif()
174 +
175 + if (NOT WIN32)
176 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libalkimia.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libalkimia${ALKIMIA_PATH_SUFFIX}.pc IMMEDIATE @ONLY)
177 +diff --git a/src/alkonlinequote.cpp b/src/alkonlinequote.cpp
178 +index 5b1b6e6..83a839c 100644
179 +--- a/src/alkonlinequote.cpp
180 ++++ b/src/alkonlinequote.cpp
181 +@@ -337,6 +337,7 @@ bool AlkOnlineQuote::Private::launchNative(const QString &_symbol, const QString
182 + return result;
183 + }
184 +
185 ++#ifdef ENABLE_FINANCEQUOTE
186 + bool AlkOnlineQuote::Private::launchFinanceQuote(const QString &_symbol, const QString &_id,
187 + const QString &_sourcename)
188 + {
189 +@@ -374,6 +375,7 @@ bool AlkOnlineQuote::Private::launchFinanceQuote(const QString &_symbol, const Q
190 + }
191 + return result;
192 + }
193 ++#endif
194 +
195 + bool AlkOnlineQuote::Private::parsePrice(const QString &_pricestr)
196 + {
197 +@@ -560,10 +562,13 @@ void AlkOnlineQuote::setAcceptLanguage(const QString &language)
198 +
199 + bool AlkOnlineQuote::launch(const QString &_symbol, const QString &_id, const QString &_source)
200 + {
201 ++#ifdef ENABLE_FINANCEQUOTE
202 + if (AlkOnlineQuoteSource::isFinanceQuote(_source) ||
203 + d->m_profile->type() == AlkOnlineQuotesProfile::Type::Script) {
204 + return d->launchFinanceQuote(_symbol, _id, _source);
205 +- } else if (_source.endsWith(".css")) {
206 ++ } else
207 ++#endif
208 ++ if (_source.endsWith(".css")) {
209 + return d->launchWebKitCssSelector(_symbol, _id, _source);
210 + } else if (_source.endsWith(".webkit")) {
211 + return d->launchWebKitHtmlParser(_symbol, _id, _source);
212 +diff --git a/src/alkonlinequotesprofile.cpp b/src/alkonlinequotesprofile.cpp
213 +index c3a6c96..637fb38 100644
214 +--- a/src/alkonlinequotesprofile.cpp
215 ++++ b/src/alkonlinequotesprofile.cpp
216 +@@ -59,11 +59,12 @@ public:
217 + , m_config(0)
218 + , m_type(Type::Undefined)
219 + {
220 +-
221 ++#ifdef ENABLE_FINANCEQUOTE
222 + if (m_financeQuoteScriptPath.isEmpty()) {
223 + m_financeQuoteScriptPath = KGlobal::dirs()->findResource("appdata",
224 + QString("misc/financequote.pl"));
225 + }
226 ++#endif
227 + }
228 +
229 + ~Private()
230 +@@ -135,6 +136,7 @@ public Q_SLOTS:
231 + return groups;
232 + }
233 +
234 ++#ifdef ENABLE_FINANCEQUOTE
235 + const QStringList quoteSourcesFinanceQuote()
236 + {
237 + if (m_financeQuoteSources.empty()) { // run the process one time only
238 +@@ -153,6 +155,7 @@ public Q_SLOTS:
239 + }
240 + return m_financeQuoteSources;
241 + }
242 ++#endif
243 +
244 + const QStringList quoteSourcesSkrooge()
245 + {
246 +@@ -391,9 +394,11 @@ const QStringList AlkOnlineQuotesProfile::quoteSources()
247 + case AlkOnlineQuotesProfile::Type::KMyMoney5:
248 + result << d->quoteSourcesNative();
249 + break;
250 ++#ifdef ENABLE_FINANCEQUOTE
251 + case AlkOnlineQuotesProfile::Type::Script:
252 + result << d->quoteSourcesFinanceQuote();
253 + break;
254 ++#endif
255 + case AlkOnlineQuotesProfile::Type::None:
256 + result << d->defaultQuoteSources().keys();
257 + break;
258 +diff --git a/tools/onlinequoteseditor/mainwindow.cpp b/tools/onlinequoteseditor/mainwindow.cpp
259 +index 59af0c4..791b1e6 100644
260 +--- a/tools/onlinequoteseditor/mainwindow.cpp
261 ++++ b/tools/onlinequoteseditor/mainwindow.cpp
262 +@@ -82,7 +82,9 @@ MainWindow::MainWindow(QWidget *parent)
263 + manager.addProfile(new AlkOnlineQuotesProfile("skrooge5", AlkOnlineQuotesProfile::Type::Skrooge5, "skrooge-quotes.knsrc"));
264 + manager.addProfile(new AlkOnlineQuotesProfile("kmymoney5", AlkOnlineQuotesProfile::Type::KMyMoney5, "kmymoney-quotes.knsrc"));
265 + #endif
266 ++#ifdef ENABLE_FINANCEQUOTE
267 + manager.addProfile(new AlkOnlineQuotesProfile("Finance::Quote", AlkOnlineQuotesProfile::Type::Script));
268 ++#endif
269 + d->ui.setupUi(this);
270 +
271 + d->quotesWidget = new AlkOnlineQuotesWidget(true, true);
272 +--
273 +GitLab
274 +
275
276 diff --git a/app-office/libalkimia/libalkimia-8.0.3.ebuild b/app-office/libalkimia/libalkimia-8.0.3.ebuild
277 new file mode 100644
278 index 00000000000..65225f91578
279 --- /dev/null
280 +++ b/app-office/libalkimia/libalkimia-8.0.3.ebuild
281 @@ -0,0 +1,68 @@
282 +# Copyright 1999-2020 Gentoo Authors
283 +# Distributed under the terms of the GNU General Public License v2
284 +
285 +EAPI=7
286 +
287 +ECM_TEST="forceoptional"
288 +KDE_ORG_NAME="alkimia"
289 +KFMIN=5.60.0
290 +QTMIN=5.12.3
291 +inherit ecm kde.org
292 +
293 +if [[ ${KDE_BUILD_TYPE} = release ]]; then
294 + SRC_URI="mirror://kde/stable/${KDE_ORG_NAME}/${PV}/${KDE_ORG_NAME}-${PV}.tar.xz"
295 + KEYWORDS="~amd64 ~x86"
296 +fi
297 +
298 +DESCRIPTION="Library with common classes and functionality used by KDE finance applications"
299 +HOMEPAGE="https://www.linux-apps.com/content/show.php/libalkimia?content=137323
300 +https://community.kde.org/Alkimia"
301 +
302 +LICENSE="LGPL-2.1"
303 +SLOT="0/8"
304 +IUSE="doc gmp plasma"
305 +
306 +BDEPEND="
307 + virtual/pkgconfig
308 + doc? ( app-doc/doxygen )
309 +"
310 +DEPEND="
311 + >=dev-qt/qtdbus-${QTMIN}:5
312 + >=dev-qt/qtdeclarative-${QTMIN}:5
313 + >=dev-qt/qtgui-${QTMIN}:5
314 + >=dev-qt/qtnetwork-${QTMIN}:5
315 + >=dev-qt/qtwidgets-${QTMIN}:5
316 + >=kde-frameworks/kcompletion-${KFMIN}:5
317 + >=kde-frameworks/kcodecs-${KFMIN}:5
318 + >=kde-frameworks/kconfig-${KFMIN}:5
319 + >=kde-frameworks/kcoreaddons-${KFMIN}:5
320 + >=kde-frameworks/kdelibs4support-${KFMIN}:5
321 + >=kde-frameworks/ki18n-${KFMIN}:5
322 + >=kde-frameworks/kiconthemes-${KFMIN}:5
323 + >=kde-frameworks/knewstuff-${KFMIN}:5
324 + >=kde-frameworks/ktextwidgets-${KFMIN}:5
325 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
326 + !gmp? ( sci-libs/mpir:=[cxx] )
327 + gmp? ( dev-libs/gmp:0=[cxx] )
328 + plasma? (
329 + >=kde-frameworks/kpackage-${KFMIN}:5
330 + >=kde-frameworks/plasma-${KFMIN}:5
331 + )
332 +"
333 +RDEPEND="${DEPEND}"
334 +
335 +PATCHES=(
336 + "${FILESDIR}/${P}-cmake.patch"
337 + "${FILESDIR}/${P}-no-financequote.patch"
338 +)
339 +
340 +src_configure() {
341 + local mycmakeargs=(
342 + -DENABLE_FINANCEQUOTE=OFF
343 + -DBUILD_WITH_WEBKIT=OFF
344 + -DBUILD_DOXYGEN_DOCS=$(usex doc)
345 + $(cmake_use_find_package !gmp MPIR)
346 + -DBUILD_APPLETS=$(usex plasma)
347 + )
348 + ecm_src_configure
349 +}