View | Details | Raw Unified | Return to bug 190172
Collapse All | Expand All

(-)Makefile (-3 / +2 lines)
Lines 1-12 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	trustedqsl
3
PORTNAME=	trustedqsl
4
PORTVERSION=	2.0
4
PORTVERSION=	2.0.2
5
PORTREVISION=	2
6
CATEGORIES=	comms hamradio
5
CATEGORIES=	comms hamradio
7
MASTER_SITES=	SF/${PORTNAME}/TrustedQSL/v${PORTVERSION}/
6
MASTER_SITES=	SF/${PORTNAME}/TrustedQSL/v${PORTVERSION}/
8
DISTNAME=	tqsl-${PORTVERSION}
7
DISTNAME=	tqsl-${PORTVERSION}
9
EXTRACT_SUFX=	.tgz
10
8
11
MAINTAINER=	db@FreeBSD.org
9
MAINTAINER=	db@FreeBSD.org
12
COMMENT=	Amateur Radio Station electronic trusted logbook
10
COMMENT=	Amateur Radio Station electronic trusted logbook
Lines 19-24 Link Here
19
PKGMESSAGE=	${WRKDIR}/pkg-message
17
PKGMESSAGE=	${WRKDIR}/pkg-message
20
18
21
USES=		cmake compiler:features pkgconfig
19
USES=		cmake compiler:features pkgconfig
20
CMAKE_ARGS=	-DBDB_PREFIX=${LOCALBASE}
22
USE_WX=		2.8+
21
USE_WX=		2.8+
23
WX_UNICODE=	yes
22
WX_UNICODE=	yes
24
USE_LDCONFIG=	yes
23
USE_LDCONFIG=	yes
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (tqsl-2.0.tgz) = eb1982da44b4d8c17c78b72eacb3fe3b9e94005d1b2da153685827da2e07cfaa
1
SHA256 (tqsl-2.0.2.tar.gz) = 82fb052a7f1655865769aa12b94daa590a582bbde9cabf8811168b88cb29adf1
2
SIZE (tqsl-2.0.tgz) = 2626483
2
SIZE (tqsl-2.0.2.tar.gz) = 2762892
(-)files/patch-apps_CMakeLists.txt (-13 / +13 lines)
Lines 1-14 Link Here
1
--- apps/CMakeLists.txt.orig	2013-12-06 17:42:11.000000000 -0800
1
--- apps/CMakeLists.txt	2014-05-08 17:59:25.000000000 -0700
2
+++ apps/CMakeLists.txt	2013-12-06 17:43:12.000000000 -0800
2
+++ ../../work.fixed/tqsl-2.0.2/apps/CMakeLists.txt	2014-05-24 00:46:38.000000000 -0700
3
@@ -121,6 +121,10 @@
3
@@ -149,6 +149,10 @@
4
 add_definitions("-DCONFDIR=\"${CMAKE_INSTALL_PREFIX}/share/TrustedQSL/\"")
4
 	install(TARGETS tqsl DESTINATION bin)
5
 install(TARGETS tqsl DESTINATION bin)
5
 	install(DIRECTORY help DESTINATION share/TrustedQSL)
6
 install(DIRECTORY help DESTINATION share/TrustedQSL)
6
 	install(FILES ca-bundle.crt DESTINATION share/TrustedQSL)
7
-install(FILES tqsl.5 DESTINATION share/man/man5)
7
-	install(FILES tqsl.5 DESTINATION share/man/man5)
8
+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
8
+	if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
9
+  install(FILES tqsl.5 DESTINATION man/man5)
9
+		install(FILES tqsl.5 DESTINATION man/man5)
10
+else()
10
+	else()
11
+  install(FILES tqsl.5 DESTINATION share/man/man5)
11
+		install(FILES tqsl.5 DESTINATION share/man/man5)
12
+endif()
12
+	endif()
13
 install(FILES icons/key48.png DESTINATION share/pixmaps RENAME TrustedQSL.png)
