blob: b3557c520acff344deb5f919e259e4a55e3dc62a (
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
52
53
54
55
56
57
58
59
60
|
# Created by: Alex Hayward <xelah@xelah.com>
# $FreeBSD$
PORTNAME= pngquant
PORTVERSION= 2.0.0
DISTVERSIONSUFFIX= -src
CATEGORIES= graphics
MASTER_SITES= http://pngquant.org/
MAINTAINER= ak@FreeBSD.org
COMMENT= Converts 32-bit RGBA PNGs into 8-bit RGBA-palette PNGs
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/COPYRIGHT
LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_BZIP2= yes
USES= gmake
MAKE_ARGS+= CC="${CC}"
CPPFLAGS+= $$(libpng-config --I_opts)
LDFLAGS+= $$(libpng-config --ldflags)
PORTDOCS= CHANGELOG README.md
PLIST_FILES= bin/pngquant \
man/man1/pngquant.1.gz
OPTIONS_DEFINE= OPTIMIZED_FLAGS OPENMP DEBUG DOCS
OPTIONS_DEFINE_i386= SSE
OPTIMIZED_FLAGS_CFLAGS= -O3 -fearly-inlining -fstrict-aliasing \
-ffast-math -funroll-loops -fomit-frame-pointer \
-fexpensive-optimizations -ffinite-math-only \
-funsafe-loop-optimizations -ftree-vectorize
# SSE2 support is always enabled on amd64
SSE_CFLAGS= -DUSE_SSE=1 -msse2
OPENMP_CFLAGS= -fopenmp
OPENMP_LDFLAGS= -lgomp -pthread
.include <bsd.port.options.mk>
.if empty(PORT_OPTIONS:MDEBUG)
CFLAGS+= -DNDEBUG
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-$$(MAKEFLAGS)||' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pngquant ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/pngquant.1 ${STAGEDIR}${MANPREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
|