Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Feb 2014 03:28:42 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/186418: finance/qhacc: Update to version 4.3
Message-ID:  <20140204032842.ef0ff625b54078399ed9d4ee@yahoo.com>
Resent-Message-ID: <201402031840.s13Ie1XP035005@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186418
>Category:       ports
>Synopsis:       finance/qhacc: Update to version 4.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 03 18:40:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p7 i386
>Organization:
>Environment:
>Description:
- Update to version 4.3

New file:
files/patch-engine__DefaultQHaccLoader.cpp
files/patch-engine__GpgQHaccLoader.cpp
files/patch-engine__IDableEntity.cpp
files/patch-engine__calculators__PayeeCalculator.cpp
files/patch-engine__calculators__PieCalculator.cpp
files/patch-tools__EncryptingLoader.cpp

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/finance/qhacc/Makefile finance/qhacc/Makefile
--- /usr/ports/finance/qhacc/Makefile	2013-12-03 15:29:38.000000000 +0900
+++ finance/qhacc/Makefile	2014-02-04 00:00:00.000000000 +0900
@@ -2,7 +2,7 @@
 # $FreeBSD: head/finance/qhacc/Makefile 335538 2013-12-02 20:12:02Z pawel $
 
 PORTNAME=	qhacc
-PORTVERSION=	4.2.1
+PORTVERSION=	4.3
 CATEGORIES=	finance
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 EXTRACT_SUFX=	.tgz
@@ -12,13 +12,13 @@
 
 LICENSE=	GPLv2 # (or later)
 
-LIB_DEPENDS=	libqwt6.so:${PORTSDIR}/x11-toolkits/qwt6
+LIB_DEPENDS=	libgpgme.so:${PORTSDIR}/security/gpgme \
+		libqwt6.so:${PORTSDIR}/x11-toolkits/qwt6
 
 OPTIONS_DEFINE=	DOCS
 
 USES=		qmake:norecursive
 USE_QT4=	corelib gui sql moc_build rcc_build uic_build
-USE_GCC=	yes
 USE_CXXSTD=	c++0x
 USE_LDCONFIG=	yes
 
@@ -26,23 +26,32 @@
 
 .include <bsd.port.options.mk>
 
+.if ${OSVERSION} < 1000054
+USE_GCC=	yes
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e \
 		'/^INSTALLDIR/s|=.*|=${DATADIR}| ; \
 		 /^QWTINCS/s|=.*|=${LOCALBASE}/include/qwt6| ; \
 		 /^QWTLIBS/s|=.*|=${LOCALBASE}/lib -lqwt6| ; \
-		 /^QMAKE_/s|=.*|=| ; \
-		 /+= debug/s|^|#|' ${WRKSRC}/user.pri
+		 /+= debug/s|^|#| ; \
+		 /^QMAKE_CFLAGS/s|=.*|= $$$${GPGMEINCS}| ; \
+		 /^QMAKE_CXXFLAGS/s|=.*|= $$$${GPGMEINCS}| ; \
+		 /^INCLUDEPATH/s|=.*|=|' ${WRKSRC}/user.pri
 	@${REINPLACE_CMD} -e \
 		's|/usr/include|${LOCALBASE}/include| ; \
 		 s|-lqwt||' ${WRKSRC}/gui/gui.pro
 	@${REINPLACE_CMD} -e \
 		's|/../qm/|/../share/qhacc/|' ${WRKSRC}/gui/main.cpp
+	@${FIND} ${WRKSRC} -name "*.cpp" -or -name "*.h" -or -name "*.ui" | \
+		${XARGS} ${REINPLACE_CMD} -e \
+		's|qwt/||'
 
 do-install:
 	(cd ${WRKSRC}/gui/build/release && ${INSTALL_PROGRAM} \
 		qhacc ${STAGEDIR}${PREFIX}/bin)
