diff options
author | jbeich <jbeich@FreeBSD.org> | 2015-04-23 19:11:11 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2015-04-23 19:11:11 +0800 |
commit | 5e81f9d224888d961c63d3f7c8e9b26caae621da (patch) | |
tree | ead34a862a4ceeeb263ba9b3e3a7f54671a8a246 /graphics/optipng | |
parent | f0477d8db23802076116af8f5f684009335ea361 (diff) | |
download | freebsd-ports-gnome-5e81f9d224888d961c63d3f7c8e9b26caae621da.tar.gz freebsd-ports-gnome-5e81f9d224888d961c63d3f7c8e9b26caae621da.tar.zst freebsd-ports-gnome-5e81f9d224888d961c63d3f7c8e9b26caae621da.zip |
- Update to 0.7.5
- Convert to option helpers but don't use _CONFIGURE_WITH
due to inverse logic
- Fix compiler warning on amd64 due to (size_t)(-1)
being larger than UINT_MAX
PR: 199612
Submitted by: Thomas Hurst <tom@hur.st> (maintainer)
Diffstat (limited to 'graphics/optipng')
-rw-r--r-- | graphics/optipng/Makefile | 32 | ||||
-rw-r--r-- | graphics/optipng/distinfo | 4 | ||||
-rw-r--r-- | graphics/optipng/files/patch-src-optipng-osys.c | 11 | ||||
-rw-r--r-- | graphics/optipng/files/patch-src_optipng_osys.c | 11 | ||||
-rw-r--r-- | graphics/optipng/files/patch-src_pngxtern_pngxmem.c | 11 |
5 files changed, 38 insertions, 31 deletions
diff --git a/graphics/optipng/Makefile b/graphics/optipng/Makefile index 3804590f6753..0fad2c165d89 100644 --- a/graphics/optipng/Makefile +++ b/graphics/optipng/Makefile @@ -1,9 +1,8 @@ -# Created by: Thomas Hurst <freaky@aagh.net> +# Created by: Thomas Hurst <tom@hur.st> # $FreeBSD$ PORTNAME= optipng -PORTVERSION= 0.7.4 -PORTREVISION= 1 +PORTVERSION= 0.7.5 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION} @@ -15,27 +14,24 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt OPTIONS_DEFINE= BUNDLED_LIBPNG BUNDLED_ZLIB -BUNDLED_LIBPNG_DESC= Use bundled libpng -BUNDLED_ZLIB_DESC= Use bundled zlib +BUNDLED_LIBPNG_DESC= Use bundled libpng +BUNDLED_LIBPNG_CONFIGURE_OFF= --with-system-libpng +BUNDLED_LIBPNG_CONFIGURE_ON= --without-system-libpng +BUNDLED_LIBPNG_LIB_DEPENDS_OFF= libpng.so:${PORTSDIR}/graphics/png +BUNDLED_LIBPNG_CFLAGS_OFF= -I${LOCALBASE}/include +BUNDLED_LIBPNG_LDFLAGS_OFF= -L${LOCALBASE}/lib +BUNDLED_ZLIB_DESC= Use bundled zlib +BUNDLED_ZLIB_CONFIGURE_OFF= --with-system-zlib +BUNDLED_ZLIB_CONFIGURE_ON= --without-system-zlib + +USES= gmake HAS_CONFIGURE= yes + PLIST_FILES= bin/optipng man/man1/optipng.1.gz PORTDOCS= history.txt optipng.man.html optipng.man.pdf optipng.man.txt \ png_optimization.html todo.txt -.include <bsd.port.options.mk> - -.if empty(PORT_OPTIONS:MBUNDLED_LIBPNG) -CONFIGURE_ARGS+= --with-system-libpng -CFLAGS+= "-I${LOCALBASE}/include" -LDFLAGS+= "-L${LOCALBASE}/lib" -LIB_DEPENDS+= libpng.so:${PORTSDIR}/graphics/png -.endif - -.if empty(PORT_OPTIONS:MBUNDLED_ZLIB) -CONFIGURE_ARGS+= --with-system-zlib -.endif - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/optipng/optipng ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/src/optipng/man/optipng.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/ diff --git a/graphics/optipng/distinfo b/graphics/optipng/distinfo index 556a7065ef49..94cca669ce6d 100644 --- a/graphics/optipng/distinfo +++ b/graphics/optipng/distinfo @@ -1,2 +1,2 @@ -SHA256 (optipng-0.7.4.tar.gz) = 520b5d5a9405dbdc5c905dd0cff87211e69c4ed2059744037510e613fe8237ff -SIZE (optipng-0.7.4.tar.gz) = 1613916 +SHA256 (optipng-0.7.5.tar.gz) = 74e54b798b012dff8993fb8d90185ca83f18cfa4935f4a93b0bcfc33c849619d +SIZE (optipng-0.7.5.tar.gz) = 2141943 diff --git a/graphics/optipng/files/patch-src-optipng-osys.c b/graphics/optipng/files/patch-src-optipng-osys.c deleted file mode 100644 index 5f409f63e1b8..000000000000 --- a/graphics/optipng/files/patch-src-optipng-osys.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/optipng/osys.c.orig 2011-07-22 13:49:00.000000000 +0900 -+++ src/optipng/osys.c 2012-06-14 18:51:09.000000000 +0900 -@@ -435,7 +435,7 @@ - if (chmod(dest_path, mode) != 0) - return -1; - --#ifdef AT_FDCWD -+#if 0 /* def AT_FDCWD */ - { - struct timespec times[2]; - diff --git a/graphics/optipng/files/patch-src_optipng_osys.c b/graphics/optipng/files/patch-src_optipng_osys.c new file mode 100644 index 000000000000..3cd50303bced --- /dev/null +++ b/graphics/optipng/files/patch-src_optipng_osys.c @@ -0,0 +1,11 @@ +--- src/optipng/osys.c.orig 2015-04-22 09:09:17 UTC ++++ src/optipng/osys.c +@@ -518,7 +518,7 @@ osys_copy_attr(const char *src_path, con + if (chmod(dest_path, sbuf.st_mode) != 0) + result = -1; + +-#ifdef AT_FDCWD ++#if 0 + { + struct timespec times[2]; + diff --git a/graphics/optipng/files/patch-src_pngxtern_pngxmem.c b/graphics/optipng/files/patch-src_pngxtern_pngxmem.c new file mode 100644 index 000000000000..f519ce30d5f4 --- /dev/null +++ b/graphics/optipng/files/patch-src_pngxtern_pngxmem.c @@ -0,0 +1,11 @@ +--- src/pngxtern/pngxmem.c.orig 2015-04-22 09:07:30 UTC ++++ src/pngxtern/pngxmem.c +@@ -34,7 +34,7 @@ pngx_malloc_rows_extended(png_structp pn + png_error(png_ptr, "Missing IHDR"); + row_size = png_get_rowbytes(png_ptr, info_ptr); + /* libpng sets row_size to 0 when the width is too large to process. */ +- if (row_size == 0 || height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep)) ++ if (row_size == 0 || height > (pngx_alloc_size_t)(-1U) / sizeof(png_bytep)) + png_error(png_ptr, "Can't handle exceedingly large image dimensions"); + if (row_size < min_row_size) + row_size = min_row_size; |