summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2021-04-16 16:16:05 +0000
committerryoon <ryoon@pkgsrc.org>2021-04-16 16:16:05 +0000
commitfd17eddbbdd864484fec2f9f5355e128c281f083 (patch)
tree2118d87d07afacc10dccfae41aa4306be0a4d0b8 /archivers
parentcb8e25ebdd07d6561ec9cdc9e32c290713aeca58 (diff)
downloadpkgsrc-fd17eddbbdd864484fec2f9f5355e128c281f083.tar.gz
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.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/pxz/DESCR5
-rw-r--r--archivers/pxz/Makefile21
-rw-r--r--archivers/pxz/PLIST3
-rw-r--r--archivers/pxz/distinfo7
-rw-r--r--archivers/pxz/patches/patch-pxz.c53
5 files changed, 89 insertions, 0 deletions
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 <string.h>
+ #include <stdio.h>
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <stdio_ext.h>
++#endif
+ #include <stdlib.h>
+ #include <inttypes.h>
+ #include <unistd.h>
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#include <err.h>
++#else
+ #include <error.h>
++#endif
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+@@ -42,6 +48,10 @@
+ #include <omp.h>
+ #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");