From fd17eddbbdd864484fec2f9f5355e128c281f083 Mon Sep 17 00:00:00 2001 From: ryoon Date: Fri, 16 Apr 2021 16:16:05 +0000 Subject: archivers/pxz: import pxz-4.999.9beta Parallel XZ is a compression utility that takes advantage of running LZMA compression of different parts of an input file on multiple cores and processors simultaneously. Its primary goal is to utilize all resources to speed up compression time with minimal possible influence on compression ratio. Packaged by ISIHARA Takanori and me in pkgsrc-wip/pxz. --- archivers/pxz/DESCR | 5 ++++ archivers/pxz/Makefile | 21 ++++++++++++++++ archivers/pxz/PLIST | 3 +++ archivers/pxz/distinfo | 7 ++++++ archivers/pxz/patches/patch-pxz.c | 53 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 archivers/pxz/DESCR create mode 100644 archivers/pxz/Makefile create mode 100644 archivers/pxz/PLIST create mode 100644 archivers/pxz/distinfo create mode 100644 archivers/pxz/patches/patch-pxz.c (limited to 'archivers') diff --git a/archivers/pxz/DESCR b/archivers/pxz/DESCR new file mode 100644 index 00000000000..1010f58275d --- /dev/null +++ b/archivers/pxz/DESCR @@ -0,0 +1,5 @@ +Parallel XZ is a compression utility that takes advantage of running LZMA +compression of different parts of an input file on multiple cores and +processors simultaneously. +Its primary goal is to utilize all resources to speed up compression time +with minimal possible influence on compression ratio. diff --git a/archivers/pxz/Makefile b/archivers/pxz/Makefile new file mode 100644 index 00000000000..349bca7cdb6 --- /dev/null +++ b/archivers/pxz/Makefile @@ -0,0 +1,21 @@ +# $NetBSD: Makefile,v 1.1 2021/04/16 16:16:05 ryoon Exp $ + +GITHUB_PROJECT= pxz +GITHUB_TAG= 124382a6d0832b13b7c091f72264f8f3f463070a +DISTNAME= pxz-4.999.9beta +CATEGORIES= archivers +MASTER_SITES= ${MASTER_SITE_GITHUB:=jnovy/} + +MAINTAINER= ryoon@NetBSD.org +HOMEPAGE= https://jnovy.fedorapeople.org/pxz/ +COMMENT= Parallel LZMA compressor using liblzma +LICENSE= gnu-gpl-v2 + +INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/pxz ${DESTDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/pxz.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + +.include "../../archivers/xz/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/archivers/pxz/PLIST b/archivers/pxz/PLIST new file mode 100644 index 00000000000..df3e8e2ac3f --- /dev/null +++ b/archivers/pxz/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2021/04/16 16:16:05 ryoon Exp $ +bin/pxz +man/man1/pxz.1 diff --git a/archivers/pxz/distinfo b/archivers/pxz/distinfo new file mode 100644 index 00000000000..716960190f0 --- /dev/null +++ b/archivers/pxz/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2021/04/16 16:16:05 ryoon Exp $ + +SHA1 (pxz-4.999.9beta-124382a6d0832b13b7c091f72264f8f3f463070a.tar.gz) = 403d83c0b0e1430491857fbd88c4ade12891c8ce +RMD160 (pxz-4.999.9beta-124382a6d0832b13b7c091f72264f8f3f463070a.tar.gz) = e68c7d049e9714a0b1f177395c6ebafc104c283f +SHA512 (pxz-4.999.9beta-124382a6d0832b13b7c091f72264f8f3f463070a.tar.gz) = 7675e3839764afc27e737d596080440d98c45e27b355036551acb5a1c09851abf26c419d431a62d5c635e5c11c3e638980e7516c1c774cc991b3ededef4b388a +Size (pxz-4.999.9beta-124382a6d0832b13b7c091f72264f8f3f463070a.tar.gz) = 12291 bytes +SHA1 (patch-pxz.c) = 23009478fbf4796805828bfb59bfeb912a49a895 diff --git a/archivers/pxz/patches/patch-pxz.c b/archivers/pxz/patches/patch-pxz.c new file mode 100644 index 00000000000..99fbdf1c716 --- /dev/null +++ b/archivers/pxz/patches/patch-pxz.c @@ -0,0 +1,53 @@ +$NetBSD: patch-pxz.c,v 1.1 2021/04/16 16:16:05 ryoon Exp $ + +fixed complie error. +fixed CVE. + +cf. FreeBSD's ports +cf. Debian's deb fix CVE patch + +--- pxz.c.orig 2019-05-07 15:08:53.000000000 +0000 ++++ pxz.c +@@ -23,11 +23,17 @@ + + #include + #include ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) + #include ++#endif + #include + #include + #include ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -42,6 +48,10 @@ + #include + #endif + ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++#define error errc ++#endif ++ + #ifndef XZ_BINARY + #define XZ_BINARY "xz" + #endif +@@ -132,6 +142,13 @@ const struct option long_opts[] = { + { NULL, 0, NULL, 0 } + }; + ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++static size_t __fpending (FILE *fp) ++{ ++ return (fp->_p - fp->_bf._base); ++} ++#endif ++ + void __attribute__((noreturn)) run_xz( char **argv, char **envp ) { + execve(XZ_BINARY, argv, envp); + error(0, errno, "execution of "XZ_BINARY" binary failed"); -- cgit v1.2.3