git: 7c2aa15960bf - 2026Q4 - graphics/imv: Update to 5.0.1

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Sat, 17 Oct 2026 11:10:51 UTC
The branch 2026Q4 has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7c2aa15960bfc3924c8f794d35c3c8bb706fd25e

commit 7c2aa15960bfc3924c8f794d35c3c8bb706fd25e
Author:     Son Phan Trung <phantrungson17@gmail.com>
AuthorDate: 2026-10-15 20:13:54 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-10-17 11:09:51 +0000

    graphics/imv: Update to 5.0.1
    
    - FreeImage backend was removed upstream; BMP and WebP support
      now come from the new NSBMP and WEBP options (on by default)
    - Add new options: FF (farbfeld), JXL (on by default), NSBMP, WEBP
    - NSGIF is no longer broken
    - Disable the QOI backend (not ported)
    - Drop ICU linking patch, fixed upstream (now uses icu-uc)
    - Rename the sample config in post-install instead of patching meson.build
    
    Changelog:      https://git.sr.ht/~exec64/imv/tree/master/item/CHANGELOG
    PR:             299377
    MFH:            2026Q4
    (cherry picked from commit a5c9087871ed544894206a5347be43d491fe1fc3)
---
 graphics/imv/Makefile                  | 35 +++++++++++++++++++++++++---------
 graphics/imv/distinfo                  |  6 +++---
 graphics/imv/files/patch-doc_imv.1.txt |  4 ++--
 graphics/imv/files/patch-meson.build   | 32 -------------------------------
 graphics/imv/files/patch-src_imv.c     |  4 ++--
 graphics/imv/pkg-plist                 |  4 ++--
 6 files changed, 35 insertions(+), 50 deletions(-)

diff --git a/graphics/imv/Makefile b/graphics/imv/Makefile
index b3937572ede8..33122bfd6224 100644
--- a/graphics/imv/Makefile
+++ b/graphics/imv/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	imv
 DISTVERSIONPREFIX=	v
-DISTVERSION=	4.5.0
-PORTREVISION=	1
+DISTVERSION=	5.0.1
 CATEGORIES=	graphics
 MASTER_SITES=	https://git.sr.ht/~exec64/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
 
@@ -15,6 +14,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 BUILD_DEPENDS=	a2x:textproc/asciidoc
 LIB_DEPENDS=	libicuuc.so:devel/icu \
 		libinih.so:devel/inih \
+		liblcms2.so:graphics/lcms2 \
 		libxkbcommon.so:x11/libxkbcommon
 RUN_DEPENDS=	bash:shells/bash
 
@@ -24,26 +24,28 @@ USE_GNOME=	cairo pango
 
 CONFLICTS_INSTALL=	renameutils
 
-OPTIONS_DEFINE=		FREEIMAGE HEIF JPEG NSGIF PNG SVG TEST TIFF
-OPTIONS_DEFAULT=	ALL FREEIMAGE HEIF JPEG PNG SVG TIFF
+OPTIONS_DEFINE=		FF HEIF JPEG JXL NSBMP NSGIF PNG SVG TEST TIFF WEBP
+OPTIONS_DEFAULT=	ALL HEIF JPEG JXL NSBMP NSGIF PNG SVG TIFF WEBP
 OPTIONS_SINGLE=		WIN
 OPTIONS_SINGLE_WIN=	ALL WAYLAND X11
 OPTIONS_SUB=		yes
 
 ALL_DESC=	Both Wayland and X11 support
-FREEIMAGE_DESC=	FreeImage backend (support for many image formats)
+FF_DESC=	Farbfeld support
+NSBMP_DESC=	NetSurf BMP backend (support for BMP)
 NSGIF_DESC=	NetSurf GIF backend (support for animated GIF)
 WIN_DESC=	Windowing system
 
 ALL_CATEGORIES=		wayland
