From owner-svn-ports-all@FreeBSD.ORG Wed Mar 20 03:36:45 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 929A4F44; Wed, 20 Mar 2013 03:36:45 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7636A97A; Wed, 20 Mar 2013 03:36:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2K3ajw2062906; Wed, 20 Mar 2013 03:36:45 GMT (envelope-from danfe@svn.freebsd.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2K3aiK9062898; Wed, 20 Mar 2013 03:36:44 GMT (envelope-from danfe@svn.freebsd.org) Message-Id: <201303200336.r2K3aiK9062898@svn.freebsd.org> From: Alexey Dokuchaev Date: Wed, 20 Mar 2013 03:36:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r314709 - in head/archivers: . zpaq zpaq/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Mar 2013 03:36:45 -0000 Author: danfe Date: Wed Mar 20 03:36:44 2013 New Revision: 314709 URL: http://svnweb.freebsd.org/changeset/ports/314709 Log: Add zpaq 6.22, a journaling, incremental, deduplicating archiver. Added: head/archivers/zpaq/ head/archivers/zpaq/Makefile (contents, props changed) head/archivers/zpaq/distinfo (contents, props changed) head/archivers/zpaq/files/ head/archivers/zpaq/files/patch-zpaq.cc (contents, props changed) head/archivers/zpaq/pkg-descr (contents, props changed) Modified: head/archivers/Makefile Modified: head/archivers/Makefile ============================================================================== --- head/archivers/Makefile Wed Mar 20 03:02:51 2013 (r314708) +++ head/archivers/Makefile Wed Mar 20 03:36:44 2013 (r314709) @@ -211,6 +211,7 @@ SUBDIR += zip SUBDIR += zipmix SUBDIR += zipper + SUBDIR += zpaq SUBDIR += zoo SUBDIR += zutils Added: head/archivers/zpaq/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/zpaq/Makefile Wed Mar 20 03:36:44 2013 (r314709) @@ -0,0 +1,36 @@ +# Created by: Alexey Dokuchaev +# $FreeBSD$ + +PORTNAME= zpaq +PORTVERSION= 6.22 +CATEGORIES= archivers +MASTER_SITES= http://mattmahoney.net/dc/ +DISTNAME= ${PORTNAME}${PORTVERSION:S/.//g} + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Journaling, incremental, deduplicating archiver + +LICENSE= GPLv3 + +USE_ZIP= yes +USE_DOS2UNIX= zpaq.cpp +NO_WRKSUBDIR= yes + +PLIST_FILES= bin/zpaq bin/zpaqd + +.include + +.if ${ARCH} != "i386" && ${ARCH} != "amd64" +CXXFLAGS+= -DNOJIT +.endif + +do-build: + cd ${BUILD_WRKSRC} && ${CXX} ${CXXFLAGS} -Dunix -DNDEBUG zpaq.cpp \ + libzpaq.cpp divsufsort.c -o zpaq -fopenmp -pthread + cd ${BUILD_WRKSRC} && ${CXX} ${CXXFLAGS} -Dunix zpaqd.cpp \ + libzpaq.cpp -o zpaqd + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/zpaq ${WRKSRC}/zpaqd ${PREFIX}/bin + +.include Added: head/archivers/zpaq/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/zpaq/distinfo Wed Mar 20 03:36:44 2013 (r314709) @@ -0,0 +1,2 @@ +SHA256 (zpaq622.zip) = aceae6dba77240425c8498ff588e7a40260fe59ea9f5b81e7bb3e0ab13535ba5 +SIZE (zpaq622.zip) = 827047 Added: head/archivers/zpaq/files/patch-zpaq.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/zpaq/files/patch-zpaq.cc Wed Mar 20 03:36:44 2013 (r314709) @@ -0,0 +1,38 @@ +--- zpaq.cpp.orig 2013-03-20 11:24:18.000000000 +0800 ++++ zpaq.cpp 2013-03-20 11:26:23.000000000 +0800 +@@ -147,7 +147,7 @@ + The default is to detect the number of processor cores and use that value + or the limit according to -method, whichever is less. The number of cores + is detected from the environment variable %NUMBER_OF_PROCESSORS% in +-Windows or /proc/cpuinfo in Linux. ++Windows or via sysconf(_SC_NPROCESSORS_ONLN) in Unix. + + -method M[n|e][C[N1][,N2]...]... + +@@ -1090,25 +1090,7 @@ + int numberOfProcessors() { + int rc=0; // result + #ifdef unix +- +- // Count lines of the form "processor\t: %d\n" in /proc/cpuinfo +- // where %d is 0, 1, 2,..., rc-1 +- FILE *in=fopen("/proc/cpuinfo", "r"); +- if (!in) return 1; +- std::string s; +- int c; +- while ((c=getc(in))!=EOF) { +- if (c>='A' && c<='Z') c+='a'-'A'; // convert to lowercase +- if (c>' ') s+=c; // remove white space +- if (c=='\n') { // end of line? +- if (size(s)>10 && s.substr(0, 10)=="processor:") { +- c=atoi(s.c_str()+10); +- if (c==rc) ++rc; +- } +- s=""; +- } +- } +- fclose(in); ++ rc = sysconf(_SC_NPROCESSORS_ONLN); + #else + + // In Windows return %NUMBER_OF_PROCESSORS% Added: head/archivers/zpaq/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/archivers/zpaq/pkg-descr Wed Mar 20 03:36:44 2013 (r314709) @@ -0,0 +1,22 @@ +ZPAQ is a journaling, incremental, deduplicating archiver for Windows and +Unix. "Journaling" means that when you update a file or directory, both the +old and new versions are saved. You can extract from the archive as it +existed at any time in the past. + +"Incremental" means that when you back up your entire hard drive, only those +files whose last-modified date has changed since the previous backup are +added. For 100 GB of files, this typically takes 1-2 minutes, vs. few hours +to create the first version. + +"Deduplicating" means that identical files or fragments are stored only once +to save time and space. + +Files are compressed in the open standard ZPAQ format, which is supported by +a specification, reference decoder, and a test case (which should decode to +the Calgary corpus), and a public domain C++ API that provides compression +and decompression services. The format is not known to be encumbered by any +patents. ZPAQ stores the decompression algorithm description in the archive, +which means that when archive is updated to a better compression algorithm, +older extractors will still be able to read the new archives. + +WWW: http://mattmahoney.net/dc/zpaq.html