diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2013-03-20 03:36:44 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2013-03-20 03:36:44 +0000 |
commit | 7aa095959df2f5ed8ef6db4af54017019c6513a7 (patch) | |
tree | ceca31ff04c180a024d02ad55355c7cfe39570e9 /archivers | |
parent | e76c25a332b41b7e1752fd94a2dfe335eee2b10e (diff) | |
download | ports-7aa095959df2f5ed8ef6db4af54017019c6513a7.tar.gz ports-7aa095959df2f5ed8ef6db4af54017019c6513a7.zip |
Notes
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/Makefile | 1 | ||||
-rw-r--r-- | archivers/zpaq/Makefile | 36 | ||||
-rw-r--r-- | archivers/zpaq/distinfo | 2 | ||||
-rw-r--r-- | archivers/zpaq/files/patch-zpaq.cc | 38 | ||||
-rw-r--r-- | archivers/zpaq/pkg-descr | 22 |
5 files changed, 99 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile index fd88e9455a3d..673a511ca393 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -211,6 +211,7 @@ SUBDIR += zip SUBDIR += zipmix SUBDIR += zipper + SUBDIR += zpaq SUBDIR += zoo SUBDIR += zutils diff --git a/archivers/zpaq/Makefile b/archivers/zpaq/Makefile new file mode 100644 index 000000000000..70368b0b6bba --- /dev/null +++ b/archivers/zpaq/Makefile @@ -0,0 +1,36 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $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 <bsd.port.pre.mk> + +.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 <bsd.port.post.mk> diff --git a/archivers/zpaq/distinfo b/archivers/zpaq/distinfo new file mode 100644 index 000000000000..b089f34db99d --- /dev/null +++ b/archivers/zpaq/distinfo @@ -0,0 +1,2 @@ +SHA256 (zpaq622.zip) = aceae6dba77240425c8498ff588e7a40260fe59ea9f5b81e7bb3e0ab13535ba5 +SIZE (zpaq622.zip) = 827047 diff --git a/archivers/zpaq/files/patch-zpaq.cc b/archivers/zpaq/files/patch-zpaq.cc new file mode 100644 index 000000000000..8335264f900a --- /dev/null +++ b/archivers/zpaq/files/patch-zpaq.cc @@ -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% diff --git a/archivers/zpaq/pkg-descr b/archivers/zpaq/pkg-descr new file mode 100644 index 000000000000..fba808291bd5 --- /dev/null +++ b/archivers/zpaq/pkg-descr @@ -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 |