From william88@gmail.com  Mon May 27 22:25:54 2013
Return-Path: <william88@gmail.com>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 025F8282
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 May 2013 22:25:54 +0000 (UTC)
	(envelope-from william88@gmail.com)
Received: from mail-yh0-x22d.google.com (mail-yh0-x22d.google.com [IPv6:2607:f8b0:4002:c01::22d])
	by mx1.freebsd.org (Postfix) with ESMTP id C16FF100
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 May 2013 22:25:53 +0000 (UTC)
Received: by mail-yh0-f45.google.com with SMTP id z6so64364yhz.4
        for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 May 2013 15:25:52 -0700 (PDT)
Received: from localhost ([177.40.123.225])
        by mx.google.com with ESMTPSA id n15sm42765426yhi.2.2013.05.27.14.54.26
        for <FreeBSD-gnats-submit@freebsd.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 27 May 2013 14:54:28 -0700 (PDT)
Message-Id: <51a3d614.0f84ec0a.33b9.ffffdd16@mx.google.com>
Date: Mon, 27 May 2013 14:54:28 -0700 (PDT)
From: William Grzybowski <william88@gmail.com>
Reply-To: William Grzybowski <wg@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] archivers/libpar2: update to 0.3
X-Send-Pr-Version: 3.113
X-GNATS-Notify: toxic@doobie.com

>Number:         179029
>Category:       ports
>Synopsis:       [PATCH] archivers/libpar2: update to 0.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 27 22:30:00 UTC 2013
>Closed-Date:    Wed Jun 05 11:20:29 UTC 2013
>Last-Modified:  Wed Jun 05 11:20:29 UTC 2013
>Originator:     William Grzybowski
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
>Description:

	This a patch to update to 0.3, sent by Herbert J. Skuhra <h.skuhra at gmail.com> 

>How-To-Repeat:
>Fix:

	See attached patch


--- patch-libpar2-0.3.diff begins here ---
Index: archivers/libpar2/Makefile
===================================================================
--- archivers/libpar2/Makefile	(revision 319281)
+++ archivers/libpar2/Makefile	(working copy)
@@ -2,10 +2,9 @@
 # $FreeBSD$
 
 PORTNAME=	libpar2
-PORTVERSION=	0.2
-PORTREVISION=	4
+PORTVERSION=	0.3
 CATEGORIES=	archivers
-MASTER_SITES=	SF/parchive/${PORTNAME}/${PORTVERSION}
+MASTER_SITES=	https://launchpadlibrarian.net/139080388/
 
 MAINTAINER=	toxic@doobie.com
 COMMENT=	Library for manipulating PAR2 files, extracted from par2cmdline
@@ -17,20 +16,11 @@
 LDFLAGS+=	-L${LOCALBASE}/lib
 CPPFLAGS+=	-I${LOCALBASE}/include
 
-USE_GCC=	any
 USE_LDCONFIG=	yes
 USES=		pkgconfig
 
