Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2014 11:44:56 GMT
From:      Stephen Hurd <shurd@sasktel.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/190172: comms/trustedqsl update to latest version
Message-ID:  <201405241144.s4OBiuQM056847@cgiserv.freebsd.org>
Resent-Message-ID: <201405241150.s4OBo1nB026946@freefall.freebsd.org>

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

>Number:         190172
>Category:       ports
>Synopsis:       comms/trustedqsl update to latest version
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 24 11:50:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Hurd
>Release:        10.0-RELEASE-p2
>Organization:
>Environment:
FreeBSD portable 10.0-RELEASE-p2 FreeBSD 10.0-RELEASE-p2 #0: Tue Apr 29 17:06:01 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
My current version of TrustedQSL had a problem adding locations.  Updated and now it doesn't.
>How-To-Repeat:

>Fix:
Patch attached.

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 354975)
+++ Makefile	(working copy)
@@ -1,12 +1,10 @@
 # $FreeBSD$
 
 PORTNAME=	trustedqsl
-PORTVERSION=	2.0
-PORTREVISION=	2
+PORTVERSION=	2.0.2
 CATEGORIES=	comms hamradio
 MASTER_SITES=	SF/${PORTNAME}/TrustedQSL/v${PORTVERSION}/
 DISTNAME=	tqsl-${PORTVERSION}
-EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	db@FreeBSD.org
 COMMENT=	Amateur Radio Station electronic trusted logbook
@@ -19,6 +17,7 @@
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
 USES=		cmake compiler:features pkgconfig
+CMAKE_ARGS=	-DBDB_PREFIX=${LOCALBASE}
 USE_WX=		2.8+
 WX_UNICODE=	yes
 USE_LDCONFIG=	yes
Index: distinfo
===================================================================
--- distinfo	(revision 354975)
+++ distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (tqsl-2.0.tgz) = eb1982da44b4d8c17c78b72eacb3fe3b9e94005d1b2da153685827da2e07cfaa
-SIZE (tqsl-2.0.tgz) = 2626483
+SHA256 (tqsl-2.0.2.tar.gz) = 82fb052a7f1655865769aa12b94daa590a582bbde9cabf8811168b88cb29adf1
+SIZE (tqsl-2.0.2.tar.gz) = 2762892
Index: files/patch-apps_CMakeLists.txt
===================================================================
--- files/patch-apps_CMakeLists.txt	(revision 354975)
+++ files/patch-apps_CMakeLists.txt	(working copy)
@@ -1,14 +1,14 @@
---- apps/CMakeLists.txt.orig	2013-12-06 17:42:11.000000000 -0800
-+++ apps/CMakeLists.txt	2013-12-06 17:43:12.000000000 -0800
-@@ -121,6 +121,10 @@
- add_definitions("-DCONFDIR=\"${CMAKE_INSTALL_PREFIX}/share/TrustedQSL/\"")
- install(TARGETS tqsl DESTINATION bin)
- install(DIRECTORY help DESTINATION share/TrustedQSL)
--install(FILES tqsl.5 DESTINATION share/man/man5)
-+if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-+  install(FILES tqsl.5 DESTINATION man/man5)
-+else()
-+  install(FILES tqsl.5 DESTINATION share/man/man5)
-+endif()
- install(FILES icons/key48.png DESTINATION share/pixmaps RENAME TrustedQSL.png)
+--- apps/CMakeLists.txt	2014-05-08 17:59:25.000000000 -0700
++++ ../../work.fixed/tqsl-2.0.2/apps/CMakeLists.txt	2014-05-24 00:46:38.000000000 -0700
+@@ -149,6 +149,10 @@
+ 	install(TARGETS tqsl DESTINATION bin)
+ 	install(DIRECTORY help DESTINATION share/TrustedQSL)
+ 	install(FILES ca-bundle.crt DESTINATION share/TrustedQSL)
+-	install(FILES tqsl.5 DESTINATION share/man/man5)
++	if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++		install(FILES tqsl.5 DESTINATION man/man5)
++	else()
++		install(FILES tqsl.5 DESTINATION share/man/man5)
++	endif()
+ 	install(FILES icons/key48.png DESTINATION share/pixmaps RENAME TrustedQSL.png)
  endif()
Index: files/patch-apps_tqsl.cpp
===================================================================
--- files/patch-apps_tqsl.cpp	(revision 354975)
+++ files/patch-apps_tqsl.cpp	(working copy)
@@ -1,29 +1,11 @@
---- apps/tqsl.cpp.orig	2013-10-20 20:33:20.000000000 -0400
-+++ apps/tqsl.cpp	2014-01-26 10:20:28.036914222 -0500
-@@ -71,7 +71,7 @@
+--- apps/tqsl.cpp	2014-05-08 17:59:25.000000000 -0700
++++ ../../work.fixed/tqsl-2.0.2/apps/tqsl.cpp	2014-05-24 00:30:44.000000000 -0700
+@@ -54,7 +54,7 @@
  #endif
  #include <zlib.h>
  #include <openssl/opensslv.h> // only for version info!
 -#include <db.h> //only for version info!
 +#include <db5/db.h> //only for version info!
