aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/minizip/Makefile
blob: 5112f5041624c2e1c84e0f9945d3671a5acc0a8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Created by: lbartoletti <coder@tuxfamily.org>
# $FreeBSD$

PORTNAME=   minizip
PORTVERSION=    1.2.11
CATEGORIES= archivers
MASTER_SITES=   SF/libpng/zlib/${PORTVERSION}
DISTNAME=   zlib-${PORTVERSION}

MAINTAINER= lbartoletti@tuxfamily.org
COMMENT=    Zip library and programs from Zlib distribution

LICENSE=    ZLIB

USES=       autoreconf libtool pathfix tar:xz
USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-demos
INSTALL_TARGET= install-strip
WRKSRC=     ${WRKDIR}/zlib-${PORTVERSION}/contrib/minizip

post-patch:
    @${REINPLACE_CMD} 's/#ifdef unix || __APPLE__/#ifdef unix/' ${WRKSRC}/mini???.c

post-install:
    ${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${PREFIX}/man/man1

do-test:
    ${RM} -r ${WRKDIR}/regression-test1
    ${MKDIR} ${WRKDIR}/regression-test1
    ${MV} ${WRKSRC}/*.[cho] ${WRKDIR}/regression-test1
    ${RM} ${WRKDIR}/test.zip
    (cd ${WRKDIR}/regression-test1 && ${WRKSRC}/minizip ${WRKDIR}/test.zip *)
    ${RM} -r ${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.mk>