From nobody Mon Jan 8 17:23:54 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T81BL3XlBz569jJ; Mon, 8 Jan 2024 17:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T81BL2sRTz4lwX; Mon, 8 Jan 2024 17:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704734634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PSzXG7F0BdI8SXXOHrQlFkTY1YVaTzBFwb2f26yZ7Cs=; b=BEj39Fm1zkF5LE5FZQOpReVMjGaG6zwTlgCm7+L+cyr3RbxBsp13VY9tonm41JOVG4f1/1 9/5vbo6TfScc9rRvoV/FD9G3PAX/HTo54g9tyT2KZypi9FNQ863E1VjflOqwgEtlgdNllk yxr26xIYiOhuNVWNHbWOl5fMSAIrXKcXvXohPMFeqefqI9y+E4KhdBB2Bnqa+ns2LvALcr kuhwqbPGb+En/Ztu8xTKU60qLkPnwzzQw7bmzFd4sW+YgNHziwO7SuEVMXvoiTVbQkI+CZ C/Bg04+/r5/5VuhsF/aAhMp9e0BLWRcDZXUyFYlVt87ngCnFkP10Gffuzoqkjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704734634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PSzXG7F0BdI8SXXOHrQlFkTY1YVaTzBFwb2f26yZ7Cs=; b=YpUnxmddcP9zGDEUAr/itmJh/mRArzyxm12HFqYDNQDP8a8aHICh11X0gwjpjG674R1iNA 29XYWZvv7naWkqCLauacKNoPcuaQWn4mkvvyEkQOossFB2oEacY8g6lWSJFF0ROD3uttWe iF2gXro4ic+pJctMAo8XIuoomjlJQaeQO3yosSiLVFxPMY2mM2/JiQWfbWw0tFBS4hrK7g OMcWDMOZLnGydnZycTcLVfRjNl3RdWdsRbaMub7zNdYclBgh4fJipwxl/jaDHTAq4LvLPl DIVxoJERGx5YyujDclSPaPt8b/5osqlIdj3Qm1vSHpxJF70X6lJ0E8F8fAZflQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704734634; a=rsa-sha256; cv=none; b=kf2IuHMh8PJNhxqoFV/Z7XQ64X/Sui2VA/bHqpnBsAmYzXcvXhCIQaE0enYe0PZP+c1g0z a2XP82m5DVAW6I0+euMe7HcRvUslHg8tH6THc4rSz/6MFULsJtjq/IIAUrNXY+ldrMi8IN i40swVs17hASJt3a2w/u8W+G9Dl6Yv+KdZd4b75dRv9U61X1C3kmDrafnXBWzkKu1ec8Pb CPCsJVmAGiJG1kz+TZJ1HnG4AWvBnZ1vjGBqMwmBLbTW9DrqFniNAmad6XsqUb3DLD4ICk z81LRo2DJpIrp6jpHEKebNnat0pRo67iNCPHUmPUVw+U1gIK9XtVGxVSjn0TDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T81BL1wZdzGSV; Mon, 8 Jan 2024 17:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 408HNsav004682; Mon, 8 Jan 2024 17:23:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 408HNs14004679; Mon, 8 Jan 2024 17:23:54 GMT (envelope-from git) Date: Mon, 8 Jan 2024 17:23:54 GMT Message-Id: <202401081723.408HNs14004679@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mikhail Teterin Subject: git: 5f0d96d150d5 - main - graphics/libimg: upgrade from 1.4.12 to 1.4.16 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f0d96d150d59f1c53f7e949fb5eec86e6e6a138 Auto-Submitted: auto-generated The branch main has been updated by mi: URL: https://cgit.FreeBSD.org/ports/commit/?id=5f0d96d150d59f1c53f7e949fb5eec86e6e6a138 commit 5f0d96d150d59f1c53f7e949fb5eec86e6e6a138 Author: Mikhail Teterin AuthorDate: 2024-01-08 17:18:24 +0000 Commit: Mikhail Teterin CommitDate: 2024-01-08 17:23:50 +0000 graphics/libimg: upgrade from 1.4.12 to 1.4.16 Changes: https://sourceforge.net/p/tkimg/code/HEAD/tree/tags/1.4.16/ANNOUNCE Prodded by: portscout --- graphics/libimg/Makefile | 5 +- graphics/libimg/distinfo | 6 +-- graphics/libimg/files/patch-jpeg | 27 ++++++---- graphics/libimg/files/patch-tiff | 110 +++++++++++++++++++-------------------- graphics/libimg/pkg-plist | 1 + 5 files changed, 77 insertions(+), 72 deletions(-) diff --git a/graphics/libimg/Makefile b/graphics/libimg/Makefile index 84caec71ce44..d845377860c7 100644 --- a/graphics/libimg/Makefile +++ b/graphics/libimg/Makefile @@ -1,13 +1,12 @@ 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 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,5 +1,5 @@ ---- 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 @@ -11,17 +11,18 @@ +#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 @@ - @@ -50,18 +51,22 @@ - /* 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; @@ -110,7 +115,7 @@ - /* *---------------------------------------------------------------------- -@@ -866,8 +783,6 @@ +@@ -873,8 +786,6 @@ case 2: { #ifdef USE_JPEGTCL_STUBS - if (jpeg_simple_progression != NULL) { 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 @@ -7,8 +7,8 @@ + 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" @@ -84,7 +84,7 @@ + return TCL_OK; } -@@ -435,8 +399,6 @@ +@@ -438,9 +402,7 @@ ) { TIFF *tif; - char *dir, *tempFileName = NULL, tempFileNameBuffer[1024]; @@ -92,14 +92,20 @@ + 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; - } @@ -145,8 +151,12 @@ - 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)) { @@ -158,35 +168,33 @@ - } - 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, @@ -232,8 +240,7 @@ - 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); @@ -243,53 +250,46 @@ - 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) { @@ -302,7 +302,12 @@ -#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); @@ -334,14 +339,9 @@ -#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) { @@ -353,7 +353,7 @@ - } Tcl_AppendResult(interp, errorMessage, (char *) NULL); ckfree(errorMessage); -@@ -788,43 +591,13 @@ +@@ -804,43 +607,13 @@ } - if (tempFileName) { @@ -405,7 +405,7 @@ + return TCL_OK; } -@@ -1043,9 +816,5 @@ +@@ -1063,9 +836,5 @@ TkimgTIFFfree(tdata_t data) { - if (_TIFFfree) { @@ -416,7 +416,7 @@ + _TIFFfree(data); } -@@ -1053,9 +822,5 @@ +@@ -1073,9 +842,5 @@ TkimgTIFFmalloc(tsize_t size) { - if (_TIFFmalloc) { @@ -427,7 +427,7 @@ + return _TIFFmalloc(size); } -@@ -1065,8 +830,4 @@ +@@ -1085,8 +850,4 @@ tsize_t size ) { - if (_TIFFrealloc) { 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 @@ -10,6 +10,7 @@ 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