Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2014 21:42:32 +0000 (UTC)
From:      Stephen Hurd <shurd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362230 - in head/comms/trustedqsl: . files
Message-ID:  <201407182142.s6ILgW2U006903@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: shurd
Date: Fri Jul 18 21:42:32 2014
New Revision: 362230
URL: http://svnweb.freebsd.org/changeset/ports/362230
QAT: https://qat.redports.org/buildarchive/r362230/

Log:
  Fix TQSL issues when build with Clang (previous patches were not enough)
  Update to 2.0.3
  Add options for the extra (deprecated) command-line utilities
  
  From ChangeLog.txt:
  - Fix defect that doesn't allow adding station locations if only a single
    callsign certificate is installed.
  
  Thanks Kenji!
  
  PR:		ports/191871

Added:
  head/comms/trustedqsl/files/patch-src_converter.cpp   (contents, props changed)
  head/comms/trustedqsl/files/patch-src_gen_crq.cpp   (contents, props changed)
Modified:
  head/comms/trustedqsl/Makefile
  head/comms/trustedqsl/distinfo   (contents, props changed)
  head/comms/trustedqsl/files/patch-src_location.cpp   (contents, props changed)
  head/comms/trustedqsl/files/patch-src_openssl_cert.cpp   (contents, props changed)
  head/comms/trustedqsl/files/patch-src_xml.cpp   (contents, props changed)
  head/comms/trustedqsl/files/patch-src_xml.h   (contents, props changed)
  head/comms/trustedqsl/pkg-plist   (contents, props changed)

Modified: head/comms/trustedqsl/Makefile
==============================================================================
--- head/comms/trustedqsl/Makefile	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/Makefile	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,11 +1,9 @@
 # $FreeBSD$
 
 PORTNAME=	trustedqsl
-PORTVERSION=	2.0.2
+PORTVERSION=	2.0.3
 CATEGORIES=	comms hamradio
