From cmt@elch.exwg.net  Sat Dec  7 16:43:18 2013
Return-Path: <cmt@elch.exwg.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id E2B2C3C0
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Dec 2013 16:43:17 +0000 (UTC)
Received: from smtp.burggraben.net (base.exwg.net [IPv6:2a01:4f8:140:50a2::2])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 73E841831
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Dec 2013 16:43:17 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by smtp.burggraben.net (Postfix) with ESMTP id 76D2060008B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Dec 2013 17:43:15 +0100 (CET)
Received: from smtp.burggraben.net ([127.0.0.1])
	by localhost (ns.burggraben.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id TiWAfk9L+jnK for <FreeBSD-gnats-submit@freebsd.org>;
	Sat,  7 Dec 2013 17:43:14 +0100 (CET)
Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7b43:1:6a05:caff:fe01:aae9])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "elch.exwg.net", Issuer "Christoph Moench-Tegeder" (verified OK))
	by smtp.burggraben.net (Postfix) with ESMTPS
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Dec 2013 17:43:14 +0100 (CET)
Received: by elch.exwg.net (Postfix, from userid 1000)
	id 6C78931016; Sat,  7 Dec 2013 17:43:12 +0100 (CET)
Message-Id: <20131207164312.6C78931016@elch.exwg.net>
Date: Sat,  7 Dec 2013 17:43:12 +0100 (CET)
From: Christoph Moench-Tegeder <cmt@burggraben.net>
Reply-To: Christoph Moench-Tegeder <cmt@burggraben.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: biology/plink : fix build with gcc47
X-Send-Pr-Version: 3.114
X-GNATS-Notify: jwbacon@tds.net

>Number:         184566
>Category:       ports
>Synopsis:       biology/plink : fix build with gcc47
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 07 16:50:01 UTC 2013
>Closed-Date:    Fri Dec 13 09:41:43 UTC 2013
>Last-Modified:  Fri Dec 13 09:41:43 UTC 2013
>Originator:     Christoph Moench-Tegeder
>Release:        FreeBSD 9.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD elch.exwg.net 9.2-RELEASE FreeBSD 9.2-RELEASE #11 r255911: Fri Sep 27 17:09:40 CEST 2013 cmt@elch.exwg.net:/usr/obj/usr/src/sys/ELCH amd64

lang/gcc47		gcc47-4.7.4.20131130
biology/plink	plink-1.07_1

>Description:
Hi,

in an effort towards upgrading lang/gcc to gcc 4.7, I'm helping gerald@
in making ports gcc47-safe.
Please consider the following patch to your port. If you approve of the
patch, gerald@ has offered his help in commiting it.
If you're commiting yourself or have someone else commit this (or
another patch to the same effect), can you please add an additional
reference to ports/183342 in the commit message?
In my test environment, the port built successfully with lang/gcc47.

>How-To-Repeat:

>Fix:

This patch fixes some cases of illegal C++ (rejected by gcc47)

# fix illegal variable name reuse
$ svn status
A       files/patch-elf.cpp
A       files/patch-idhelp.cpp
A       files/patch-sets.cpp