-ALL_LIB_DEPENDS+=	libwayland-client.so:graphics/wayland
+ALL_BUILD_DEPENDS=	wayland-protocols>0:graphics/wayland-protocols
+ALL_LIB_DEPENDS=	libwayland-client.so:graphics/wayland
 ALL_USES=		xorg
 ALL_USE=		GL=glu \
 			XORG=x11,xcb
 ALL_MESON_ON=		-Dwindows=all
 
-FREEIMAGE_LIB_DEPENDS=		libfreeimage.so:graphics/freeimage
-FREEIMAGE_MESON_ENABLED=	freeimage
+FF_RUN_DEPENDS=		2ff:graphics/farbfeld
+FF_MESON_ENABLED=	farbfeld
 
 HEIF_LIB_DEPENDS=	libheif.so:graphics/libheif
 HEIF_MESON_ENABLED=	libheif
@@ -51,7 +53,12 @@ HEIF_MESON_ENABLED=	libheif
 JPEG_LIB_DEPENDS=	libturbojpeg.so:graphics/libjpeg-turbo
 JPEG_MESON_ENABLED=	libjpeg
 
-NSGIF_BROKEN=		fails to build with libnsgif 1.0.0, see also https://lists.sr.ht/~exec64/imv-devel/%3CCAFDf7UKQCAO5VXqykRCnpHG6u0owdXRnk5kt0S3b-aTkpuF66Q%40mail.gmail.com%3E
+JXL_LIB_DEPENDS=	libjxl.so:graphics/libjxl
+JXL_MESON_ENABLED=	libjxl
+
+NSBMP_LIB_DEPENDS=	libnsbmp.so:graphics/libnsbmp
+NSBMP_MESON_ENABLED=	libnsbmp
+
 NSGIF_LIB_DEPENDS=	libnsgif.so:graphics/libnsgif
 NSGIF_MESON_ENABLED=	libnsgif
 
@@ -68,18 +75,28 @@ TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
 TIFF_MESON_ENABLED=	libtiff
 
 WAYLAND_CATEGORIES=	wayland
+WAYLAND_BUILD_DEPENDS=	wayland-protocols>0:graphics/wayland-protocols
 WAYLAND_LIB_DEPENDS=	libwayland-client.so:graphics/wayland \
 			libwayland-egl.so:graphics/wayland
 WAYLAND_MESON_ON=	-Dwindows=wayland
 
+WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
+WEBP_MESON_ENABLED=	libwebp
+
 X11_USES=	xorg
 X11_USE=	GL=glu \
 		XORG=x11,xcb
 X11_MESON_ON=	-Dwindows=x11
 
+# https://github.com/phoboslab/qoi is not yet ported
+MESON_ARGS+=	-Dqoi=disabled
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' \
 		${WRKSRC}/src/imv.c \
 		${WRKSRC}/doc/imv.1.txt
 
+post-install:
+	${MV} ${STAGEDIR}${PREFIX}/etc/imv_config ${STAGEDIR}${PREFIX}/etc/imv_config.sample
+
 .include <bsd.port.mk>
diff --git a/graphics/imv/distinfo b/graphics/imv/distinfo
index c015fb2c7778..6f79d96c6cc5 100644
--- a/graphics/imv/distinfo
+++ b/graphics/imv/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1735079239
-SHA256 (imv-v4.5.0.tar.gz) = 3b11991a86942d757830015033b1c3a3cc915be2f0c20fee7bc7493be560cbcb
-SIZE (imv-v4.5.0.tar.gz) = 82559
+TIMESTAMP = 1791962161
+SHA256 (imv-v5.0.1.tar.gz) = 8949c1df4b933b1d324e02ce49f1834a4b73dd25fa8103579e0ed105149e080e
+SIZE (imv-v5.0.1.tar.gz) = 72953
diff --git a/graphics/imv/files/patch-doc_imv.1.txt b/graphics/imv/files/patch-doc_imv.1.txt
index 448979dea168..c7f9af317a49 100644
--- a/graphics/imv/files/patch-doc_imv.1.txt
+++ b/graphics/imv/files/patch-doc_imv.1.txt
@@ -1,6 +1,6 @@
---- doc/imv.1.txt.orig	2023-01-18 22:20:52 UTC
+--- doc/imv.1.txt.orig	2025-11-27 20:03:44 UTC
 +++ doc/imv.1.txt
-@@ -265,10 +265,9 @@ - $HOME/.imv/config
+@@ -274,10 +274,9 @@ - $HOME/.imv/config
  - $HOME/.config/imv/config
  - $HOME/.imv_config
  - $HOME/.imv/config
diff --git a/graphics/imv/files/patch-meson.build b/graphics/imv/files/patch-meson.build
deleted file mode 100644
index d129ba66df53..000000000000
--- a/graphics/imv/files/patch-meson.build
+++ /dev/null
@@ -1,32 +0,0 @@
-imv: directly link against everything that it uses, needed for ICU 76
-From NetBSD pkgsrc:
-http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/graphics/imv/patches/patch-meson.build?rev=1.2;content-type=text%2Fplain
-
---- meson.build.orig	2024-02-20 22:30:06 UTC
-+++ meson.build
-@@ -42,7 +42,7 @@ if _unicode == 'icu'
- 
- _unicode = get_option('unicode')
- if _unicode == 'icu'
--  unicode_lib = dependency('icu-io')
-+  unicode_lib = [dependency('icu-io'), dependency('icu-uc')]
-   add_project_arguments('-DIMV_USE_ICU', language: 'c')
- elif _unicode == 'grapheme'
-   unicode_lib = cc.find_library('grapheme')
-@@ -120,7 +120,7 @@ foreach backend : [
- 
- enabled_backends = []
- foreach backend : [
--  ['freeimage', 'library', 'freeimage'],
-+  ['freeimage', 'dependency', 'freeimage', []],
-   ['libtiff', 'dependency', 'libtiff-4', []],
-   ['libpng', 'dependency', 'libpng', []],
-   ['libjpeg', 'dependency', 'libturbojpeg', []],
-@@ -205,6 +205,7 @@ install_data(
-   files('files/imv_config'),
-   install_dir: get_option('sysconfdir'),
-   install_mode: 'rw-r--r--',
-+  rename: 'imv_config.sample',
- )
- 
- dep_cmocka = dependency('cmocka', required: get_option('test'))
diff --git a/graphics/imv/files/patch-src_imv.c b/graphics/imv/files/patch-src_imv.c
index 5f30caad1c1a..42b9ea17661c 100644
--- a/graphics/imv/files/patch-src_imv.c
+++ b/graphics/imv/files/patch-src_imv.c
@@ -1,6 +1,6 @@
---- src/imv.c.orig	2024-01-06 21:47:38 UTC
+--- src/imv.c.orig	2025-11-27 20:03:44 UTC
 +++ src/imv.c
-@@ -1425,8 +1425,7 @@ static char *get_config_path(void)
+@@ -1476,8 +1476,7 @@ static char *get_config_path(void)
      "$HOME/.config/imv/config",
      "$HOME/.imv_config",
      "$HOME/.imv/config",
diff --git a/graphics/imv/pkg-plist b/graphics/imv/pkg-plist
index 47fd27f95838..6df667a35f5f 100644
--- a/graphics/imv/pkg-plist
+++ b/graphics/imv/pkg-plist
@@ -4,9 +4,9 @@ bin/imv-msg
 %%ALL%%bin/imv-wayland
 %%ALL%%bin/imv-x11
 @sample etc/imv_config.sample
+share/applications/imv-dir.desktop
+share/applications/imv.desktop
 share/man/man1/imv-dir.1.gz
 share/man/man1/imv-msg.1.gz
 share/man/man1/imv.1.gz
 share/man/man5/imv.5.gz
-share/applications/imv-dir.desktop
-share/applications/imv.desktop