aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/pngnq/Makefile44
-rw-r--r--graphics/pngnq/distinfo3
-rw-r--r--graphics/pngnq/files/patch-pngcomp.c10
-rw-r--r--graphics/pngnq/pkg-descr10
5 files changed, 68 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index f483923d1330..16d5c60eadb9 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -668,6 +668,7 @@
SUBDIR += png2ico
SUBDIR += pngcheck
SUBDIR += pngcrush
+ SUBDIR += pngnq
SUBDIR += pngquant
SUBDIR += pngrewrite
SUBDIR += pngwriter
diff --git a/graphics/pngnq/Makefile b/graphics/pngnq/Makefile
new file mode 100644
index 000000000000..326e0a52bbf0
--- /dev/null
+++ b/graphics/pngnq/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: pngnq
+# Date created: 10 May 2009
+# Whom: stb@lassitu.de
+#
+# $FreeBSD$
+#
+
+PORTNAME= pngnq
+PORTVERSION= 0.5
+CATEGORIES= graphics
+MASTER_SITES= SF
+DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+
+MAINTAINER= stb@lassitu.de
+COMMENT= A tool for quantizing PNG images in RGBA format
+
+LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
+
+WRKSRC= ${WRKDIR}/${PORTVERSION}
+
+USE_GMAKE= yes
+MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS} -I${LOCALBASE}/include -DVERSION='${PORTVERSION}'" \
+ LDFLAGS="-lpng -lz -lm -L${LOCALBASE}/lib"
+
+PORTDOCS= README LICENSE README.pngcomp
+PLIST_FILES= bin/pngcomp bin/pngnq
+.if !defined(NO_INSTALL_MANPAGES)
+MAN1= pngnq.1
+.endif
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/pngcomp ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/pngnq ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
+.if !defined(NO_INSTALL_MANPAGES)
+ ${INSTALL_MAN} ${WRKSRC}/pngnq.1 ${MAN1PREFIX}/man/man1
+.endif
+
+.include <bsd.port.mk>
diff --git a/graphics/pngnq/distinfo b/graphics/pngnq/distinfo
new file mode 100644
index 000000000000..bfb218ee9332
--- /dev/null
+++ b/graphics/pngnq/distinfo
@@ -0,0 +1,3 @@
+MD5 (pngnq-0.5-src.tar.gz) = 14aff764008dfd55e816d3fe08636cb9
+SHA256 (pngnq-0.5-src.tar.gz) = c9f2f4239e07d23064176909cd59ef12d96573599a3fa29bed59fe554b769b92
+SIZE (pngnq-0.5-src.tar.gz) = 26115
diff --git a/graphics/pngnq/files/patch-pngcomp.c b/graphics/pngnq/files/patch-pngcomp.c
new file mode 100644
index 000000000000..9fd8e2c1e76a
--- /dev/null
+++ b/graphics/pngnq/files/patch-pngcomp.c
@@ -0,0 +1,10 @@
+--- pngcomp.c.orig 2007-11-12 13:59:38.000000000 +0100
++++ pngcomp.c 2009-05-10 15:07:38.000000000 +0200
+@@ -41,6 +41,7 @@
+ #include <string.h>
+ #include <math.h>
+ #include <ctype.h>
++#include <unistd.h>
+
+ #include "png.h"
+ #include "rwpng.h"
diff --git a/graphics/pngnq/pkg-descr b/graphics/pngnq/pkg-descr
new file mode 100644
index 000000000000..70b7aee6f1ef
--- /dev/null
+++ b/graphics/pngnq/pkg-descr
@@ -0,0 +1,10 @@
+Pngnq is a tool for quantizing PNG images in RGBA format.
+
+Pngnq is an adaptation by Stuart Coyle of Greg Roelf's pnqquant using
+Anthony Dekker's neuquant algorithm.
+
+The neuquant algorithm uses a neural network to optimise the color map
+selection. This is fast and quite accurate, giving good results on many
+types of images.
+
+WWW: http://pngnq.sourceforge.net/