Add new port archivers/minizip, which installs contributed

minizip/miniunz programs from the ZLib.

PR:		ports/184697
Submitted by:	lbartoletti <coder@tuxfamily.org>
This commit is contained in:
Matthias Andree 2014-01-15 00:14:51 +00:00
parent e9e61375d0
commit ab95e4cea8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339732
6 changed files with 85 additions and 0 deletions

View File

@ -81,6 +81,7 @@
SUBDIR += makeself
SUBDIR += mar
SUBDIR += mate-file-archiver
SUBDIR += minizip
SUBDIR += mscompress
SUBDIR += mtf
SUBDIR += nomarch

View File

@ -0,0 +1,41 @@
# Created by: lbartoletti <coder@tuxfamily.org>
# $FreeBSD$
PORTNAME= minizip
PORTVERSION= 1.2.8
CATEGORIES= archivers
MASTER_SITES= https://github.com/madler/zlib/archive/
DISTNAME= v${PORTVERSION}
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= coder@tuxfamily.org
COMMENT= Minizip and miniunz programs from Zlib contributions
LICENSE= ZLIB
WRKSRC= ${WRKDIR}/zlib-${PORTVERSION}/contrib/minizip
MAKE_ARGS= CFLAGS="${CPPFLAGS} ${CFLAGS} -include sys/stat.h -include stdint.h"
USE_ZIP= yes
.include <bsd.port.pre.mk>
# work around missing typedef in 8.X's libz configuration
.if ${OSVERSION} < 900000
CPPFLAGS+= -Dz_crc_t=uint32_t
.endif
post-patch:
${REINPLACE_CMD} -e 's/#ifdef unix \|\| __APPLE__/#ifdef unix/' ${WRKSRC}/mini???.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/miniunz ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${PREFIX}/man/man1
regression-test:
${RM} -f ${WRKDIR}/test.zip && (cd ${WRKSRC} && ./${PORTNAME} ${WRKDIR}/test.zip *)
${RM} -rf ${WRKDIR}/regression-test && ${MKDIR} ${WRKDIR}/regression-test
${WRKSRC}/miniunz ${WRKDIR}/test.zip -d ${WRKDIR}/regression-test
diff -ur >/dev/null ${WRKSRC} ${WRKDIR}/regression-test
.include <bsd.port.post.mk>

View File

@ -0,0 +1,2 @@
SHA256 (minizip/v1.2.8.zip) = da78eabfef55cbab21776d4cca207cf7e0dde483b4dd3590e525421667bfb6a7
SIZE (minizip/v1.2.8.zip) = 724598

View File

@ -0,0 +1,28 @@
--- Makefile.orig 2013-04-29 02:23:49.000000000 +0200
+++ Makefile 2013-12-10 10:06:34.000000000 +0100
@@ -1,8 +1,9 @@
CC=cc
-CFLAGS=-O -I../..
+CFLAGS=-O -I/usr/local
+LDFLAGS=-L/usr/lib -lz
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
+UNZ_OBJS = miniunz.o unzip.o ioapi.o
+ZIP_OBJS = minizip.o zip.o ioapi.o
.c.o:
$(CC) -c $(CFLAGS) $*.c
@@ -10,10 +11,10 @@
all: miniunz minizip
miniunz: $(UNZ_OBJS)
- $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(UNZ_OBJS)
minizip: $(ZIP_OBJS)
- $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ZIP_OBJS)
test: miniunz minizip
./minizip test readme.txt

View File

@ -0,0 +1,9 @@
The Zlib library allows to deflate compressed files and to create gzip (.gz)
files. Zlib is free software and small.
An archive in ZIP format can contain several files compressed with this method,
while a .gz archive can containt only one file. It is a very popular format,
that is why I have written a package for reading files compressed within a Zip
archive.
WWW: http://www.winimage.com/zLibDll/minizip.html

View File

@ -0,0 +1,4 @@
bin/minizip
bin/miniunz
man/man1/miniunzip.1.gz
man/man1/minizip.1.gz