aboutsummaryrefslogtreecommitdiff
path: root/graphics/optipng/Makefile
blob: 246b88c8ecaaea815d099006ef2f288967f58172 (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
40
41
42
43
44
45
46
47
48
49
50
51
# New ports collection makefile for:	optipng
# Date created:				09 July 2003
# Whom:					Thomas Hurst <freaky@aagh.net>
#
# $FreeBSD$
#

PORTNAME=	optipng
PORTVERSION=	0.6.5
CATEGORIES=	graphics
MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION}

MAINTAINER=	tom@hur.st
COMMENT=	An optimizer for PNG files

OPTIONS=	BUNDLED_LIBPNG	"Use bundled libpng"	off \
		BUNDLED_ZLIB	"Use bundled zlib"	off

HAS_CONFIGURE=	yes
BUILD_WRKSRC=	${WRKSRC}/src
MAKEFILE=	scripts/unix.mak
ALL_TARGET=	${PORTNAME}
PLIST_FILES=	bin/optipng
MAN1=		optipng.1
PORTDOCS=	caveat.txt history.txt manual.html manual.pdf manual.txt \
		png_optimization_guide.html thanks.html todo.txt

.include <bsd.port.options.mk>

.ifndef(WITH_BUNDLED_LIBPNG)
BROKEN=		does not build with libpng 1.5.x
CONFIGURE_ARGS+=	--with-system-libpng
CFLAGS+=	"-I${LOCALBASE}/include"
LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
.endif

.ifndef(WITH_BUNDLED_ZLIB)
CONFIGURE_ARGS+=	--with-system-zlib
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng ${PREFIX}/bin/
	${INSTALL_MAN} ${WRKSRC}/man/optipng.1 ${MAN1PREFIX}/man/man1/

post-install:
.ifndef NOPORTDOCS
	${INSTALL} -d ${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/
.endif

.include <bsd.port.mk>