Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2017 06:01:53 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r452044 - in head/news/nget: . files
Message-ID:  <201710140601.v9E61r4g033848@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sat Oct 14 06:01:53 2017
New Revision: 452044
URL: https://svnweb.freebsd.org/changeset/ports/452044

Log:
  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

Added:
  head/news/nget/files/patch-etree.cc   (contents, props changed)
  head/news/nget/files/patch-getter.h   (contents, props changed)
  head/news/nget/files/patch-par2_par2fileformat.h   (contents, props changed)
Modified:
  head/news/nget/Makefile
  head/news/nget/files/patch-cache.h

Modified: head/news/nget/Makefile
==============================================================================
--- head/news/nget/Makefile	Sat Oct 14 05:59:19 2017	(r452043)
+++ head/news/nget/Makefile	Sat Oct 14 06:01:53 2017	(r452044)
@@ -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

Modified: head/news/nget/files/patch-cache.h
==============================================================================
--- head/news/nget/files/patch-cache.h	Sat Oct 14 05:59:19 2017	(r452043)
+++ head/news/nget/files/patch-cache.h	Sat Oct 14 06:01:53 2017	(r452044)
@@ -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<c_nntp_server_article*,c_server::ptr> t_real_server_article;
  typedef multimap<float,t_real_server_article,greater<float> > 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<ulong,int> t_server_have_map;
  
  class c_nntp_file : public c_nntp_file_base, public c_refcounted<c_nntp_file>{
  	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<c_message_
+ };
+ 
+ #ifdef HAVE_WORKING_HASH_MAP
+-typedef hash_map<const char*, c_message_state::ptr, hash<const char*>, eqstr> t_message_state_list;
++typedef hash_map<const char*, c_message_state::ptr, std::hash<const char*>, eqstr> t_message_state_list;
+ #else
+ typedef map<const char*, c_message_state::ptr, ltstr> 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();

Added: head/news/nget/files/patch-etree.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/nget/files/patch-etree.cc	Sat Oct 14 06:01:53 2017	(r452044)
@@ -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<ClassType> *new_comparison(RetType (ClassType::*m
+ 	return new Comparison<Op, MemGetter, RetType, ClassType>(member, v);
+ }
+ template <template <class A, class B> class Op, class ClassType, class RetType>
+-pred<ClassType> *new_comparison(RetType (ClassType::*memberf)(void), RetType v){
++pred<ClassType> *new_comparison(RetType (ClassType::*memberf)(void) const, RetType v){
+ 	return new Comparison<Op, MemfuncGetter, RetType, ClassType>(memberf, v);
+ }
+ template <class ClassType, class getterT, class T2>
+@@ -112,7 +112,7 @@ pred<ClassType> *new_comparison_re(RetType (ClassType:
+ 	return new Comparison_re<Op, MemGetter, RetType, ClassType>(member, pattern, flags);
+ }
+ template <template <class A, class B> class Op, class ClassType, class RetType>
+-pred<ClassType> *new_comparison_re(RetType (ClassType::*memberf)(void), const char *pattern, int flags){
++pred<ClassType> *new_comparison_re(RetType (ClassType::*memberf)(void) const, const char *pattern, int flags){
+ 	return new Comparison_re<Op, MemfuncGetter, RetType, ClassType>(memberf, pattern, flags);
+ }
+ template <class ClassType, class getterT>

Added: head/news/nget/files/patch-getter.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/nget/files/patch-getter.h	Sat Oct 14 06:01:53 2017	(r452044)
@@ -0,0 +1,13 @@
+https://github.com/Optware/Optware-ng/commit/cf5b5050c989fb4e969167d20e6b135ff2608a87
+
+--- getter.h.orig	2017-10-14 02:48:48 UTC
++++ getter.h
+@@ -35,7 +35,7 @@ class MemGetter {
+ template <class RetType, class ClassType>
+ class MemfuncGetter {
+ 	private:
+-		typedef RetType (ClassType::*member_t)(void);
++		typedef RetType (ClassType::*member_t)(void) const;
+ 		member_t member;		
+ 	public:
+ 		typedef RetType T;

Added: head/news/nget/files/patch-par2_par2fileformat.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/nget/files/patch-par2_par2fileformat.h	Sat Oct 14 06:01:53 2017	(r452044)
@@ -0,0 +1,14 @@
+./par2/par2fileformat.h:89:25: error: flexible array member 'entries' of non-POD element type 'FILEVERIFICATIONENTRY []'
+  FILEVERIFICATIONENTRY entries[];
+
+--- par2/par2fileformat.h.orig	2017-10-14 03:14:17 UTC
++++ par2/par2fileformat.h
+@@ -86,7 +86,7 @@ struct FILEVERIFICATIONPACKET
+   PACKET_HEADER         header;
+   // Body
+   MD5Hash               fileid;     // MD5hash of file_hash_16k, file_length, file_name
+-  FILEVERIFICATIONENTRY entries[];
++  FILEVERIFICATIONENTRY entries[0];
+ } PACKED;
+ 
+ // The file description packet is used to record the name of the file,



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