mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Enable the libminizip library which will be used by multimedia/vlc:
- Use the standard MASTER_SITE for zlib. - Replace PLIST_FILES with a separate pkg-plist. - Instead of using the bundled "Makefile" set USE_AUTOTOOLS to generate a new Makefile from Makefile.am that allows building libminizip.so. Also remove MAKE_ARGS, do-install and patch-contrib-minizip-Makefile. - Silence post-patch. - Adjust regression-test. PR: 190179 Approved by: bapt
This commit is contained in:
parent
54ec4d7796
commit
044449c06a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=356248
@ -3,24 +3,25 @@
|
||||
|
||||
PORTNAME= minizip
|
||||
PORTVERSION= 1.2.8
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= archivers
|
||||
MASTER_SITES= https://github.com/madler/zlib/archive/ \
|
||||
LOCAL/mandree/${PORTNAME}
|
||||
DISTNAME= v${PORTVERSION}
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
MASTER_SITES= SF/libpng/zlib/${PORTVERSION}
|
||||
DISTNAME= zlib-${PORTVERSION}
|
||||
|
||||
MAINTAINER= coder@tuxfamily.org
|
||||
COMMENT= Minizip and miniunz programs from Zlib contributions
|
||||
COMMENT= Zip library and programs from Zlib distribution
|
||||
|
||||
LICENSE= ZLIB
|
||||
|
||||
USES= zip
|
||||
PLIST_FILES= bin/minizip bin/miniunz \
|
||||
man/man1/miniunzip.1.gz man/man1/minizip.1.gz
|
||||
MAKE_ARGS= CFLAGS="${CPPFLAGS} ${CFLAGS} -include sys/stat.h -include stdint.h"
|
||||
USES= libtool pathfix tar:xz
|
||||
PATHFIX_MAKEFILEIN= Makefile.am
|
||||
USE_AUTOTOOLS= libtoolize aclocal autoconf automake
|
||||
AUTOMAKE_ARGS= -a -c -f
|
||||
CONFIGURE_ARGS= --enable-demos
|
||||
INSTALL_TARGET= install-strip
|
||||
WRKSRC= ${WRKDIR}/zlib-${PORTVERSION}/contrib/minizip
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
# work around missing typedef in 8.X's libz configuration
|
||||
.if ${OSVERSION} < 900000
|
||||
@ -28,16 +29,20 @@ CPPFLAGS+= -Dz_crc_t=uint32_t
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's/#ifdef unix \|\| __APPLE__/#ifdef unix/' ${WRKSRC}/mini???.c
|
||||
@${REINPLACE_CMD} 's/#ifdef unix || __APPLE__/#ifdef unix/' ${WRKSRC}/mini???.c
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/miniunz ${STAGEDIR}${PREFIX}/bin/
|
||||
post-install:
|
||||
${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
|
||||
${RM} -rf ${WRKDIR}/regression-test1
|
||||
${MKDIR} ${WRKDIR}/regression-test1
|
||||
${MV} ${WRKSRC}/*.[cho] ${WRKDIR}/regression-test1
|
||||
${RM} -f ${WRKDIR}/test.zip
|
||||
(cd ${WRKDIR}/regression-test1 && ${WRKSRC}/minizip ${WRKDIR}/test.zip *)
|
||||
${RM} -rf ${WRKDIR}/regression-test2
|
||||
${MKDIR} ${WRKDIR}/regression-test2
|
||||
${WRKSRC}/miniunzip ${WRKDIR}/test.zip -d ${WRKDIR}/regression-test2
|
||||
${DIFF} -ur ${WRKDIR}/regression-test1 ${WRKDIR}/regression-test2 > /dev/null
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (minizip/v1.2.8.zip) = da78eabfef55cbab21776d4cca207cf7e0dde483b4dd3590e525421667bfb6a7
|
||||
SIZE (minizip/v1.2.8.zip) = 724598
|
||||
SHA256 (zlib-1.2.8.tar.xz) = 831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057
|
||||
SIZE (zlib-1.2.8.tar.xz) = 450776
|
||||
|
@ -1,28 +0,0 @@
|
||||
--- 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
|
15
archivers/minizip/pkg-plist
Normal file
15
archivers/minizip/pkg-plist
Normal file
@ -0,0 +1,15 @@
|
||||
bin/miniunzip
|
||||
bin/minizip
|
||||
include/minizip/crypt.h
|
||||
include/minizip/ioapi.h
|
||||
include/minizip/mztools.h
|
||||
include/minizip/unzip.h
|
||||
include/minizip/zip.h
|
||||
lib/libminizip.a
|
||||
lib/libminizip.so
|
||||
lib/libminizip.so.1
|
||||
lib/libminizip.so.1.0.0
|
||||
libdata/pkgconfig/minizip.pc
|
||||
man/man1/miniunzip.1.gz
|
||||
man/man1/minizip.1.gz
|
||||
@dirrm include/minizip
|
Loading…
Reference in New Issue
Block a user