[Midnightbsd-cvs] mports [18992] trunk/graphics/tiff: tiff 4.0.4beta
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri May 15 19:40:29 EDT 2015
Revision: 18992
http://svnweb.midnightbsd.org/mports/?rev=18992
Author: laffer1
Date: 2015-05-15 19:40:29 -0400 (Fri, 15 May 2015)
Log Message:
-----------
tiff 4.0.4beta
Modified Paths:
--------------
trunk/graphics/tiff/Makefile
trunk/graphics/tiff/distinfo
trunk/graphics/tiff/pkg-plist
Added Paths:
-----------
trunk/graphics/tiff/files/patch-tools_tiffdither.c
Modified: trunk/graphics/tiff/Makefile
===================================================================
--- trunk/graphics/tiff/Makefile 2015-05-15 23:34:02 UTC (rev 18991)
+++ trunk/graphics/tiff/Makefile 2015-05-15 23:40:29 UTC (rev 18992)
@@ -1,8 +1,8 @@
# $MidnightBSD$
PORTNAME= tiff
-PORTVERSION= 4.0.3
-PORTREVISION= 5
+DISTVERSION= 4.0.4beta
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.remotesensing.org/pub/libtiff/ \
http://download.osgeo.org/libtiff/
@@ -16,7 +16,10 @@
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
libjbig.so:${PORTSDIR}/graphics/jbigkit
-USES= libtool
+USES= cpe libtool
+CPE_PRODUCT= libtiff
+CPE_VERSION= ${DISTVERSION:C/[a-z]+//}
+CPE_UPDATE= ${DISTVERSION:C/[0-9.]+//}
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-jpeg-include-dir=${LOCALBASE}/include \
Modified: trunk/graphics/tiff/distinfo
===================================================================
--- trunk/graphics/tiff/distinfo 2015-05-15 23:34:02 UTC (rev 18991)
+++ trunk/graphics/tiff/distinfo 2015-05-15 23:40:29 UTC (rev 18992)
@@ -1,2 +1,2 @@
-SHA256 (tiff-4.0.3.tar.gz) = ea1aebe282319537fb2d4d7805f478dd4e0e05c33d0928baba76a7c963684872
-SIZE (tiff-4.0.3.tar.gz) = 2051630
+SHA256 (tiff-4.0.4beta.tar.gz) = 5bd6c8e9be4ec318f6beb0c3f28b9ee31bd8b615195a00e0acc3eb5d08b26c1b
+SIZE (tiff-4.0.4beta.tar.gz) = 2098962
Added: trunk/graphics/tiff/files/patch-tools_tiffdither.c
===================================================================
--- trunk/graphics/tiff/files/patch-tools_tiffdither.c (rev 0)
+++ trunk/graphics/tiff/files/patch-tools_tiffdither.c 2015-05-15 23:40:29 UTC (rev 18992)
@@ -0,0 +1,70 @@
+--- tools/tiffdither.c.orig 2013-05-02 14:44:29 UTC
++++ tools/tiffdither.c
+@@ -39,6 +39,7 @@
+ #endif
+
+ #include "tiffio.h"
++#include "tiffiop.h"
+
+ #define streq(a,b) (strcmp(a,b) == 0)
+ #define strneq(a,b,n) (strncmp(a,b,n) == 0)
+@@ -56,7 +57,7 @@ static void usage(void);
+ * Floyd-Steinberg error propragation with threshold.
+ * This code is stolen from tiffmedian.
+ */
+-static void
++static int
+ fsdither(TIFF* in, TIFF* out)
+ {
+ unsigned char *outline, *inputline, *inptr;
+@@ -68,14 +69,19 @@ fsdither(TIFF* in, TIFF* out)
+ int lastline, lastpixel;
+ int bit;
+ tsize_t outlinesize;
++ int errcode = 0;
+
+ imax = imagelength - 1;
+ jmax = imagewidth - 1;
+ inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
+- thisline = (short *)_TIFFmalloc(imagewidth * sizeof (short));
+- nextline = (short *)_TIFFmalloc(imagewidth * sizeof (short));
++ thisline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short)));
++ nextline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short)));
+ outlinesize = TIFFScanlineSize(out);
+ outline = (unsigned char *) _TIFFmalloc(outlinesize);
++ if (! (inputline && thisline && nextline && outline)) {
++ fprintf(stderr, "Out of memory.\n");
++ goto skip_on_error;
++ }
+
+ /*
+ * Get first line
+@@ -93,7 +99,7 @@ fsdither(TIFF* in, TIFF* out)
+ nextline = tmpptr;
+ lastline = (i == imax);
+ if (TIFFReadScanline(in, inputline, i, 0) <= 0)
+- break;
++ goto skip_on_error;
+ inptr = inputline;
+ nextptr = nextline;
+ for (j = 0; j < imagewidth; ++j)
+@@ -131,13 +137,18 @@ fsdither(TIFF* in, TIFF* out)
+ }
+ }
+ if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
+- break;
++ goto skip_on_error;
+ }
++ goto exit_label;
++
+ skip_on_error:
++ errcode = 1;
++ exit_label:
+ _TIFFfree(inputline);
+ _TIFFfree(thisline);
+ _TIFFfree(nextline);
+ _TIFFfree(outline);
++ return errcode;
+ }
+
+ static uint16 compression = COMPRESSION_PACKBITS;
Property changes on: trunk/graphics/tiff/files/patch-tools_tiffdither.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/graphics/tiff/pkg-plist
===================================================================
--- trunk/graphics/tiff/pkg-plist 2015-05-15 23:34:02 UTC (rev 18991)
+++ trunk/graphics/tiff/pkg-plist 2015-05-15 23:40:29 UTC (rev 18992)
@@ -30,11 +30,11 @@
lib/libtiff.so
lib/libtiff.so.4
lib/libtiff.so.5
-lib/libtiff.so.5.2.0
+lib/libtiff.so.5.2.1
lib/libtiffxx.a
lib/libtiffxx.so
lib/libtiffxx.so.5
-lib/libtiffxx.so.5.2.0
+lib/libtiffxx.so.5.2.1
libdata/pkgconfig/libtiff-4.pc
man/man1/bmp2tiff.1.gz
man/man1/fax2ps.1.gz
@@ -301,3 +301,5 @@
%%PORTDOCS%%%%DOCSDIR%%/v4.0.0.html
%%PORTDOCS%%%%DOCSDIR%%/v4.0.1.html
%%PORTDOCS%%%%DOCSDIR%%/v4.0.2.html
+%%PORTDOCS%%%%DOCSDIR%%/v4.0.3.html
+%%PORTDOCS%%%%DOCSDIR%%/v4.0.4beta.html
More information about the Midnightbsd-cvs
mailing list