13
 	install(FILES icons/key48.png DESTINATION share/pixmaps RENAME TrustedQSL.png)
14
 endif()
14
 endif()
(-)files/patch-apps_tqsl.cpp (-24 / +6 lines)
Lines 1-29 Link Here
1
--- apps/tqsl.cpp.orig	2013-10-20 20:33:20.000000000 -0400
1
--- apps/tqsl.cpp	2014-05-08 17:59:25.000000000 -0700
2
+++ apps/tqsl.cpp	2014-01-26 10:20:28.036914222 -0500
2
+++ ../../work.fixed/tqsl-2.0.2/apps/tqsl.cpp	2014-05-24 00:30:44.000000000 -0700
3
@@ -71,7 +71,7 @@
3
@@ -54,7 +54,7 @@
4
 #endif
4
 #endif
5
 #include <zlib.h>
5
 #include <zlib.h>
6
 #include <openssl/opensslv.h> // only for version info!
6
 #include <openssl/opensslv.h> // only for version info!
7
-#include <db.h> //only for version info!
7
-#include <db.h> //only for version info!
8
+#include <db5/db.h> //only for version info!
8
+#include <db5/db.h> //only for version info!
9
 #include "tqslwiz.h"
9
 
10
 #include "qsodatadialog.h"
10
 #include <iostream>
11
 #include "tqslerrno.h"
11
 #include <fstream>
12
@@ -1862,7 +1862,7 @@
13
 				return TQSL_EXIT_LIB_ERROR;
14
 			}
15
 		} else {
16
-			out<<output;
17
+			out<<output.mb_str();
18
 			if (out.fail()) {
19
 				tqsl_converterRollBack(conv);
20
 				tqsl_endConverter(&conv);
21
@@ -2016,7 +2016,7 @@
22
 	} else {
23
 		//compress the upload
24
 		string compressed;
25
-		size_t compressedSize=compressToBuf(compressed, (const char*)signedOutput.mb_str());
26
+		ssize_t compressedSize=compressToBuf(compressed, (const char*)signedOutput.mb_str());
27
 		//ofstream f; f.open("testzip.tq8", ios::binary); f<<compressed; f.close(); //test of compression routine
28
 		if (compressedSize<0) { 
29
 			wxLogMessage(wxT("Error compressing before upload")); 
(-)files/patch-cmakemodules_FindBDB.cmake (-8 / +16 lines)
Lines 1-18 Link Here
1
--- cmakemodules/FindBDB.cmake.orig	2013-10-20 19:33:20.000000000 -0500
1
--- cmakemodules/FindBDB.cmake.orig	2014-05-08 17:59:25.000000000 -0700
2
+++ cmakemodules/FindBDB.cmake	2013-12-07 20:44:12.000000000 -0500
2
+++ cmakemodules/FindBDB.cmake	2014-05-24 01:29:11.000000000 -0700
3
@@ -5,6 +5,7 @@
3
@@ -6,6 +6,7 @@
4
 FIND_PATH(BDB_INCLUDE_DIR db.h NO_DEFAULT_PATH PATHS
5
   "/usr/local/BerkeleyDB.6.0/include"
4
   "/usr/local/BerkeleyDB.6.0/include"
6
   "/usr/local/BerkeleyDB.5.3/include"
5
   "/usr/local/BerkeleyDB.5.3/include"
7
+  "/usr/local/include/db5"
8
   "${BDB_PREFIX}/include"
6
   "${BDB_PREFIX}/include"
7
+  "${BDB_PREFIX}/include/db5"
9
 ) 
8
 ) 
10
 else()
9
 else()
11
@@ -37,6 +38,7 @@
10
 FIND_PATH(BDB_INCLUDE_DIR db.h
12
   #OSX (and probably other unix) src build
11
@@ -29,6 +30,7 @@
12
   libdb53s
13
   libdb5-5.3
14
   libdb5-5.so
15
+  libdb5
16
   PATHS
17
   "C:\\db-6.0.20\\build_windows\\Win32\\Static Release\\"
18
   "C:\\db-6.0.20\\build_windows\\Win32\\Static_Release\\" #vc08 adds underscore
19
@@ -38,6 +40,7 @@
13
   "/usr/local/BerkeleyDB.6.0/lib"
20
   "/usr/local/BerkeleyDB.6.0/lib"
14
   "/usr/local/BerkeleyDB.5.3/lib"
21
   "/usr/local/BerkeleyDB.5.3/lib"
15
+  "/usr/local/lib/db5"
16
   "${BDB_PREFIX}/lib"
22
   "${BDB_PREFIX}/lib"
23
+  "${BDB_PREFIX}/lib/db5"
17
   "${BDB_PREFIX}"
24
   "${BDB_PREFIX}"
18
 )
25
 )
26
 MARK_AS_ADVANCED(BDB_LIBRARY)
(-)files/patch-src_location.cpp (+52 lines)
Line 0 Link Here
1
--- src/location.cpp	2014-05-08 17:59:25.000000000 -0700
2
+++ ../../work.fixed/tqsl-2.0.2/src/location.cpp	2014-05-24 00:29:01.000000000 -0700
3
@@ -1958,7 +1958,7 @@
4
 			if (field.gabbi_name != "") {
5
 				// A field that may exist
6
 				XMLElement el;
7
-				if (ep->second.getFirstElement(field.gabbi_name, el)) {
8
+				if (ep->second.elem->getFirstElement(field.gabbi_name, el)) {
9
 					field.cdata = el.getText();
10
 					switch (field.input_type) {
11
                                                 case TQSL_LOCATION_FIELD_DDLIST:
12
@@ -2085,11 +2085,11 @@
13
 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
14
 		if (ep->first != "StationData")
15
 			break;
16
-		pair<string, bool> rval = ep->second.getAttribute("name");
17
+		pair<string, bool> rval = ep->second.elem->getAttribute("name");
18
 		if (rval.second) {
19
 			TQSL_LOCATION *oldloc;
20
 			TQSL_LOCATION *newloc;
21
-			ep->second.getFirstElement("CALL", call);
22
+			ep->second.elem->getFirstElement("CALL", call);
23
 			for (size_t j = 0; j < calls.size(); j++) {
24
 				if (calls[j] == call.getText()) {
25
 					if (tqsl_getStationLocation(reinterpret_cast<tQSL_Location *>(&oldloc), rval.first.c_str())) { // Location doesn't exist
26
@@ -2124,7 +2124,7 @@
27
 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
28
 		if (ep->first != "StationData")
29
 			break;
30
-		pair<string, bool> rval = ep->second.getAttribute("name");
31
+		pair<string, bool> rval = ep->second.elem->getAttribute("name");
32
 		if (rval.second && !strcasecmp(rval.first.c_str(), name)) {
33
 			ellist.erase(ep);
34
 			return tqsl_dump_station_data(sfile);
35
@@ -2157,7 +2157,7 @@
36
 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
37
 		if (ep->first != "StationData")
38
 			break;
39
-		pair<string, bool> rval = ep->second.getAttribute("name");
40
+		pair<string, bool> rval = ep->second.elem->getAttribute("name");
41
 		if (rval.second && !strcasecmp(trim(rval.first).c_str(), trim(loc->name).c_str())) {
42
 			exists = true;
43
 			break;
44
@@ -2402,7 +2402,7 @@
45
 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
46
 		if (ep->first != "StationData")
47
 			break;
48
-		pair<string, bool> rval = ep->second.getAttribute("name");
49
+		pair<string, bool> rval = ep->second.elem->getAttribute("name");
50
 		if (rval.second && !strcasecmp(rval.first.c_str(), loc->name.c_str())) {
51
 			exists = true;
52
 			break;
(-)files/patch-src_openssl_cert.cpp (+11 lines)
Line 0 Link Here
1
--- src/openssl_cert.cpp	2014-05-08 17:59:25.000000000 -0700
2
+++ ../../work.fixed/tqsl-2.0.2/src/openssl_cert.cpp	2014-05-24 00:28:34.000000000 -0700
3
@@ -4214,7 +4214,7 @@
4
 	for (ep = ellist.find("Cert"); ep != ellist.end(); ep++) {
5
 		if (ep->first != "Cert")
6
 			break;
7
-		pair<string, bool> rval = ep->second.getAttribute("serial");
8
+		pair<string, bool> rval = ep->second.elem->getAttribute("serial");
9
 		if (rval.second && strtol(rval.first.c_str(), NULL, 10) == serial) {
10
 			exists = true;
11
 			break;
(-)files/patch-src_xml.cpp (-31 / +40 lines)
Lines 1-36 Link Here
1
--- src/xml.cpp.orig	2013-10-20 20:33:20.000000000 -0400
1
--- src/xml.cpp.orig	2014-05-08 17:59:25.000000000 -0700
2
+++ src/xml.cpp	2014-02-01 20:30:26.874285772 -0500
2
+++ src/xml.cpp	2014-05-24 04:26:40.000000000 -0700
3
@@ -17,6 +17,33 @@
3
@@ -20,9 +20,20 @@
4
 using namespace std;
4
 using std::string;
5
 using std::ostream;
6
 using std::map;
7
+#ifdef USE_TR1
8
+using std::tr1::shared_ptr;
9
+#else
10
+using std::make_shared;
11
+#endif
5
 
12
 
6
 namespace tqsllib {
13
 namespace tqsllib {
7
+static	XMLElementList::iterator _iter;
14
 
8
+
15
+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e)
9
+bool
16
+{
10
+XMLElement::getFirstElement(XMLElement& element) {
17
+	shared_ptr<XMLElement> p(e);
11
+	_iterByName = false;
18
+	return p;
12
+	_iter = _elements.begin();
13
+	return getNextElement(element);
14
+}
19
+}
15
+
20
+
16
+bool
21
 pair<string, bool>
17
+XMLElement::getFirstElement(const std::string& name, XMLElement& element) {
22
 XMLElement::getAttribute(const string& key) {
18
+	_iterName = name;
23
 	string s;
19
+	_iterByName = true;
24
@@ -49,9 +60,9 @@
20
+	_iter = _elements.find(_iterName);
25
 	if (el->_parsingStack.empty()) {
21
+	return getNextElement(element);
26
 		el->_parsingStack.push_back(el->addElement(new_el));
22
+}
27
 	} else {
23
+
28
-		new_el.setPretext(el->_parsingStack.back()->second.getText());
24
+bool
29
-		el->_parsingStack.back()->second.setText("");
25
+XMLElement::getNextElement(XMLElement& element) {
30
-		el->_parsingStack.push_back(el->_parsingStack.back()->second.addElement(new_el));
26
+	if (_iter == _elements.end())
31
+		new_el.setPretext(el->_parsingStack.back()->second.elem->getText());
27
+		return false;
32
+		el->_parsingStack.back()->second.elem->setText("");
28
+	if (_iterByName && _iter->second.getElementName() != _iterName)
33
+		el->_parsingStack.push_back(el->_parsingStack.back()->second.elem->addElement(new_el));
29
+		return false;
34
 	}
30
+	element = _iter->second;
35
 }
31
+	++_iter;
32
+	return true;
33
+}
34
 
36
 
35
 pair<string,bool>
37
@@ -65,7 +76,7 @@
36
 XMLElement::getAttribute(const string& key) {
38
 void
39
 XMLElement::xml_text(void *data, const XML_Char *text, int len) {
40
 	XMLElement *el = reinterpret_cast<XMLElement *>(data);
41
-	el->_parsingStack.back()->second._text.append(text, len);
42
+	el->_parsingStack.back()->second.elem->_text.append(text, len);
43
 }
44
 
45
 /*
(-)files/patch-src_xml.h (-20 / +73 lines)
Lines 1-26 Link Here
1
--- src/xml.h.orig	2013-10-20 20:33:20.000000000 -0400
1
--- src/xml.h.orig	2014-05-08 17:59:25.000000000 -0700
2
+++ src/xml.h	2014-02-01 20:20:55.798824124 -0500
2
+++ src/xml.h	2014-05-24 04:17:00.000000000 -0700
3
@@ -108,7 +108,6 @@
3
@@ -16,6 +16,14 @@
4
 	XMLElementAttributeList _attributes;
4
 #include <vector>
5
 	XMLElementList _elements;
5
 #include <utility>
6
 	std::vector<XMLElementList::iterator> _parsingStack;
6
 #include <expat.h>
7
-	XMLElementList::iterator _iter;
7
+#if defined(__GNUC__) && !defined(__clang__)
8
 	bool _iterByName;
8
+#define USE_TR1
9
 	std::string _iterName;
9
+#endif
10
 	XMLElementAttributeList::iterator _aiter;
10
+#ifdef USE_TR1
11
@@ -132,6 +131,7 @@
11
+#include <tr1/memory>
12
+#else
13
+#include <memory>
14
+#endif
15
 
16
 using std::pair;
17
 using std::string;
18
@@ -23,12 +31,28 @@
19
 using std::map;
20
 using std::multimap;
21
 using std::vector;
22
+#ifdef USE_TR1
23
+using std::tr1::shared_ptr;
24
+#else
25
+using std::shared_ptr;
26
+using std::make_shared;
27
+#endif
28
+
29
 
30
 namespace tqsllib {
31
 
32
+
33
 class XMLElement;
34
+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e);
35
+class XMLElementP {
36
+	public:
37
+		XMLElementP() {}
38
+		XMLElementP(shared_ptr<XMLElement> new_elem) { elem = new_elem; }
39
+
40
+		shared_ptr<XMLElement> elem;
41
+};
42
 
43
-typedef multimap<string, XMLElement> XMLElementList;
44
+typedef multimap<string, XMLElementP> XMLElementList;
45
 typedef map<string, string> XMLElementAttributeList;
46
 
47
 /** Encapsulates an XML element
48
@@ -62,7 +86,7 @@
49
       */
50
 	pair<string, bool> getAttribute(const string& key);
51
 	/// Add an element to the list of contained subelements
52
-	XMLElementList::iterator addElement(const XMLElement& element);
53
+	XMLElementList::iterator addElement(XMLElement& element);
54
 	XMLElementAttributeList& getAttributeList() { return _attributes; }
55
 	XMLElementList& getElementList() { return _elements; }
56
 	/// Parse an XML file and add its element tree to this element
57
@@ -134,8 +158,8 @@
58
 }
59
 
60
 inline XMLElementList::iterator
61
-XMLElement::addElement(const XMLElement& element) {
62
-	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), element));
63
+XMLElement::addElement(XMLElement& element) {
64
+	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), make_shared_XMLElement(&element)));
12
 	return it;
65
 	return it;
13
 }
66
 }
14
 
67
 
15
+#if 0
68
@@ -158,9 +182,9 @@
16
 inline bool
69
 XMLElement::getNextElement(XMLElement& element) {
17
 XMLElement::getFirstElement(XMLElement& element) {
70
 	if (_iter == _elements.end())
18
 	_iterByName = false;
71
 		return false;
19
@@ -157,6 +157,7 @@
72
-	if (_iterByName && _iter->second.getElementName() != _iterName)
73
+	if (_iterByName && _iter->second.elem->getElementName() != _iterName)
74
 		return false;
75
-	element = _iter->second;
76
+	element = *_iter->second.elem.get();
20
 	++_iter;
77
 	++_iter;
21
 	return true;
78
 	return true;
22
 }
79
 }
23
+#endif
24
 
25
 inline bool
26
 XMLElement::getFirstAttribute(std::string& key, std::string& attr) {

Return to bug 190172