From ba3fb2c14a36adfd99fddf2af521224e87318ef6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jun 23 2014 12:08:11 +0000 Subject: kmymoney-4.6.6 --- diff --git a/.gitignore b/.gitignore index 50ce06f..e8fd315 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/kmymoney-4.6.5.tar.xz +/kmymoney-4.6.6.tar.xz diff --git a/0002-Revert-Add-VAT-split-to-file-import.patch b/0002-Revert-Add-VAT-split-to-file-import.patch deleted file mode 100644 index 4833875..0000000 --- a/0002-Revert-Add-VAT-split-to-file-import.patch +++ /dev/null @@ -1,199 +0,0 @@ -From 1b9df8d665a62ffacd208bd7dbc091e175ae8ab5 Mon Sep 17 00:00:00 2001 -From: Alvaro Soliverez -Date: Fri, 20 Jun 2014 12:15:34 -0300 -Subject: [PATCH 2/3] Revert "Add VAT split to file import." as it fails to - build This reverts commit 83aa0cddba2f2a2aa415cc365d926171d00f0da2. - ---- - kmymoney/converter/mymoneystatementreader.cpp | 3 -- - kmymoney/dialogs/transactioneditor.cpp | 59 +++++++++++++++++++++++++-- - kmymoney/mymoney/mymoneyfile.cpp | 57 -------------------------- - kmymoney/mymoney/mymoneyfile.h | 11 ----- - 4 files changed, 56 insertions(+), 74 deletions(-) - -diff --git a/kmymoney/converter/mymoneystatementreader.cpp b/kmymoney/converter/mymoneystatementreader.cpp -index 832d026..0742006 100644 ---- a/kmymoney/converter/mymoneystatementreader.cpp -+++ b/kmymoney/converter/mymoneystatementreader.cpp -@@ -1024,9 +1024,6 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra - s.setValue(-s1.value()); - s.setAccountId(payeeObj.defaultAccountId()); - t.addSplit(s); -- MyMoneyFile* file = MyMoneyFile::instance(); -- MyMoneyAccount category = file->account(payeeObj.defaultAccountId()); -- file->addVATSplit(t, m_account, category, statementTransactionUnderImport.m_amount); - } else if (t_in.m_listSplits.isEmpty() && !d->m_skipCategoryMatching) { - MyMoneyTransactionFilter filter(thisaccount.id()); - filter.addPayee(payeeid); -diff --git a/kmymoney/dialogs/transactioneditor.cpp b/kmymoney/dialogs/transactioneditor.cpp -index f17b5a1..21986a8 100644 ---- a/kmymoney/dialogs/transactioneditor.cpp -+++ b/kmymoney/dialogs/transactioneditor.cpp -@@ -1640,10 +1640,63 @@ bool StdTransactionEditor::addVatSplit(MyMoneyTransaction& tr, const MyMoneyMone - if (tr.splitCount() != 2) - return false; - -+ bool rc = false; - MyMoneyFile* file = MyMoneyFile::instance(); -- // extract the category split from the transaction -- MyMoneyAccount category = file->account(tr.splitByAccount(m_account.id(), false).accountId()); -- return file->addVATSplit(tr, m_account, category, amount); -+ -+ try { -+ MyMoneySplit cat; // category -+ MyMoneySplit tax; // tax -+ -+ // extract the category split from the transaction -+ MyMoneyAccount category = file->account(tr.splitByAccount(m_account.id(), false).accountId()); -+ if (category.value("VatAccount").isEmpty()) -+ return false; -+ MyMoneyAccount vatAcc = file->account(category.value("VatAccount").toLatin1()); -+ const MyMoneySecurity& asec = file->security(m_account.currencyId()); -+ const MyMoneySecurity& csec = file->security(category.currencyId()); -+ const MyMoneySecurity& vsec = file->security(vatAcc.currencyId()); -+ if (asec.id() != csec.id() || asec.id() != vsec.id()) { -+ qDebug("Auto VAT assignment only works if all three accounts use the same currency."); -+ return false; -+ } -+ -+ MyMoneyMoney vatRate(vatAcc.value("VatRate")); -+ MyMoneyMoney gv, nv; // gross value, net value -+ int fract = m_account.fraction(); -+ -+ if (!vatRate.isZero()) { -+ -+ tax.setAccountId(vatAcc.id()); -+ -+ // qDebug("vat amount is '%s'", category.value("VatAmount").toLatin1()); -+ if (category.value("VatAmount").toLower() != QString("net")) { -+ // split value is the gross value -+ gv = amount; -+ nv = gv / (MyMoneyMoney(1, 1) + vatRate); -+ MyMoneySplit catSplit = tr.splitByAccount(m_account.id(), false); -+ catSplit.setShares(-nv.convert(fract)); -+ catSplit.setValue(catSplit.shares()); -+ tr.modifySplit(catSplit); -+ -+ } else { -+ // split value is the net value -+ nv = amount; -+ gv = nv * (MyMoneyMoney(1, 1) + vatRate); -+ MyMoneySplit accSplit = tr.splitByAccount(m_account.id()); -+ accSplit.setValue(gv.convert(fract)); -+ accSplit.setShares(accSplit.value()); -+ tr.modifySplit(accSplit); -+ } -+ -+ tax.setValue(-(gv - nv).convert(fract)); -+ tax.setShares(tax.value()); -+ tr.addSplit(tax); -+ rc = true; -+ } -+ } catch (MyMoneyException *e) { -+ delete e; -+ } -+ return rc; - } - - MyMoneyMoney StdTransactionEditor::removeVatSplit(void) -diff --git a/kmymoney/mymoney/mymoneyfile.cpp b/kmymoney/mymoney/mymoneyfile.cpp -index f563ec4..a6c2a77 100644 ---- a/kmymoney/mymoney/mymoneyfile.cpp -+++ b/kmymoney/mymoney/mymoneyfile.cpp -@@ -39,7 +39,6 @@ - // ---------------------------------------------------------------------------- - // Project Includes - #include "storage/mymoneyseqaccessmgr.h" --#include "mymoneyaccount.h" - #include "mymoneyreport.h" - #include "mymoneybalancecache.h" - #include "mymoneybudget.h" -@@ -2655,63 +2654,7 @@ void MyMoneyFile::removeBudget(const MyMoneyBudget& budget) - d->addCacheNotification(budget.id(), false); - } - --bool MyMoneyFile::addVATSplit(MyMoneyTransaction& transaction, const MyMoneyAccount& account, const MyMoneyAccount& category, const MyMoneyMoney& amount) --{ -- bool rc = false; -- -- try { -- MyMoneySplit cat; // category -- MyMoneySplit tax; // tax -- -- if (category.value("VatAccount").isEmpty()) -- return false; -- MyMoneyAccount vatAcc = this->account(category.value("VatAccount").toLatin1()); -- const MyMoneySecurity& asec = security(account.currencyId()); -- const MyMoneySecurity& csec = security(category.currencyId()); -- const MyMoneySecurity& vsec = security(vatAcc.currencyId()); -- if (asec.id() != csec.id() || asec.id() != vsec.id()) { -- qDebug("Auto VAT assignment only works if all three accounts use the same currency."); -- return false; -- } -- -- MyMoneyMoney vatRate(vatAcc.value("VatRate")); -- MyMoneyMoney gv, nv; // gross value, net value -- int fract = account.fraction(); -- -- if (!vatRate.isZero()) { -- -- tax.setAccountId(vatAcc.id()); -- -- // qDebug("vat amount is '%s'", category.value("VatAmount").toLatin1()); -- if (category.value("VatAmount").toLower() != QString("net")) { -- // split value is the gross value -- gv = amount; -- nv = gv / (MyMoneyMoney(1, 1) + vatRate); -- MyMoneySplit catSplit = transaction.splitByAccount(account.id(), false); -- catSplit.setShares(-nv.convert(fract)); -- catSplit.setValue(catSplit.shares()); -- transaction.modifySplit(catSplit); - -- } else { -- // split value is the net value -- nv = amount; -- gv = nv * (MyMoneyMoney(1, 1) + vatRate); -- MyMoneySplit accSplit = transaction.splitByAccount(account.id()); -- accSplit.setValue(gv.convert(fract)); -- accSplit.setShares(accSplit.value()); -- transaction.modifySplit(accSplit); -- } -- -- tax.setValue(-(gv - nv).convert(fract)); -- tax.setShares(tax.value()); -- transaction.addSplit(tax); -- rc = true; -- } -- } catch (MyMoneyException *e) { -- delete e; -- } -- return rc; --} - - bool MyMoneyFile::isReferenced(const MyMoneyObject& obj, const MyMoneyFileBitArray& skipChecks) const - { -diff --git a/kmymoney/mymoney/mymoneyfile.h b/kmymoney/mymoney/mymoneyfile.h -index c66acaf..6c1aa25 100644 ---- a/kmymoney/mymoney/mymoneyfile.h -+++ b/kmymoney/mymoney/mymoneyfile.h -@@ -1328,17 +1328,6 @@ public: - */ - void removeBudget(const MyMoneyBudget& budget); - -- /** -- * This method is used to add a VAT split to a transaction. -- * -- * @param transaction reference to the transaction -- * @param account reference to the account -- * @param category reference to the category -- * @param amount reference to the amount of the VAT split -- * -- * @return true if a VAT split has been added -- */ -- bool addVATSplit(MyMoneyTransaction& transaction, const MyMoneyAccount& account, const MyMoneyAccount& category, const MyMoneyMoney& amount); - - /** - * This method checks, if the given @p object is referenced --- -1.9.3 - diff --git a/0003-Fixed-linking-with-Gwenhywfar-4.6.0.patch b/0003-Fixed-linking-with-Gwenhywfar-4.6.0.patch deleted file mode 100644 index caab399..0000000 --- a/0003-Fixed-linking-with-Gwenhywfar-4.6.0.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 273255ce1ff61c370c517a56e1fba8b39c47ec16 Mon Sep 17 00:00:00 2001 -From: Lukasz Maszczynski -Date: Fri, 26 Jul 2013 22:51:30 +0200 -Subject: [PATCH 3/3] Fixed linking with Gwenhywfar >= 4.6.0 - -used a list of libraries to link with as reported by pkg-config instead -of hardcoded gwengui-qt4 (in gwenhywfar 4.6.0, gwengui-qt4 is no longer -standalone - it depends on gwengui-cpp) - -REVIEW: 111672 ---- - cmake/modules/FindGwenhywfar.cmake | 45 ++++++++++++++++++++------------------ - 1 file changed, 24 insertions(+), 21 deletions(-) - -diff --git a/cmake/modules/FindGwenhywfar.cmake b/cmake/modules/FindGwenhywfar.cmake -index 41961e6..526c041 100644 ---- a/cmake/modules/FindGwenhywfar.cmake -+++ b/cmake/modules/FindGwenhywfar.cmake -@@ -5,6 +5,8 @@ - # GWENHYWFAR_LIBRARIES - The libraries needed to use Gwenhywfar - # GWENHYWFAR_VERSION = The version of Gwenhywfar as defined in version.h - -+find_package(PkgConfig) -+ - set(GWENHYWFAR_FOUND FALSE) - - if(NOT GWENHYWFAR_MIN_VERSION) -@@ -16,26 +18,27 @@ if(GWENHYWFAR_INCLUDE_DIRS AND GWENHYWFAR_LIBRARIES) - set(GWENHYWFAR_FIND_QUIETLY TRUE) - endif(GWENHYWFAR_INCLUDE_DIRS AND GWENHYWFAR_LIBRARIES) - --PKG_CHECK_MODULES(GWENHYWFAR gwenhywfar>=${GWENHYWFAR_MIN_VERSION}) -- --if(${GWENHYWFAR_FOUND}) -- PKG_CHECK_MODULES(QT4GUI gwengui-qt4) -- if (NOT ${QT4GUI_FOUND}) -- set(GWENHYWFAR_FOUND FALSE) -- unset(GWENHYWFAR_INCLUDE_DIRS) -- unset(GWENHYWFAR_LIBRARIES) -- unset(GWENHYWFAR_VERSION) -- message(STATUS "Gwenhywfar does not have the Q4Banking frontend enabled") -- endif (NOT ${QT4GUI_FOUND}) -- -- if(${GWENHYWFAR_FOUND}) -- find_library(GWENHYWFAR_GUI_LIBRARY NAMES gwengui-qt4 libgwengui-qt4 -- HINTS ${GWENHYWFAR_LIBRARY_DIRS}) -- if(GWENHYWFAR_GUI_LIBRARY STREQUAL "GWENHYWFAR_GUI_LIBRARY-NOTFOUND") -- set(GWENHYWFAR_GUI_LIBRARY "") -- endif(GWENHYWFAR_GUI_LIBRARY STREQUAL "GWENHYWFAR_GUI_LIBRARY-NOTFOUND") -- set(GWENHYWFAR_LIBRARIES ${GWENHYWFAR_GUI_LIBRARY} ${GWENHYWFAR_LIBRARIES}) -- endif(${GWENHYWFAR_FOUND}) --endif(${GWENHYWFAR_FOUND}) -+PKG_CHECK_MODULES(GWENHYWFAR_CORE gwenhywfar>=${GWENHYWFAR_MIN_VERSION}) -+PKG_CHECK_MODULES(GWENHYWFAR_QT4GUI gwengui-qt4>=${GWENHYWFAR_MIN_VERSION}) -+ -+if (${GWENHYWFAR_CORE_FOUND} AND ${GWENHYWFAR_QT4GUI_FOUND}) -+ set(GWENHYWFAR_FOUND TRUE) -+ set(GWENHYWFAR_INCLUDE_DIRS ${GWENHYWFAR_CORE_INCLUDE_DIRS}) -+ set(GWENHYWFAR_LIBRARIES ${GWENHYWFAR_QT4GUI_LIBRARIES} ${GWENHYWFAR_CORE_LIBRARIES}) -+ set(GWENHYWFAR_VERSION ${GWENHYWFAR_CORE_VERSION}) -+else (${GWENHYWFAR_CORE_FOUND} AND ${GWENHYWFAR_QT4GUI_FOUND}) -+ set(GWENHYWFAR_FOUND FALSE) -+ unset(GWENHYWFAR_INCLUDE_DIRS) -+ unset(GWENHYWFAR_LIBRARIES) -+ unset(GWENHYWFAR_VERSION) -+endif (${GWENHYWFAR_CORE_FOUND} AND ${GWENHYWFAR_QT4GUI_FOUND}) -+ -+if (NOT ${GWENHYWFAR_QT4GUI_FOUND}) -+ message(WARNING "Gwenhywfar does not have the Qt4Banking frontend enabled") -+endif (NOT ${GWENHYWFAR_QT4GUI_FOUND}) -+ -+if (NOT ${GWENHYWFAR_CORE_VERSION} VERSION_EQUAL ${GWENHYWFAR_QT4GUI_VERSION}) -+ message(WARNING "Gwenhywfar libraries versions mismatch") -+endif (NOT ${GWENHYWFAR_CORE_VERSION} VERSION_EQUAL ${GWENHYWFAR_QT4GUI_VERSION}) - - mark_as_advanced(GWENHYWFAR_INCLUDE_DIRS GWENHYWFAR_LIBRARIES) --- -1.9.3 - diff --git a/kmymoney.spec b/kmymoney.spec index a7d3041..2c35a45 100644 --- a/kmymoney.spec +++ b/kmymoney.spec @@ -1,7 +1,7 @@ Summary: Personal finance Name: kmymoney -Version: 4.6.5 +Version: 4.6.6 Release: 1%{?dist} # kmm itself is GPLv2+ @@ -13,9 +13,6 @@ Source0: http://download.kde.org/stable/kmymoney/%{version}/src/kmymoney-%{versi ## upstreamable patches ## upstream patches -Patch102: 0002-Revert-Add-VAT-split-to-file-import.patch -Patch103: 0003-Fixed-linking-with-Gwenhywfar-4.6.0.patch - BuildRequires: boost-devel BuildRequires: cppunit-devel @@ -82,9 +79,6 @@ BuildArch: noarch %prep %setup -q -n kmymoney-%{version} -%patch102 -p1 -b .0002 -%patch103 -p1 -b .0003 - ## kdchart munging begin sed -i.kdchart -e 's|ADD_SUBDIRECTORY( libkdchart )|#ADD_SUBDIRECTORY( libkdchart )|' CMakeLists.txt sed -i.kdchart -e 's|kmm_kdchart|kdchart|' kmymoney/CMakeLists.txt @@ -170,6 +164,9 @@ update-mime-database %{_kde4_datadir}/mime &> /dev/null ||: %changelog +* Mon Jun 23 2014 Rex Dieter 4.6.6-1 +- kmymoney-4.6.6 + * Fri Jun 20 2014 Rex Dieter 4.6.5-1 - kmymoney-4.6.5 diff --git a/sources b/sources index 6693572..bb667ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f1703dee515494a1e0edb9b6a61c02d0 kmymoney-4.6.5.tar.xz +c346d16683666d537ce4141498141829 kmymoney-4.6.6.tar.xz