Date: Tue, 21 Jan 2020 03:05:14 +0000 (UTC) From: Mikhail Teterin <mi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r523700 - in head/graphics/libimg: . files Message-ID: <202001210305.00L35Eoc048239@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mi Date: Tue Jan 21 03:05:14 2020 New Revision: 523700 URL: https://svnweb.freebsd.org/changeset/ports/523700 Log: Upgrade from 1.4.7 to 1.4.9. Some new image-formats added, etc. As before, we force the use of the already installed libraries for JPEG, TIFF, and others. This causes some tests to fail, because the newer versions of these libraries yield slightly different files -- mark such tests as non-portable. Modified: head/graphics/libimg/Makefile head/graphics/libimg/distinfo head/graphics/libimg/files/patch-jpeg head/graphics/libimg/files/patch-tiff head/graphics/libimg/pkg-plist Modified: head/graphics/libimg/Makefile ============================================================================== --- head/graphics/libimg/Makefile Tue Jan 21 01:37:59 2020 (r523699) +++ head/graphics/libimg/Makefile Tue Jan 21 03:05:14 2020 (r523700) @@ -2,10 +2,10 @@ # $FreeBSD$ PORTNAME= libimg -PORTVERSION= 1.4.7 -CATEGORIES?= graphics tk +PORTVERSION= 1.4.9 +CATEGORIES?= graphics tk tcl MASTER_SITES= SF/tkimg/tkimg/${PORTVERSION:R}/tkimg%20${PORTVERSION} -DISTNAME= Img-Source-${PORTVERSION} +DISTNAME= Img-${PORTVERSION}-Source MAINTAINER= mi@aldan.algebra.com COMMENT= Library of image format handlers for Tk4.1 and later @@ -21,18 +21,18 @@ LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libpng.so:graphics/png \ libtiff.so:graphics/tiff -PLIST_SUB+= PORTVERSION=${PORTVERSION} +USES= autoreconf jpeg tk:tea xorg dos2unix -USES= autoreconf jpeg tk:tea xorg zip +PLIST_SUB+= PORTVERSION=${PORTVERSION} USE_XORG= x11 xext xft xrender xscrnsaver OPTIONS_DEFINE= EXAMPLES OPTIONS_SUB= yes +WRKSRC= ${WRKDIR}/Img-${PORTVERSION} +DOS2UNIX_GLOB= *.[ch] *.tcl *.msg *.in *.test license.terms # We don't need the bundled libraries: -EXTRACT_AFTER_ARGS= -x '*/libz/*' -x zlib \ - -x 'config.*' -x Makefile \ - -x '*/compat/*' -x '*/libtiff/*' \ - -x '*/libjpeg/*' -x '*/libpng/*' -a -d ${WRKDIR} +EXTRACT_AFTER_ARGS= --exclude 'config.*' --exclude Makefile \ + --exclude 'compat' --exclude win MAKE_ARGS+= INSTALL_ROOT="${STAGEDIR}" CONFIGURE_ENV= WRKDIR="${WRKDIR}" @@ -42,9 +42,6 @@ post-patch: .for d in jpeg png tiff zlib ${TOUCH} ${WRKDIR}/$dtclConfig.sh .endfor - -pre-configure: - ${CHMOD} +x ${WRKSRC}/${CONFIGURE_SCRIPT} post-configure: .for l in jpeg png tiff Modified: head/graphics/libimg/distinfo ============================================================================== --- head/graphics/libimg/distinfo Tue Jan 21 01:37:59 2020 (r523699) +++ head/graphics/libimg/distinfo Tue Jan 21 03:05:14 2020 (r523700) @@ -1,3 +1,3 @@ -TIMESTAMP = 1514742359 -SHA256 (Img-Source-1.4.7.zip) = ec5b742d6936e9b93f53dc2a6d995a47abc06cfb8ec4ca14f70c1f28680bd189 -SIZE (Img-Source-1.4.7.zip) = 7976394 +TIMESTAMP = 1579572018 +SHA256 (Img-1.4.9-Source.tar.gz) = 89aa029d9352de02c483857bc85b27af52f1b77907ee276047e13e894d1e3629 +SIZE (Img-1.4.9-Source.tar.gz) = 7702460 Modified: head/graphics/libimg/files/patch-jpeg ============================================================================== --- head/graphics/libimg/files/patch-jpeg Tue Jan 21 01:37:59 2020 (r523699) +++ head/graphics/libimg/files/patch-jpeg Tue Jan 21 03:05:14 2020 (r523700) @@ -1,7 +1,7 @@ ---- jpeg/jpeg.c 2013-04-09 15:10:34.000000000 -0400 -+++ jpeg/jpeg.c 2014-06-09 13:53:53.000000000 -0400 -@@ -56,5 +56,9 @@ - #endif +--- jpeg/jpeg.c 2018-09-14 09:53:49.000000000 -0400 ++++ jpeg/jpeg.c 2020-01-20 21:56:13.089925000 -0500 +@@ -62,5 +62,9 @@ + #include "tkimg.h" -#include "jpegtcl.h" +#ifdef EXTERN @@ -11,7 +11,7 @@ +#include <jerror.h> static int SetupJPegLibrary(Tcl_Interp *interp); -@@ -137,86 +141,11 @@ +@@ -143,86 +147,11 @@ - @@ -98,3 +98,51 @@ - /* *---------------------------------------------------------------------- +@@ -860,8 +789,6 @@ + } + case 2: { +- if (jpeg_simple_progression != NULL) { +- /* Select simple progressive mode. */ +- jpeg_simple_progression(cinfo); +- } ++ /* Select simple progressive mode. */ ++ jpeg_simple_progression(cinfo); + break; + } +@@ -899,5 +826,5 @@ + greenOffset = blockPtr->offset[1] - blockPtr->offset[0]; + blueOffset = blockPtr->offset[2] - blockPtr->offset[0]; +- if ((jpeg_set_colorspace != NULL) && ++ if ( + (grayscale || (!greenOffset && !blueOffset))) { + /* Generate monochrome JPEG file if source block is grayscale. */ +--- tests/jpeg.test 2016-07-30 10:30:48.000000000 -0400 ++++ tests/jpeg.test 2020-01-20 21:43:20.086115000 -0500 +@@ -24,5 +24,5 @@ + source $file2.base64 + +- test jpeg-1.1 {} -setup { ++ test jpeg-1.1 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { +@@ -33,5 +33,5 @@ + } -result $imgdata2 + +- test jpeg-1.2 {} -setup { ++ test jpeg-1.2 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { +@@ -42,5 +42,5 @@ + } -result $imgdata2 + +- test jpeg-1.3 {} -setup { ++ test jpeg-1.3 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { +@@ -52,5 +52,5 @@ + } -result $imgdata2 + +- test jpeg-1.4 {} -setup { ++ test jpeg-1.4 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { Modified: head/graphics/libimg/files/patch-tiff ============================================================================== --- head/graphics/libimg/files/patch-tiff Tue Jan 21 01:37:59 2020 (r523699) +++ head/graphics/libimg/files/patch-tiff Tue Jan 21 03:05:14 2020 (r523700) @@ -7,8 +7,8 @@ + vars="tiff.c" for i in $vars; do case $i in ---- tiff/tiff.c 2013-11-21 17:03:14.000000000 -0500 -+++ tiff/tiff.c 2014-06-09 14:16:39.000000000 -0400 +--- tiff/tiff.c 2019-03-02 16:33:00.000000000 -0500 ++++ tiff/tiff.c 2020-01-20 21:20:18.135776000 -0500 @@ -19,11 +19,15 @@ #endif #include "tkimg.h" @@ -28,7 +28,7 @@ +#include <jpeglib.h> -@@ -35,7 +39,4 @@ static int SetupTiffLibrary(Tcl_Interp * +@@ -35,7 +39,4 @@ #include "init.c" -#include "tiffInt.h" @@ -36,7 +36,7 @@ - extern DLLIMPORT int unlink(const char *); -@@ -88,10 +89,4 @@ SetupTiffLibrary (interp) +@@ -88,52 +89,11 @@ Tcl_Interp *interp; { - static int initialized = 0; @@ -47,9 +47,15 @@ - if (errorMessage) { ckfree(errorMessage); -@@ -105,35 +100,4 @@ SetupTiffLibrary (interp) + errorMessage = NULL; } - +- if (TIFFSetErrorHandler != NULL) { +- TIFFSetErrorHandler(_TIFFerr); +- } +- if (TIFFSetWarningHandler != NULL) { +- TIFFSetWarningHandler(_TIFFwarn); +- } +- - /* - * Initialize jpeg and zlib too, for use by the CODEC's we register - * with the base TIFF library in this package. @@ -73,7 +79,9 @@ - } - TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TkimgTIFFInitZip); - TIFFRegisterCODEC (COMPRESSION_ADOBE_DEFLATE, "AdobeDeflate", TkimgTIFFInitZip); -- ++ TIFFSetErrorHandler(_TIFFerr); ++ TIFFSetWarningHandler(_TIFFwarn); + - if (Jpegtcl_InitStubs(interp, JPEGTCL_VERSION, 0) == NULL) { - return TCL_ERROR; - } @@ -83,23 +91,23 @@ - } return TCL_OK; } -@@ -451,8 +415,6 @@ ObjRead(interp, data, format, imageHandl +@@ -451,9 +411,6 @@ { TIFF *tif; - char *tempFileName = NULL, tempFileNameBuffer[256]; -- int count, result; -+ int result; +- size_t count; + int result; tkimg_MFile handle; - char buffer[1024]; char *dataPtr = NULL; -@@ -461,35 +423,13 @@ ObjRead(interp, data, format, imageHandl +@@ -462,35 +419,13 @@ } - if (TIFFClientOpen) { - if (handle.state != IMG_STRING) { - dataPtr = ckalloc((handle.length*3)/4 + 2); -- handle.length = tkimg_Read(&handle, dataPtr, handle.length); +- handle.length = tkimg_Read2(&handle, dataPtr, handle.length); - handle.data = dataPtr; - } - handle.state = 0; @@ -114,12 +122,12 @@ - return TCL_ERROR; - } - -- count = tkimg_Read(&handle, buffer, 1024); +- count = (size_t)tkimg_Read2(&handle, buffer, 1024); - while (count == 1024) { - Tcl_Write(outchan, buffer, count); -- count = tkimg_Read(&handle, buffer, 1024); +- count = (size_t)tkimg_Read2(&handle, buffer, 1024); - } -- if (count>0){ +- if (count + 1 > 1){ - Tcl_Write(outchan, buffer, count); - } - if (Tcl_Close(interp, outchan) == TCL_ERROR) { @@ -128,17 +136,17 @@ - tif = TIFFOpen(tempFileName, "r"); - } + if (handle.state != IMG_STRING) { -+ dataPtr = ckalloc((handle.length*3)/4 + 2); -+ handle.length = tkimg_Read(&handle, dataPtr, handle.length); -+ handle.data = dataPtr; ++ dataPtr = ckalloc((handle.length*3)/4 + 2); ++ handle.length = tkimg_Read(&handle, dataPtr, handle.length); ++ handle.data = dataPtr; + } + handle.state = 0; + tif = TIFFClientOpen("inline data", "r", (thandle_t) &handle, -+ readString, writeString, seekString, closeDummy, -+ sizeString, mapDummy, unMapDummy); ++ readString, writeString, seekString, closeDummy, ++ sizeString, mapDummy, unMapDummy); if (tif != NULL) { -@@ -499,7 +439,4 @@ ObjRead(interp, data, format, imageHandl +@@ -500,7 +435,4 @@ result = TCL_ERROR; } - if (tempFileName) { @@ -146,11 +154,12 @@ - } if (result == TCL_ERROR) { Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -526,37 +463,12 @@ ChnRead(interp, chan, fileName, format, +@@ -527,38 +459,12 @@ { TIFF *tif; - char *tempFileName = NULL, tempFileNameBuffer[256]; -- int count, result; +- size_t count; +- int result; - char buffer[1024]; - - if (TIFFClientOpen) { @@ -167,31 +176,31 @@ - if (!outchan) { - return TCL_ERROR; - } -- -- count = Tcl_Read(chan, buffer, 1024); ++ int result; ++ tkimg_MFile handle; + +- count = (size_t)Tcl_Read(chan, buffer, 1024); - while (count == 1024) { - Tcl_Write(outchan, buffer, count); -- count = Tcl_Read(chan, buffer, 1024); +- count = (size_t)Tcl_Read(chan, buffer, 1024); - } -- if (count>0){ +- if (count + 1 > 1){ - Tcl_Write(outchan, buffer, count); - } - if (Tcl_Close(interp, outchan) == TCL_ERROR) { - return TCL_ERROR; - } -+ int result; -+ tkimg_MFile handle; - +- - tif = TIFFOpen(tempFileName, "r"); - } + handle.data = (char *) chan; + handle.state = IMG_CHAN; + tif = TIFFClientOpen(fileName, "r", (thandle_t) &handle, -+ readMFile, writeDummy, seekMFile, closeDummy, -+ sizeMFile, mapDummy, unMapDummy); ++ readMFile, writeDummy, seekMFile, closeDummy, ++ sizeMFile, mapDummy, unMapDummy); if (tif) { result = CommonRead(interp, tif, format, imageHandle, -@@ -565,7 +477,4 @@ ChnRead(interp, chan, fileName, format, +@@ -567,7 +473,4 @@ result = TCL_ERROR; } - if (tempFileName) { @@ -199,28 +208,28 @@ - } if (result == TCL_ERROR) { Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -635,5 +544,5 @@ CommonRead(interp, tif, format, imageHan +@@ -637,5 +540,5 @@ npixels = w * h; - raster = (uint32*) TkimgTIFFmalloc(npixels * sizeof (uint32)); + raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32)); block.width = w; block.height = h; -@@ -646,5 +555,5 @@ CommonRead(interp, tif, format, imageHan +@@ -648,5 +551,5 @@ if (!TIFFReadRGBAImage(tif, w, h, raster, 0) || errorMessage) { - TkimgTIFFfree (raster); + _TIFFfree (raster); if (errorMessage) { Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -663,5 +572,5 @@ CommonRead(interp, tif, format, imageHan +@@ -665,5 +568,5 @@ } - TkimgTIFFfree (raster); + _TIFFfree (raster); TIFFClose(tif); return result; -@@ -674,7 +583,6 @@ static int StringWrite( +@@ -676,7 +579,6 @@ ) { TIFF *tif; - int result, comp; @@ -229,7 +238,7 @@ - char *tempFileName = NULL, tempFileNameBuffer[256]; Tcl_DString dstring; const char *mode; -@@ -686,14 +594,9 @@ static int StringWrite( +@@ -688,14 +590,9 @@ } - if (TIFFClientOpen) { @@ -249,7 +258,7 @@ + sizeString, mapDummy, unMapDummy); result = CommonWrite(interp, tif, comp, blockPtr); -@@ -701,7 +604,4 @@ static int StringWrite( +@@ -703,7 +600,4 @@ if (result != TCL_OK) { - if (tempFileName) { @@ -257,7 +266,7 @@ - } Tcl_AppendResult(interp, errorMessage, (char *) NULL); ckfree(errorMessage); -@@ -710,29 +610,8 @@ static int StringWrite( +@@ -712,29 +606,8 @@ } - if (tempFileName) { @@ -271,18 +280,18 @@ - - result = Tcl_Read(inchan, buffer, 1024); - while ((result == TCL_OK) && !Tcl_Eof(inchan)) { -- tkimg_Write(&handle, buffer, result); +- tkimg_Write2(&handle, buffer, result); - result = Tcl_Read(inchan, buffer, 1024); - } - if (result == TCL_OK) { -- tkimg_Write(&handle, buffer, result); +- tkimg_Write2(&handle, buffer, result); - result = Tcl_Close(interp, inchan); - } - unlink(tempFileName); - } else { - int length = handle.length; - tkimg_WriteInit(&data, &handle); -- tkimg_Write(&handle, Tcl_DStringValue(&dstring), length); +- tkimg_Write2(&handle, Tcl_DStringValue(&dstring), length); - Tcl_DStringFree(&dstring); - } + length = handle.length; @@ -291,7 +300,7 @@ + Tcl_DStringFree(&dstring); tkimg_Putc(IMG_DONE, &handle); if (result == TCL_OK) { -@@ -954,36 +833,2 @@ CommonWrite(interp, tif, comp, blockPtr) +@@ -956,36 +829,2 @@ return TCL_OK; } - @@ -328,3 +337,33 @@ - return ckrealloc(data, size); - } -} +--- tests/tiff.test 2016-07-30 10:31:08.000000000 -0400 ++++ tests/tiff.test 2020-01-20 21:44:30.430340000 -0500 +@@ -22,5 +22,5 @@ + source $file.base64 + +- test tiff-1.1 {} -setup { ++ test tiff-1.1 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { +@@ -31,5 +31,5 @@ + } -result $imgdata + +- test tiff-1.2 {} -setup { ++ test tiff-1.2 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { +@@ -40,5 +40,5 @@ + } -result $imgdata + +- test tiff-1.3 {} -setup { ++ test tiff-1.3 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { +@@ -50,5 +50,5 @@ + } -result $imgdata + +- test tiff-1.4 {} -setup { ++ test tiff-1.4 {} -constraints nonPortable -setup { + catch {image delete i} + } -body { Modified: head/graphics/libimg/pkg-plist ============================================================================== --- head/graphics/libimg/pkg-plist Tue Jan 21 01:37:59 2020 (r523699) +++ head/graphics/libimg/pkg-plist Tue Jan 21 03:05:14 2020 (r523700) @@ -29,6 +29,7 @@ man/mann/img.n.gz lib/Img/libtkimg%%PORTVERSION%%.so lib/Img/libtkimgbmp%%PORTVERSION%%.so lib/Img/libtkimgdted%%PORTVERSION%%.so +lib/Img/libtkimgflir%%PORTVERSION%%.so lib/Img/libtkimggif%%PORTVERSION%%.so lib/Img/libtkimgico%%PORTVERSION%%.so lib/Img/libtkimgjpeg%%PORTVERSION%%.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001210305.00L35Eoc048239>