diff --git a/archivers/pigz/Makefile b/archivers/pigz/Makefile index def21c804a23..c5a3f312e76f 100644 --- a/archivers/pigz/Makefile +++ b/archivers/pigz/Makefile @@ -1,37 +1,40 @@ # Created by: Gea-Suan Lin PORTNAME= pigz -PORTVERSION= 2.6 +PORTVERSION= 2.7 CATEGORIES= archivers MASTER_SITES= http://www.zlib.net/pigz/ \ http://freebsd.unixfreunde.de/sources/ MAINTAINER= delphij@FreeBSD.org COMMENT= Parallel GZIP LICENSE= ZLIB LIB_DEPENDS= libzopfli.so:archivers/zopfli USES= cpe gmake localbase:ldflags CPE_VENDOR= zlib ALL_TARGET= dev MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" LDFLAGS+= -lz -lzopfli PLIST_FILES= bin/pigz bin/pigzn bin/pigzt bin/unpigz PLIST_FILES+= share/man/man1/pigz.1.gz post-patch: - ${REINPLACE_CMD} -e 's/$${ZOPFLI}.*//' \ + ${REINPLACE_CMD} -e 's/$$(ZOPFLI).*//' \ + -e 's/$$(ZOP).*//' \ + ${WRKSRC}/Makefile + ${REINPLACE_CMD} -E -e 's/-o pigz(t?) /-pthread -o pigz\1 /' \ ${WRKSRC}/Makefile ${REINPLACE_CMD} -e 's,zopfli/src/,,' \ ${WRKSRC}/pigz.c do-install: .for FILE in pigz pigzn pigzt unpigz ${INSTALL_PROGRAM} ${WRKSRC}/${FILE} ${STAGEDIR}${PREFIX}/bin .endfor ${INSTALL_MAN} ${WRKSRC}/pigz.1 ${STAGEDIR}${PREFIX}/share/man/man1/ .include diff --git a/archivers/pigz/distinfo b/archivers/pigz/distinfo index 8fbea7f075a3..7088bee9bb43 100644 --- a/archivers/pigz/distinfo +++ b/archivers/pigz/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1635727738 -SHA256 (pigz-2.6.tar.gz) = 2eed7b0d7449d1d70903f2a62cd6005d262eb3a8c9e98687bc8cbb5809db2a7d -SIZE (pigz-2.6.tar.gz) = 106840 +TIMESTAMP = 1642392318 +SHA256 (pigz-2.7.tar.gz) = b4c9e60344a08d5db37ca7ad00a5b2c76ccb9556354b722d56d55ca7e8b1c707 +SIZE (pigz-2.7.tar.gz) = 108102 diff --git a/archivers/pigz/files/patch-pigz.c b/archivers/pigz/files/patch-pigz.c new file mode 100644 index 000000000000..72fe98af1c5f --- /dev/null +++ b/archivers/pigz/files/patch-pigz.c @@ -0,0 +1,45 @@ +--- pigz.c.orig 2022-01-17 19:06:15 UTC ++++ pigz.c +@@ -558,9 +558,7 @@ local struct { + int procs; // maximum number of compression threads (>= 1) + int setdict; // true to initialize dictionary in each thread + size_t block; // uncompressed input size per thread (>= 32K) +-#ifndef NOTHREAD + crc_t shift; // pre-calculated CRC-32 shift for length block +-#endif + + // saved gzip/zip header data for decompression, testing, and listing + time_t stamp; // time stamp from gzip header +@@ -1338,9 +1336,6 @@ local long zlib_vernum(void) { + return left < 2 ? num << (left << 2) : -1; + } + +-#ifndef NOTHREAD +-// -- threaded portions of pigz -- +- + // -- check value combination routines for parallel calculation -- + + #define COMB(a,b,c) (g.form == 1 ? adler32_comb(a,b,c) : crc32_comb(a,b,c)) +@@ -1421,6 +1416,9 @@ local unsigned long adler32_comb(unsigned long adler1, + return sum1 | (sum2 << 16); + } + ++#ifndef NOTHREAD ++// -- threaded portions of pigz -- ++ + // -- pool of spaces for buffer management -- + + // These routines manage a pool of spaces. Each pool specifies a fixed size +@@ -4337,11 +4335,11 @@ local void defaults(void) { + ZopfliInitOptions(&g.zopts); + #endif + g.block = 131072UL; // 128K ++ g.shift = x2nmodp(g.block, 3); + #ifdef NOTHREAD + g.procs = 1; + #else + g.procs = nprocs(8); +- g.shift = x2nmodp(g.block, 3); + #endif + g.rsync = 0; // don't do rsync blocking + g.setdict = 1; // initialize dictionary each thread