1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

update to zpaq 6.14; add lazy2 and the updated level 2 zpaq spec

Feature safe:	yes
This commit is contained in:
Brendan Fabeny 2012-11-01 23:21:29 +00:00
parent 7c2861eb04
commit a3f381034f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=306828
4 changed files with 61 additions and 85 deletions

View File

@ -6,19 +6,10 @@
#
PORTNAME= paq
PORTVERSION= 20120404
PORTVERSION= 20121030
CATEGORIES= archivers
MASTER_SITES= http://mattmahoney.net/dc/ LOCAL/bf/paq/
DISTFILES= libzpaq501.zip wbpe110.zip zpaq404.zip zpipe.201.zip
.if !defined(NOPORTDATA) || make(makesum)
DISTFILES+= bmp_j4a.zip bwt.1.zip bwt_j3.zip bwt_slowmode1.zip \
calgarytest.zpaq calgarytest2.zpaq exe_j1.zip fast.cfg \
jpg_test2.zip lz1.zip max.cfg mid.cfg min.zip zpsfx.100.zip \
zpsfx101.cpp
.endif
.if !defined(NOPORTDOCS) || make(makesum)
DISTFILES+= zpaq1.pdf zpaq200.pdf
.endif
DISTFILES= wbpe110.zip zpaq614.zip zpipe.201.zip
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTFILES:M*.zip}
@ -28,57 +19,70 @@ COMMENT= A family of archivers with extremely high compression ratios
LICENSE= GPLv3 MIT
LICENSE_COMB= multi
EXTRACT_AFTER_ARGS= -x *.bat *.exe readme.txt -d ${WRKDIR}
NO_WRKSUBDIR= yes
USE_DOS2UNIX= yes
USE_ZIP= yes
USE_DOS2UNIX= yes
USE_PERL5_BUILD= yes
EXTRACT_AFTER_ARGS= -x *.bat *.exe readme.txt -d ${WRKDIR}
NO_WRKSUBDIR= yes
OPTIONS_DEFINE= OPENMP
SUB_FILES= pkg-message
MAN1= zpaq.1
MAN3= libzpaq.3
.include <bsd.port.pre.mk>
.if !defined(WITH_DEBUG)
CFLAGS+= -DNDEBUG
.endif
.if !defined(WITHOUT_OPENMP) && empty(CXX:M*clang*)
PTHREAD_CFLAGS+= -fopenmp
.endif
.include <bsd.port.options.mk>
.if ${ARCH} == "amd64" || ( ${ARCH} == "i386" && !empty(MACHINE_CPU:Msse2) )
ZPAQFLAGS= -msse2
ZPAQFLAGS= -Dunix -msse2
.else
ZPAQFLAGS= -DNOJIT
.endif
.if !defined(NOPORTDOCS)
PORTDOCS= libzpaq.cpp wbpe.cpp zpaq.cpp zpaq1.pdf zpipe.cpp
.if defined(WITH_DEBUG)
CXXFLAGS+= -DDEBUG
.else
CXXFLAGS+= -DNDEBUG
.endif
.if !defined(NOPORTDATA) || make(makesum)
DISTFILES+= bmp_j4b.zip bwt.1.zip bwt_j3.zip bwt_slowmode1.zip \
calgarytest.zpaq calgarytest2.zpaq exe_j1.zip fast.cfg \
jpg_test2.zip lazy210.zip lz1.zip max.cfg mid.cfg min.zip \
zpsfx.100.zip zpsfx101.cpp
.endif
.if ${PORT_OPTIONS:MDOCS} || make(makesum)
DISTFILES+= zpaq1.pdf zpaq201.pdf
.endif
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= libzpaq.cpp wbpe.cpp zpaq.cpp zpaq1.pdf zpaq201.pdf zpipe.cpp
.endif
.if !defined(NOPORTDATA)
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS+= bwt_.cpp bwtpre.cpp bwtrle.cpp divsufsort.c divsufsort.h \
exe_jo.cpp jpeg_jo.cpp lzpre.cpp lzppre.cpp readme_bwt.txt \
readme_bwt_j3.txt readme_exe_j1.txt zpsfx.cpp
READMES+= bwt_j3 exe_j1
EXTRA_PATCHES += ${FILESDIR}/patch_zpsfx.cpp
readme_bwt_j3.txt readme_exe_j1.txt readme_lazy210.txt zpsfx.cpp
READMES+= bwt_j3 exe_j1 lazy210
EXTRA_PATCHES+= ${FILESDIR}/patch_zpsfx.cpp
.endif
WDATA= bmp_j4.cfg bwt_j3.cfg bwt_slowmode1_1GB_block.cfg \
bwt_slowmode1_256MB_block.cfg bwt_slowmode1_4MB_block.cfg \
bwt1.cfg bwt2.cfg bwtrle1.cfg bwtrle2.cfg colorpre.cfg \
exe_j1.cfg jpg_test2.cfg lz1.cfg min.cfg zpsfx.tag
exe_j1.cfg jpg_test2.cfg lazy2.cfg lz1.cfg min.cfg zpsfx.tag
DDATA= fast.cfg max.cfg mid.cfg
PORTDATA= ${WDATA} ${DDATA} zpsfx
.endif
.if ${PORT_OPTIONS:MOPENMP}
.if !empty(CC:T:M*clang*)
IGNORE = : clang does not support OpenMP. Disable the OPENMP option or\
use another compiler
.endif
PTHREAD_CFLAGS+= -fopenmp
.endif
post-extract:
@${CP} ${_DISTDIR}/zpsfx101.cpp ${WRKSRC}/zpsfx.cpp
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
.for r in ${READMES}
@${UNZIP_CMD} -pq ${_DISTDIR}/${r}.zip readme.txt > ${WRKSRC}/readme_${r:R}.txt
.endfor
@ -89,12 +93,12 @@ post-patch:
.if !defined(NOPORTDATA)
@${REINPLACE_CMD} -e 's|c:\\res\\zpaq\\||' ${WRKSRC}/bwt[12].cfg \
${WRKSRC}/bwtrle[12].cfg
.endif
do-build:
.if !defined(NOPORTDATA)
@cd ${WRKSRC}; for prog in bwt_ bwtpre exe_jo jpeg_jo lzpre lzppre; do \
@cd ${WRKSRC}; for prog in bwt_ bwtpre exe_jo jpeg_jo lazy2 lzpre \
lzppre; do \
${CXX} ${CXXFLAGS} -o $${prog} $${prog}.cpp; done; \
${CXX} ${CXXFLAGS} -o bwtrle bwtrle.cpp divsufsort.c; \
${CXX} ${CXXFLAGS} ${ZPAQFLAGS} -o zpsfx zpsfx.cpp libzpaq.cpp
@ -102,23 +106,16 @@ do-build:
@cd ${WRKSRC}; \
${CXX} ${CXXFLAGS} -o wbpe wbpe.cpp; \
${CXX} ${CXXFLAGS} ${PTHREAD_CFLAGS} ${ZPAQFLAGS} \
-o zpaq zpaq.cpp libzpaq.cpp divsufsort.c ${LDFLAGS} ${PTHREAD_LIBS}; \
${CXX} ${CXXFLAGS} ${ZPAQFLAGS} -o zpipe zpipe.cpp libzpaq.cpp; \
for page in ${MAN1} ${MAN3}; \
do pod2man $${page}.pod > $${page}; done
-o zpaq zpaq.cpp libzpaq.cpp divsufsort.c ${LDFLAGS} ${PTHREAD_LIBS}; \
${CXX} ${CXXFLAGS} ${ZPAQFLAGS} -o zpipe zpipe.cpp libzpaq.cpp
do-install:
@${MKDIR} ${PREFIX}/bin ${PREFIX}/include ${MANPREFIX}/man/man1 \
${MANPREFIX}/man/man3
.for prog in wbpe zpaq zpipe
@${INSTALL_PROGRAM} ${WRKSRC}/${prog} ${PREFIX}/bin
.endfor
@${INSTALL_DATA} ${WRKSRC}/libzpaq.h ${PREFIX}/include
.for page in ${MAN1} ${MAN3}
@${INSTALL_MAN} ${WRKSRC}/${page} ${MANPREFIX}/man/man${page:E}
.endfor
.if !defined(NOPORTDATA)
.for prog in bwt_ bwtpre bwtrle exe_jo jpeg_jo lzpre lzppre
.for prog in bwt_ bwtpre bwtrle exe_jo jpeg_jo lazy2 lzpre lzppre
@${INSTALL_PROGRAM} ${WRKSRC}/${prog} ${PREFIX}/bin
.endfor
@${MKDIR} ${DATADIR}
@ -126,15 +123,15 @@ do-install:
${INSTALL_LIB} zpsfx ${DATADIR}
@cd ${_DISTDIR}; ${INSTALL_DATA} ${DDATA} ${DATADIR}
.endif
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS:Nzpaq1.pdf} ${DOCSDIR}
@${INSTALL_DATA} ${_DISTDIR}/zpaq1.pdf ${DOCSDIR}
@cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS:N*.pdf} ${DOCSDIR}
@cd ${_DISTDIR}; ${INSTALL_DATA} ${PORTDOCS:M*.pdf} ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
check regression-test test: build
${WRKSRC}/zpaq l ${_DISTDIR}/calgarytest.zpaq
${WRKSRC}/zpaq l ${_DISTDIR}/calgarytest2.zpaq
${WRKSRC}/zpaq -list ${_DISTDIR}/calgarytest.zpaq
${WRKSRC}/zpaq -list ${_DISTDIR}/calgarytest2.zpaq
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,13 +1,11 @@
SHA256 (paq/libzpaq501.zip) = 3ea073fd7f02a5eafe6bd4e64723f8098224484eaa2ff42f5c56508bb48cc689
SIZE (paq/libzpaq501.zip) = 43716
SHA256 (paq/wbpe110.zip) = 1675083b253e04ba7dd7cd28b2f7be179b3f5c1bb4d5289be4cfa217c6bc9b27
SIZE (paq/wbpe110.zip) = 13667
SHA256 (paq/zpaq404.zip) = ce946b8a9cb92c5656a20ff83a3a0ef88e23b374a58e33c295ef00b1843dfe30
SIZE (paq/zpaq404.zip) = 45770
SHA256 (paq/zpaq614.zip) = 67639eb2928abe18de02b909d5b0b4f8a01a9f614fb93c65859ba340e09ff914
SIZE (paq/zpaq614.zip) = 458008
SHA256 (paq/zpipe.201.zip) = e95dfe6f701dd463f969fe16c933ed97fca194bd7aacec37d6c35409766133a8
SIZE (paq/zpipe.201.zip) = 67555
SHA256 (paq/bmp_j4a.zip) = 6b314e518f5b9ceffdac183229ddf74e6b5a0f4ef0e47181f652bf46e55de03c
SIZE (paq/bmp_j4a.zip) = 1852
SHA256 (paq/bmp_j4b.zip) = 131a4cce96a56a5f4c61fd9a226b22b5d19f1838076b25f91e5815d9b40f32de
SIZE (paq/bmp_j4b.zip) = 2654
SHA256 (paq/bwt.1.zip) = 689dbafe057afb5d46be34906f4c7565d5f9d8eed7943c78b70ac10753943c68
SIZE (paq/bwt.1.zip) = 40417
SHA256 (paq/bwt_j3.zip) = c5e75abdd8d8a3fb6effa3c467e98aeb3175068bd454a635baae79de024b9120
@ -24,6 +22,8 @@ SHA256 (paq/fast.cfg) = 2cf9605ba5eb73a58146509844d4b360c07ae55ebc2ab92d485d0c90
SIZE (paq/fast.cfg) = 359
SHA256 (paq/jpg_test2.zip) = b09eedf0760826fa6822d266c1e262e67ad4ac119e11235e192e208e558e4855
SIZE (paq/jpg_test2.zip) = 12189
SHA256 (paq/lazy210.zip) = 7c6d55c316b366328d711ada5fd8302e4db89916dfd66449d696416d7f60d735
SIZE (paq/lazy210.zip) = 15867
SHA256 (paq/lz1.zip) = 2817e3d300edee5c1d65d702feb58b51bd459817dc32a2a29d82d0f92a0ea7d9
SIZE (paq/lz1.zip) = 10012
SHA256 (paq/max.cfg) = 7965863923d5558409f5792167c74914a9c0d07f813ef385587450e7b5a156b7
@ -38,5 +38,5 @@ SHA256 (paq/zpsfx101.cpp) = d035fa2cc2f63f61e8e3476ccd09598b9f5012628de8c911dfaa
SIZE (paq/zpsfx101.cpp) = 5491
SHA256 (paq/zpaq1.pdf) = dce14a22ddd51117a29743db77a79ce31f97b2dbb1b2aaec7d0be0946ed85bf0
SIZE (paq/zpaq1.pdf) = 105049
SHA256 (paq/zpaq200.pdf) = 3a858e81e9b0a361a1306711fdf31d9bcfb1f007f7d766172ef50ca73a9febdf
SIZE (paq/zpaq200.pdf) = 194940
SHA256 (paq/zpaq201.pdf) = 9cbeffcc1ede4aa09d5b492216bb45a95d6472775d23438d790ba2de8919e28b
SIZE (paq/zpaq201.pdf) = 202070

View File

@ -1,22 +0,0 @@
--- zpaq.cpp.orig 2011-11-28 15:50:58.000000000 -0500
+++ zpaq.cpp 2011-11-28 16:01:21.000000000 -0500
@@ -70,6 +70,7 @@
#define PTHREAD 1
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysctl.h>
#include <unistd.h>
#else
#include <windows.h>
@@ -195,6 +196,11 @@
int rc=0; // result
#ifdef unix
+ size_t rcsize;
+ rcsize = sizeof(rc);
+ if (sysctlbyname("kern.smp.cpus", &rc, &rcsize, NULL, 0) < 0) return 1;
+#elif 0
+
// Count lines of the form "processor\t: %d\n" in /proc/cpuinfo
// where %d is 0, 1, 2,..., rc-1
FILE *in=fopen("/proc/cpuinfo", "r");

View File

@ -3,6 +3,7 @@
%%PORTDATA%%bin/bwtrle
%%PORTDATA%%bin/exe_jo
%%PORTDATA%%bin/jpeg_jo
%%PORTDATA%%bin/lazy2
%%PORTDATA%%bin/lzpre
%%PORTDATA%%bin/lzppre
bin/wbpe