svn commit: r313598 - head/finance/kmymoney-kde4/files
David Naylor
dbn at FreeBSD.org
Thu Mar 7 16:13:36 UTC 2013
Author: dbn
Date: Thu Mar 7 16:13:35 2013
New Revision: 313598
URL: http://svnweb.freebsd.org/changeset/ports/313598
Log:
Back-port commit 77209f84: Fix build (of finance/kmymoney-kde4) with GMP 5.1.0
"""
GMP 5.1.0 no longer has implicit conversions to mpz_class from mpq_class
or mpf_class. So we have to have an explicit conversion.
"""
Approved by: bdrewery (mentor), jhale (maintainer timeout: 2 weeks)
Added:
head/finance/kmymoney-kde4/files/patch-kmymoney_mymoney_mymoneymoney.cpp (contents, props changed)
Added: head/finance/kmymoney-kde4/files/patch-kmymoney_mymoney_mymoneymoney.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/finance/kmymoney-kde4/files/patch-kmymoney_mymoney_mymoneymoney.cpp Thu Mar 7 16:13:35 2013 (r313598)
@@ -0,0 +1,24 @@
+commit 77209f84a85360e98d2e805d412956a8f2a77db3
+Author: Alex Merry <kde at randomguy3.me.uk>
+Date: Fri Feb 1 15:31:54 2013 +0000
+
+ Fix build with GMP 5.1.0
+
+ GMP 5.1.0 no longer has implicit conversions to mpz_class from mpq_class
+ or mpf_class. So we have to have an explicit conversion.
+
+ BUG: 312481
+
+diff --git a/kmymoney/mymoney/mymoneymoney.cpp b/kmymoney/mymoney/mymoneymoney.cpp
+index aeed135..5de7fa9 100644
+--- kmymoney/mymoney/mymoneymoney.cpp
++++ kmymoney/mymoney/mymoneymoney.cpp
+@@ -158,7 +158,7 @@ QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool
+ // be much better than using KGlobal::locale()->formatMoney.
+ bool bNegative = false;
+ mpz_class left = value / static_cast<MyMoneyMoney>(convertDenominator(d)).valueRef().get_den();
+- mpz_class right = (valueRef() - mpq_class(left)) * denom;
++ mpz_class right = mpz_class((valueRef() - mpq_class(left)) * denom);
+
+ if (right < 0) {
+ right = -right;
More information about the svn-ports-all
mailing list