diff --git a/graphics/libimg/Makefile b/graphics/libimg/Makefile index 84caec71ce44..d845377860c7 100644 --- a/graphics/libimg/Makefile +++ b/graphics/libimg/Makefile @@ -1,63 +1,62 @@ PORTNAME= libimg -PORTVERSION= 1.4.12 -PORTREVISION= 1 +PORTVERSION= 1.4.16 CATEGORIES?= graphics tk tcl MASTER_SITES= SF/tkimg/tkimg/${PORTVERSION:R}/tkimg%20${PORTVERSION} DISTNAME= Img-${PORTVERSION}-Source MAINTAINER= mi@aldan.algebra.com COMMENT= Library of image format handlers for Tk4.1 and later -WWW= http://members1.chello.nl/~j.nijtmans/img.html +WWW= https://sourceforge.net/projects/tkimg/ LICENSE= TclTk LICENSE_NAME= Tcl/Tk License LICENSE_FILE= ${WRKSRC}/license.terms LICENSE_PERMS= auto-accept pkg-sell pkg-mirror dist-sell dist-mirror BUILD_DEPENDS= dtplite:devel/tcllib LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libpng.so:graphics/png \ libtiff.so:graphics/tiff USES= autoreconf jpeg tk:tea xorg dos2unix 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= --exclude 'config.*' --exclude Makefile --exclude \ 'compat' --exclude win MAKE_ARGS+= INSTALL_ROOT="${STAGEDIR}" CONFIGURE_ENV= WRKDIR="${WRKDIR}" CONFIGURE_ARGS+=--enable-shared --disable-stubs post-patch: ${REINPLACE_CMD} -E -e 's,"(zlib|tiff|jpeg|png)tcl.h",<\1.h>,' \ -e 's,jpeg\.h,jpeglib.h,' ${WRKSRC}/*/*.[ch] .for d in jpeg png tiff zlib ${TOUCH} ${WRKDIR}/$dtclConfig.sh .endfor post-configure: .for l in jpeg png tiff # Link with -l$l ${REINPLACE_CMD} -E \ -e 's,^SHLIB_LD_LIBS[[:space:]]*=[[:space:]]*(.*),SHLIB_LD_LIBS=\1 -l$l,' \ ${WRKSRC}/$l/Makefile .endfor do-test: cd ${WRKSRC}/tests && \ ${SETENV} TCLLIBPATH=${WRKSRC:Q} ${WISH} ${WRKSRC}/tests/all post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/msgs/ ${INSTALL_DATA} ${WRKSRC}/msgs/*.msg ${STAGEDIR}${EXAMPLESDIR}/msgs/ ${INSTALL_SCRIPT} ${WRKSRC}/demo.tcl ${WRKSRC}/tkv.tcl ${STAGEDIR}${EXAMPLESDIR}/ .include diff --git a/graphics/libimg/distinfo b/graphics/libimg/distinfo index 126318166bff..eeb597e65a18 100644 --- a/graphics/libimg/distinfo +++ b/graphics/libimg/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1609788426 -SHA256 (Img-1.4.12-Source.tar.gz) = 4ff4e4d836ec41f0b56eba5fb73e628387a0dbfdcb7d8bb5821bb6edde0922f9 -SIZE (Img-1.4.12-Source.tar.gz) = 8363871 +TIMESTAMP = 1704732357 +SHA256 (Img-1.4.16-Source.tar.gz) = d99af4835fe3e20960817c7a1b5235dcfaa97c642593cce50bdb64c5827cd321 +SIZE (Img-1.4.16-Source.tar.gz) = 12129708 diff --git a/graphics/libimg/files/patch-jpeg b/graphics/libimg/files/patch-jpeg index 46996060664e..70bebc3b46fe 100644 --- a/graphics/libimg/files/patch-jpeg +++ b/graphics/libimg/files/patch-jpeg @@ -1,153 +1,158 @@ ---- jpeg/jpeg.c 2019-03-22 10:47:24.654594000 -0400 -+++ jpeg/jpeg.c 2021-01-04 14:38:51.161931000 -0500 +--- jpeg/jpeg.c 2023-04-19 09:19:56.206635300 -0400 ++++ jpeg/jpeg.c 2024-01-08 11:50:37.142511000 -0500 @@ -64,5 +64,9 @@ #include "tkimg.h" #ifdef USE_TCL_STUBS -#include "jpegtcl.h" +#ifdef EXTERN +# undef EXTERN +#endif +#include +#include #else #include "jpeglib.h" -@@ -70,8 +74,5 @@ +@@ -70,9 +74,6 @@ #endif -static int SetupJPegLibrary(Tcl_Interp *interp); -- --#define MORE_INITIALIZATION \ -- if (SetupJPegLibrary (interp) != TCL_OK) { return TCL_ERROR; } +#define MORE_INITIALIZATION {} +-#define MORE_INITIALIZATION \ +- if (SetupJPegLibrary (interp) != TCL_OK) { return TCL_ERROR; } +- #include "init.c" -@@ -149,88 +150,4 @@ + +@@ -149,92 +150,4 @@ - -static int -SetupJPegLibrary( - Tcl_Interp *interp -) { - struct jpeg_compress_struct *cinfo; /* libjpeg's parameter structure */ - struct my_error_mgr jerror; /* for controlling libjpeg error handling */ - int i; - -#ifdef USE_TCL_STUBS - if (Jpegtcl_InitStubs(interp, JPEGTCL_VERSION, 0) == NULL) { - return TCL_ERROR; - } -#endif - - /* The followin code tries to determine if the JPEG library is - valid at all. The library might be configured differently, - which will produce core dumps. Also it might be that - fields appear in different places in jpeg_compress_struct - or jpeg_decompress_struct. This will make the library totally - unusable. In stead of a core-dump, we better have a proper - error message */ - - /* overallocat size, so we don't get a core-dump if the library - thinks that the structure is much larger */ - -- cinfo = (struct jpeg_compress_struct *) ckalloc(8*sizeof(struct jpeg_compress_struct)); +- cinfo = (struct jpeg_compress_struct *) attemptckalloc(8*sizeof(struct jpeg_compress_struct)); +- if (cinfo == NULL) { +- Tcl_AppendResult (interp, "Unable to allocate memory for image data.", (char *) NULL); +- return TCL_ERROR; +- } - cinfo->err = jpeg_std_error(&jerror.pub); - jerror.pub.error_exit = my_error_exit; - jerror.pub.output_message = my_output_message; - /* Establish the setjmp return context for my_error_exit to use. */ -- if (setjmp(jerror.setjmp_buffer)) { +- if (SETJMP(jerror.setjmp_buffer)) { - /* If we get here, the JPEG library is invalid. */ - jpeg_destroy_compress(cinfo); - ckfree((char *)cinfo); - - if (interp) { -- Tcl_AppendResult(interp, "couldn't use \"", "jpegtcl", +- Tcl_AppendResult(interp, "Could not use \"", "jpegtcl", - "\": please upgrade to at least version 6a", (char *) NULL); - } - return TCL_ERROR; - } - - /* Now we can initialize libjpeg. */ - ((char *) cinfo)[sizeof(struct jpeg_compress_struct)] = 53; - jpeg_create_compress(cinfo); - if (((char *) cinfo)[sizeof(struct jpeg_compress_struct)] != 53) { - /* Oops. The library changed this value, which is outside the - * structure. Definitely, the library is invalid!!!! */ - ERREXIT(cinfo, JMSG_NOMESSAGE); - } - - /* Set up JPEG compression parameters. */ - cinfo->image_width = 16; - cinfo->image_height = 16; - cinfo->input_components = 3; - cinfo->in_color_space = JCS_RGB; - cinfo->data_precision = -1; - cinfo->optimize_coding = TRUE; - cinfo->dct_method = -1; - cinfo->X_density = 0; - cinfo->Y_density = 0; - jpeg_set_defaults(cinfo); - - if ((cinfo->data_precision != BITS_IN_JSAMPLE) || - (cinfo->optimize_coding != FALSE) || - (cinfo->dct_method != JDCT_DEFAULT) || - (cinfo->X_density != 1) || - (cinfo->Y_density != 1)) { - ERREXIT(cinfo, JMSG_NOMESSAGE); - } - for (i = 0; i < NUM_ARITH_TBLS; i++) { - if ((cinfo->arith_dc_L[i] != 0) || - (cinfo->arith_dc_U[i] != 1) || - (cinfo->arith_ac_K[i] != 5)) { - ERREXIT(cinfo, JMSG_NOMESSAGE); - } - } - jpeg_destroy_compress(cinfo); - ckfree((char *) cinfo); - return TCL_OK; -} - - /* *---------------------------------------------------------------------- -@@ -866,8 +783,6 @@ +@@ -873,8 +786,6 @@ case 2: { #ifdef USE_JPEGTCL_STUBS - if (jpeg_simple_progression != NULL) { - /* Select simple progressive mode. */ - jpeg_simple_progression(cinfo); - } + /* Select simple progressive mode. */ + jpeg_simple_progression(cinfo); #else jpeg_simple_progression(cinfo); --- 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 { diff --git a/graphics/libimg/files/patch-tiff b/graphics/libimg/files/patch-tiff index 76afeb99e3cc..2011309e7157 100644 --- a/graphics/libimg/files/patch-tiff +++ b/graphics/libimg/files/patch-tiff @@ -1,439 +1,439 @@ --- tiff/configure 2013-11-21 17:03:14.000000000 -0500 +++ tiff/configure 2014-06-09 14:00:22.000000000 -0400 @@ -8232,5 +8232,5 @@ - vars="tiff.c tiffJpeg.c tiffZip.c tiffPixar.c" + vars="tiff.c" for i in $vars; do case $i in ---- tiff/tiff.c 2020-08-26 17:17:10.040341300 -0400 -+++ tiff/tiff.c 2021-01-04 15:02:19.857169000 -0500 +--- tiff/tiff.c 2023-10-27 17:01:40.715604300 -0400 ++++ tiff/tiff.c 2024-01-08 12:09:34.186075000 -0500 @@ -20,11 +20,15 @@ #endif #include "tkimg.h" -#include "tifftcl.h" -#include "zlibtcl.h" +#ifdef EXTERN +# undef EXTERN +#endif +#include +#include +#include #ifdef HAVE_STDLIB_H #undef HAVE_STDLIB_H #endif -#include "jpegtcl.h" +#include static int SetupTiffLibrary(Tcl_Interp *interp); @@ -37,7 +41,4 @@ #include "tiffInt.h" - -extern DLLIMPORT int unlink(const char *); - /* * Prototypes for local procedures defined in this file: @@ -84,44 +85,7 @@ SetupTiffLibrary (Tcl_Interp *interp) { - static int initialized = 0; - - if (Tifftcl_InitStubs(interp, TIFFTCL_VERSION, 0) == NULL) { - return TCL_ERROR; - } - - if (errorMessage) { - ckfree(errorMessage); - 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. - */ - - if (Jpegtcl_InitStubs(interp, JPEGTCL_VERSION, 0) == NULL) { - return TCL_ERROR; - } - - if (!initialized) { - initialized = 1; - if (Zlibtcl_InitStubs(interp, ZLIBTCL_VERSION, 0) == NULL) { - return TCL_ERROR; - } - TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TkimgTIFFInitZip); - TIFFRegisterCODEC (COMPRESSION_ADOBE_DEFLATE, "AdobeDeflate", TkimgTIFFInitZip); - - if (Jpegtcl_InitStubs(interp, JPEGTCL_VERSION, 0) == NULL) { - return TCL_ERROR; - } - TIFFRegisterCODEC (COMPRESSION_JPEG, "JPEG", TkimgTIFFInitJpeg); - TIFFRegisterCODEC (COMPRESSION_PIXARLOG, "PixarLog", TkimgTIFFInitPixar); - } + TIFFSetErrorHandler(_TIFFerr); + TIFFSetWarningHandler(_TIFFwarn); + return TCL_OK; } -@@ -435,8 +399,6 @@ +@@ -438,9 +402,7 @@ ) { TIFF *tif; - char *dir, *tempFileName = NULL, tempFileNameBuffer[1024]; - int count, result; + int result; tkimg_MFile handle; - char buffer[4096]; - char *dataPtr = NULL; +- char *dataPtr = NULL; ++ void *dataPtr = NULL; -@@ -445,66 +407,13 @@ + if (!tkimg_ReadInit(data, '\115', &handle)) { +@@ -448,70 +410,17 @@ } - if (TIFFClientOpen) { - if (handle.state != IMG_STRING) { -- dataPtr = ckalloc((handle.length*3)/4 + 2); +- dataPtr = attemptckalloc((handle.length*3)/4 + 2); +- if (dataPtr == NULL) { +- Tcl_AppendResult (interp, "Unable to allocate memory for image data.", (char *) NULL); +- return TCL_ERROR; +- } - handle.length = tkimg_Read2(&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); - } else { - FILE *outfile; -#ifdef WIN32 - char dirBuffer[512]; - HANDLE h; - - dir = dirBuffer; - strcpy(dir, "."); - GetTempPathA(sizeof (dirBuffer), dir); - tempFileName = tempFileNameBuffer; - tempFileName[0] = '\0'; - GetTempFileNameA(dir, "tki", 0, tempFileName); - h = CreateFileA(tempFileName, GENERIC_READ|GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY, NULL); - if (h != INVALID_HANDLE_VALUE) { - CloseHandle(h); - } -#else - dir = getenv("TMPDIR"); - tempFileName = tempFileNameBuffer; - if (dir) { - strcpy(tempFileName, dir); - } else { -#ifdef P_tmpdir - strcpy(tempFileName, P_tmpdir); -#else - strcpy(tempFileName, "/tmp"); -#endif - } - strcat(tempFileName, "/tkimgXXXXXX"); - result = mkstemp(tempFileName); - if (result >= 0) { - close(result); - } -#endif - outfile = fopen(tempFileName, "wb"); - if (outfile == NULL) { - Tcl_AppendResult(interp, "error open output file", (char *) NULL); -- return TCL_ERROR; -- } ++ if (handle.state != IMG_STRING) { ++ dataPtr = attemptckalloc((handle.length*3)/4 + 2); ++ if (dataPtr == NULL) { ++ Tcl_AppendResult (interp, "Unable to allocate memory for image data.", (char *) NULL); + return TCL_ERROR; + } - - count = tkimg_Read2(&handle, buffer, sizeof (buffer)); - while (count == sizeof (buffer)) { - fwrite(buffer, 1, sizeof (buffer), outfile); - count = tkimg_Read2(&handle, buffer, sizeof (buffer)); - } - if (count + 1 > 1){ - fwrite(buffer, 1, count, outfile); - } - fclose(outfile); - tif = TIFFOpen(tempFileName, "r"); -- } -+ if (handle.state != IMG_STRING) { -+ dataPtr = ckalloc((handle.length*3)/4 + 2); + handle.length = tkimg_Read2(&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); if (tif != NULL) { -@@ -514,7 +423,4 @@ +@@ -522,7 +431,4 @@ result = TCL_ERROR; } - if (tempFileName) { - unlink(tempFileName); - } if (result == TCL_ERROR) { - Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -540,68 +446,13 @@ + if (strlen (Tcl_GetStringResult(interp)) == 0 && errorMessage) { +@@ -550,68 +456,13 @@ ) { TIFF *tif; - char *dir, *tempFileName = NULL, tempFileNameBuffer[1024]; - int count, result; ++ int result; + tkimg_MFile handle; - char buffer[4096]; -- + - if (TIFFClientOpen) { -- tkimg_MFile handle; - handle.data = (char *) chan; - handle.state = IMG_CHAN; - tif = TIFFClientOpen(fileName, "r", (thandle_t) &handle, - readMFile, writeDummy, seekMFile, closeDummy, - sizeMFile, mapDummy, unMapDummy); - } else { - FILE *outfile; -#ifdef WIN32 - char dirBuffer[512]; - HANDLE h; - - dir = dirBuffer; - strcpy(dir, "."); - GetTempPathA(sizeof (dirBuffer), dir); - tempFileName = tempFileNameBuffer; - tempFileName[0] = '\0'; - GetTempFileNameA(dir, "tki", 0, tempFileName); - h = CreateFileA(tempFileName, GENERIC_READ|GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY, NULL); - if (h != INVALID_HANDLE_VALUE) { - CloseHandle(h); - } -#else - dir = getenv("TMPDIR"); - tempFileName = tempFileNameBuffer; - if (dir) { - strcpy(tempFileName, dir); - } else { -#ifdef P_tmpdir - strcpy(tempFileName, P_tmpdir); -#else - strcpy(tempFileName, "/tmp"); -#endif - } - strcat(tempFileName, "/tkimgXXXXXX"); - result = mkstemp(tempFileName); - if (result >= 0) { - close(result); - } -#endif - outfile = fopen(tempFileName, "wb"); - if (outfile == NULL) { - Tcl_AppendResult(interp, "error open output file", (char *) NULL); - return TCL_ERROR; - } -+ int result; - +- - count = Tcl_Read(chan, buffer, sizeof (buffer)); - while (count == sizeof (buffer)) { - fwrite(buffer, 1, sizeof (buffer), outfile); - count = Tcl_Read(chan, buffer, sizeof (buffer)); - } - if (count>0){ - fwrite(buffer, 1, count, outfile); - } - fclose(outfile); -+ tkimg_MFile handle; -+ handle.data = (char *) chan; +- +- tif = TIFFOpen(tempFileName, "r"); +- } ++ handle.data = (void *) chan; + handle.state = IMG_CHAN; + tif = TIFFClientOpen(fileName, "r", (thandle_t) &handle, + readMFile, writeDummy, seekMFile, closeDummy, + sizeMFile, mapDummy, unMapDummy); - -- tif = TIFFOpen(tempFileName, "r"); -- } ++ if (tif) { result = CommonRead(interp, tif, format, imageHandle, -@@ -610,7 +461,4 @@ +@@ -621,7 +472,4 @@ result = TCL_ERROR; } - if (tempFileName) { - unlink(tempFileName); - } if (result == TCL_ERROR) { - Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -678,5 +526,5 @@ - npixels = w * h; - -- raster = (uint32*) TkimgTIFFmalloc(npixels * sizeof (uint32)); -+ raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32)); - block.width = w; - block.height = h; -@@ -689,5 +537,5 @@ - - if (!TIFFReadRGBAImage(tif, w, h, raster, 0) || errorMessage) { + if (strlen (Tcl_GetStringResult(interp)) == 0 && errorMessage) { +@@ -710,5 +558,5 @@ + errorMessage = NULL; + } - TkimgTIFFfree (raster); + _TIFFfree (raster); - if (errorMessage) { - Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -705,5 +553,5 @@ + return TCL_ERROR; + } +@@ -722,5 +570,5 @@ } - TkimgTIFFfree (raster); + _TIFFfree (raster); - TIFFClose(tif); - return result; -@@ -718,5 +566,4 @@ + return TCL_OK; + } +@@ -734,5 +582,4 @@ int result, comp; tkimg_MFile handle; - char *dir, *tempFileName = NULL, tempFileNameBuffer[256]; Tcl_DString dstring; const char *mode; -@@ -728,46 +575,9 @@ +@@ -744,58 +591,14 @@ } - if (TIFFClientOpen) { - Tcl_DStringInit(&dstring); - tkimg_WriteInit(&dstring, &handle); - tif = TIFFClientOpen("inline data", mode, (thandle_t) &handle, - readString, writeString, seekString, closeDummy, - sizeString, mapDummy, unMapDummy); - } else { -#ifdef WIN32 - char dirBuffer[512]; - HANDLE h; -- ++ Tcl_DStringInit(&dstring); ++ tkimg_WriteInit(&dstring, &handle); ++ tif = TIFFClientOpen("inline data", mode, (thandle_t) &handle, ++ readString, writeString, seekString, closeDummy, ++ sizeString, mapDummy, unMapDummy); + - dir = dirBuffer; - strcpy(dir, "."); - GetTempPathA(sizeof (dirBuffer), dir); - tempFileName = tempFileNameBuffer; - tempFileName[0] = '\0'; - GetTempFileNameA(dir, "tki", 0, tempFileName); - h = CreateFileA(tempFileName, GENERIC_READ|GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY, NULL); - if (h != INVALID_HANDLE_VALUE) { - CloseHandle(h); - } -#else - dir = getenv("TMPDIR"); - tempFileName = tempFileNameBuffer; - if (dir) { - strcpy(tempFileName, dir); - } else { -#ifdef P_tmpdir - strcpy(tempFileName, P_tmpdir); -#else - strcpy(tempFileName, "/tmp"); -#endif - } - strcat(tempFileName, "/tkimgXXXXXX"); - result = mkstemp(tempFileName); - if (result >= 0) { - close(result); - } -#endif - tif = TIFFOpen(tempFileName,mode); - } -+ Tcl_DStringInit(&dstring); -+ tkimg_WriteInit(&dstring, &handle); -+ tif = TIFFClientOpen("inline data", mode, (thandle_t) &handle, -+ readString, writeString, seekString, closeDummy, -+ sizeString, mapDummy, unMapDummy); - +- result = CommonWrite(interp, tif, comp, blockPtr); -@@ -775,11 +585,4 @@ + TIFFClose(tif); if (result != TCL_OK) { - if (tempFileName) { -#ifdef WIN32 - DeleteFileA(tempFileName); -#else - unlink(tempFileName); -#endif - } Tcl_AppendResult(interp, errorMessage, (char *) NULL); ckfree(errorMessage); -@@ -788,43 +591,13 @@ +@@ -804,43 +607,13 @@ } - if (tempFileName) { - FILE *infile; - char buffer[4096]; - - infile = fopen(tempFileName, "rb"); - if (infile == NULL) { - Tcl_AppendResult(interp, "error open input file", (char *) NULL); - return TCL_ERROR; - } - tkimg_WriteInit(&data, &handle); - - result = fread(buffer, 1, sizeof (buffer), infile); - while (result > 0) { - tkimg_Write2(&handle, buffer, result); - result = fread(buffer, 1, sizeof (buffer), infile); - } - if (ferror(infile)) { - Tcl_AppendResult(interp, "error reading input file", (char *) NULL); - result = TCL_ERROR; - } - fclose(infile); -#ifdef WIN32 - DeleteFileA(tempFileName); -#else - unlink(tempFileName); -#endif - } else { - int length = handle.length; - tkimg_WriteInit(&data, &handle); - tkimg_Write2(&handle, Tcl_DStringValue(&dstring), length); - Tcl_DStringFree(&dstring); - } + int length = handle.length; + tkimg_WriteInit(&data, &handle); + tkimg_Write2(&handle, Tcl_DStringValue(&dstring), length); + Tcl_DStringFree(&dstring); + tkimg_Putc(IMG_DONE, &handle); - if (result == TCL_OK) { - Tcl_DStringResult(interp, &data); - } else { - Tcl_DStringFree(&data); - } - return result; + Tcl_DStringResult(interp, &data); + + return TCL_OK; } -@@ -1043,9 +816,5 @@ +@@ -1063,9 +836,5 @@ TkimgTIFFfree(tdata_t data) { - if (_TIFFfree) { - _TIFFfree(data); - } else { - ckfree((char *) data); - } + _TIFFfree(data); } -@@ -1053,9 +822,5 @@ +@@ -1073,9 +842,5 @@ TkimgTIFFmalloc(tsize_t size) { - if (_TIFFmalloc) { - return _TIFFmalloc(size); - } else { - return attemptckalloc(size); - } + return _TIFFmalloc(size); } -@@ -1065,8 +830,4 @@ +@@ -1085,8 +850,4 @@ tsize_t size ) { - if (_TIFFrealloc) { - return _TIFFrealloc(data, size); - } else { - return attemptckrealloc(data, size); - } + return _TIFFrealloc(data, size); } diff --git a/graphics/libimg/pkg-plist b/graphics/libimg/pkg-plist index 1eb929fd1ee3..5c3d1775c480 100644 --- a/graphics/libimg/pkg-plist +++ b/graphics/libimg/pkg-plist @@ -1,54 +1,55 @@ %%EXAMPLES%%%%EXAMPLESDIR%%/demo.tcl %%EXAMPLES%%%%EXAMPLESDIR%%/tkv.tcl %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/de.msg %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/el.msg %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/en.msg %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/es.msg %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/fr.msg %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/ja.msg %%EXAMPLES%%%%EXAMPLESDIR%%/msgs/nl.msg man/mann/img-bmp.n.gz man/mann/img-dted.n.gz man/mann/img-gif.n.gz +man/mann/img-flir.n.gz man/mann/img-ico.n.gz man/mann/img-jpeg.n.gz man/mann/img-pcx.n.gz man/mann/img-pixmap.n.gz man/mann/img-png.n.gz man/mann/img-ppm.n.gz man/mann/img-ps.n.gz man/mann/img-raw.n.gz man/mann/img-sgi.n.gz man/mann/img-sun.n.gz man/mann/img-tga.n.gz man/mann/img-tiff.n.gz man/mann/img-window.n.gz man/mann/img-xbm.n.gz man/mann/img-xpm.n.gz 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 lib/Img/libtkimgpcx%%PORTVERSION%%.so lib/Img/libtkimgpixmap%%PORTVERSION%%.so lib/Img/libtkimgpng%%PORTVERSION%%.so lib/Img/libtkimgppm%%PORTVERSION%%.so lib/Img/libtkimgps%%PORTVERSION%%.so lib/Img/libtkimgraw%%PORTVERSION%%.so lib/Img/libtkimgsgi%%PORTVERSION%%.so lib/Img/libtkimgstub%%PORTVERSION%%.a lib/Img/libtkimgsun%%PORTVERSION%%.so lib/Img/libtkimgtga%%PORTVERSION%%.so lib/Img/libtkimgxbm%%PORTVERSION%%.so lib/Img/libtkimgtiff%%PORTVERSION%%.so lib/Img/libtkimgwindow%%PORTVERSION%%.so lib/Img/libtkimgxpm%%PORTVERSION%%.so lib/Img/pkgIndex.tcl lib/Img/tkimgConfig.sh @comment include/tkimg.h @comment include/tkimgDecls.h @comment lib/tkimgConfig.sh