Index: branches/2015Q1/graphics/tiff/Makefile =================================================================== --- branches/2015Q1/graphics/tiff/Makefile (revision 382723) +++ branches/2015Q1/graphics/tiff/Makefile (revision 382724) @@ -1,125 +1,126 @@ # Created by: Richard Hwang , Mikhail Teterin , Jun-ichiro itojun Itoh # $FreeBSD$ PORTNAME= tiff DISTVERSION= 4.0.4beta +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= ftp://ftp.remotesensing.org/pub/libtiff/ \ http://download.osgeo.org/libtiff/ MAINTAINER= portmgr@FreeBSD.org COMMENT= Tools and library routines for working with TIFF images LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYRIGHT LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ libjbig.so:${PORTSDIR}/graphics/jbigkit 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 \ --with-jpeg-lib-dir=${LOCALBASE}/lib \ --without-x INSTALL_TARGET= install-strip MLNKS= TIFFError.3tiff TIFFSetErrorHandler.3tiff \ TIFFFlush.3tiff TIFFFlushData.3tiff \ TIFFGetField.3tiff TIFFGetFieldDefaulted.3tiff \ TIFFGetField.3tiff TIFFVGetField.3tiff \ TIFFGetField.3tiff TIFFVGetFieldDefaulted.3tiff \ TIFFOpen.3tiff TIFFFdOpen.3tiff \ TIFFOpen.3tiff TIFFClientOpen.3tiff \ TIFFRGBAImage.3tiff TIFFRGBAImageOK.3tiff \ TIFFRGBAImage.3tiff TIFFRGBAImageBegin.3tiff \ TIFFRGBAImage.3tiff TIFFRGBAImageGet.3tiff \ TIFFRGBAImage.3tiff TIFFRGBAImageEnd.3tiff \ TIFFRGBAImage.3tiff TIFFReadRGBAImageOriented.3tiff \ TIFFSetDirectory.3tiff TIFFSetSubDirectory.3tiff \ TIFFSetField.3tiff TIFFVSetField.3tiff \ TIFFWarning.3tiff TIFFSetWarningHandler.3tiff \ TIFFWriteDirectory.3tiff TIFFRewriteDirectory.3tiff \ TIFFbuffer.3tiff TIFFReadBufferSetup.3tiff \ TIFFbuffer.3tiff TIFFWriteBufferSetup.3tiff \ TIFFcodec.3tiff TIFFFindCODEC.3tiff \ TIFFcodec.3tiff TIFFRegisterCODEC.3tiff \ TIFFcodec.3tiff TIFFUnRegisterCODEC.3tiff \ TIFFmemory.3tiff TIFFfree.3tiff \ TIFFmemory.3tiff TIFFmalloc.3tiff \ TIFFmemory.3tiff TIFFmemcmp.3tiff \ TIFFmemory.3tiff TIFFmemcpy.3tiff \ TIFFmemory.3tiff TIFFmemset.3tiff \ TIFFmemory.3tiff TIFFrealloc.3tiff \ TIFFquery.3tiff TIFFCurrentDirectory.3tiff \ TIFFquery.3tiff TIFFCurrentRow.3tiff \ TIFFquery.3tiff TIFFCurrentStrip.3tiff \ TIFFquery.3tiff TIFFCurrentTile.3tiff \ TIFFquery.3tiff TIFFFileName.3tiff \ TIFFquery.3tiff TIFFFileno.3tiff \ TIFFquery.3tiff TIFFGetMode.3tiff \ TIFFquery.3tiff TIFFIsTiled.3tiff \ TIFFquery.3tiff TIFFIsByteSwapped.3tiff \ TIFFquery.3tiff TIFFIsUpSampled.3tiff \ TIFFquery.3tiff TIFFIsMSB2LSB.3tiff \ TIFFquery.3tiff TIFFLastDirectory.3tiff \ TIFFsize.3tiff TIFFScanlineSize.3tiff \ TIFFstrip.3tiff TIFFComputeStrip.3tiff \ TIFFstrip.3tiff TIFFDefaultStripSize.3tiff \ TIFFstrip.3tiff TIFFNumberOfStrips.3tiff \ TIFFstrip.3tiff TIFFStripSize.3tiff \ TIFFstrip.3tiff TIFFVStripSize.3tiff \ TIFFswab.3tiff TIFFReverseBits.3tiff \ TIFFswab.3tiff TIFFSwabArrayOfLong.3tiff \ TIFFswab.3tiff TIFFSwabArrayOfShort.3tiff \ TIFFswab.3tiff TIFFSwabLong.3tiff \ TIFFswab.3tiff TIFFSwabShort.3tiff \ TIFFtile.3tiff TIFFCheckTile.3tiff \ TIFFtile.3tiff TIFFComputeTile.3tiff \ TIFFtile.3tiff TIFFDefaultTileSize.3tiff \ TIFFtile.3tiff TIFFNumberOfTiles.3tiff \ TIFFtile.3tiff TIFFTileSize.3tiff \ TIFFtile.3tiff TIFFTileRowSize.3tiff \ TIFFtile.3tiff TIFFVTileSize.3tiff OPTIONS_DEFINE= DOCS .include .if !defined(BUILDING_INDEX) __pmlinks3!= ${ECHO_CMD} '${MLNKS:S/ / /}' | ${AWK} \ '{ if (NF % 2 != 0) { print "broken"; exit; } \ for (i=1; i<=NF; i++) { \ if ( i % 2 == 0) { print " " $$i " ;"; } \ else { printf "${LN} -s " $$i " "; } \ } }' .endif post-patch: @${REINPLACE_CMD} "/\.po 0/d" ${WRKSRC}/man/* pre-configure: ${REINPLACE_CMD} \ -e 's|tiffgt.1 ||' \ ${WRKSRC}/man/Makefile.in ${REINPLACE_CMD} -e 's|^docfiles|no-docfiles|' \ -e 's|man html|man|' ${WRKSRC}/Makefile.in post-install: ${LN} -s libtiff.so.5 ${STAGEDIR}${PREFIX}/lib/libtiff.so.4 ( cd ${STAGEDIR}${PREFIX}/man/man3 && ${__pmlinks3} ) .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR}/images ${STAGEDIR}${DOCSDIR}/man ${INSTALL_DATA} ${WRKSRC}/html/*.html ${STAGEDIR}${DOCSDIR}/ ${INSTALL_DATA} ${WRKSRC}/html/images/*.jpg ${STAGEDIR}${DOCSDIR}/images/ ${INSTALL_DATA} ${WRKSRC}/html/images/*.gif ${STAGEDIR}${DOCSDIR}/images/ ${INSTALL_DATA} ${WRKSRC}/html/man/*.html ${STAGEDIR}${DOCSDIR}/man/ .endif regression-test: build @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} check) .include Index: branches/2015Q1/graphics/tiff/files/patch-tools_tiffdither.c =================================================================== --- branches/2015Q1/graphics/tiff/files/patch-tools_tiffdither.c (nonexistent) +++ branches/2015Q1/graphics/tiff/files/patch-tools_tiffdither.c (revision 382724) @@ -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: branches/2015Q1/graphics/tiff/files/patch-tools_tiffdither.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: branches/2015Q1 =================================================================== --- branches/2015Q1 (revision 382723) +++ branches/2015Q1 (revision 382724) Property changes on: branches/2015Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r382617