1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

- Update to 1.7.2

PR:		166888
Submitted by:	Ports Fury
This commit is contained in:
Martin Wilke 2012-04-21 18:48:11 +00:00
parent 7623653437
commit 9dcf4bcaca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295211
4 changed files with 63 additions and 48 deletions

View File

@ -6,33 +6,66 @@
# #
PORTNAME= pngquant PORTNAME= pngquant
PORTVERSION= 1.0 PORTVERSION= 1.7.2
PORTREVISION= 2 DISTVERSIONSUFFIX= -src
CATEGORIES= graphics CATEGORIES= graphics
MASTER_SITES= SF/png-mng/${PORTNAME}/${PORTVERSION} MASTER_SITES= http://pngquant.org/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org MAINTAINER= ports@FreeBSD.org
COMMENT= Converts 32-bit RGBA PNGs into 8-bit RGBA-palette PNGs COMMENT= Converts 32-bit RGBA PNGs into 8-bit RGBA-palette PNGs
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/COPYRIGHT
LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} OPTIONS= OPTIMIZED_CFLAGS "Additional optimization" off \
OPENMP "Enable OpenMP support" off \
SSE2 "Enable x86 SSE2 optimization" off
MAKEFILE= Makefile.unx NO_WRKSUBDIR= yes
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="-lpng -lz -lm -L${LOCALBASE}/lib"
PORTDOCS= CHANGELOG README USE_BZIP2= yes
USE_CSTD= c99
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
MAKE_JOBS_SAFE= yes
CFLAGS+= `libpng-config --I_opts`
LDFLAGS+= `libpng-config --ldflags`
MAN1= pngquant.1
PORTDOCS= CHANGELOG README.md
PLIST_FILES= bin/pngquant PLIST_FILES= bin/pngquant
.include <bsd.port.pre.mk>
.if !defined(WITH_DEBUG)
CFLAGS+= -DNDEBUG
.endif
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O3 -fearly-inlining -fstrict-aliasing -ffast-math \
-funroll-loops -fomit-frame-pointer -fexpensive-optimizations \
-ffinite-math-only -funsafe-loop-optimizations -ftree-vectorize
.endif
.if defined(WITH_OPENMP)
CFLAGS+= ${PTHREAD_CFLAGS} -fopenmp
LDFLAGS+= ${PTHREAD_LIBS} -lgomp
.endif
# SSE2 support is always enabled on amd64
.if defined(WITH_SSE2) && ${ARCH} == "i386"
CFLAGS+= -DUSE_SSE=1 -msse2
.endif
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pngquant ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/pngquant ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/pngquant.1 ${MANPREFIX}/man/man1
.if !defined(NOPORTDOCS) .if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR} @${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${DOCSDIR}
.endif .endif
.include <bsd.port.mk> .include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
SHA256 (pngquant-1.0-src.tgz) = 48e22dbab8412dcc04a5663135e1324045cd53a390d56c01f2878ab781a95fd3 SHA256 (pngquant-1.7.2-src.tar.bz2) = 4e8b3378aeb573ed092f555483cdbbec94c5d5d19e709d8b338b2026b2e9a2bc
SIZE (pngquant-1.0-src.tgz) = 21060 SIZE (pngquant-1.7.2-src.tar.bz2) = 27223

View File

@ -1,11 +0,0 @@
--- rwpng.c.orig 2006-06-15 11:39:29.000000000 +0200
+++ rwpng.c 2010-03-29 15:35:32.000000000 +0200
@@ -77,7 +77,7 @@
* have used slightly more general png_sig_cmp() function instead */
fread(sig, 1, 8, infile);
- if (!png_check_sig(sig, 8)) {
+ if (png_sig_cmp(sig, 0, 8)) {
mainprog_ptr->retval = 21; /* bad signature */
return mainprog_ptr->retval;
}

View File

@ -1,24 +1,17 @@
The pngquant utility converts 32-bit RGBA PNGs to 8-bit RGBA-palette PNGs (or pngquant is a command-line utility to quantize and dither 32-bit RGBA
fewer than 8 bits, if you want), via quantization and ordered or diffusion PNGs down to 8-bit (or smaller) RGBA-palette PNGs, usually with a
(Floyd-Steinberg) dithering. You can also use it on RGB or even palette images significant reduction in file size (40-70% smaller than 24-bit PNGs).
(for example, to further color-reduce them to 16 colors). It does:
- nice reduction of all PNG image types to 256-color (or smaller) palette
- automatic optimization of tRNS chunks
- batch conversion of multiple files (e.g., "pngquant 256 *.png")
- Unix-style command-line filtering (e.g., "... | pngquant 16 | ...")
It does still lack a few features:
- no ancillary chunk preservation (except gAMA)
- no preservation of significant-bits info after rescaling (sBIT chunk)
- no mapfile support
- no "native" handling of 16-bit-per-sample files or gray+alpha files
(all samples are truncated to 8 bits and all images are promoted
to RGBA before quantization)
By the way, be sure to check "before" and "after" file sizes, preferably with
pngcrush (http://pmt.sourceforge.net/pngcrush/); dithered palette images may
be four times smaller to begin with, but they do not compress nearly as well
as grayscale and truecolor images. Some images, such as Henri Sivonen's alpha
button (http://www.pp.htv.fi/hsivone1/css-test/bitmapstyle.html), can be made
smaller as full 32-bit RGBA images (4076 bytes in this case) than as either
FS-dithered palette (4550 bytes) or ordered-dither palette (4482 bytes) images.
WWW: http://www.libpng.org/pub/png/apps/pngquant.html This unique type of PNG supports full alpha transparency and is
compatible with all modern web browsers, and has better fallback in IE6
than 24-bit PNGs.
Features:
- High-quality palette generation using modernized Median Cut
algorithm.
- Unique dithering algorithm that adds less noise to images than the
standard Floyd-Steinberg.
- Easy to integrate with shell scripts, GUIs and server-side software.
- Fast mode for processing large numbers of images.
WWW: http://pngquant.org/