-	(cd ${WRKSRC}/engine/build/release && ${INSTALL_DATA} \
+	(cd ${WRKSRC}/engine/build/release && ${INSTALL_LIB} \
 		libengine.so.1.0.0 ${STAGEDIR}${PREFIX}/lib)
 	@${LN} -sf libengine.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libengine.so
 	@${LN} -sf libengine.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libengine.so.1
diff -urN /usr/ports/finance/qhacc/distinfo finance/qhacc/distinfo
--- /usr/ports/finance/qhacc/distinfo	2013-12-03 15:29:38.000000000 +0900
+++ finance/qhacc/distinfo	2014-02-04 00:00:00.000000000 +0900
@@ -1,2 +1,2 @@
-SHA256 (qhacc-4.2.1.tgz) = 2e491f0c6c47d81f2ed32f8bad49bb18c6c19a43a05679d2e445c7e081bbe08d
-SIZE (qhacc-4.2.1.tgz) = 145190
+SHA256 (qhacc-4.3.tgz) = 007d0ccf0e9e239a215dabe4b305ca9c655673c123f570c0908567f97a32083f
+SIZE (qhacc-4.3.tgz) = 150670
diff -urN /usr/ports/finance/qhacc/files/patch-engine__DefaultQHaccLoader.cpp finance/qhacc/files/patch-engine__DefaultQHaccLoader.cpp
--- /usr/ports/finance/qhacc/files/patch-engine__DefaultQHaccLoader.cpp	1970-01-01 09:00:00.000000000 +0900
+++ finance/qhacc/files/patch-engine__DefaultQHaccLoader.cpp	2014-02-04 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- engine/DefaultQHaccLoader.cpp.orig
++++ engine/DefaultQHaccLoader.cpp
+@@ -22,6 +22,8 @@
+ #include "QHacc.h"
+ 
+ #include <sys/stat.h>
++#include <cstdlib>
++
+ #include <QSqlQuery>
+ #include <QSqlError>
+ #include <QStringList>
diff -urN /usr/ports/finance/qhacc/files/patch-engine__GpgQHaccLoader.cpp finance/qhacc/files/patch-engine__GpgQHaccLoader.cpp
--- /usr/ports/finance/qhacc/files/patch-engine__GpgQHaccLoader.cpp	1970-01-01 09:00:00.000000000 +0900
+++ finance/qhacc/files/patch-engine__GpgQHaccLoader.cpp	2014-02-04 00:00:00.000000000 +0900
@@ -0,0 +1,10 @@
+--- engine/GpgQHaccLoader.cpp.orig
++++ engine/GpgQHaccLoader.cpp
+@@ -26,6 +26,7 @@
+ #include <unistd.h>
+ #include <iostream>
+ #include <cstdio>
++#include <cerrno>
+ 
+ #include <QFile>
+ #include <QVariant>
diff -urN /usr/ports/finance/qhacc/files/patch-engine__IDableEntity.cpp finance/qhacc/files/patch-engine__IDableEntity.cpp
--- /usr/ports/finance/qhacc/files/patch-engine__IDableEntity.cpp	1970-01-01 09:00:00.000000000 +0900
+++ finance/qhacc/files/patch-engine__IDableEntity.cpp	2014-02-04 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- engine/IDableEntity.cpp.orig
++++ engine/IDableEntity.cpp
+@@ -21,7 +21,7 @@
+ 
+ const int IDableEntity::NOID = -1;
+ 
+-IDableEntity::IDableEntity( int _id = NOID ) {
++IDableEntity::IDableEntity( int _id ) {
+   setId( _id );
+ }
+ 
diff -urN /usr/ports/finance/qhacc/files/patch-engine__calculators__PayeeCalculator.cpp finance/qhacc/files/patch-engine__calculators__PayeeCalculator.cpp
--- /usr/ports/finance/qhacc/files/patch-engine__calculators__PayeeCalculator.cpp	1970-01-01 09:00:00.000000000 +0900
+++ finance/qhacc/files/patch-engine__calculators__PayeeCalculator.cpp	2014-02-04 00:00:00.000000000 +0900
@@ -0,0 +1,19 @@
+--- engine/calculators/PayeeCalculator.cpp.orig
++++ engine/calculators/PayeeCalculator.cpp
+@@ -59,14 +59,12 @@
+   }
+ 
+   std::multimap<Money, QString> moneymap;
+-  std::map<QString, Money>::iterator it;
+-  for( it = payeemap.begin(); it!= payeemap.end(); ++it ){
++  for( auto it = payeemap.begin(); it!= payeemap.end(); ++it ){
+     moneymap.insert( std::make_pair( it->second, it->first ) );
+   }
+ 
+   int id = 0;
+-  std::map<Money, QString>::iterator mit;
+-  for( mit = moneymap.begin(); mit!= moneymap.end(); ++mit ){
++  for( auto mit = moneymap.begin(); mit!= moneymap.end(); ++mit ){
+     CalculatorSeries cs( ++id );
+     cs.addValue( mit->first );
+ 
diff -urN /usr/ports/finance/qhacc/files/patch-engine__calculators__PieCalculator.cpp finance/qhacc/files/patch-engine__calculators__PieCalculator.cpp
--- /usr/ports/finance/qhacc/files/patch-engine__calculators__PieCalculator.cpp	1970-01-01 09:00:00.000000000 +0900
+++ finance/qhacc/files/patch-engine__calculators__PieCalculator.cpp	2014-02-04 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- engine/calculators/PieCalculator.cpp.orig
++++ engine/calculators/PieCalculator.cpp
+@@ -147,7 +147,7 @@
+ 
+   // erase the smallest accounts
+   Money other;
+-  std::map<Money,int>::iterator it = smap.begin();
++  auto it = smap.begin();
+   while( mergenum >= 0  ){
+     other += it->first;
+ 
diff -urN /usr/ports/finance/qhacc/files/patch-tools__EncryptingLoader.cpp finance/qhacc/files/patch-tools__EncryptingLoader.cpp
--- /usr/ports/finance/qhacc/files/patch-tools__EncryptingLoader.cpp	1970-01-01 09:00:00.000000000 +0900
+++ finance/qhacc/files/patch-tools__EncryptingLoader.cpp	2014-02-04 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- tools/EncryptingLoader.cpp.orig
++++ tools/EncryptingLoader.cpp
+@@ -17,6 +17,8 @@
+     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  ************************** * * * * * * * * * * * * **************************/
+ 
++#include <cstdlib>
++
+ #include <QSqlError>
+ 
+ #include "EncryptingLoader.h"
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140204032842.ef0ff625b54078399ed9d4ee>