-#MASTER_SITES=	SF/${PORTNAME}/TrustedQSL/v${PORTVERSION}/
-MASTER_SITES=	${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR=	shurd
+MASTER_SITES=	SF/${PORTNAME}/TrustedQSL/v${PORTVERSION}/
 DISTNAME=	tqsl-${PORTVERSION}
 
 MAINTAINER=	hamradio@FreeBSD.org
@@ -26,6 +24,36 @@ CMAKE_ARGS=	-DBDB_PREFIX=${LOCALBASE}
 USE_WX=		2.8+
 WX_UNICODE=	yes
 USE_LDCONFIG=	yes
+USE_OPENSSL=	yes
+
+OPTIONS_DEFINE=	GEN_CRQ LOAD_CERT STATION_LOC CONVERTER
+GEN_CRQ_DESC=	Build gen_crq
+LOAD_CERT_DESC=	Build load_cert
+STATION_LOC_DESC=	Build station_loc
+CONVERTER_DESC=	Build converter
+
+GEN_CRQ_CMAKE_ON=	-DBUILD_GENCRQ=ON
+LOAD_CERT_CMAKE_ON=	-DBUILD_LOADCERT=ON
+STATION_LOC_CMAKE_ON=	-DBUILD_STATIONLOC=ON
+CONVERTER_CMAKE_ON=	-DBUILD_CONVERTER=ON
+
+OPTIONS_SUB=	yes
+
+.include <bsd.port.options.mk>
+
+post-stage:
+.if ${PORT_OPTIONS:MGEN_CRQ}
+	${INSTALL_PROGRAM} ${WRKSRC}/src/gen_crq ${STAGEDIR}${PREFIX}/bin
+.endif
+.if ${PORT_OPTIONS:MLOAD_CERT}
+	${INSTALL_PROGRAM} ${WRKSRC}/src/load_cert ${STAGEDIR}${PREFIX}/bin
+.endif
+.if ${PORT_OPTIONS:MSTATION_LOC}
+	${INSTALL_PROGRAM} ${WRKSRC}/src/station_loc ${STAGEDIR}${PREFIX}/bin
+.endif
+.if ${PORT_OPTIONS:MCONVERTER}
+	${INSTALL_PROGRAM} ${WRKSRC}/src/converter ${STAGEDIR}${PREFIX}/bin
+.endif
 
 post-patch:
 	@${SED} -e 's:%%PREFIX%%:${PREFIX}:g' \

Modified: head/comms/trustedqsl/distinfo
==============================================================================
--- head/comms/trustedqsl/distinfo	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/distinfo	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,2 +1,2 @@
-SHA256 (tqsl-2.0.2.tar.gz) = 472e45ba74cf8fea4e8d96aa0beb4db08054d9b60fa84c29e30162a7a00622f4
-SIZE (tqsl-2.0.2.tar.gz) = 2763921
+SHA256 (tqsl-2.0.3.tar.gz) = 87527e2b69a6e91ef3b13793f3aa32a271ca3b173e09df3a6eac8365b492a604
+SIZE (tqsl-2.0.3.tar.gz) = 2764308

Added: head/comms/trustedqsl/files/patch-src_converter.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/trustedqsl/files/patch-src_converter.cpp	Fri Jul 18 21:42:32 2014	(r362230)
@@ -0,0 +1,11 @@
+--- src/converter.cpp.orig	2014-07-17 03:34:36.000000000 -0700
++++ src/converter.cpp	2014-07-17 03:36:07.000000000 -0700
+@@ -88,7 +88,7 @@
+ 		optind++;
+ 		const char *ofile = (optind < argc) ? argv[optind] : "converted.tq7";
+ 		ofstream out;
+-		out.open(ofile, ios::out|ios::trunc|ios::binary);
++		out.open(ofile, std::ios::out|std::ios::trunc|std::ios::binary);
+ 		if (!out.is_open())
+ 			throw myexc(string("Unable to open ") + ofile);
+ 		bool haveout = false;

Added: head/comms/trustedqsl/files/patch-src_gen_crq.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/trustedqsl/files/patch-src_gen_crq.cpp	Fri Jul 18 21:42:32 2014	(r362230)
@@ -0,0 +1,24 @@
+--- src/gen_crq.cpp.orig	2014-07-17 03:33:28.000000000 -0700
++++ src/gen_crq.cpp	2014-07-17 03:34:02.000000000 -0700
+@@ -99,9 +99,9 @@
+ 				throw tqslexc();
+ 			if (tqsl_getCertificateDXCCEntity(sign_cert, &cdxcc))
+ 				throw tqslexc();
+-			cout << "Signing certificate issuer: " << buf << endl;
+-			cout << "Signing certificate serial: " << serial << endl;
+-			cout << "  Signing certificate DXCC: " << cdxcc << endl;
++			std::cout << "Signing certificate issuer: " << buf << endl;
++			std::cout << "Signing certificate serial: " << serial << endl;
++			std::cout << "  Signing certificate DXCC: " << cdxcc << endl;
+ 			if (tqsl_beginSigning(sign_cert, const_cast<char *>(""), 0, 0))
+ 				throw tqslexc();
+ 		}
+@@ -124,7 +124,7 @@
+ 					*cp = '_';
+ 			}
+ 			string filename = string(argv[optind]) + ".tq5";
+-			cout << "Creating CRQ for " << crq.callSign << " DXCC=" << crq.dxccEntity << endl;
++			std::cout << "Creating CRQ for " << crq.callSign << " DXCC=" << crq.dxccEntity << endl;
+ 			if (tqsl_createCertRequest(filename.c_str(), &crq, 0, 0))
+ 				throw tqslexc();
+ 		}

Modified: head/comms/trustedqsl/files/patch-src_location.cpp
==============================================================================
--- head/comms/trustedqsl/files/patch-src_location.cpp	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/files/patch-src_location.cpp	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,52 +1,110 @@
---- 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 @@
+--- src/location.cpp.orig	2014-07-12 13:18:13.000000000 -0700
++++ src/location.cpp	2014-07-18 05:40:36.000000000 -0700
+@@ -1957,7 +1957,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)) {
++				if (ep->second->getFirstElement(field.gabbi_name, el)) {
  					field.cdata = el.getText();
  					switch (field.input_type) {
                                                  case TQSL_LOCATION_FIELD_DDLIST:
-@@ -2085,11 +2085,11 @@
+@@ -2086,11 +2086,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");
++		pair<string, bool> rval = ep->second->getAttribute("name");
  		if (rval.second) {
  			TQSL_LOCATION *oldloc;
  			TQSL_LOCATION *newloc;
 -			ep->second.getFirstElement("CALL", call);
-+			ep->second.elem->getFirstElement("CALL", call);
++			ep->second->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 @@
+@@ -2125,7 +2125,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");
++		pair<string, bool> rval = ep->second->getAttribute("name");
  		if (rval.second && !strcasecmp(rval.first.c_str(), name)) {
  			ellist.erase(ep);
  			return tqsl_dump_station_data(sfile);
-@@ -2157,7 +2157,7 @@
+@@ -2158,7 +2158,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");
++		pair<string, bool> rval = ep->second->getAttribute("name");
  		if (rval.second && !strcasecmp(trim(rval.first).c_str(), trim(loc->name).c_str())) {
  			exists = true;
  			break;
-@@ -2402,7 +2402,7 @@
+@@ -2321,30 +2321,31 @@
+ 			return 1;
+ 		for (int i = 0; i < numf; i++) {
+ 			TQSL_LOCATION_FIELD& field = loc->pagelist[loc->page-1].fieldlist[i];
+-			XMLElement fd;
+-			fd.setPretext(sd.getPretext() + "  ");
+-			fd.setElementName(field.gabbi_name);
++			shared_ptr<XMLElement> fd(new XMLElement);
++			fd->setPretext(sd.getPretext() + "  ");
++			fd->setElementName(field.gabbi_name);
+ 			switch (field.input_type) {
+                                 case TQSL_LOCATION_FIELD_DDLIST:
+                                 case TQSL_LOCATION_FIELD_LIST:
+ 					if (field.idx < 0 || field.idx >= static_cast<int>(field.items.size())) {
+-						fd.setText("");
++						fd->setText("");
+ 					} else if (field.data_type == TQSL_LOCATION_FIELD_INT) {
+ 						char numbuf[20];
+ 						snprintf(numbuf, sizeof numbuf, "%d", field.items[field.idx].ivalue);
+-						fd.setText(numbuf);
++						fd->setText(numbuf);
+ 					} else {
+-						fd.setText(field.items[field.idx].text);
++						fd->setText(field.items[field.idx].text);
+ 					}
+ 					break;
+                                 case TQSL_LOCATION_FIELD_TEXT:
+ 					field.cdata = trim(field.cdata);
+ 					if (field.flags & TQSL_LOCATION_FIELD_UPPER)
+ 						field.cdata = string_toupper(field.cdata);
+-					fd.setText(field.cdata);
++					fd->setText(field.cdata);
+ 					break;
+ 			}
+-			if (strcmp(fd.getText().c_str(), ""))
++			if (strcmp(fd->getText().c_str(), ""))
++			if (strcmp(fd->getText().c_str(), ""))
+ 				sd.addElement(fd);
+ 		}
+ 		int rval;
+@@ -2407,7 +2408,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");
++		pair<string, bool> rval = ep->second->getAttribute("name");
  		if (rval.second && !strcasecmp(rval.first.c_str(), loc->name.c_str())) {
  			exists = true;
  			break;
+@@ -2417,12 +2418,12 @@
+ 		tQSL_Error = TQSL_NAME_EXISTS;
+ 		return 1;
+ 	}
+-	XMLElement sd("StationData");
+-	sd.setPretext("\n  ");
+-	if (tqsl_location_to_xml(loc, sd))
++	shared_ptr<XMLElement> sd(new XMLElement("StationData"));
++	sd->setPretext("\n  ");
++	if (tqsl_location_to_xml(loc, *sd))
+ 		return 1;
+-	sd.setAttribute("name", loc->name);
+-	sd.setText("\n  ");
++	sd->setAttribute("name", loc->name);
++	sd->setText("\n  ");
+ 
+ 	// If 'exists', ep points to the existing station record
+ 	if (exists)

Modified: head/comms/trustedqsl/files/patch-src_openssl_cert.cpp
==============================================================================
--- head/comms/trustedqsl/files/patch-src_openssl_cert.cpp	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/files/patch-src_openssl_cert.cpp	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,11 +1,36 @@
---- 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 @@
+--- src/openssl_cert.cpp.orig	2014-07-12 13:18:13.000000000 -0700
++++ src/openssl_cert.cpp	2014-07-18 05:39:51.000000000 -0700
+@@ -4214,23 +4214,23 @@
  	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");
++		pair<string, bool> rval = ep->second->getAttribute("serial");
  		if (rval.second && strtol(rval.first.c_str(), NULL, 10) == serial) {
  			exists = true;
  			break;
+ 		}
+ 	}
+ 
+-	XMLElement cs("Cert");
+-	cs.setPretext("\n  ");
+-	XMLElement se;
+-	se.setPretext(cs.getPretext() + "  ");
+-	se.setElementName("status");
+-	se.setText(status);
+-	cs.addElement(se);
++	shared_ptr<XMLElement> cs(new XMLElement("Cert"));
++	cs->setPretext("\n  ");
++	shared_ptr<XMLElement> se(new XMLElement);
++	se->setPretext(cs->getPretext() + "  ");
++	se->setElementName("status");
++	se->setText(status);
++	cs->addElement(se);
+ 
+-	cs.setAttribute("serial", sstr);
+-	cs.setText("\n  ");
++	cs->setAttribute("serial", sstr);
++	cs->setText("\n  ");
+ 
+ 	if (exists)
+ 		ellist.erase(ep);

Modified: head/comms/trustedqsl/files/patch-src_xml.cpp
==============================================================================
--- head/comms/trustedqsl/files/patch-src_xml.cpp	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/files/patch-src_xml.cpp	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,6 +1,6 @@
---- 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 @@
+--- src/xml.cpp.orig	2014-07-12 13:18:13.000000000 -0700
++++ src/xml.cpp	2014-07-18 05:40:18.000000000 -0700
+@@ -20,6 +20,11 @@
  using std::string;
  using std::ostream;
  using std::map;
@@ -12,34 +12,35 @@
  
  namespace tqsllib {
  
-+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e)
-+{
-+	shared_ptr<XMLElement> p(e);
-+	return p;
-+}
-+
- pair<string, bool>
- XMLElement::getAttribute(const string& key) {
- 	string s;
-@@ -49,9 +60,9 @@
+@@ -41,17 +46,17 @@
+ void
+ XMLElement::xml_start(void *data, const XML_Char *name, const XML_Char **atts) {
+ 	XMLElement *el = reinterpret_cast<XMLElement *>(data);
+-	XMLElement new_el(name);
++	shared_ptr<XMLElement> new_el(new XMLElement(name));
+ //cout << "Element: " << name << endl;
+ 	for (int i = 0; atts[i]; i += 2) {
+-		new_el.setAttribute(atts[i], atts[i+1]);
++		new_el->setAttribute(atts[i], atts[i+1]);
+ 	}
  	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));
++		new_el->setPretext(el->_parsingStack.back()->second->getText());
++		el->_parsingStack.back()->second->setText("");
++		el->_parsingStack.push_back(el->_parsingStack.back()->second->addElement(new_el));
  	}
  }
  
-@@ -65,7 +76,7 @@
+@@ -65,7 +70,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);
++	el->_parsingStack.back()->second->_text.append(text, len);
  }
  
  /*

Modified: head/comms/trustedqsl/files/patch-src_xml.h
==============================================================================
--- head/comms/trustedqsl/files/patch-src_xml.h	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/files/patch-src_xml.h	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,5 +1,5 @@
---- src/xml.h.orig	2014-05-08 17:59:25.000000000 -0700
-+++ src/xml.h	2014-05-24 04:17:00.000000000 -0700
+--- src/xml.h.orig	2014-07-12 13:18:13.000000000 -0700
++++ src/xml.h	2014-07-18 05:43:47.000000000 -0700
 @@ -16,6 +16,14 @@
  #include <vector>
  #include <utility>
@@ -15,7 +15,7 @@
  
  using std::pair;
  using std::string;
-@@ -23,12 +31,28 @@
+@@ -23,12 +31,19 @@
  using std::map;
  using std::multimap;
  using std::vector;
@@ -29,51 +29,42 @@
  
  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 multimap<string, shared_ptr<XMLElement> > XMLElementList;
  typedef map<string, string> XMLElementAttributeList;
  
  /** Encapsulates an XML element
-@@ -62,7 +86,7 @@
+@@ -62,7 +77,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);
++	XMLElementList::iterator addElement(shared_ptr<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 @@
+@@ -134,8 +149,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)));
++XMLElement::addElement(shared_ptr<XMLElement>& element) {
++	XMLElementList::iterator it = _elements.insert(make_pair(element->getElementName(), element));
  	return it;
  }
  
-@@ -158,9 +182,9 @@
+@@ -158,9 +173,9 @@
  XMLElement::getNextElement(XMLElement& element) {
  	if (_iter == _elements.end())
  		return false;
 -	if (_iterByName && _iter->second.getElementName() != _iterName)
-+	if (_iterByName && _iter->second.elem->getElementName() != _iterName)
++	if (_iterByName && _iter->second->getElementName() != _iterName)
  		return false;
 -	element = _iter->second;
-+	element = *_iter->second.elem.get();
++	element = *_iter->second;
  	++_iter;
  	return true;
  }

Modified: head/comms/trustedqsl/pkg-plist
==============================================================================
--- head/comms/trustedqsl/pkg-plist	Fri Jul 18 20:59:16 2014	(r362229)
+++ head/comms/trustedqsl/pkg-plist	Fri Jul 18 21:42:32 2014	(r362230)
@@ -1,4 +1,8 @@
 bin/tqsl
+%%CONVERTER%%bin/converter
+%%GEN_CRQ%%bin/gen_crq
+%%LOAD_CERT%%bin/load_cert
+%%STATION_LOC%%bin/station_loc
 include/adif.h
 include/cabrillo.h
 include/tqslconvert.h



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