From f7bfa6901d8b25005b6509b8e7e1e7d0e3696d11 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Tue, 23 Nov 2010 10:26:40 +0000 Subject: 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/ --- archivers/Makefile | 1 + archivers/pxz/Makefile | 50 +++++++++++++++++++++++++++++++++++++++++ archivers/pxz/distinfo | 2 ++ archivers/pxz/files/patch-pxz.c | 47 ++++++++++++++++++++++++++++++++++++++ archivers/pxz/pkg-descr | 7 ++++++ 5 files changed, 107 insertions(+) create mode 100644 archivers/pxz/Makefile create mode 100644 archivers/pxz/distinfo create mode 100644 archivers/pxz/files/patch-pxz.c create mode 100644 archivers/pxz/pkg-descr (limited to 'archivers') diff --git a/archivers/Makefile b/archivers/Makefile index 8cde62745310..9d35a6900502 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -141,6 +141,7 @@ SUBDIR += ppmd SUBDIR += ppmd-7z SUBDIR += ppunpack + SUBDIR += pxz SUBDIR += py-liblzma SUBDIR += py-librtfcomp SUBDIR += py-lzma 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 + +.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 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 + #include +-#include ++#ifndef __FreeBSD__ ++#include ++#endif + #include + #include + #include +-#include ++#ifdef __FreeBSD__ ++#include ++#else ++#include ++#endif + #include + #include + #include +@@ -40,6 +46,10 @@ + #include + #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/ -- cgit v1.2.3