diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2017-05-18 21:15:45 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2017-05-18 21:48:03 +0200 |
commit | 7ba20123fc43fc66d5151005ae529163ac030db3 (patch) | |
tree | 200f7268190fac0f2a12dfb297c0c247047ae9ca /app-office/kmymoney | |
parent | media-gfx/scour: Fix Python dependencies and support tests (diff) | |
download | gentoo-7ba20123fc43fc66d5151005ae529163ac030db3.tar.gz gentoo-7ba20123fc43fc66d5151005ae529163ac030db3.tar.bz2 gentoo-7ba20123fc43fc66d5151005ae529163ac030db3.zip |
app-office/kmymoney: Drop national onlinetasks
Removed in master branch for not being supported by banks anymore.
Fixes moc issue with Qt4 and >=boost-1.63
Reported-by: Mark Nowiasz <mark+gentoo@nowiasz.de>
Gentoo-bug: 617636
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'app-office/kmymoney')
-rw-r--r-- | app-office/kmymoney/files/kmymoney-4.8.0-drop-national-onlinetasks.patch | 289 | ||||
-rw-r--r-- | app-office/kmymoney/kmymoney-4.8.0-r2.ebuild | 90 |
2 files changed, 379 insertions, 0 deletions
diff --git a/app-office/kmymoney/files/kmymoney-4.8.0-drop-national-onlinetasks.patch b/app-office/kmymoney/files/kmymoney-4.8.0-drop-national-onlinetasks.patch new file mode 100644 index 000000000000..abcffed02275 --- /dev/null +++ b/app-office/kmymoney/files/kmymoney-4.8.0-drop-national-onlinetasks.patch @@ -0,0 +1,289 @@ +commit 5979b1e92d67124591d10b18b173852882f077e7 +Author: Christian Dávid <christian-david@web.de> +Date: Mon Jun 13 00:05:27 2016 +0200 + + Removed national credit transfers + + They are not supported by the banks anymore. So they can be removed. + + Unfortunately they contained the only example for a task converter. + Due to the removed plugin the CMakeLists.txt for sepa could be + simplified. + + Cherry-picked from d514e650 + +diff --git a/kmymoney/plugins/kbanking/aqbankingkmmoperators.cpp b/kmymoney/plugins/kbanking/aqbankingkmmoperators.cpp +index 6c2b5d8a..8b67bcbb 100644 +--- a/kmymoney/plugins/kbanking/aqbankingkmmoperators.cpp ++++ b/kmymoney/plugins/kbanking/aqbankingkmmoperators.cpp +@@ -24,9 +24,9 @@ + #include <aqbanking/value.h> + + #include "payeeidentifier/payeeidentifiertyped.h" ++#include "payeeidentifier/nationalaccount/nationalaccount.h" + #include "tasksettings/credittransfersettingsbase.h" + #include "onlinetasks/sepa/tasks/sepaonlinetransfer.h" +-#include "onlinetasks/national/tasks/germanonlinetransfer.h" + #include "gwenhywfarqtoperators.h" + + /** +@@ -49,40 +49,6 @@ static const QString dtausChars = QString::fromUtf8("0123456789ABCDEFGHIJKLMNOPQ + */ + static const QString sepaChars = QString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz':?.,- (+)/"); + +-QSharedPointer<germanOnlineTransfer::settings> AB_TransactionLimits_toGermanOnlineTaskSettings(const AB_TRANSACTION_LIMITS* aqlimits) +-{ +- Q_CHECK_PTR(aqlimits); +- +- QSharedPointer<creditTransferSettingsBase> settings(new creditTransferSettingsBase); +- +- // AqBanking returns 0 as min length even if it requires one +- int minLength = AB_TransactionLimits_GetMinLenPurpose(aqlimits); +- if (minLength == 0) +- minLength = 1; +- settings->setPurposeLimits(AB_TransactionLimits_GetMaxLinesPurpose(aqlimits), +- AB_TransactionLimits_GetMaxLenPurpose(aqlimits), +- minLength +- ); +- +- // AqBanking returns 0 as min length even if it requires one +- minLength = AB_TransactionLimits_GetMinLenRemoteName(aqlimits); +- if (minLength == 0) +- minLength = 1; +- settings->setRecipientNameLimits(AB_TransactionLimits_GetMaxLinesRemoteName(aqlimits), +- AB_TransactionLimits_GetMaxLenRemoteName(aqlimits), +- minLength +- ); +- +- minLength = AB_TransactionLimits_GetMinLenLocalName(aqlimits); +- if (minLength == 0) +- minLength = 1; +- settings->setPayeeNameLimits(1, AB_TransactionLimits_GetMaxLenLocalName(aqlimits), minLength); +- +- settings->setAllowedChars(dtausChars); +- +- return settings.dynamicCast<germanOnlineTransfer::settings>(); +-} +- + /** @todo Check if AB_TransactionLimits_GetMaxLenCustomerReference really is the limit for the sepa reference */ + QSharedPointer<sepaOnlineTransfer::settings> AB_TransactionLimits_toSepaOnlineTaskSettings(const AB_TRANSACTION_LIMITS* aqlimits) + { +diff --git a/kmymoney/plugins/kbanking/aqbankingkmmoperators.h b/kmymoney/plugins/kbanking/aqbankingkmmoperators.h +index a314cd72..5205a884 100644 +--- a/kmymoney/plugins/kbanking/aqbankingkmmoperators.h ++++ b/kmymoney/plugins/kbanking/aqbankingkmmoperators.h +@@ -29,7 +29,6 @@ + + #include "onlinetasks/interfaces/tasks/ionlinetasksettings.h" + #include "onlinetasks/sepa/tasks/sepaonlinetransfer.h" +-#include "onlinetasks/national/tasks/germanonlinetransfer.h" + + class AB_ACCOUNT; + class AB_TRANSACTION_LIMITS; +@@ -43,12 +42,6 @@ class nationalAccount; + } + + /** +- * @brief AB_TransactionLimits_toGermanOnlineTaskSettings +- * @param aqlimits IN +- */ +-QSharedPointer<germanOnlineTransfer::settings> AB_TransactionLimits_toGermanOnlineTaskSettings(const AB_TRANSACTION_LIMITS* aqlimits); +- +-/** + * @brief AB_TransactionLimits_toSepaOnlineTaskSettings + * @param aqlimits IN + */ +diff --git a/kmymoney/plugins/kbanking/mymoneybanking.cpp b/kmymoney/plugins/kbanking/mymoneybanking.cpp +index d8c4a571..a64eaf61 100644 +--- a/kmymoney/plugins/kbanking/mymoneybanking.cpp ++++ b/kmymoney/plugins/kbanking/mymoneybanking.cpp +@@ -598,11 +598,7 @@ void KBankingPlugin::sendOnlineJob(QList<onlineJob>& jobs) + + if (!jobs.isEmpty()) { + foreach (onlineJob job, jobs) { +- if (germanOnlineTransfer::name() == job.task()->taskName()) { +- onlineJobTyped<germanOnlineTransfer> typedJob(job); +- enqueTransaction(typedJob); +- job = typedJob; +- } else if (sepaOnlineTransfer::name() == job.task()->taskName()) { ++ if (sepaOnlineTransfer::name() == job.task()->taskName()) { + onlineJobTyped<sepaOnlineTransfer> typedJob(job); + enqueTransaction(typedJob); + job = typedJob; +@@ -646,14 +642,8 @@ QStringList KBankingPlugin::availableJobs(QString accountId) + + // Check availableJobs + +- // national transfer +- AB_JOB *abJob = AB_JobSingleTransfer_new(abAccount); +- if (AB_Job_CheckAvailability(abJob) == 0) +- list.append(germanOnlineTransfer::name()); +- AB_Job_free(abJob); +- + // sepa transfer +- abJob = AB_JobSepaTransfer_new(abAccount); ++ AB_JOB* abJob = AB_JobSepaTransfer_new(abAccount); + if (AB_Job_CheckAvailability(abJob) == 0) + list.append(sepaOnlineTransfer::name()); + AB_Job_free(abJob); +@@ -686,17 +676,7 @@ IonlineTaskSettings::ptr KBankingPlugin::settings(QString accountId, QString tas + if (abAcc == 0) + return IonlineTaskSettings::ptr(); + +- if (germanOnlineTransfer::name() == taskName) { +- // Get Limits for germanOnlineTransfer +- QScopedPointer<AB_JOB, QScopedPointerAbJobDeleter> abJob(AB_JobSingleTransfer_new(abAcc)); +- if (AB_Job_CheckAvailability(abJob.data()) != 0) +- return IonlineTaskSettings::ptr(); +- +- const AB_TRANSACTION_LIMITS* limits = AB_Job_GetFieldLimits(abJob.data()); +- return AB_TransactionLimits_toGermanOnlineTaskSettings(limits).dynamicCast<IonlineTaskSettings>(); +- //! @todo needs free? because that is not possible with const AB_TRANSACTION_LIMITS* +- // AB_TransactionLimits_free( limits ); +- } else if (sepaOnlineTransfer::name() == taskName) { ++ if (sepaOnlineTransfer::name() == taskName) { + // Get limits for sepaonlinetransfer + QScopedPointer<AB_JOB, QScopedPointerAbJobDeleter> abJob(AB_JobSepaTransfer_new(abAcc)); + if (AB_Job_CheckAvailability(abJob.data()) != 0) +@@ -707,62 +687,6 @@ IonlineTaskSettings::ptr KBankingPlugin::settings(QString accountId, QString tas + return IonlineTaskSettings::ptr(); + } + +-bool KBankingPlugin::enqueTransaction(onlineJobTyped<germanOnlineTransfer>& job) +-{ +- /* get AqBanking account */ +- QString accId = job.constTask()->responsibleAccount(); +- AB_ACCOUNT *abAccount = aqbAccount(accId); +- if (!abAccount) { +- job.addJobMessage(onlineJobMessage(onlineJobMessage::warning, "KBanking", i18n("<qt>" +- "The given application account <b>%1</b> " +- "has not been mapped to an online " +- "account." +- "</qt>", +- MyMoneyFile::instance()->account(accId).name()))); +- return false; +- } +- //setupAccountReference(acc, ba); // needed? +- +- AB_JOB *abJob = AB_JobSingleTransfer_new(abAccount); +- int rv = AB_Job_CheckAvailability(abJob); +- if (rv) { +- qDebug("AB_ERROR_OFFSET is %i", AB_ERROR_OFFSET); +- job.addJobMessage(onlineJobMessage::error, "AqBanking", +- QString("National credit transfers for account \"%1\" are not available, error code %2.").arg(MyMoneyFile::instance()->account(accId).name(), rv), +- QString::number(rv) +- ); +- return false; +- } +- AB_TRANSACTION *abTransaction = AB_Transaction_new(); +- +- // Recipient +- payeeIdentifiers::nationalAccount beneficiaryAcc = job.task()->beneficiaryTyped(); +- AB_Transaction_SetRemoteAccount(abTransaction, beneficiaryAcc); +- +- // Origin Account +- AB_Transaction_SetLocalAccount(abTransaction, abAccount); +- +- // Purpose +- QStringList qPurpose = job.task()->purpose().split('\n', QString::SkipEmptyParts); +- GWEN_STRINGLIST *purpose = GWEN_StringList_fromQStringList(qPurpose); +- AB_Transaction_SetPurpose(abTransaction, purpose); +- GWEN_StringList_free(purpose); +- +- // Other +- AB_Transaction_SetTextKey(abTransaction, job.task()->textKey()); +- AB_Transaction_SetValue(abTransaction, AB_Value_fromMyMoneyMoney(job.task()->value())); +- +- /** @todo LOW remove Debug info */ +- qDebug() << "SetTransaction: " << AB_Job_SetTransaction(abJob, abTransaction); +- +- GWEN_DB_NODE *gwenNode = AB_Job_GetAppData(abJob); +- GWEN_DB_SetCharValue(gwenNode, GWEN_DB_FLAGS_DEFAULT, "kmmOnlineJobId", m_kbanking->mappingId(job).toLatin1().constData()); +- +- qDebug() << "Enqueue: " << m_kbanking->enqueueJob(abJob); +- //delete localAcc; +- return true; +-} +- + bool KBankingPlugin::enqueTransaction(onlineJobTyped<sepaOnlineTransfer>& job) + { + /* get AqBanking account */ +diff --git a/kmymoney/plugins/kbanking/mymoneybanking.h b/kmymoney/plugins/kbanking/mymoneybanking.h +index c2559ae7..7936704e 100644 +--- a/kmymoney/plugins/kbanking/mymoneybanking.h ++++ b/kmymoney/plugins/kbanking/mymoneybanking.h +@@ -64,7 +64,6 @@ class KBAccountSettings; + + #include "mymoney/onlinejobtyped.h" + #include "onlinetasks/sepa/tasks/sepaonlinetransfer.h" +-#include "onlinetasks/national/tasks/germanonlinetransfer.h" + + /** + * This class represents the KBanking plugin towards KMymoney. +@@ -184,7 +183,6 @@ private: + */ + void startPasswordTimer(); + +- bool enqueTransaction(onlineJobTyped<germanOnlineTransfer>& job); + bool enqueTransaction(onlineJobTyped<sepaOnlineTransfer>& job); + + +diff --git a/kmymoney/plugins/kbanking/tasksettings/credittransfersettingsbase.h b/kmymoney/plugins/kbanking/tasksettings/credittransfersettingsbase.h +index 28d55a06..3bac6ce8 100644 +--- a/kmymoney/plugins/kbanking/tasksettings/credittransfersettingsbase.h ++++ b/kmymoney/plugins/kbanking/tasksettings/credittransfersettingsbase.h +@@ -20,14 +20,13 @@ + #define CREDITTRANSFERSETTINGSBASE_H + + #include "onlinetasks/sepa/tasks/sepaonlinetransfer.h" +-#include "onlinetasks/national/tasks/germanonlinetransfer.h" + + /** + * @brief Base class for sepaCreditTransfer and germanCreditTransfer settings + * + * @internal Both credit transfers have similar fields + */ +-class creditTransferSettingsBase : public sepaOnlineTransfer::settings, public germanOnlineTransfer::settings ++class creditTransferSettingsBase : public sepaOnlineTransfer::settings + { + public: + creditTransferSettingsBase() +diff --git a/kmymoney/plugins/onlinetasks/CMakeLists.txt b/kmymoney/plugins/onlinetasks/CMakeLists.txt +index 7be53137..2e57b214 100644 +--- a/kmymoney/plugins/onlinetasks/CMakeLists.txt ++++ b/kmymoney/plugins/onlinetasks/CMakeLists.txt +@@ -1,5 +1,4 @@ + + add_subdirectory(interfaces) + add_subdirectory(sepa) +-add_subdirectory(national) + add_subdirectory(unavailabletask) +diff --git a/kmymoney/plugins/onlinetasks/sepa/CMakeLists.txt b/kmymoney/plugins/onlinetasks/sepa/CMakeLists.txt +index 3c2d9db1..e3962d7a 100644 +--- a/kmymoney/plugins/onlinetasks/sepa/CMakeLists.txt ++++ b/kmymoney/plugins/onlinetasks/sepa/CMakeLists.txt +@@ -2,6 +2,7 @@ set( sepaOnlineTasks_SRCS + tasks/sepaonlinetransferimpl.cpp + ui/sepacredittransferedit.cpp + sepastorageplugin.cpp ++ sepaonlinetasksloader.cpp + ) + + set( sepaOnlineTasks_HEADER +@@ -12,14 +13,8 @@ kde4_add_ui_files( sepaOnlineTasks_SRCS + ui/sepacredittransferedit.ui + ) + +-automoc4( konlinetasks_sepa_OBJECTS sepaOnlineTasks_SRCS) +-add_library( konlinetasks_sepa_OBJECTS OBJECT ${sepaOnlineTasks_SRCS} ) +- +-# Add actual plugin here it is not part of the objects +-# needed if multiple plugins are linked (needed for unit tests) +-kde4_add_plugin(konlinetasks_sepa +- $<TARGET_OBJECTS:konlinetasks_sepa_OBJECTS> +- sepaonlinetasksloader.cpp ++add_library(konlinetasks_sepa MODULE ++ ${sepaOnlineTasks_SRCS} + ) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kmymoney-sepaorders.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/kmymoney-sepaorders.desktop) diff --git a/app-office/kmymoney/kmymoney-4.8.0-r2.ebuild b/app-office/kmymoney/kmymoney-4.8.0-r2.ebuild new file mode 100644 index 000000000000..757dc00ef9c3 --- /dev/null +++ b/app-office/kmymoney/kmymoney-4.8.0-r2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_LINGUAS="bs ca ca@valencia cs da de el en_GB es et eu fi fr gl +hu it kk nds nl pl pt pt_BR ro ru sk sv tr uk zh_CN zh_TW" +KDE_HANDBOOK="optional" +VIRTUALX_REQUIRED="test" +VIRTUALDBUS_TEST="true" +inherit kde4-base + +DESCRIPTION="Personal finance manager by KDE" +HOMEPAGE="https://kmymoney.org/" +if [[ ${KDE_BUILD_TYPE} = release ]]; then + SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" +fi + +LICENSE="GPL-2" +SLOT="4" +KEYWORDS="~amd64 ~x86" +IUSE="calendar debug doc hbci ofx pim quotes weboob" + +COMMON_DEPEND=" + >=app-crypt/gpgme-1.7.0[cxx] + <app-office/libalkimia-6.0.0 + dev-libs/gmp:0= + dev-libs/libgpg-error + x11-misc/shared-mime-info + calendar? ( dev-libs/libical:= ) + hbci? ( + >=net-libs/aqbanking-5.5.1 + >=sys-libs/gwenhywfar-4.15.3[qt4] + ) + ofx? ( >=dev-libs/libofx-0.9.4 ) + pim? ( $(add_kdeapps_dep kdepimlibs) ) + weboob? ( www-client/weboob ) +" +RDEPEND="${COMMON_DEPEND} + quotes? ( dev-perl/Finance-Quote ) +" +DEPEND="${COMMON_DEPEND} + dev-libs/boost + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${P}-tests.patch" + "${FILESDIR}/${P}-alkimia-detect.patch" + "${FILESDIR}/${P}-fix-csvdialog.patch" + "${FILESDIR}/${P}-soversion.patch" + "${FILESDIR}/${P}-gpgmepp.patch" + "${FILESDIR}/${P}-kdepimlibs-optional.patch" + "${FILESDIR}/${P}-drop-national-onlinetasks.patch" +) + +src_prepare() { + kde4-base_src_prepare + + # don't install as executable + sed -i kmymoney/CMakeLists.txt \ + -e "/install.*kmymoney.appdata/ s/PROGRAMS/FILES/" || die + + # bug #617636, complement to drop-national-onlinetasks.patch + rm -r kmymoney/plugins/onlinetasks/national || die +} + +src_configure() { + local mycmakeargs=( + -DUSE_QT_DESIGNER=OFF + -DENABLE_LIBICAL=$(usex calendar) + -DUSE_DEVELOPER_DOC=$(usex doc) + -DENABLE_KBANKING=$(usex hbci) + -DENABLE_LIBOFX=$(usex ofx) + $(cmake-utils_use_find_package pim KdepimLibs) + -DENABLE_WEBOOB=$(usex weboob) + ) + kde4-base_src_configure +} + +src_compile() { + kde4-base_src_compile + use doc && kde4-base_src_compile apidoc +} + +src_install() { + use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/") + kde4-base_src_install +} |