- Update to 0.6.2

- Add OPTIONS for bundled libpng and zlib (both off by default)
- Update maintainer address

PR:		ports/128877
Submitted by:	Thomas Hurst <tom@hur.st> (maintainer)
Security:	http://www.vuxml.org/freebsd/2bc960c4-e665-11dd-afcd-00e0815b8da8.html
This commit is contained in:
Wesley Shields 2009-01-19 20:44:24 +00:00
parent dba6f35472
commit 02618f7fa0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226451
7 changed files with 133 additions and 11 deletions

View File

@ -6,22 +6,38 @@
#
PORTNAME= optipng
PORTVERSION= 0.5.4
PORTVERSION= 0.6.2
CATEGORIES= graphics
MASTER_SITES= SF
MAINTAINER= freaky@aagh.net
MAINTAINER= tom@hur.st
COMMENT= An optimizer for PNG files
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
OPTIONS= BUNDLED_LIBPNG "Use bundled libpng" off \
BUNDLED_ZLIB "Use bundled zlib" off
BUILD_WRKSRC= ${WRKSRC}/src
MAKEFILE= scripts/unix-secure.mak
MAKEFILE= scripts/unix.mak
ALL_TARGET= ${PORTNAME}
PLIST_FILES= bin/optipng
MAN1= optipng.1
PORTDOCS= CAVEAT.txt HISTORY.txt TODO.txt USAGE.txt \
design.html features.html guide.html thanks.html
PORTDOCS= caveat.txt history.txt manual.html manual.pdf manual.txt \
png_optimization_guide.html thanks.html todo.txt
.include <bsd.port.pre.mk>
CONFIGURE_ARGS= #
.ifndef(WITH_BUNDLED_LIBPNG)
CONFIGURE_ARGS+= --with-system-libpng
LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
.endif
.ifndef(WITH_BUNDLED_ZLIB)
CONFIGURE_ARGS+= --with-system-zlib
.endif
do-configure:
(cd ${WRKSRC} && ./configure ${CONFIGURE_ARGS})
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/optipng ${PREFIX}/bin/
@ -33,4 +49,4 @@ post-install:
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (optipng-0.5.4.tar.gz) = 8d989971e674a06b55e17fc5b70c41aa
SHA256 (optipng-0.5.4.tar.gz) = 3074f7ebac74683c12b805d58f836400cbec51355fad13f47d46775792ad35ab
SIZE (optipng-0.5.4.tar.gz) = 1094572
MD5 (optipng-0.6.2.tar.gz) = 08b6195bb5895a7fe167fab16dcdf6d5
SHA256 (optipng-0.6.2.tar.gz) = 84312506ea0c683a4e7675b3c8278067222762520016cc61e53c2b0e679120ca
SIZE (optipng-0.6.2.tar.gz) = 1052509

View File

@ -0,0 +1,11 @@
--- configure.orig 2008-07-21 03:32:00.000000000 +0100
+++ configure 2008-11-14 18:58:23.000000000 +0000
@@ -49,7 +49,7 @@
then
sed -e "$zlib_inc_del" -e "$libpng_inc_del" \
-e "$zlib_lib_del" -e "$libpng_lib_del" \
- -e "$zlib_sys_ins" -e "$libpng_sys_ins" \
+ -e "$libpng_sys_ins" -e "$zlib_sys_ins" \
src/scripts/unix.mak.in > src/scripts/unix.mak
sed -e "$zlib_inc_del" -e "$libpng_inc_del" \
-e "$zlib_lib_del" -e "$libpng_lib_del" \

View File

@ -0,0 +1,25 @@
--- lib/libpng/scripts/makefile.std.orig 2006-03-06 17:06:28.000000000 +0000
+++ lib/libpng/scripts/makefile.std 2008-11-14 18:00:09.000000000 +0000
@@ -24,12 +24,16 @@
ZLIBLIB=../zlib
ZLIBINC=../zlib
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=rm -f
+CC?=cc
+AR?=ar
+AR_RC=${AR} rc
+MKDIR?=mkdir
+MKDIR_P=${MKDIR}
+LN?=ln
+LN_SF=${LN} -sf
+RANLIB?=ranlib
+RM?=rm
+RM_F=${RM} -f
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm

View File

@ -0,0 +1,37 @@
--- lib/zlib/Makefile.in.orig 2005-07-18 03:25:21.000000000 +0100
+++ lib/zlib/Makefile.in 2008-11-14 18:07:42.000000000 +0000
@@ -16,9 +16,9 @@
# To install in $HOME instead of /usr/local, use:
# make install prefix=$HOME
-CC=cc
+CC?=cc
-CFLAGS=-O
+CFLAGS?=-O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-g -DDEBUG
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
@@ -33,9 +33,10 @@
SHAREDLIBV=libz.so.1.2.3
SHAREDLIBM=libz.so.1
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
+AR?=ar
+ARFLAGS?=rc
+RANLIB?=ranlib
+TAR?=tar
SHELL=/bin/sh
EXE=
@@ -68,7 +69,7 @@
fi
libz.a: $(OBJS) $(OBJA)
- $(AR) $@ $(OBJS) $(OBJA)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
match.o: match.S

View File

@ -0,0 +1,33 @@
--- src/scripts/unix.mak.in.orig 2008-09-03 23:56:00.000000000 +0100
+++ src/scripts/unix.mak.in 2008-11-14 18:29:12.000000000 +0000
@@ -4,16 +4,16 @@
# Usage: make -f scripts/unix.mak
-prefix=/usr/local
+prefix=${PREFIX}
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
mandir=$(prefix)/man
man1dir=$(mandir)/man1
-CC = cc
-LD = $(CC)
-CFLAGS = -O
-LDFLAGS = -s
+CC ?= cc
+LD = $(CC)
+CFLAGS ?= -O
+LDFLAGS += -s -L${LOCALBASE}/lib
OPTIPNG = optipng
ZLIB = libz.a
@@ -28,7 +28,7 @@
BACKDIR = ../../src
OBJS = optipng.o opngoptim.o opngreduc.o cbitset.o osys.o strutil.o
-INCS = -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR)
+INCS = -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR) -I${LOCALBASE}/include
LIBS = $(PNGXDIR)/$(PNGXLIB) $(PNGDIR)/$(PNGLIB) $(ZDIR)/$(ZLIB)
SYSLIBS =

View File

@ -11,4 +11,4 @@ trial, and a wider search space.
WWW: http://optipng.sourceforge.net/
- Thomas Hurst
<freaky@aagh.net>
<tom@hur.st>