From c0e0c10673c6baf05709b5efa545edf57ddf6c4f Mon Sep 17 00:00:00 2001 From: tobik Date: Sat, 14 Oct 2017 06:01:53 +0000 Subject: news/nget: Fix build with Clang and GCC > 4.8 - Remove GCC dependency since it now builds fine with Clang - Set WRKSRC directly instead of symlinking in post-extract --- news/nget/Makefile | 15 +++++++++------ news/nget/files/patch-cache.h | 29 +++++++++++++++++++---------- news/nget/files/patch-etree.cc | 22 ++++++++++++++++++++++ news/nget/files/patch-getter.h | 13 +++++++++++++ news/nget/files/patch-par2_par2fileformat.h | 14 ++++++++++++++ 5 files changed, 77 insertions(+), 16 deletions(-) create mode 100644 news/nget/files/patch-etree.cc create mode 100644 news/nget/files/patch-getter.h create mode 100644 news/nget/files/patch-par2_par2fileformat.h (limited to 'news') diff --git a/news/nget/Makefile b/news/nget/Makefile index dbee15eb356b..fc58cc2b1f81 100644 --- a/news/nget/Makefile +++ b/news/nget/Makefile @@ -3,10 +3,10 @@ PORTNAME= nget PORTVERSION= 0.27.1 -PORTREVISION= 3 +DISTVERSIONSUFFIX= +uulib +PORTREVISION= 4 CATEGORIES= news MASTER_SITES= SF -DISTNAME= nget-${PORTVERSION}+uulib MAINTAINER= ports@FreeBSD.org COMMENT= Auto-resuming command line nntp file grabber @@ -15,14 +15,17 @@ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= gmake -# Fails to build with GCC 4.9, cf. PR 196913. -USE_GCC= 4.8 GNU_CONFIGURE= yes +# Skip check if the C++ compiler supports exceptions. We know both +# Clang and GCC do. The configure test fails on FreeBSD 10.3 because +# it passes -fhandle-exceptions to the compiler and Clang 3.4.1 does +# not know to ignore it yet. +CONFIGURE_ARGS= my_cv_exceptions=1 + OPTIONS_DEFINE= DOCS -post-extract: - @${LN} -s nget-${PORTVERSION} ${WRKDIR}/${DISTNAME} +WRKSRC= ${WRKDIR}/nget-${PORTVERSION} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/nget ${STAGEDIR}${PREFIX}/bin diff --git a/news/nget/files/patch-cache.h b/news/nget/files/patch-cache.h index f498837ba81a..a5b6b64a34a8 100644 --- a/news/nget/files/patch-cache.h +++ b/news/nget/files/patch-cache.h @@ -1,6 +1,6 @@ ---- cache.h 2004-05-29 16:00:08.000000000 -0700 -+++ cache.h 2005-09-22 22:37:43.000000000 -0700 -@@ -102,7 +102,7 @@ +--- cache.h.orig 2004-05-29 23:00:08 UTC ++++ cache.h +@@ -102,7 +102,7 @@ class c_nntp_server_article { ulong bytes,lines; c_nntp_server_article(ulong serverid,const c_group_info::ptr &group,ulong articlenum,ulong bytes,ulong lines); }; @@ -9,7 +9,7 @@ typedef pair t_real_server_article; typedef multimap > t_nntp_server_articles_prioritized; class c_nntp_part { -@@ -118,7 +118,7 @@ +@@ -118,7 +118,7 @@ class c_nntp_part { c_nntp_server_article *highest_sa=NULL; float highprio=-10000.0,f; for (;nsai!=articles.end();++nsai) { @@ -18,7 +18,7 @@ for (t_server_list_range servers = nconfig.getservers(sa->serverid); servers.first!=servers.second; ++servers.first) if ((f=nconfig.trustsizes->getserverpriority(servers.first->second)) > highprio){ highest_sa=sa; -@@ -137,7 +137,41 @@ +@@ -137,15 +137,49 @@ class c_nntp_part { }; @@ -30,7 +30,7 @@ + const_iterator i = lower_bound(partnum); + return (i != end() && (*i)->partnum == partnum); + } -+ + + c_nntp_part* part(int partnum) { + iterator i = lower_bound(partnum); + if (i != end() && (*i)->partnum == partnum) @@ -58,10 +58,10 @@ + return ((c_nntp_file_parts*)this)->lower_bound(partnum); + } +}; - ++ //#define FILEFLAG_READ 1 -@@ -145,7 +179,7 @@ + typedef map t_server_have_map; class c_nntp_file : public c_nntp_file_base, public c_refcounted{ public: @@ -70,7 +70,7 @@ int have; // ulong bytes,lines; ulong flags; -@@ -161,13 +195,13 @@ +@@ -161,13 +195,13 @@ class c_nntp_file : public c_nntp_file_base, public c_ bool iscomplete(void) const {return (have>=req) || maybe_a_textreply();} void get_server_have_map(t_server_have_map &have_map) const; // ulong banum(void){assert(!parts.empty());return (*parts.begin()).second->articlenum;} @@ -88,7 +88,16 @@ }\ return b;\ } -@@ -311,9 +345,9 @@ +@@ -228,7 +262,7 @@ class c_message_state : public c_refcounted, eqstr> t_message_state_list; ++typedef hash_map, eqstr> t_message_state_list; + #else + typedef map t_message_state_list; + #endif +@@ -311,9 +345,9 @@ class meta_mid_info { } void insert(const c_nntp_file::ptr &f){ const string &mid=f->bamid(); diff --git a/news/nget/files/patch-etree.cc b/news/nget/files/patch-etree.cc new file mode 100644 index 000000000000..e41f0d766c51 --- /dev/null +++ b/news/nget/files/patch-etree.cc @@ -0,0 +1,22 @@ +https://github.com/Optware/Optware-ng/commit/cf5b5050c989fb4e969167d20e6b135ff2608a87 + +--- etree.cc.orig 2017-10-14 02:49:56 UTC ++++ etree.cc +@@ -79,7 +79,7 @@ pred *new_comparison(RetType (ClassType::*m + return new Comparison(member, v); + } + template