View | Details | Raw Unified | Return to bug 169063
Collapse All | Expand All

(-)./Makefile (-9 / +6 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	optipng
8
PORTNAME=	optipng
9
PORTVERSION=	0.6.5
9
PORTVERSION=	0.7.1
10
CATEGORIES=	graphics
10
CATEGORIES=	graphics
11
MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION}
11
MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION}
12
12
Lines 17-36 Link Here
17
		BUNDLED_ZLIB	"Use bundled zlib"	off
17
		BUNDLED_ZLIB	"Use bundled zlib"	off
18
18
19
HAS_CONFIGURE=	yes
19
HAS_CONFIGURE=	yes
20
BUILD_WRKSRC=	${WRKSRC}/src
21
MAKEFILE=	scripts/unix.mak
22
ALL_TARGET=	${PORTNAME}
23
PLIST_FILES=	bin/optipng
20
PLIST_FILES=	bin/optipng
24
MAN1=		optipng.1
21
MAN1=		optipng.1
25
PORTDOCS=	caveat.txt history.txt manual.html manual.pdf manual.txt \
22
PORTDOCS=	history.txt optipng.man.html optipng.man.pdf optipng.man.txt \
26
		png_optimization_guide.html thanks.html todo.txt
23
		png_optimization.html todo.txt
27
24
28
.include <bsd.port.options.mk>
25
.include <bsd.port.options.mk>
29
26
30
.ifndef(WITH_BUNDLED_LIBPNG)
27
.ifndef(WITH_BUNDLED_LIBPNG)
31
BROKEN=		does not build with libpng 1.5.x
32
CONFIGURE_ARGS+=	--with-system-libpng
28
CONFIGURE_ARGS+=	--with-system-libpng
33
CFLAGS+=	"-I${LOCALBASE}/include"
29
CFLAGS+=	"-I${LOCALBASE}/include"
30
LDFLAGS+=	"-L${LOCALBASE}/lib"
34
LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
31
LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
35
.endif
32
.endif
36
33
Lines 39-46 Link Here
39
.endif
36
.endif
40
37
41
do-install:
38
do-install:
42
	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng ${PREFIX}/bin/
39
	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng/optipng ${PREFIX}/bin/
43
	${INSTALL_MAN} ${WRKSRC}/man/optipng.1 ${MAN1PREFIX}/man/man1/
40
	${INSTALL_MAN} ${WRKSRC}/src/optipng/man/optipng.1 ${MAN1PREFIX}/man/man1/
44
41
45
post-install:
42
post-install:
46
.ifndef NOPORTDOCS
43
.ifndef NOPORTDOCS
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (optipng-0.6.5.tar.gz) = 2998e203941cdb95eb97587a44b02b3b765e85a7d62fe2df076b0123a7ba5b44
1
SHA256 (optipng-0.7.1.tar.gz) = 6d28cd194729f6c806df24cb604355f27c4badd4457fffcbeeca23d9b6106b76
2
SIZE (optipng-0.6.5.tar.gz) = 1534271
2
SIZE (optipng-0.7.1.tar.gz) = 1608280
(-)./files/patch-lib-libpng-scripts-makefile.std (-25 lines)
Lines 1-25 Link Here
1
--- lib/libpng/scripts/makefile.std.orig	2010-12-09 16:48:13.000000000 +0300
2
+++ lib/libpng/scripts/makefile.std	2011-04-13 20:38:46.000000000 +0400
3
@@ -27,12 +27,16 @@
4
 ZLIBLIB=../zlib
5
 ZLIBINC=../zlib
6
 
7
-CC=cc
8
-AR_RC=ar rc
9
-MKDIR_P=mkdir
10
-LN_SF=ln -sf
11
-RANLIB=ranlib
12
-RM_F=rm -f
13
+CC?=cc
14
+AR?=ar
15
+AR_RC=${AR} rc
16
+MKDIR?=mkdir
17
+MKDIR_P=${MKDIR}
18
+LN?=ln
19
+LN_SF=${LN} -sf
20
+RANLIB?=ranlib
21
+RM?=rm
22
+RM_F=${RM} -f
23
 
24
 CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
25
 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
(-)./files/patch-lib-pngxtern-scripts-unix.mak.in (-26 lines)
Lines 1-26 Link Here
1
--- lib/pngxtern/scripts/unix.mak.in.orig	2008-06-18 03:29:00.000000000 +0400
2
+++ lib/pngxtern/scripts/unix.mak.in	2011-04-13 21:06:00.000000000 +0400
3
@@ -8,8 +8,8 @@
4
 PNGDIR = ../libpng
5
 
6
 # Compiler, linker, librarian and other tools
7
-CC = cc
8
-LD = $(CC)
9
+CC ?= cc
10
+LD ?= $(CC)
11
 AR_RC = ar rcs
12
 RANLIB = ranlib
13
 RM_F = rm -f
