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

(-)Makefile (-18 / +14 lines)
Lines 1-9 Link Here
1
# Created by: Thomas Hurst <freaky@aagh.net>
1
# Created by: Thomas Hurst <tom@hur.st>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	optipng
4
PORTNAME=	optipng
5
PORTVERSION=	0.7.4
5
PORTVERSION=	0.7.5
6
PORTREVISION=	1
7
CATEGORIES=	graphics
6
CATEGORIES=	graphics
8
MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION}
7
MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION}
9
8
Lines 15-41 Link Here
15
14
16
OPTIONS_DEFINE=	BUNDLED_LIBPNG BUNDLED_ZLIB
15
OPTIONS_DEFINE=	BUNDLED_LIBPNG BUNDLED_ZLIB
17
16
18
BUNDLED_LIBPNG_DESC=	Use bundled libpng
17
BUNDLED_LIBPNG_DESC=		Use bundled libpng
19
BUNDLED_ZLIB_DESC=	Use bundled zlib
18
BUNDLED_LIBPNG_CONFIGURE_OFF=	--with-system-libpng
19
BUNDLED_LIBPNG_CONFIGURE_ON=	--without-system-libpng
20
BUNDLED_LIBPNG_LIB_DEPENDS_OFF=	libpng.so:${PORTSDIR}/graphics/png
21
BUNDLED_LIBPNG_CFLAGS_OFF=	-I${LOCALBASE}/include
22
BUNDLED_LIBPNG_LDFLAGS_OFF=	-L${LOCALBASE}/lib
20
23
24
BUNDLED_ZLIB_DESC=		Use bundled zlib
25
BUNDLED_ZLIB_CONFIGURE_OFF=	--with-system-zlib
26
BUNDLED_ZLIB_CONFIGURE_ON=	--without-system-zlib
27
28
USES=	gmake
21
HAS_CONFIGURE=	yes
29
HAS_CONFIGURE=	yes
30
22
PLIST_FILES=	bin/optipng man/man1/optipng.1.gz
31
PLIST_FILES=	bin/optipng man/man1/optipng.1.gz
23
PORTDOCS=	history.txt optipng.man.html optipng.man.pdf optipng.man.txt \
32
PORTDOCS=	history.txt optipng.man.html optipng.man.pdf optipng.man.txt \
24
		png_optimization.html todo.txt
33
		png_optimization.html todo.txt
25
34
26
.include <bsd.port.options.mk>
27
28
.if empty(PORT_OPTIONS:MBUNDLED_LIBPNG)
29
CONFIGURE_ARGS+=	--with-system-libpng
30
CFLAGS+=	"-I${LOCALBASE}/include"
31
LDFLAGS+=	"-L${LOCALBASE}/lib"
32
LIB_DEPENDS+=	libpng.so:${PORTSDIR}/graphics/png
33
.endif
34
35
.if empty(PORT_OPTIONS:MBUNDLED_ZLIB)
36
CONFIGURE_ARGS+=	--with-system-zlib
37
.endif
38
39
do-install:
35
do-install:
40
	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng/optipng ${STAGEDIR}${PREFIX}/bin/
36
	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng/optipng ${STAGEDIR}${PREFIX}/bin/
41
	${INSTALL_MAN} ${WRKSRC}/src/optipng/man/optipng.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
37
	${INSTALL_MAN} ${WRKSRC}/src/optipng/man/optipng.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (optipng-0.7.4.tar.gz) = 520b5d5a9405dbdc5c905dd0cff87211e69c4ed2059744037510e613fe8237ff
1
SHA256 (optipng-0.7.5.tar.gz) = 74e54b798b012dff8993fb8d90185ca83f18cfa4935f4a93b0bcfc33c849619d
2
SIZE (optipng-0.7.4.tar.gz) = 1613916
2
SIZE (optipng-0.7.5.tar.gz) = 2141943
(-)files/patch-src-optipng-osys.c (-11 lines)
Lines 1-11 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_optipng_osys.c (+11 lines)
Line 0 Link Here
1
--- src/optipng/osys.c.orig	2015-04-22 09:09:17 UTC
2
+++ src/optipng/osys.c
3
@@ -518,7 +518,7 @@ osys_copy_attr(const char *src_path, con
4
     if (chmod(dest_path, sbuf.st_mode) != 0)
5
         result = -1;
6
 
7
-#ifdef AT_FDCWD
8
+#if 0
9
     {
10
         struct timespec times[2];
11
 
(-)files/patch-src_pngxtern_pngxmem.c (+11 lines)
Line 0 Link Here
1
--- src/pngxtern/pngxmem.c.orig	2015-04-22 09:07:30 UTC
2
+++ src/pngxtern/pngxmem.c
3
@@ -34,7 +34,7 @@ pngx_malloc_rows_extended(png_structp pn
4
       png_error(png_ptr, "Missing IHDR");
5
    row_size = png_get_rowbytes(png_ptr, info_ptr);
6
    /* libpng sets row_size to 0 when the width is too large to process. */
7
-   if (row_size == 0 || height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep))
8
+   if (row_size == 0 || height > (pngx_alloc_size_t)(-1U) / sizeof(png_bytep))
9
       png_error(png_ptr, "Can't handle exceedingly large image dimensions");
10
    if (row_size < min_row_size)
11
       row_size = min_row_size;

Return to bug 199612