1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

New port: optipng-0.4.2

OptiPNG is a PNG optimizer that recompresses the image files to
a smaller size, without losing any information.

PR:		54260
Submitted by:	Thomas Hurst <freaky@aagh.net>
Approved by:	fjoe (mentor) (implicit)
This commit is contained in:
Kirill Ponomarev 2003-07-23 22:04:26 +00:00
parent c6e2c51beb
commit 11bd228fd1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=85489
7 changed files with 133 additions and 0 deletions

View File

@ -235,6 +235,7 @@
SUBDIR += opengl-man
SUBDIR += openrm
SUBDIR += ophoto
SUBDIR += optipng
SUBDIR += osg
SUBDIR += osgedit
SUBDIR += p5-Chart-PNGgraph

31
graphics/optipng/Makefile Normal file
View File

@ -0,0 +1,31 @@
# New ports collection makefile for: optipng
# Date created: 09 July 2003
# Whom: Thomas Hurst <freaky@aagh.net>
#
# $FreeBSD$
#
PORTNAME= optipng
PORTVERSION= 0.4.2
CATEGORIES= graphics
MASTER_SITES= http://www.cs.toronto.edu/~cosmin/pngtech/optipng/
MAINTAINER= freaky@aagh.net
COMMENT= An optimizer for PNG files
BUILD_WRKSRC= ${WRKSRC}/src
MAKEFILE= scripts/Makefile.gcc
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/optipng ${PREFIX}/bin
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for i in CAVEAT DESIGN FEATURES HISTORY LICENSE README TODO USAGE index.html
${INSTALL_MAN} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (optipng-0.4.2.tar.gz) = 8e1a59f0ec9f9aee3ce313de716f966e

View File

@ -0,0 +1,40 @@
--- lib-cos/zlib/Makefile.in.orig Mon Mar 11 18:58:30 2002
+++ lib-cos/zlib/Makefile.in Wed Jul 9 02:36:33 2003
@@ -12,28 +12,28 @@
# 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 \
# -Wstrict-prototypes -Wmissing-prototypes
-LDFLAGS=-L. -lz
+LDFLAGS=-L. -lz
LDSHARED=$(CC)
-CPP=$(CC) -E
+CPP?=$(CC) -E
VER=1.1.4
LIBS=libz.a
SHAREDLIB=libz.so
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
+AR+= rc
+RANLIB?=ranlib
+TAR?=tar
+SHELL?=/bin/sh
-prefix = /usr/local
+prefix ?= /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include

View File

@ -0,0 +1,43 @@
--- src/scripts/Makefile.gcc.orig Mon May 12 22:11:56 2003
+++ src/scripts/Makefile.gcc Wed Jul 9 13:29:49 2003
@@ -1,21 +1,25 @@
# ** OptiPNG
# ** Quick and dirty makefile for GCC
+CC?= gcc
+CFLAGS?= -pipe -O2 -g
+CP?= cp
+
all: optipng
optipng: optipng.o opngio.o opngreduc.o cbitset.o \
wildargs.o libpng.a libz.a
- gcc -s -o optipng optipng.o opngio.o opngreduc.o cbitset.o \
+ ${CC} ${CFLAGS} -o optipng optipng.o opngio.o opngreduc.o cbitset.o \
wildargs.o libpng.a libz.a
.c.o: #png.h opng.h
- gcc -c -O2 -I../lib-cos/zlib -I../lib-cos/libpng -Wall $*.c
+ ${CC} ${CFLAGS} -c -I../lib-cos/zlib -I../lib-cos/libpng -Wall $*.c
cbitset.o: cbitset.c cbitset.h
- gcc -c -O2 -Wall $*.c
+ ${CC} ${CFLAGS} -c -Wall $*.c
wildargs.o: xtra/wildargs.c
- gcc -c -O2 xtra/wildargs.c
+ ${CC} ${CFLAGS} -c xtra/wildargs.c
libpng.a: ../lib-cos/libpng/libpng.a
cp ../lib-cos/libpng/libpng.a libpng.a
@@ -24,7 +28,8 @@
cp ../lib-cos/zlib/libz.a libz.a
../lib-cos/libpng/libpng.a: ../lib-cos/zlib/libz.a
- cd ../lib-cos/libpng; ${MAKE} -f scripts/makefile.gcc; cd ../../src
+ cd ../lib-cos/libpng; ${MAKE} CFLAGS="-I../zlib ${CFLAGS}" -f scripts/makefile.freebsd libpng.a; cd ../../src
../lib-cos/zlib/libz.a:
- cd ../lib-cos/zlib; ./configure; ${MAKE}; cd ../../src
+# gcc 2.95 seems to break when using -O w/ x86. Force -O2 over -O0.
+ cd ../lib-cos/zlib; ./configure; ${MAKE} CFLAGS="${CFLAGS} -O2"; cd ../../src

View File

@ -0,0 +1,7 @@
OptiPNG is a PNG optimizer that recompresses the image files to a
smaller size, without losing any information.
WWW: http://www.cs.toronto.edu/~cosmin/pngtech/optipng/
- Thomas Hurst
<freaky@aagh.net>

View File

@ -0,0 +1,10 @@
bin/optipng
%%PORTDOCS%%%%DOCSDIR%%/CAVEAT
%%PORTDOCS%%%%DOCSDIR%%/DESIGN
%%PORTDOCS%%%%DOCSDIR%%/FEATURES
%%PORTDOCS%%%%DOCSDIR%%/HISTORY
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/USAGE
%%PORTDOCS%%%%DOCSDIR%%/index.html