14
@@ -18,9 +18,9 @@
15
 LDDEBUG =
16
 CRELEASE = -O
17
 LDRELEASE = -s
18
-CFLAGS = $(CRELEASE)
19
-LDFLAGS = $(LDRELEASE)
20
-INCS = -I$(ZDIR) -I$(PNGDIR)
21
+CFLAGS ?= $(CRELEASE)
22
+LDFLAGS ?= $(LDRELEASE)
23
+INCS = -I$(ZDIR) -I$(PNGDIR) -I${LOCALBASE}/include
24
 LIBS = -lpng -lz -lm
25
 
26
 # File extensions
(-)./files/patch-lib-zlib-Makefile.in (-39 lines)
Lines 1-39 Link Here
1
--- lib/zlib/Makefile.in.orig	2011-04-14 15:10:39.000000000 +0400
2
+++ lib/zlib/Makefile.in	2011-04-14 15:11:57.000000000 +0400
3
@@ -16,9 +16,9 @@
4
 # To install in $HOME instead of /usr/local, use:
5
 #    make install prefix=$HOME
6
 
7
-CC=cc
8
+CC?=cc
9
 
10
-CFLAGS=-O
11
+CFLAGS?=-O
12
 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
13
 #CFLAGS=-g -DDEBUG
14
 #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
15
@@ -36,11 +36,12 @@
16
 SHAREDLIBM=libz.so.1
17
 LIBS=$(STATICLIB) $(SHAREDLIBV)
18
 
19
-AR=ar rc
20
-RANLIB=ranlib
21
+AR?=ar
22
+ARFLAGS?=rc
23
+RANLIB?=ranlib
24
 LDCONFIG=ldconfig
25
 LDSHAREDLIBC=-lc
26
-TAR=tar
27
+TAR?=tar
28
 SHELL=/bin/sh
29
 EXE=
30
 
31
@@ -108,7 +109,7 @@
32
 	-@rm -f foo.gz
33
 
34
 libz.a: $(OBJS)
35
-	$(AR) $@ $(OBJS)
36
+	$(AR) $(ARFLAGS) $@ $(OBJS)
37
 	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
38
 
39
 match.o: match.S
(-)./files/patch-src-opngreduc.c (-11 lines)
Lines 1-11 Link Here
1
--- src/opngreduc.c.orig	2011-12-29 14:47:34.000000000 +0100
2
+++ src/opngreduc.c	2011-12-29 14:48:52.000000000 +0100
3
@@ -27,6 +27,8 @@
4
 #if PNG_LIBPNG_VER >= 10400
5
 #ifdef PNG_USER_PRIVATEBUILD
6
 #include "pngpriv.h"
7
+#else
8
+#include "libpng/pngpriv.h"
9
 #endif
10
 #endif
11
 
(-)./files/patch-src-optipng-osys.c (+11 lines)
Line 0 Link Here
1
--- src/optipng/osys.c.orig	2011-07-22 13:49:00.000000000 +0900
2
+++ src/optipng/osys.c	2012-06-14 18:51:09.000000000 +0900
3
@@ -435,7 +435,7 @@
4
     if (chmod(dest_path, mode) != 0)
5
         return -1;
6
 
7
-#ifdef AT_FDCWD
8
+#if 0 /* def AT_FDCWD */
9
     {
10
         struct timespec times[2];
11
 
(-)./files/patch-src-scripts-unix.mak.in (-31 lines)
Lines 1-31 Link Here
1
--- src/scripts/unix.mak.in.orig	2011-04-14 15:07:03.000000000 +0400
2
+++ src/scripts/unix.mak.in	2011-04-14 15:08:29.000000000 +0400
3
@@ -4,16 +4,16 @@
4
 # Usage: make -f scripts/unix.mak
5
 
6
 
7
-prefix=/usr/local
8
+prefix=${PREFIX}
9
 exec_prefix=$(prefix)
10
 bindir=$(exec_prefix)/bin
11
 mandir=$(prefix)/man
12
 man1dir=$(mandir)/man1
13
 
14
-CC = cc
15
+CC ?= cc
16
 LD = $(CC)
17
-CFLAGS  = -O
18
-LDFLAGS = -s
19
+CFLAGS  ?= -O
20
+LDFLAGS += -s -L${LOCALBASE}/lib
21
 
22
 OPTIPNG = optipng
23
 ZLIB    = libz.a
24
@@ -28,7 +28,7 @@
25
 BACKDIR = ../../src
26
 
27
 OBJS = optipng.o opngoptim.o opngreduc.o cbitset.o osys.o
28
-INCS = -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR)
29
+INCS = -I$(ZDIR) -I$(PNGDIR) -I$(PNGXDIR) -I${LOCALBASE}/include
30
 LIBS = $(PNGXDIR)/$(PNGXLIB) $(PNGDIR)/$(PNGLIB) $(ZDIR)/$(ZLIB)
31
 SYSLIBS = -lm

Return to bug 169063