mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-02 11:09:29 +00:00
update zpsfx to 1.01
This commit is contained in:
parent
bb3662de19
commit
80e017847a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295236
@ -6,14 +6,15 @@
|
||||
#
|
||||
|
||||
PORTNAME= paq
|
||||
PORTVERSION= 20120326
|
||||
PORTVERSION= 20120404
|
||||
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
|
||||
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
|
||||
@ -75,8 +76,9 @@ DDATA= fast.cfg max.cfg mid.cfg
|
||||
PORTDATA= ${WDATA} ${DDATA} zpsfx
|
||||
.endif
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
post-extract:
|
||||
@${CP} ${_DISTDIR}/zpsfx101.cpp ${WRKSRC}/zpsfx.cpp
|
||||
.if !defined(NOPORTDOCS)
|
||||
.for r in ${READMES}
|
||||
@${UNZIP_CMD} -pq ${_DISTDIR}/${r}.zip readme.txt > ${WRKSRC}/readme_${r:R}.txt
|
||||
.endfor
|
||||
|
@ -34,6 +34,8 @@ SHA256 (paq/min.zip) = 7209ffaf0d48f5e10e3134826d766e2dc52ed914ed5dbad415023db10
|
||||
SIZE (paq/min.zip) = 9560
|
||||
SHA256 (paq/zpsfx.100.zip) = 4ccf6b7967a2545d7741021f6c87362d72077d7f51c74840ab0ae34e5f12bffa
|
||||
SIZE (paq/zpsfx.100.zip) = 43423
|
||||
SHA256 (paq/zpsfx101.cpp) = d035fa2cc2f63f61e8e3476ccd09598b9f5012628de8c911dfaae07e64ae73ff
|
||||
SIZE (paq/zpsfx101.cpp) = 5491
|
||||
SHA256 (paq/zpaq1.pdf) = dce14a22ddd51117a29743db77a79ce31f97b2dbb1b2aaec7d0be0946ed85bf0
|
||||
SIZE (paq/zpaq1.pdf) = 105049
|
||||
SHA256 (paq/zpaq200.pdf) = 3a858e81e9b0a361a1306711fdf31d9bcfb1f007f7d766172ef50ca73a9febdf
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- zpsfx.cpp.orig 2011-03-30 19:27:34.000000000 -0400
|
||||
+++ zpsfx.cpp 2011-03-30 19:28:24.000000000 -0400
|
||||
@@ -15,19 +15,38 @@
|
||||
--- zpsfx.cpp.orig 2012-04-09 04:01:23.000000000 -0400
|
||||
+++ zpsfx.cpp 2012-04-09 04:02:25.000000000 -0400
|
||||
@@ -16,19 +16,38 @@
|
||||
the executable smaller. -DNDEBUG turns off run time checks.
|
||||
To convert a ZPAQ archive to a self extracting archive:
|
||||
|
||||
@ -39,3 +39,39 @@
|
||||
The program reads itself and decompresses the appended archive.
|
||||
You must enter the .exe extension as shown. If the file is not in
|
||||
the current folder then you need to specify the path. The PATH environment
|
||||
@@ -44,7 +63,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
+#ifdef unix
|
||||
+#include <sys/stat.h>
|
||||
+#else
|
||||
#include <windows.h>
|
||||
+#endif
|
||||
|
||||
// An error handler is required as shown in this example. libzpaq will
|
||||
// call it with an English language message in case of a fatal error.
|
||||
@@ -96,7 +119,11 @@
|
||||
|
||||
// Return '/' in Linux or '\' in Windows
|
||||
char slash() {
|
||||
+#ifdef unix
|
||||
+ return '/';
|
||||
+#else
|
||||
return '\\';
|
||||
+#endif
|
||||
}
|
||||
|
||||
// Create directories as needed. For example if path="/tmp/foo/bar"
|
||||
@@ -106,7 +133,11 @@
|
||||
for (int i=0; i<path.size(); ++i) {
|
||||
if (path[i]=='\\' || path[i]=='/') {
|
||||
path[i]=0;
|
||||
+#ifdef unix
|
||||
+ int ok=!mkdir(path.c_str(), 0777);
|
||||
+#else
|
||||
int ok=CreateDirectory(path.c_str(), 0);
|
||||
+#endif
|
||||
path[i]=slash();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user