Index: files/patch-elf.cpp
===================================================================
--- files/patch-elf.cpp	(revision 0)
+++ files/patch-elf.cpp	(working copy)
@@ -0,0 +1,25 @@
+--- elf.cpp.orig	2013-11-16 17:09:56.000000000 +0100
++++ elf.cpp	2013-11-16 17:10:24.000000000 +0100
+@@ -1175,10 +1175,10 @@
+ 	  << setw(8) << gcnt << " "
+ 	  << setw(8) << (double)cnt / (double)gcnt << "\n";
+ 
+-      map<int,int>::iterator i = chr_cnt.begin();
+-      while ( i != chr_cnt.end() )
++      map<int,int>::iterator ichr = chr_cnt.begin();
++      while ( ichr != chr_cnt.end() )
+ 	{
+-	  int c = i->first;
++	  int c = ichr->first;
+ 	  int x = chr_cnt.find( c )->second;
+ 	  int y = chr_gcnt.find( c )->second;
+ 	  
+@@ -1189,7 +1189,7 @@
+ 	      << setw(8) << y << " "
+ 	      << setw(8) << (double)x / (double)y << "\n";
+ 	  
+-	  ++i;
++	  ++ichr;
+ 	}
+       
+     }
Index: files/patch-idhelp.cpp
===================================================================
--- files/patch-idhelp.cpp	(revision 0)
+++ files/patch-idhelp.cpp	(working copy)
@@ -0,0 +1,19 @@
+--- idhelp.cpp.orig	2013-11-16 17:11:42.000000000 +0100
++++ idhelp.cpp	2013-11-16 17:12:53.000000000 +0100
+@@ -772,12 +772,12 @@
+       for (int j = 0 ; j < jointField.size(); j++ )
+ 	{
+ 	  set<IDField*> & jf = jointField[j];
+-	  set<IDField*>::iterator j = jf.begin();
++	  set<IDField*>::iterator jfit = jf.begin();
+ 	  PP->printLOG(" { ");
+-	  while ( j != jf.end() )
++	  while ( jfit != jf.end() )
+ 	    {
+-	      PP->printLOG( (*j)->name + " " );
+-	      ++j;
++	      PP->printLOG( (*jfit)->name + " " );
++	      ++jfit;
+ 	    }
+ 	  PP->printLOG(" }");
+ 	}
Index: files/patch-sets.cpp
===================================================================
--- files/patch-sets.cpp	(revision 0)
+++ files/patch-sets.cpp	(working copy)
@@ -0,0 +1,18 @@
+--- sets.cpp.orig	2013-11-16 17:06:29.000000000 +0100
++++ sets.cpp	2013-11-16 17:07:12.000000000 +0100
+@@ -768,11 +768,11 @@
+       //////////////////////////////////////////////
+       // Reset original missing status
+ 
+-      vector<Individual*>::iterator i = PP->sample.begin();
+-      while ( i != PP->sample.end() )
++      vector<Individual*>::iterator ipp = PP->sample.begin();
++      while ( ipp != PP->sample.end() )
+ 	{
+-	  (*i)->missing = (*i)->flag;
+-	  ++i;
++	  (*ipp)->missing = (*ipp)->flag;
++	  ++ipp;
+ 	}
+ 
+       ////////////////////////////////////////////////


Regards,
Christoph
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Dec 7 16:50:14 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184566 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: jwbacon@tds.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/184566: biology/plink : fix build with gcc47
Date: Sat, 7 Dec 2013 16:50:13 UT

 Maintainer of biology/plink,
 
 Please note that PR ports/184566 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184566
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Gerald Pfeifer <gerald@pfeifer.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184566: biology/plink : fix build with gcc47
Date: Sat, 7 Dec 2013 23:57:46 +0100 (CET)

 Apologies, the PR to reference should have been 182136.
 
 Gerald

