diff options
author | mm <mm@FreeBSD.org> | 2010-11-23 18:26:40 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2010-11-23 18:26:40 +0800 |
commit | 0e7d3b66d3c604c26c05a96892369d889b2d44e4 (patch) | |
tree | 6743616e83ea841ea14d2fc09f242c005dede6f1 /archivers/pxz | |
parent | df1f9133e8ea82c2a9e17a9eb2105adef67d6479 (diff) | |
download | freebsd-ports-gnome-0e7d3b66d3c604c26c05a96892369d889b2d44e4.tar.gz freebsd-ports-gnome-0e7d3b66d3c604c26c05a96892369d889b2d44e4.tar.zst freebsd-ports-gnome-0e7d3b66d3c604c26c05a96892369d889b2d44e4.zip |
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.
WWW: http://jnovy.fedorapeople.org/pxz/
Diffstat (limited to 'archivers/pxz')
-rw-r--r-- | archivers/pxz/Makefile | 50 | ||||
-rw-r--r-- | archivers/pxz/distinfo | 2 | ||||
-rw-r--r-- | archivers/pxz/files/patch-pxz.c | 47 | ||||
-rw-r--r-- | archivers/pxz/pkg-descr | 7 |
4 files changed, 106 insertions, 0 deletions
diff --git a/archivers/pxz/Makefile b/archivers/pxz/Makefile new file mode 100644 index 000000000000..a8e28a9a2b83 --- /dev/null +++ b/archivers/pxz/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: pxz +# Date created: 2011-23-16 +# Whom: mm +# +# $FreeBSD$ +# + +PORTNAME= pxz +PORTVERSION= 0.20101123 +CATEGORIES= archivers +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= mm +DISTNAME= pxz-git-${PORTVERSION:S/0.//} + +MAINTAINER= mm@FreeBSD.org +COMMENT= Parallel LZMA compressor using liblzma + +WRKSRC= ${WRKDIR}/${PORTNAME} + +PLIST_FILES= bin/pxz +MAN1= pxz.1 + +MAKE_ENV+= BINDIR=${PREFIX}/bin \ + MANDIR=${MANPREFIX}/man + +.if !defined(NOPORTDOCS) +PORTDOCS= COPYING +.endif + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 800505 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) +LIB_DEPENDS+= lzma.5:${PORTSDIR}/archivers/xz +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +MAKE_ENV+= LDFLAGS="${LDFLAGS}" +.endif + +post-patch: + @${REINPLACE_CMD} -e 's/CC=.*/CC:=$${CC}/g' ${WRKSRC}/Makefile + +post-install: +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +. for FILE in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${FILE} +. endfor +.endif + +.include <bsd.port.post.mk> diff --git a/archivers/pxz/distinfo b/archivers/pxz/distinfo new file mode 100644 index 000000000000..bf23e0dcc7da --- /dev/null +++ b/archivers/pxz/distinfo @@ -0,0 +1,2 @@ +SHA256 (pxz-git-20101123.tar.gz) = 8f823dd1f5d7a02a8d28420964450b63946ed10dc8435284566297be34b1e43d +SIZE (pxz-git-20101123.tar.gz) = 50700 diff --git a/archivers/pxz/files/patch-pxz.c b/archivers/pxz/files/patch-pxz.c new file mode 100644 index 000000000000..8878d8ea28c5 --- /dev/null +++ b/archivers/pxz/files/patch-pxz.c @@ -0,0 +1,47 @@ +--- pxz.c.orig 2010-11-23 10:35:25.720939440 +0100 ++++ pxz.c 2010-11-23 10:46:28.910235910 +0100 +@@ -21,11 +21,17 @@ + + #include <string.h> + #include <stdio.h> +-#include <stdio_ext.h> ++#ifndef __FreeBSD__ ++#include <stdio_ext.h> ++#endif + #include <stdlib.h> + #include <inttypes.h> + #include <unistd.h> +-#include <error.h> ++#ifdef __FreeBSD__ ++#include <err.h> ++#else ++#include <error.h> ++#endif + #include <errno.h> + #include <sys/stat.h> + #include <sys/mman.h> +@@ -40,6 +46,10 @@ + #include <omp.h> + #endif + ++#ifdef __FreeBSD__ ++#define error errc ++#endif ++ + #ifndef XZ_BINARY + #define XZ_BINARY "xz" + #endif +@@ -119,6 +129,13 @@ + { NULL, 0, NULL, 0 } + }; + ++#ifdef __FreeBSD__ ++static size_t __fpending (FILE *fp) ++{ ++ return (fp->_p - fp->_bf._base); ++} ++#endif ++ + void __attribute__((noreturn)) run_xz( char **argv ) { + execvp(XZ_BINARY, argv); + error(0, errno, "execution of "XZ_BINARY" binary failed"); diff --git a/archivers/pxz/pkg-descr b/archivers/pxz/pkg-descr new file mode 100644 index 000000000000..3356326a5918 --- /dev/null +++ b/archivers/pxz/pkg-descr @@ -0,0 +1,7 @@ +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. + +WWW: http://jnovy.fedorapeople.org/pxz/ |