- #include "tqslwiz.h"
- #include "qsodatadialog.h"
- #include "tqslerrno.h"
-@@ -1862,7 +1862,7 @@
- 				return TQSL_EXIT_LIB_ERROR;
- 			}
- 		} else {
--			out<<output;
-+			out<<output.mb_str();
- 			if (out.fail()) {
- 				tqsl_converterRollBack(conv);
- 				tqsl_endConverter(&conv);
-@@ -2016,7 +2016,7 @@
- 	} else {
- 		//compress the upload
- 		string compressed;
--		size_t compressedSize=compressToBuf(compressed, (const char*)signedOutput.mb_str());
-+		ssize_t compressedSize=compressToBuf(compressed, (const char*)signedOutput.mb_str());
- 		//ofstream f; f.open("testzip.tq8", ios::binary); f<<compressed; f.close(); //test of compression routine
- 		if (compressedSize<0) { 
- 			wxLogMessage(wxT("Error compressing before upload")); 
+ 
+ #include <iostream>
+ #include <fstream>
Index: files/patch-cmakemodules_FindBDB.cmake
===================================================================
--- files/patch-cmakemodules_FindBDB.cmake	(revision 354975)
+++ files/patch-cmakemodules_FindBDB.cmake	(working copy)
@@ -1,18 +1,26 @@
---- cmakemodules/FindBDB.cmake.orig	2013-10-20 19:33:20.000000000 -0500
-+++ cmakemodules/FindBDB.cmake	2013-12-07 20:44:12.000000000 -0500
-@@ -5,6 +5,7 @@
- FIND_PATH(BDB_INCLUDE_DIR db.h NO_DEFAULT_PATH PATHS
+--- cmakemodules/FindBDB.cmake.orig	2014-05-08 17:59:25.000000000 -0700
++++ cmakemodules/FindBDB.cmake	2014-05-24 01:29:11.000000000 -0700
+@@ -6,6 +6,7 @@
    "/usr/local/BerkeleyDB.6.0/include"
    "/usr/local/BerkeleyDB.5.3/include"
-+  "/usr/local/include/db5"
    "${BDB_PREFIX}/include"
++  "${BDB_PREFIX}/include/db5"
  ) 
  else()
-@@ -37,6 +38,7 @@
-   #OSX (and probably other unix) src build
+ FIND_PATH(BDB_INCLUDE_DIR db.h
+@@ -29,6 +30,7 @@
+   libdb53s
+   libdb5-5.3
+   libdb5-5.so
++  libdb5
+   PATHS
+   "C:\\db-6.0.20\\build_windows\\Win32\\Static Release\\"
+   "C:\\db-6.0.20\\build_windows\\Win32\\Static_Release\\" #vc08 adds underscore
+@@ -38,6 +40,7 @@
    "/usr/local/BerkeleyDB.6.0/lib"
    "/usr/local/BerkeleyDB.5.3/lib"
-+  "/usr/local/lib/db5"
    "${BDB_PREFIX}/lib"
++  "${BDB_PREFIX}/lib/db5"
    "${BDB_PREFIX}"
  )
+ MARK_AS_ADVANCED(BDB_LIBRARY)
Index: files/patch-src_location.cpp
===================================================================
--- files/patch-src_location.cpp	(revision 0)
+++ files/patch-src_location.cpp	(working copy)
@@ -0,0 +1,52 @@
+--- src/location.cpp	2014-05-08 17:59:25.000000000 -0700
++++ ../../work.fixed/tqsl-2.0.2/src/location.cpp	2014-05-24 00:29:01.000000000 -0700
+@@ -1958,7 +1958,7 @@
+ 			if (field.gabbi_name != "") {
+ 				// A field that may exist
+ 				XMLElement el;
+-				if (ep->second.getFirstElement(field.gabbi_name, el)) {
++				if (ep->second.elem->getFirstElement(field.gabbi_name, el)) {
+ 					field.cdata = el.getText();
+ 					switch (field.input_type) {
+                                                 case TQSL_LOCATION_FIELD_DDLIST:
+@@ -2085,11 +2085,11 @@
+ 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
+ 		if (ep->first != "StationData")
+ 			break;
+-		pair<string, bool> rval = ep->second.getAttribute("name");
++		pair<string, bool> rval = ep->second.elem->getAttribute("name");
+ 		if (rval.second) {
+ 			TQSL_LOCATION *oldloc;
+ 			TQSL_LOCATION *newloc;
+-			ep->second.getFirstElement("CALL", call);
++			ep->second.elem->getFirstElement("CALL", call);
+ 			for (size_t j = 0; j < calls.size(); j++) {
+ 				if (calls[j] == call.getText()) {
+ 					if (tqsl_getStationLocation(reinterpret_cast<tQSL_Location *>(&oldloc), rval.first.c_str())) { // Location doesn't exist
+@@ -2124,7 +2124,7 @@
+ 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
+ 		if (ep->first != "StationData")
+ 			break;
+-		pair<string, bool> rval = ep->second.getAttribute("name");
++		pair<string, bool> rval = ep->second.elem->getAttribute("name");
+ 		if (rval.second && !strcasecmp(rval.first.c_str(), name)) {
+ 			ellist.erase(ep);
+ 			return tqsl_dump_station_data(sfile);
+@@ -2157,7 +2157,7 @@
+ 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
+ 		if (ep->first != "StationData")
+ 			break;
+-		pair<string, bool> rval = ep->second.getAttribute("name");
++		pair<string, bool> rval = ep->second.elem->getAttribute("name");
+ 		if (rval.second && !strcasecmp(trim(rval.first).c_str(), trim(loc->name).c_str())) {
+ 			exists = true;
+ 			break;
+@@ -2402,7 +2402,7 @@
+ 	for (ep = ellist.find("StationData"); ep != ellist.end(); ep++) {
+ 		if (ep->first != "StationData")
+ 			break;
+-		pair<string, bool> rval = ep->second.getAttribute("name");
++		pair<string, bool> rval = ep->second.elem->getAttribute("name");
+ 		if (rval.second && !strcasecmp(rval.first.c_str(), loc->name.c_str())) {
+ 			exists = true;
+ 			break;

Property changes on: files/patch-src_location.cpp
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: files/patch-src_openssl_cert.cpp
===================================================================
--- files/patch-src_openssl_cert.cpp	(revision 0)
+++ files/patch-src_openssl_cert.cpp	(working copy)
@@ -0,0 +1,11 @@
+--- src/openssl_cert.cpp	2014-05-08 17:59:25.000000000 -0700
++++ ../../work.fixed/tqsl-2.0.2/src/openssl_cert.cpp	2014-05-24 00:28:34.000000000 -0700
+@@ -4214,7 +4214,7 @@
+ 	for (ep = ellist.find("Cert"); ep != ellist.end(); ep++) {
+ 		if (ep->first != "Cert")
+ 			break;
+-		pair<string, bool> rval = ep->second.getAttribute("serial");
++		pair<string, bool> rval = ep->second.elem->getAttribute("serial");
+ 		if (rval.second && strtol(rval.first.c_str(), NULL, 10) == serial) {
+ 			exists = true;
+ 			break;

Property changes on: files/patch-src_openssl_cert.cpp
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: files/patch-src_xml.cpp
===================================================================
--- files/patch-src_xml.cpp	(revision 354975)
+++ files/patch-src_xml.cpp	(working copy)
@@ -1,36 +1,45 @@
---- src/xml.cpp.orig	2013-10-20 20:33:20.000000000 -0400
-+++ src/xml.cpp	2014-02-01 20:30:26.874285772 -0500
-@@ -17,6 +17,33 @@
- using namespace std;
+--- src/xml.cpp.orig	2014-05-08 17:59:25.000000000 -0700
++++ src/xml.cpp	2014-05-24 04:26:40.000000000 -0700
+@@ -20,9 +20,20 @@
+ using std::string;
+ using std::ostream;
+ using std::map;
++#ifdef USE_TR1
++using std::tr1::shared_ptr;
++#else
++using std::make_shared;
++#endif
  
  namespace tqsllib {
-+static	XMLElementList::iterator _iter;
-+
-+bool
-+XMLElement::getFirstElement(XMLElement& element) {
-+	_iterByName = false;
-+	_iter = _elements.begin();
-+	return getNextElement(element);
+ 
++shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e)
++{
++	shared_ptr<XMLElement> p(e);
++	return p;
 +}
 +
-+bool
-+XMLElement::getFirstElement(const std::string& name, XMLElement& element) {
-+	_iterName = name;
-+	_iterByName = true;
-+	_iter = _elements.find(_iterName);
-+	return getNextElement(element);
-+}
-+
-+bool
-+XMLElement::getNextElement(XMLElement& element) {
-+	if (_iter == _elements.end())
-+		return false;
-+	if (_iterByName && _iter->second.getElementName() != _iterName)
-+		return false;
-+	element = _iter->second;
-+	++_iter;
-+	return true;
-+}
+ pair<string, bool>
+ XMLElement::getAttribute(const string& key) {
+ 	string s;
+@@ -49,9 +60,9 @@
+ 	if (el->_parsingStack.empty()) {
+ 		el->_parsingStack.push_back(el->addElement(new_el));
+ 	} else {
+-		new_el.setPretext(el->_parsingStack.back()->second.getText());
+-		el->_parsingStack.back()->second.setText("");
+-		el->_parsingStack.push_back(el->_parsingStack.back()->second.addElement(new_el));
++		new_el.setPretext(el->_parsingStack.back()->second.elem->getText());
++		el->_parsingStack.back()->second.elem->setText("");
++		el->_parsingStack.push_back(el->_parsingStack.back()->second.elem->addElement(new_el));
+ 	}
+ }
  
- pair<string,bool>
- XMLElement::getAttribute(const string& key) {
+@@ -65,7 +76,7 @@
+ void
+ XMLElement::xml_text(void *data, const XML_Char *text, int len) {
+ 	XMLElement *el = reinterpret_cast<XMLElement *>(data);
+-	el->_parsingStack.back()->second._text.append(text, len);
++	el->_parsingStack.back()->second.elem->_text.append(text, len);
+ }
+ 
+ /*
Index: files/patch-src_xml.h
===================================================================
--- files/patch-src_xml.h	(revision 354975)
+++ files/patch-src_xml.h	(working copy)
@@ -1,26 +1,79 @@
---- src/xml.h.orig	2013-10-20 20:33:20.000000000 -0400
-+++ src/xml.h	2014-02-01 20:20:55.798824124 -0500
-@@ -108,7 +108,6 @@
- 	XMLElementAttributeList _attributes;
- 	XMLElementList _elements;
- 	std::vector<XMLElementList::iterator> _parsingStack;
--	XMLElementList::iterator _iter;
- 	bool _iterByName;
- 	std::string _iterName;
- 	XMLElementAttributeList::iterator _aiter;
-@@ -132,6 +131,7 @@
+--- src/xml.h.orig	2014-05-08 17:59:25.000000000 -0700
++++ src/xml.h	2014-05-24 04:17:00.000000000 -0700
+@@ -16,6 +16,14 @@
+ #include <vector>
+ #include <utility>
+ #include <expat.h>
++#if defined(__GNUC__) && !defined(__clang__)
++#define USE_TR1
++#endif
++#ifdef USE_TR1
++#include <tr1/memory>
++#else
++#include <memory>
++#endif
+ 
+ using std::pair;
+ using std::string;
+@@ -23,12 +31,28 @@
+ using std::map;
+ using std::multimap;
+ using std::vector;
++#ifdef USE_TR1
++using std::tr1::shared_ptr;
++#else
++using std::shared_ptr;
++using std::make_shared;
++#endif
++
+ 
+ namespace tqsllib {
+ 
++
+ class XMLElement;
++shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e);
++class XMLElementP {
++	public:
++		XMLElementP() {}
++		XMLElementP(shared_ptr<XMLElement> new_elem) { elem = new_elem; }
++
++		shared_ptr<XMLElement> elem;
++};
+ 
+-typedef multimap<string, XMLElement> XMLElementList;
++typedef multimap<string, XMLElementP> XMLElementList;
+ typedef map<string, string> XMLElementAttributeList;
+ 
+ /** Encapsulates an XML element
+@@ -62,7 +86,7 @@
+       */
+ 	pair<string, bool> getAttribute(const string& key);
+ 	/// Add an element to the list of contained subelements
+-	XMLElementList::iterator addElement(const XMLElement& element);
++	XMLElementList::iterator addElement(XMLElement& element);
+ 	XMLElementAttributeList& getAttributeList() { return _attributes; }
+ 	XMLElementList& getElementList() { return _elements; }
+ 	/// Parse an XML file and add its element tree to this element
+@@ -134,8 +158,8 @@
+ }
+ 
+ inline XMLElementList::iterator
+-XMLElement::addElement(const XMLElement& element) {
+-	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), element));
++XMLElement::addElement(XMLElement& element) {
++	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), make_shared_XMLElement(&element)));
  	return it;
  }
  
-+#if 0
- inline bool
- XMLElement::getFirstElement(XMLElement& element) {
- 	_iterByName = false;
-@@ -157,6 +157,7 @@
+@@ -158,9 +182,9 @@
+ XMLElement::getNextElement(XMLElement& element) {
+ 	if (_iter == _elements.end())
+ 		return false;
+-	if (_iterByName && _iter->second.getElementName() != _iterName)
++	if (_iterByName && _iter->second.elem->getElementName() != _iterName)
+ 		return false;
+-	element = _iter->second;
++	element = *_iter->second.elem.get();
  	++_iter;
  	return true;
  }
-+#endif
- 
- inline bool
- XMLElement::getFirstAttribute(std::string& key, std::string& attr) {


>Release-Note:
>Audit-Trail:
>Unformatted:



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