From: Jason Bacon <jwbacon@tds.net>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184566: biology/plink : fix build with gcc47
Date: Mon, 09 Dec 2013 10:50:52 -0600

 Approved.
 
 On 12/07/13 10:50, Edwin Groothuis wrote:
 > Maintainer of biology/plink,
 >
 > Please note that PR ports/184566 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184566
 >
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184566: commit references a PR
Date: Fri, 13 Dec 2013 09:34:47 +0000 (UTC)

 Author: gerald
 Date: Fri Dec 13 09:34:40 2013
 New Revision: 336328
 URL: http://svnweb.freebsd.org/changeset/ports/336328
 
 Log:
   Fix the build with more standards-compliant compilers such as GCC 4.7. [1]
   
   On the way replace USE_GMAKE by USES=gmake.
   
   PR:		184566 [1], 182136
   Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net> [1]
   Approved by:	maintainer (Jason Bacon <jwbacon@tds.net>) [1]
 
 Added:
   head/biology/plink/files/patch-elf.cpp   (contents, props changed)
   head/biology/plink/files/patch-idhelp.cpp   (contents, props changed)
   head/biology/plink/files/patch-sets.cpp   (contents, props changed)
 Modified:
   head/biology/plink/Makefile
 
 Modified: head/biology/plink/Makefile
 ==============================================================================
 --- head/biology/plink/Makefile	Fri Dec 13 09:03:57 2013	(r336327)
 +++ head/biology/plink/Makefile	Fri Dec 13 09:34:40 2013	(r336328)
 @@ -15,8 +15,8 @@ LICENSE=	GPLv2
  
  LIB_DEPENDS=	liblapack.so:${PORTSDIR}/math/lapack
  
 +USES=		gmake
  USE_ZIP=	yes
 -USE_GMAKE=	yes
  USE_FORTRAN=	yes	# Make it use the same compiler as lapack
  
  PLIST_FILES=	bin/plink
 
 Added: head/biology/plink/files/patch-elf.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/biology/plink/files/patch-elf.cpp	Fri Dec 13 09:34:40 2013	(r336328)
 @@ -0,0 +1,25 @@
 +--- elf.cpp.orig	2013-11-16 17:09:56.000000000 +0100
 ++++ elf.cpp	2013-11-16 17:10:24.000000000 +0100
 +@@ -1175,10 +1175,10 @@
 + 	  << setw(8) << gcnt << " "
 + 	  << setw(8) << (double)cnt / (double)gcnt << "\n";
 + 
 +-      map<int,int>::iterator i = chr_cnt.begin();
 +-      while ( i != chr_cnt.end() )
 ++      map<int,int>::iterator ichr = chr_cnt.begin();
 ++      while ( ichr != chr_cnt.end() )
 + 	{
 +-	  int c = i->first;
 ++	  int c = ichr->first;
 + 	  int x = chr_cnt.find( c )->second;
 + 	  int y = chr_gcnt.find( c )->second;
 + 	  
 +@@ -1189,7 +1189,7 @@
 + 	      << setw(8) << y << " "
 + 	      << setw(8) << (double)x / (double)y << "\n";
 + 	  
 +-	  ++i;
 ++	  ++ichr;
 + 	}
 +       
 +     }
 
 Added: head/biology/plink/files/patch-idhelp.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/biology/plink/files/patch-idhelp.cpp	Fri Dec 13 09:34:40 2013	(r336328)
 @@ -0,0 +1,19 @@
 +--- idhelp.cpp.orig	2013-11-16 17:11:42.000000000 +0100
 ++++ idhelp.cpp	2013-11-16 17:12:53.000000000 +0100
 +@@ -772,12 +772,12 @@
 +       for (int j = 0 ; j < jointField.size(); j++ )
 + 	{
 + 	  set<IDField*> & jf = jointField[j];
 +-	  set<IDField*>::iterator j = jf.begin();
 ++	  set<IDField*>::iterator jfit = jf.begin();
 + 	  PP->printLOG(" { ");
 +-	  while ( j != jf.end() )
 ++	  while ( jfit != jf.end() )
 + 	    {
 +-	      PP->printLOG( (*j)->name + " " );
 +-	      ++j;
 ++	      PP->printLOG( (*jfit)->name + " " );
 ++	      ++jfit;
 + 	    }
 + 	  PP->printLOG(" }");
 + 	}
 
 Added: head/biology/plink/files/patch-sets.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/biology/plink/files/patch-sets.cpp	Fri Dec 13 09:34:40 2013	(r336328)
 @@ -0,0 +1,18 @@
 +--- sets.cpp.orig	2013-11-16 17:06:29.000000000 +0100
 ++++ sets.cpp	2013-11-16 17:07:12.000000000 +0100
 +@@ -768,11 +768,11 @@
 +       //////////////////////////////////////////////
 +       // Reset original missing status
 + 
 +-      vector<Individual*>::iterator i = PP->sample.begin();
 +-      while ( i != PP->sample.end() )
 ++      vector<Individual*>::iterator ipp = PP->sample.begin();
 ++      while ( ipp != PP->sample.end() )
 + 	{
 +-	  (*i)->missing = (*i)->flag;
 +-	  ++i;
 ++	  (*ipp)->missing = (*ipp)->flag;
 ++	  ++ipp;
 + 	}
 + 
 +       ////////////////////////////////////////////////
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: gerald 
State-Changed-When: Fri Dec 13 09:40:58 UTC 2013 
State-Changed-Why:  
Thanks for the patch and report, Christoph! 
And thanks for the quick review/approval, Jason! 
I have committed the patch and am closeing the report. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184566 
>Unformatted:
