head 1.3; access; symbols pkgsrc-2026Q2:1.3.0.2 pkgsrc-2026Q2-base:1.3 pkgsrc-2026Q1:1.2.0.8 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.6 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.4 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.2 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.1.0.2 pkgsrc-2025Q1-base:1.1; locks; strict; comment @# @; 1.3 date 2026.06.04.03.43.55; author scole; state Exp; branches; next 1.2; commitid 5izPQhtuw1v8PqIG; 1.2 date 2025.05.22.17.29.13; author scole; state Exp; branches; next 1.1; commitid R37RCMwKzpbAxVVF; 1.1 date 2025.03.03.02.35.31; author scole; state Exp; branches; next ; commitid hEFrNQ5BmEHpazLF; desc @@ 1.3 log @Update to version 2.1.1 2026/03/04: Version 2.1.1 Patch release. Updated external libraries: JPEG 10.0, PNG 1.6.48, TIFF 4.7.1, ZLIB 1.3.2. Fixed FLIR and RAW parser to work correctly on big-endian systems. 2025/06/22: Version 2.1.0 Maintenance release. Updated external libraries: PNG 1.6.48. Improved RAW image handler to handle all data types correctly. Fixed bug compiling with MSYS2/Clang64. @ text @# $NetBSD: Makefile,v 1.2 2025/05/22 17:29:13 scole Exp $ PKGVERSION= 2.1.1 DISTNAME= Img-${PKGVERSION_NOREV} PKGNAME= tkimg-${PKGVERSION} CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tkimg/} MAINTAINER= pkgsrc-users@@NetBSD.org HOMEPAGE= https://tkimg.sourceforge.net/ COMMENT= Add support for several image formats to Tk LICENSE= modified-bsd .include "options.mk" WRKSRC= ${WRKDIR}/${DISTNAME} GNU_CONFIGURE= yes USE_TOOLS+= cat chmod gmake ls mkdir mv sed tclsh TEST_TARGET= tests INSTALLATION_DIRS+= lib/Img${PKGVERSION_NOREV} ${PKGMANDIR}/mann TOOL_DEPENDS+= tcllib-[0-9]*:../../devel/tcllib # xxx configure script doesn't grok NetBSD 64bit: # WARNING: 64bit support being disabled -- don't know magic for this platform .if ${MACHINE_ARCH} == "sparc64" CONFIGURE_ARGS+= --enable-64bit-vis .else . for plat in ${LP64PLATFORMS} . if ${MACHINE_PLATFORM:M${plat}} CONFIGURE_ARGS+= --enable-64bit . endif . endfor .endif # xxx shared libs GENERATE_PLIST+= (cd ${WRKSRC}/Img/exec_prefix && \ ${LS} lib/Img/* | ${SED} -e 's/lib\/Img/lib\/Img${PKGVERSION_NOREV}/'); do-install: cd ${WRKSRC} && ${GMAKE} collate ${MKDIR} ${DESTDIR}${PREFIX}/${PKGMANDIR}/mann \ ${DESTDIR}${PREFIX}/include \ ${DESTDIR}${PREFIX}/lib/Img${PKGVERSION_NOREV} ${INSTALL_DATA} ${WRKSRC}/Img/prefix/include/*.h \ ${DESTDIR}${PREFIX}/include/ ${INSTALL_DATA} ${WRKSRC}/Img/exec_prefix/lib/*.sh \ ${DESTDIR}${PREFIX}/lib/ ${INSTALL_LIB} ${WRKSRC}/Img/exec_prefix/lib/Img/* \ ${DESTDIR}${PREFIX}/lib/Img${PKGVERSION_NOREV} ${INSTALL_DATA} ${WRKSRC}/Img/exec_prefix/lib/Img/pkgIndex.tcl \ ${DESTDIR}${PREFIX}/lib/Img${PKGVERSION_NOREV} for i in ${WRKSRC}/doc/*.man; do \ dtplite -ext n -o ${DESTDIR}${PREFIX}/${PKGMANDIR}/mann nroff $$i; \ done tests: cd ${WRKSRC}/tests/demo && ${TCLSH} demo.tcl cd ${WRKSRC}/tests/visualtests && ${TCLSH} RunTests --auto --verbose .include "../../lang/tcl/buildlink3.mk" .include "../../mk/dlopen.buildlink3.mk" .include "../../x11/tk/buildlink3.mk" .include "../../mk/bsd.pkg.mk" @ 1.2 log @remove kludgy pkg vulnerability check of bundled software that exposes pkgsrc internals. I think this should be handled in some standard way, e.g., : EMBEDDED_SRCS= jpeg-9.6.0 png-1.6.44 tiff-4.7.0 zlib-1.3.1 or just ignored like it is for other packages (tcl, tk, python, ...) @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2025/03/03 02:35:31 scole Exp $ d3 1 a3 1 PKGVERSION= 2.0.1 @ 1.1 log @Update to version 2.0.1 For pkgsrc, rename pkgsrc directory from "tk-tkimg" to "tkimg" to match actual package name being built, more consistency with other tk packages, and slightly less redundancy. Note this package includes other builtin libraries (jpeg png tiff zlib) that are part of the source distribution. I don't think there is an easy way around this issue. Also, the previous version (tkimg-1.3.20080116nb5) built for me but wouldn't run on NetBSD as there seemed to be tcl errors about not being able to load the Img package (i.e., tkimg, this package) ======================== 2024/12/08: Version 2.0.1 Maintenance release. Added --with-tk8 configuration option. Improved tests handling PS and PDF format. Removed test suite afltests from distribution files, as it contains image files triggering virus alarms at VirusTotal. Top of page 2024/09/30: Version 2.0.0 Major rework. Tk 9 support. Support for Tk 9 based image metadata: Added ability to read and write metadata via the new Version3 match, read and write functions as defined in TIP 529. The following metadata information are currently supported for read and write functions: DPI, aspect. Added options -resolution, -xresolution and -yresolution to image formats BMP, JPEG, PCX, PNG and TIFF to allow writing resolution information into image files without setting the correspondig metadata explicitely. These options work with Tk 8.6, too. See chapter Image Metadata of the Img reference manual for more details. Further improvements and changes: Extended and improved test suites. Extended and improved documentation. Added Img homepage including reference manual. Removed all stuff related to Tk < 8.6. Do not support base64 encode image data anymore, as this feature made auto-detection of image formats not working correctly. Either use GIF or PNG format for base64 encoded images, which can be read by Tk or use the binary encode/decode command. Match functions for JPEG, PNG and TIFF now use related library functions instead of hand-crafted file header parsers. Format handler for PS and PDF does not hang anymore. Unified and corrected handling of format options. All format handler now support the -verbose option. Several security and stability related changes. Updated external libraries: JPEG 9f (9.6.0), PNG 1.6.44, TIFF 4.7.0, ZLIB 1.3.1. Incompatible changes: Img version 2 only works with Tcl/Tk 8.6 or newer. If using an older Tcl/Tk version, use the lastest Img 1.4 version. No base64 encoded image data support anymore. Syntax of option -resolution for format BMP has changed. All optional values specified when writing PNG files were interpreted as text metadata. Text metadata for PNG files must now be specified explicitely with new option -tag. Format GIF must be explicitely loaded with package require img::gif. The default resolution values written have been unified: Format Old Value New value ------------------------------ BMP 74 0 JPEG 0 0 PCX 300 0 PNG 0 0 TIFF 1200 0 Top of page 2024/09/30: Version 1.4.17 Maintenance release. Last release of the 1.4 branch. Works with Tk 9, but no support of image metadata. Several security and stability related changes. Top of page 2023/11/20: Version 1.4.16 Maintenance release. Several security and stability related changes. Extended test suite. Top of page 2023/08/21: Version 1.4.15 Maintenance release. Added support for Tk 8.7 and 9.0. Several security and stability related changes. Added test suite with afl fuzzed images for formats BMP, GIF, ICO, JPEG, PNG, TIFF. Added test suites bmpsuite and pngsuite. POSSIBLE INCOMPATIBILITY: Format PS must now be explicitely loaded with package require img::ps. Updated external libraries: PNG 1.6.39, TIFF 4.5.0. Top of page 2022/11/24: Version 1.4.14 Maintenance release. Added support for reading RAW images with 32-bit integer and 64-bit double pixel values. Fixed compilation of libpng for ARM Neon. Updated external libraries: JPEG 9e, PNG 1.6.38, TIFF 4.4.0, ZLIB 1.2.13. Top of page 2021/01/06: Version 1.4.13 Maintenance release. Disable support of zstd in libtiff. Top of page 2021/01/02: Version 1.4.12 Maintenance release. Corrected bug in BMP and XBM parser. Updated to latest TEA files. Corrected nmake builds. Updated external libraries: JPEG 9d, PNG 1.6.37, TIFF 4.1.0. Top of page 2020/05/06: Version 1.4.11 Maintenance release. Fixed -format window on Windows. It is now possible to get the window content, even if the window is hidden. Top of page 2020/04/27: Version 1.4.10 Maintenance release. Bug fix when reading 16-bit images (tkimg_RemapUShortValues). Updated TEA to latest version (use configure.ac instead of configure.in). Top of page 2019/03/03: Version 1.4.9 Maintenance release. Added new format flir for reading FLIR infrared images. Code cleanup for image formats supporting 16-bit or 32-bit channels. Top of page 2019/02/03: Version 1.4.8 Maintenance release. Bug fix for reading animated GIF's. Bug fix for RAW format handler regarding AutomaticGainControl. Updated external libraries: PNG 1.6.35. Top of page 2017/12/30: Version 1.4.7 Maintenance release. Added nmake files according to TIP 477: nmake build system reform Unified test scripts. Bug fix for SGI format handler. Enhanced RAW format handler with AutomaticGainControl algorithmn. Updated external libraries: PNG 1.6.28, ZLIB 1.2.11. Top of page 2016/05/29: Version 1.4.6 Maintenance release. Fixed bug #85: Tk panic on exit when pixmap images have been created. Fixed bug #87: PNG darker in 1.4.5. Changed behaviour of gamma handling: Read: If no gamma is stored in PNG file, no gamma is set. Previous behaviour was to set it to 0.45. Write: No gamma value is written to PNG file. Previous behaviour was to set it to 1.0. Added 2 new PNG format options -verbose and -gamma. Top of page 2016/04/08: Version 1.4.5 Maintenance release. Workaround for reading progressive JPEG images on Windows. Performance optimization under Windows for -format window. Updated external libraries: PNG 1.6.21, JPEG 9c. Top of page Version 1.4.4 Maintenance release. Disable jbig support, as this generally cannot be relied upon (Bug #81). Updated external libraries: PNG 1.6.19, TIFF 3.9.7. Top of page Version 1.4.3 Maintenance release. Bug fix when writing GIF images. Bug fix when reading greyscale PNG images with alpha channel. Added target install-libraries to install without documentation generation. Version 1.4.2 Maintenance release. Will build correctly on more platforms (TEA upgraded to latest version 3.9). Added format option "-alpha" to PNG reader to be compatible with Tk 8.6. Bug fixes in various parsers to avoid core dumps when specifying a wrong format option. Updated external libraries: ZLIB 1.2.8, JPEG 8d. Version 1.4.1 Maintenance release. Will build correctly on more platforms (TEA upgraded to version 3.9). Updated external libraries: ZLIB 1.2.7, JPEG 8c, PNG 1.4.12, TIFF 3.9.4. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.6 2023/11/12 13:22:19 wiz Exp $ a35 19 # tkimg has the source code of these graphic libraries embedded in the # its distribution and are heavily intertwined with its build. To # separate them out and use the pkgsrc libraries instead would require # a large amount of work, as they appear dependent on the text of the # source code itself. check vulnerabilities, may be better than nothing EMB_SRC= jpeg-9.6.0 png-1.6.44 tiff-4.7.0 zlib-1.3.1 VFILE= ${_EXTRACT_PKGVULNDIR:sh}/pkg-vulnerabilities pre-fetch: .if exists(${VFILE}) . if !empty(ALLOW_VULNERABLE_PACKAGES:tl:Mno) for i in ${EMB_SRC}; do \ ${PKG_ADMIN} audit-pkg $$i || \ { ${FAIL_MSG} "embedded source $$i has vulnerabilities. "\ "Define ALLOW_VULNERABLE_PACKAGES if necessary"; \ exit 1; } \ done . endif .endif a60 5 # xxx already in src distribution file, see note above #.include "../../devel/zlib/buildlink3.mk" #.include "../../graphics/png/buildlink3.mk" #.include "../../graphics/tiff/buildlink3.mk" #.include "../../mk/jpeg.buildlink3.mk" @