-OPTIONS_DEFINE=	ENABLECANCEL
-OPTIONS_DEFAULT=	ENABLECANCEL
-ENABLECANCEL_DESC=	Enable graceful cancellation of repairs
-
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MENABLECANCEL}
-EXTRA_PATCHES=	${FILESDIR}/xpatch-addcancel-par2repairer.cpp
-.endif
-
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
Index: archivers/libpar2/distinfo
===================================================================
--- archivers/libpar2/distinfo	(revision 319281)
+++ archivers/libpar2/distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (libpar2-0.2.tar.gz) = 074fbf840f73b1e13e0405fce261078c81c8c0a4859e30a7bba10510f9199908
-SIZE (libpar2-0.2.tar.gz) = 401700
+SHA256 (libpar2-0.3.tar.gz) = 0bcc680db9e8d9fa178b2fec38681ff865d38d283085be1898eac1e615b51b36
+SIZE (libpar2-0.3.tar.gz) = 516329
Index: archivers/libpar2/files/patch-ChangeLog
===================================================================
--- archivers/libpar2/files/patch-ChangeLog	(revision 319281)
+++ archivers/libpar2/files/patch-ChangeLog	(working copy)
@@ -1,13 +0,0 @@
---- ChangeLog.orig	2010-04-28 12:17:05.000000000 -0700
-+++ ChangeLog	2010-04-28 12:16:35.000000000 -0700
-@@ -1,3 +1,10 @@
-+28 Apr 2010 FreeBSD Port
-+	* Fix memory leak/segfault under certain circumstances.
-+           http://sf.net/tracker/?func=detail&aid=2209433&group_id=30568&atid=399700
-+
-+16 Aug 2008 FreeBSD Port
-+	* Fix 2G overflow for data_size (backported from vendor CVS)
-+
- 03 Feb 2006 Francois LESUEUR
- 	* Version 0.2 released
- 	* Added support for detailed output
Index: archivers/libpar2/files/patch-par2repairer.cpp
===================================================================
--- archivers/libpar2/files/patch-par2repairer.cpp	(revision 319281)
+++ archivers/libpar2/files/patch-par2repairer.cpp	(working copy)
@@ -1,60 +0,0 @@
-diff -aud -U 5 ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.cpp
---- ../libpar2-0.2-original/par2repairer.cpp	2006-01-20 18:25:20.000000000 +0100
-+++ ../libpar2-0.2/par2repairer.cpp	2012-11-30 14:23:31.000000000 +0100
-@@ -76,10 +76,11 @@
-     ++sf;
-   }
- 
-   delete mainpacket;
-   delete creatorpacket;
-+  delete headers;
- }
- 
- 
- Result Par2Repairer::PreProcess(const CommandLine &commandline)
- {
-@@ -1259,11 +1260,11 @@
-         string path;
-         string name;
-         DiskFile::SplitFilename(filename, path, name);
- 
-         cout << "Target: \"" << name << "\" - missing." << endl;
--	sig_done.emit(name, 0, sourcefile->GetVerificationPacket()->BlockCount());
-+	sig_done.emit(name, 0, sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0);
-       }
-     }
- 
-     ++sf;
-   }
-@@ -1802,11 +1803,11 @@
-              << "\" - no data found." 
-              << endl;
-       }
-     }
-   }
--  sig_done.emit(name,count,sourcefile->GetVerificationPacket()->BlockCount()); 
-+  sig_done.emit(name,count, count>0 && sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0); 
-   sig_progress.emit(1000.0);
-   return true;
- }
- 
- // Find out how much data we have found
-diff -aud -U 5 ../libpar2-0.2-original/par2repairer.h ../libpar2-0.2/par2repairer.h
---- ../libpar2-0.2-original/par2repairer.h	2006-01-20 00:38:27.000000000 +0100
-+++ ../libpar2-0.2/par2repairer.h	2012-11-30 14:24:46.000000000 +0100
-@@ -34,10 +34,15 @@
-   sigc::signal<void, std::string> sig_filename;
-   sigc::signal<void, double> sig_progress;
-   sigc::signal<void, ParHeaders*> sig_headers;
-   sigc::signal<void, std::string, int, int> sig_done;
- 
-+  // This method allows to determine whether libpar2 includes the patches
-+  // ("libpar2-0.2-bugfixes.patch") submitted to libpar2 project.
-+  // Use the method in configure scripts for detection.
-+  void BugfixesPatchVersion2() { }
-+
- protected:
-   // Steps in verifying and repairing files:
- 
-   // Load packets from the specified file
-   bool LoadPacketsFromFile(string filename);
Index: archivers/libpar2/files/patch-parheaders.h
===================================================================
--- archivers/libpar2/files/patch-parheaders.h	(revision 319281)
+++ archivers/libpar2/files/patch-parheaders.h	(working copy)
@@ -1,11 +0,0 @@
---- parheaders.h	2005/11/27 03:48:37	1.1
-+++ parheaders.h	2006/04/18 08:49:39	1.2
-@@ -9,7 +9,7 @@
-   int other_files;
-   int block_size;
-   int data_blocks;
--  int data_size;
-+  long int data_size;
-   int chunk_size;
-   
-   ParHeaders(void);
Index: archivers/libpar2/files/xpatch-addcancel-par2repairer.cpp
===================================================================
--- archivers/libpar2/files/xpatch-addcancel-par2repairer.cpp	(revision 319281)
+++ archivers/libpar2/files/xpatch-addcancel-par2repairer.cpp	(working copy)
@@ -1,236 +0,0 @@
-diff -aud -U 5 ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.cpp
---- ../libpar2-0.2-original/par2repairer.cpp	2012-12-03 10:47:04.000000000 +0100
-+++ ../libpar2-0.2/par2repairer.cpp	2012-12-03 10:48:13.000000000 +0100
-@@ -50,10 +50,12 @@
-   outputbuffer = 0;
- 
-   noiselevel = CommandLine::nlNormal;
-   headers = new ParHeaders;
-   alreadyloaded = false;
-+
-+  cancelled = false;
- }
- 
- Par2Repairer::~Par2Repairer(void)
- {
-   delete [] (u8*)inputbuffer;
-@@ -404,10 +406,14 @@
-         {
-           cout << "Loading: " << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
-           progress = offset;
- 	sig_progress.emit(newfraction);
- 
-+          if (cancelled)
-+          {
-+            break;
-+          }
-         }
-       }
- 
-       // Attempt to read the next packet header
-       PACKET_HEADER header;
-@@ -582,10 +588,15 @@
-     if (noiselevel > CommandLine::nlQuiet)
-       cout << "No new packets found" << endl;
-     delete diskfile;
-   }
-   
-+  if (cancelled)
-+  {
-+    return false;
-+  }
-+
-   return true;
- }
- 
- // Finish loading a recovery packet
- bool Par2Repairer::LoadRecoveryPacket(DiskFile *diskfile, u64 offset, PACKET_HEADER &header)
-@@ -831,26 +842,42 @@
- 
-     // Load packets from each file that was found
-     for (list<string>::const_iterator s=files->begin(); s!=files->end(); ++s)
-     {
-       LoadPacketsFromFile(*s);
-+      if (cancelled)
-+      {
-+        break;
-+      }
-     }
- 
-     delete files;
-+    if (cancelled)
-+    {
-+      return false;
-+    }
-   }
- 
-   {
-     string wildcard = name.empty() ? "*.PAR2" : name + ".*.PAR2";
-     list<string> *files = DiskFile::FindFiles(path, wildcard);
- 
-     // Load packets from each file that was found
-     for (list<string>::const_iterator s=files->begin(); s!=files->end(); ++s)
-     {
-       LoadPacketsFromFile(*s);
-+      if (cancelled)
-+      {
-+        break;
-+      }
-     }
- 
-     delete files;
-+    if (cancelled)
-+    {
-+      return false;
-+    }
-   }
- 
-   return true;
- }
- 
-@@ -864,13 +891,22 @@
-     // If the filename contains ".par2" anywhere
-     if (string::npos != filename.find(".par2") ||
-         string::npos != filename.find(".PAR2"))
-     {
-       LoadPacketsFromFile(filename);
-+      if (cancelled)
-+      {
-+        break;
-+      }
-     }
-   }
- 
-+  if (cancelled)
-+  {
-+    return false;
-+  }
-+
-   return true;
- }
- 
- // Check that the packets are consistent and discard any that are not
- bool Par2Repairer::CheckPacketConsistency(void)
-@@ -1208,10 +1244,15 @@
- 
-   // Start verifying the files
-   sf = sortedfiles.begin();
-   while (sf != sortedfiles.end())
-   {
-+    if (cancelled)
-+    {
-+      return false;
-+    }
-+
-     // Do we have a source file
-     Par2RepairerSourceFile *sourcefile = *sf;
- 
-     // What filename does the file use
-     string filename = sourcefile->TargetFileName();
-@@ -1560,10 +1601,14 @@
-       if (oldfraction != newfraction)
-       {
-         cout << "Scanning: \"" << shortname << "\": " << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
- 	sig_progress.emit(newfraction);
- 
-+        if (cancelled)
-+        {
-+          break;
-+        }
-       }
-     }
- 
-     // If we fail to find a match, it might be because it was a duplicate of a block
-     // that we have already found.
-@@ -1649,10 +1694,15 @@
-           return false;
-       }
-     }
-   }
- 
-+  if (cancelled)
-+  {
-+    return false;
-+  }
-+
-   // Get the Full and 16k hash values of the file
-   filechecksummer.GetFileHashes(hashfull, hash16k);
- 
-   // Did we make any matches at all
-   if (count > 0)
-@@ -2289,14 +2339,23 @@
-           if (oldfraction != newfraction)
-           {
-             cout << "Repairing: " << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
- 	    sig_progress.emit(newfraction);
- 
-+            if (cancelled)
-+            {
-+              break;
-+            }
-           }
-         }
-       }
- 
-+      if (cancelled)
-+      {
-+        break;
-+      }
-+
-       ++inputblock;
-       ++inputindex;
-     }
-   }
-   else
-@@ -2346,13 +2405,22 @@
-         if (oldfraction != newfraction)
-         {
-           cout << "Processing: " << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
- 	sig_progress.emit(newfraction);
- 
-+          if (cancelled)
-+          {
-+            break;
-+          }
-         }
-       }
- 
-+      if (cancelled)
-+      {
-+        break;
-+      }
-+
-       ++copyblock;
-       ++inputblock;
-     }
-   }
- 
-@@ -2360,10 +2428,15 @@
-   if (lastopenfile != NULL)
-   {
-     lastopenfile->Close();
-   }
- 
-+  if (cancelled)
-+  {
-+    return false;
-+  }
-+
-   if (noiselevel > CommandLine::nlQuiet)
-     cout << "Writing recovered data\r";
- 
-   // For each output block that has been recomputed
-   vector<DataBlock*>::iterator outputblock = outputblocks.begin();
-diff -aud -U 5 ../libpar2-0.2-with-bugfixes-patch/par2repairer.h ../libpar2-0.2/par2repairer.h
---- ../libpar2-0.2-original/par2repairer.h	2012-12-03 10:47:04.000000000 +0100
-+++ ../libpar2-0.2/par2repairer.h	2012-12-03 10:48:13.000000000 +0100
-@@ -186,8 +186,9 @@
- 
-   u64                       progress;                // How much data has been processed.
-   u64                       totaldata;               // Total amount of data to be processed.
-   u64                       totalsize;               // Total data size
- 
-+  bool                      cancelled;               // repair cancelled
- };
- 
- #endif // __PAR2REPAIRER_H__
--- patch-libpar2-0.3.diff ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon May 27 22:30:09 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179029 
Responsible-Changed-From-To: freebsd-ports-bugs->wg 
Responsible-Changed-By: wg 
Responsible-Changed-When: Mon May 27 22:31:03 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: toxic@doobie.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/179029: [PATCH] archivers/libpar2: update to 0.3
Date: Mon, 27 May 2013 22:30:08 UT

 Maintainer of archivers/libpar2,
 
 Please note that PR ports/179029 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/179029
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Jeff Burchell <toxic@doobie.com>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: ports/179029: [PATCH] archivers/libpar2: update to 0.3
Date: Mon, 27 May 2013 15:37:54 -0700

 ------MCQXMJV9FMF2LN59WUPD6OURVMID2D
 Content-Type: text/plain;
  charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
 I approve.
 
 
 Edwin Groothuis <edwin@FreeBSD.ORG> wrote:
 
 >Maintainer of archivers/libpar2,
 >
 >Please note that PR ports/179029 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/179029
 >
 >-- 
 >Edwin Groothuis via the GNATS Auto Assign Tool
 >edwin@FreeBSD.org
 
 ------MCQXMJV9FMF2LN59WUPD6OURVMID2D
 Content-Type: text/html;
  charset=utf-8
 Content-Transfer-Encoding: 8bit
 
 <html><head/><body><html><head></head><body>I approve.<br>
 <br><br><div class="gmail_quote">Edwin Groothuis &lt;edwin@FreeBSD.ORG&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 <pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif; margin-top: 0px">Maintainer of archivers/libpar2,<br /><br />Please note that PR ports/179029 has just been submitted.<br /><br />If it contains a patch for an upgrade, an enhancement or a bug fix<br />you agree on, reply to this email stating that you approve the patch<br />and a committer will take care of it.<br /><br />The full text of the PR can be found at:<br /><a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/ 179029">http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/179029</a><br /></pre></blockquote></div></body></html></body></html>
 ------MCQXMJV9FMF2LN59WUPD6OURVMID2D--
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/179029: commit references a PR
Date: Wed,  5 Jun 2013 11:15:18 +0000 (UTC)

 Author: wg
 Date: Wed Jun  5 11:15:06 2013
 New Revision: 319977
 URL: http://svnweb.freebsd.org/changeset/ports/319977
 
 Log:
   - Update to 0.3 [1]
   - Remove USE_GCC (builds with clang) [1]
   - Add LICENSE (GPLv2)
   
   This is a new upstream, the original is dead.
   
   PR:		ports/179029
   Submitted by:	Herbert J. Skuhra <h.skuhra@gmail.com>
   Approved by:	culot (mentor), maintainer
 
 Deleted:
   head/archivers/libpar2/files/
 Modified:
   head/archivers/libpar2/Makefile
   head/archivers/libpar2/distinfo
 
 Modified: head/archivers/libpar2/Makefile
 ==============================================================================
 --- head/archivers/libpar2/Makefile	Wed Jun  5 10:43:43 2013	(r319976)
 +++ head/archivers/libpar2/Makefile	Wed Jun  5 11:15:06 2013	(r319977)
 @@ -2,10 +2,11 @@
  # $FreeBSD$
  
  PORTNAME=	libpar2
 -PORTVERSION=	0.2
 -PORTREVISION=	4
 +PORTVERSION=	0.3
  CATEGORIES=	archivers
 -MASTER_SITES=	SF/parchive/${PORTNAME}/${PORTVERSION}
 +MASTER_SITES=	http://launchpad.net/${PORTNAME}/trunk/${PORTVERSION}/+download/
 +
 +LICENSE=	GPLv2
  
  MAINTAINER=	toxic@doobie.com
  COMMENT=	Library for manipulating PAR2 files, extracted from par2cmdline
 @@ -14,23 +15,15 @@ LIB_DEPENDS=	sigc-2.0:${PORTSDIR}/devel/
  
  GNU_CONFIGURE=	yes
  
 +FETCH_ARGS=	-pRr
  LDFLAGS+=	-L${LOCALBASE}/lib
  CPPFLAGS+=	-I${LOCALBASE}/include
  
 -USE_GCC=	any
  USE_LDCONFIG=	yes
  USES=		pkgconfig
  
 -OPTIONS_DEFINE=	ENABLECANCEL
 -OPTIONS_DEFAULT=	ENABLECANCEL
 -ENABLECANCEL_DESC=	Enable graceful cancellation of repairs
 -
  .include <bsd.port.options.mk>
  
 -.if ${PORT_OPTIONS:MENABLECANCEL}
 -EXTRA_PATCHES=	${FILESDIR}/xpatch-addcancel-par2repairer.cpp
 -.endif
 -
  post-install:
  .if ${PORT_OPTIONS:MDOCS}
  	@${MKDIR} ${DOCSDIR}
 
 Modified: head/archivers/libpar2/distinfo
 ==============================================================================
 --- head/archivers/libpar2/distinfo	Wed Jun  5 10:43:43 2013	(r319976)
 +++ head/archivers/libpar2/distinfo	Wed Jun  5 11:15:06 2013	(r319977)
 @@ -1,2 +1,2 @@
 -SHA256 (libpar2-0.2.tar.gz) = 074fbf840f73b1e13e0405fce261078c81c8c0a4859e30a7bba10510f9199908
 -SIZE (libpar2-0.2.tar.gz) = 401700
 +SHA256 (libpar2-0.3.tar.gz) = 0bcc680db9e8d9fa178b2fec38681ff865d38d283085be1898eac1e615b51b36
 +SIZE (libpar2-0.3.tar.gz) = 516329
 _______________________________________________
 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: wg 
State-Changed-When: Wed Jun 5 11:20:28 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

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