diff options
author | joerg <joerg> | 2013-05-06 14:49:32 +0000 |
---|---|---|
committer | joerg <joerg> | 2013-05-06 14:49:32 +0000 |
commit | c9b92cbd77e2cd20bcb3ca669f65481f0f9f34cb (patch) | |
tree | fac1be187fac3d1a516d85ca9ade2a267610a4fd /ham | |
parent | cf447b031fc07e692e4a89e805310ec8d9f860a6 (diff) | |
download | pkgsrc-c9b92cbd77e2cd20bcb3ca669f65481f0f9f34cb.tar.gz |
Avoid implicit conversions to bool for streams.
Require C++11 for Clang and prefer std version over tr1 when in C++11
mode.
Diffstat (limited to 'ham')
-rw-r--r-- | ham/fldigi/Makefile | 7 | ||||
-rw-r--r-- | ham/fldigi/distinfo | 15 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_dominoex_dominoex.cxx | 13 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_include_qrunner.h | 12 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_logbook_logsupport.cxx | 39 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_misc_dxcc.cxx | 30 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_misc_re.cxx | 24 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_navtex_navtex.cxx | 19 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_spot_notify.cxx | 16 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_spot_pskrep.cxx | 17 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_spot_spot.cxx | 38 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_thor_thor.cxx | 13 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcClient.cpp | 13 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcServer.cpp | 13 | ||||
-rw-r--r-- | ham/fldigi/patches/patch-src_xmlrpcpp_base64.h | 12 |
15 files changed, 279 insertions, 2 deletions
diff --git a/ham/fldigi/Makefile b/ham/fldigi/Makefile index c067e4b59fc..9212aabe3ce 100644 --- a/ham/fldigi/Makefile +++ b/ham/fldigi/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2013/02/16 11:22:36 wiz Exp $ +# $NetBSD: Makefile,v 1.31 2013/05/06 14:49:32 joerg Exp $ # DISTNAME= fldigi-3.21.65 @@ -49,6 +49,11 @@ CHECK_WRKREF_SKIP+= bin/fldigi CONFIGURE_ENV+= ac_cv_header_execinfo_h=no .endif +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +CXXFLAGS+= -std=c++11 -Wno-error=c++11-narrowing +.endif + .include "../../audio/libsamplerate/buildlink3.mk" .include "../../audio/libsndfile/buildlink3.mk" .include "../../audio/portaudio-devel/buildlink3.mk" diff --git a/ham/fldigi/distinfo b/ham/fldigi/distinfo index 9b3996d72bc..a45ef6a4ead 100644 --- a/ham/fldigi/distinfo +++ b/ham/fldigi/distinfo @@ -1,7 +1,20 @@ -$NetBSD: distinfo,v 1.11 2013/01/16 02:54:54 mef Exp $ +$NetBSD: distinfo,v 1.12 2013/05/06 14:49:32 joerg Exp $ SHA1 (fldigi-3.21.65.tar.gz) = 02b5a63e5895e39a3727bc717b5fe6ffefc602de RMD160 (fldigi-3.21.65.tar.gz) = 7cca0f4e066d02ca8141e8a8097ee721666888f2 Size (fldigi-3.21.65.tar.gz) = 2134500 bytes +SHA1 (patch-src_dominoex_dominoex.cxx) = f1f94bb21856f1911c75ee0a138170fba17432b4 +SHA1 (patch-src_include_qrunner.h) = 575a142fa935be760e6d440de5b6d965c6259388 +SHA1 (patch-src_logbook_logsupport.cxx) = f5540103677064d8a6da61db8f445b792729305c +SHA1 (patch-src_misc_dxcc.cxx) = 05fe507377334dd2787a76395dec21afeacf499a SHA1 (patch-src_misc_newinstall.cxx) = 2c215e9423d27dd4f4657221b17cf4ed3f12355c +SHA1 (patch-src_misc_re.cxx) = 9daf70fa7844546e6ad761b5bdf924b6de74843c +SHA1 (patch-src_navtex_navtex.cxx) = 13c70ecfa6c7052c0e42bbbc9829d559b6ea2cd3 +SHA1 (patch-src_spot_notify.cxx) = e0f2889f1ae2405326b2883f13f618c3d9bfd412 +SHA1 (patch-src_spot_pskrep.cxx) = 1ea5838d80224b06fe940802f4f6ee7ac4207a72 +SHA1 (patch-src_spot_spot.cxx) = e69b10e9f9e884d3ef3cf5bb18d882cb1a5db5a7 +SHA1 (patch-src_thor_thor.cxx) = 7df1c77f79f9746e243440740bb35994a09ac66e SHA1 (patch-src_throb_throb.cxx) = a5dc3edc64058076d046ee99e76dfc84663f756e +SHA1 (patch-src_xmlrpcpp_XmlRpcClient.cpp) = 5d7aab9e194cd51ca0bd56430e751db1491dd1f7 +SHA1 (patch-src_xmlrpcpp_XmlRpcServer.cpp) = 30da72b30c6f66ecaa1e05ac1b53450db9a1c2cc +SHA1 (patch-src_xmlrpcpp_base64.h) = 1f1b27e010c5e4ce0f9d5b0bf4a729eefc7535ac diff --git a/ham/fldigi/patches/patch-src_dominoex_dominoex.cxx b/ham/fldigi/patches/patch-src_dominoex_dominoex.cxx new file mode 100644 index 00000000000..b8a3650c909 --- /dev/null +++ b/ham/fldigi/patches/patch-src_dominoex_dominoex.cxx @@ -0,0 +1,13 @@ +$NetBSD: patch-src_dominoex_dominoex.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/dominoex/dominoex.cxx.orig 2013-05-03 14:18:53.000000000 +0000 ++++ src/dominoex/dominoex.cxx +@@ -64,7 +64,7 @@ void dominoex::tx_init(SoundBase *sc) + + strSecXmtText = progdefaults.secText; + if (strSecXmtText.length() == 0) +- strSecXmtText = "fldigi "PACKAGE_VERSION" "; ++ strSecXmtText = "fldigi " PACKAGE_VERSION " "; + + videoText(); + } diff --git a/ham/fldigi/patches/patch-src_include_qrunner.h b/ham/fldigi/patches/patch-src_include_qrunner.h new file mode 100644 index 00000000000..cb02aed5479 --- /dev/null +++ b/ham/fldigi/patches/patch-src_include_qrunner.h @@ -0,0 +1,12 @@ +$NetBSD: patch-src_include_qrunner.h,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/include/qrunner.h.orig 2013-05-03 14:32:45.000000000 +0000 ++++ src/include/qrunner.h +@@ -32,6 +32,7 @@ + #include <cerrno> + #include <stdexcept> + #include <cstring> ++#include <string> + + #if HAVE_STD_BIND + # include <functional> diff --git a/ham/fldigi/patches/patch-src_logbook_logsupport.cxx b/ham/fldigi/patches/patch-src_logbook_logsupport.cxx new file mode 100644 index 00000000000..503cc37266c --- /dev/null +++ b/ham/fldigi/patches/patch-src_logbook_logsupport.cxx @@ -0,0 +1,39 @@ +$NetBSD: patch-src_logbook_logsupport.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/logbook/logsupport.cxx.orig 2013-05-03 14:19:39.000000000 +0000 ++++ src/logbook/logsupport.cxx +@@ -211,7 +211,7 @@ void Export_ADIF() + } + } + string sp = p; +- if (sp.find("."ADIF_SUFFIX) == string::npos) sp.append("."ADIF_SUFFIX); ++ if (sp.find("." ADIF_SUFFIX) == string::npos) sp.append("." ADIF_SUFFIX); + adifFile.writeFile (sp.c_str(), &qsodb); + } + +@@ -308,8 +308,8 @@ void cb_mnuSaveLogbook(Fl_Menu_*m, void* + const char* p = FSEL::saveas( title.c_str(), filter.c_str(), logbook_filename.c_str()); + if (p) { + logbook_filename = p; +- if (logbook_filename.find("."ADIF_SUFFIX) == string::npos) +- logbook_filename.append("."ADIF_SUFFIX); ++ if (logbook_filename.find("." ADIF_SUFFIX) == string::npos) ++ logbook_filename.append("." ADIF_SUFFIX); + dlgLogbook->label(fl_filename_name(logbook_filename.c_str())); + + cQsoDb::reverse = false; +@@ -1542,9 +1542,13 @@ SOAPBOX: \n\n", + return; + } + +- ++#if __cplusplus >= 200103L ++#include <unordered_map> ++typedef unordered_map<string, unsigned> dxcc_entity_cache_t; ++#else + #include <tr1/unordered_map> + typedef tr1::unordered_map<string, unsigned> dxcc_entity_cache_t; ++#endif + static dxcc_entity_cache_t dxcc_entity_cache; + static bool dxcc_entity_cache_enabled = false; + diff --git a/ham/fldigi/patches/patch-src_misc_dxcc.cxx b/ham/fldigi/patches/patch-src_misc_dxcc.cxx new file mode 100644 index 00000000000..e9bf8ad8d39 --- /dev/null +++ b/ham/fldigi/patches/patch-src_misc_dxcc.cxx @@ -0,0 +1,30 @@ +$NetBSD: patch-src_misc_dxcc.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/misc/dxcc.cxx.orig 2013-05-03 14:21:04.000000000 +0000 ++++ src/misc/dxcc.cxx +@@ -30,7 +30,6 @@ + #include <string> + #include <list> + #include <map> +-#include <tr1/unordered_map> + #include <algorithm> + + #include <FL/filename.H> +@@ -43,8 +42,16 @@ + #include "confdialog.h" + #include "main.h" + ++#if __cplusplus >= 201103L ++#include <unordered_map> ++using std::unordered_map; ++#else ++#include <tr1/unordered_map> ++using std::tr1::unordered_map; ++#endif ++ + using namespace std; +-using tr1::unordered_map; ++ + + + dxcc::dxcc(const char* cn, int cq, int itu, const char* ct, float lat, float lon, float tz) diff --git a/ham/fldigi/patches/patch-src_misc_re.cxx b/ham/fldigi/patches/patch-src_misc_re.cxx new file mode 100644 index 00000000000..36af7643080 --- /dev/null +++ b/ham/fldigi/patches/patch-src_misc_re.cxx @@ -0,0 +1,24 @@ +$NetBSD: patch-src_misc_re.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/misc/re.cxx.orig 2013-05-03 14:24:52.000000000 +0000 ++++ src/misc/re.cxx +@@ -120,12 +120,17 @@ void re_t::suboff(size_t n, int* start, + } + } + ++#if __cplusplus >= 201103L ++#include <functional> ++#else + #include <tr1/functional> ++using tr1::hash; ++#endif + + size_t re_t::hash(void) const + { +- size_t h = tr1::hash<string>()(pattern); +- return h ^ (tr1::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2)); ++ size_t h = ::hash<string>()(pattern); ++ return h ^ (::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2)); + } + + // ------------------------------------------------------------------------ diff --git a/ham/fldigi/patches/patch-src_navtex_navtex.cxx b/ham/fldigi/patches/patch-src_navtex_navtex.cxx new file mode 100644 index 00000000000..34d1b7fe78d --- /dev/null +++ b/ham/fldigi/patches/patch-src_navtex_navtex.cxx @@ -0,0 +1,19 @@ +$NetBSD: patch-src_navtex_navtex.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/navtex/navtex.cxx.orig 2013-05-03 14:31:34.000000000 +0000 ++++ src/navtex/navtex.cxx +@@ -177,12 +177,12 @@ bool read_until_delim( std::istream & is + if( ! std::getline( istrm, parsed_str, delim ) ) return false ; + std::stringstream sstrm( parsed_str ); + sstrm >> ref ; +- return sstrm ; ++ return sstrm.good(); + } + + static bool read_until_delim( std::istream & istrm, std::string & ref ) + { +- return std::getline( istrm, ref, delim ); ++ return std::getline( istrm, ref, delim ).good(); + } + + class NavtexRecord diff --git a/ham/fldigi/patches/patch-src_spot_notify.cxx b/ham/fldigi/patches/patch-src_spot_notify.cxx new file mode 100644 index 00000000000..b76d266da47 --- /dev/null +++ b/ham/fldigi/patches/patch-src_spot_notify.cxx @@ -0,0 +1,16 @@ +$NetBSD: patch-src_spot_notify.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/spot/notify.cxx.orig 2013-05-03 14:35:28.000000000 +0000 ++++ src/spot/notify.cxx +@@ -33,7 +33,10 @@ + #include <cctype> + #include <cstdlib> + +-#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) ++#if __cplusplus >= 201103L ++# define MAP_TYPE std::unordered_map ++# include <unordered_map> ++#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) + # define MAP_TYPE std::tr1::unordered_map + # include <tr1/unordered_map> + #else diff --git a/ham/fldigi/patches/patch-src_spot_pskrep.cxx b/ham/fldigi/patches/patch-src_spot_pskrep.cxx new file mode 100644 index 00000000000..4fdd04a4596 --- /dev/null +++ b/ham/fldigi/patches/patch-src_spot_pskrep.cxx @@ -0,0 +1,17 @@ +$NetBSD: patch-src_spot_pskrep.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/spot/pskrep.cxx.orig 2013-05-03 14:36:37.000000000 +0000 ++++ src/spot/pskrep.cxx +@@ -50,7 +50,11 @@ + #include <algorithm> + #include <fstream> + +-#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) ++#if __cplusplus >= 201103L ++# define MAP_TYPE std::unordered_map ++# define HASH_TYPE std::hash ++# include <unordered_map> ++#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) + # define MAP_TYPE std::tr1::unordered_map + #define HASH_TYPE std::tr1::hash + # include <tr1/unordered_map> diff --git a/ham/fldigi/patches/patch-src_spot_spot.cxx b/ham/fldigi/patches/patch-src_spot_spot.cxx new file mode 100644 index 00000000000..68164ebf36c --- /dev/null +++ b/ham/fldigi/patches/patch-src_spot_spot.cxx @@ -0,0 +1,38 @@ +$NetBSD: patch-src_spot_spot.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/spot/spot.cxx.orig 2013-05-03 14:37:33.000000000 +0000 ++++ src/spot/spot.cxx +@@ -23,7 +23,6 @@ + #include <config.h> + + #include <list> +-#include <tr1/unordered_map> + #include <functional> + + #include "trx.h" +@@ -33,6 +32,13 @@ + #include "debug.h" + #include "spot.h" + ++#if __cplusplus >= 201103L ++#include <unordered_map> ++#else ++#include <tr1/unordered_map> ++using std::tr1::unordered_map; ++#endif ++ + // the number of characters that we match our REs against + #define SEARCHLEN 32 + #define DECBUFSIZE 8 * SEARCHLEN +@@ -60,9 +66,9 @@ struct fre_comp : std::unary_function<co + }; + + typedef list<callback_t*> callback_p_list_t; +-typedef tr1::unordered_map<fre_t*, callback_p_list_t, fre_hash, fre_comp> rcblist_t; ++typedef unordered_map<fre_t*, callback_p_list_t, fre_hash, fre_comp> rcblist_t; + +-static tr1::unordered_map<int, string> buffers; ++static unordered_map<int, string> buffers; + static cblist_t cblist; + static rcblist_t rcblist; + diff --git a/ham/fldigi/patches/patch-src_thor_thor.cxx b/ham/fldigi/patches/patch-src_thor_thor.cxx new file mode 100644 index 00000000000..04997092c88 --- /dev/null +++ b/ham/fldigi/patches/patch-src_thor_thor.cxx @@ -0,0 +1,13 @@ +$NetBSD: patch-src_thor_thor.cxx,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/thor/thor.cxx.orig 2013-05-03 14:19:08.000000000 +0000 ++++ src/thor/thor.cxx +@@ -63,7 +63,7 @@ void thor::tx_init(SoundBase *sc) + videoText(); + strSecXmtText = progdefaults.THORsecText; + if (strSecXmtText.length() == 0) +- strSecXmtText = "fldigi "PACKAGE_VERSION" "; ++ strSecXmtText = "fldigi " PACKAGE_VERSION " "; + cptr = 0; + } + diff --git a/ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcClient.cpp b/ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcClient.cpp new file mode 100644 index 00000000000..6d9452ca4a7 --- /dev/null +++ b/ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcClient.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_xmlrpcpp_XmlRpcClient.cpp,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/xmlrpcpp/XmlRpcClient.cpp.orig 2013-05-03 14:41:57.000000000 +0000 ++++ src/xmlrpcpp/XmlRpcClient.cpp +@@ -319,7 +319,7 @@ XmlRpcClient::generateHeader(std::string + + header += "Content-Type: text/xml\r\nContent-length: "; + +- sprintf(buff,"%"PRIuSZ"\r\n\r\n", body.size()); ++ sprintf(buff,"%" PRIuSZ "\r\n\r\n", body.size()); + + return header + buff; + } diff --git a/ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcServer.cpp b/ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcServer.cpp new file mode 100644 index 00000000000..fee4cd7db20 --- /dev/null +++ b/ham/fldigi/patches/patch-src_xmlrpcpp_XmlRpcServer.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_xmlrpcpp_XmlRpcServer.cpp,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/xmlrpcpp/XmlRpcServer.cpp.orig 2013-05-03 14:42:36.000000000 +0000 ++++ src/xmlrpcpp/XmlRpcServer.cpp +@@ -481,7 +481,7 @@ XmlRpcServer::generateHeader(std::string + "Content-length: "; + + char buffLen[40]; +- sprintf(buffLen,"%"PRIuSZ"\r\n\r\n", body.size()); ++ sprintf(buffLen,"%" PRIuSZ "\r\n\r\n", body.size()); + + return header + buffLen; + } diff --git a/ham/fldigi/patches/patch-src_xmlrpcpp_base64.h b/ham/fldigi/patches/patch-src_xmlrpcpp_base64.h new file mode 100644 index 00000000000..478ee4e6f05 --- /dev/null +++ b/ham/fldigi/patches/patch-src_xmlrpcpp_base64.h @@ -0,0 +1,12 @@ +$NetBSD: patch-src_xmlrpcpp_base64.h,v 1.1 2013/05/06 14:49:32 joerg Exp $ + +--- src/xmlrpcpp/base64.h.orig 2013-05-03 14:39:47.000000000 +0000 ++++ src/xmlrpcpp/base64.h +@@ -10,6 +10,7 @@ + #define __BASE64_H_INCLUDED__ 1 + + #include <iterator> ++#include <ios> + + static + int _base64Chars[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |