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:
parent
e9e61375d0
commit
ab95e4cea8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339732
@ -81,6 +81,7 @@
|
||||
SUBDIR += makeself
|
||||
SUBDIR += mar
|
||||
SUBDIR += mate-file-archiver
|
||||
SUBDIR += minizip
|
||||
SUBDIR += mscompress
|
||||
SUBDIR += mtf
|
||||
SUBDIR += nomarch
|
||||
|
41
archivers/minizip/Makefile
Normal file
41
archivers/minizip/Makefile
Normal 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>
|
2
archivers/minizip/distinfo
Normal file
2
archivers/minizip/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (minizip/v1.2.8.zip) = da78eabfef55cbab21776d4cca207cf7e0dde483b4dd3590e525421667bfb6a7
|
||||
SIZE (minizip/v1.2.8.zip) = 724598
|
28
archivers/minizip/files/patch-contrib-minizip-Makefile
Normal file
28
archivers/minizip/files/patch-contrib-minizip-Makefile
Normal 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
|
9
archivers/minizip/pkg-descr
Normal file
9
archivers/minizip/pkg-descr
Normal 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
|
4
archivers/minizip/pkg-plist
Normal file
4
archivers/minizip/pkg-plist
Normal file
@ -0,0 +1,4 @@
|
||||
bin/minizip
|
||||
bin/miniunz
|
||||
man/man1/miniunzip.1.gz
|
||||
man/man1/minizip.1.gz
|
Loading…
Reference in New Issue
Block a user