commit:     83680b6dad776c667e451fa6d48a2f097bf5d3e8
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  9 03:28:34 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Oct  9 03:46:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83680b6d

media-gfx/imv: drop IUSE=gif

The upper bound been there for a while (too long) and upstream is still
inactive. While there are a few (different) patches we could use for
libnsgif-1.0.0 support it's hard to say which one is correct and would
rather just drop support. Users that really want this can still do
MYMESONARGS and /etc/portage/patches at their own risks.

Long term this package may be headed for last-rite anyway if nobody
picks up maintenance upstream, so let's stick to simple solutions to
keep it working for now.

As noted in the ebuild comment, gif can still be viewed through
USE=freeimage but they won't be animated anymore. Not that freeimage
doesn't have its share of issues and isn't a maintenance nightmare
that should ideally be last-rited (wish a future imv upstream would
migrate to something else like media-libs/vips or others). For
comparison Arch disables both nsgif and freeimage in imv right now.

Bug: https://bugs.gentoo.org/963898
Closes: https://bugs.gentoo.org/922496
Closes: https://github.com/gentoo/gentoo/pull/44086
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../imv/files/imv-4.3.1_p20211221-animated-gif.patch  | 19 -------------------
 media-gfx/imv/imv-4.5.0.ebuild                        | 18 ++++++++----------
 2 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/media-gfx/imv/files/imv-4.3.1_p20211221-animated-gif.patch 
b/media-gfx/imv/files/imv-4.3.1_p20211221-animated-gif.patch
deleted file mode 100644
index 3b7ac34a3a80..000000000000
--- a/media-gfx/imv/files/imv-4.3.1_p20211221-animated-gif.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream priorizes freeimage in general, but nsgif supports animated
-gif while freeimage displays them as a static image. This allows setting
-USE=freeimage while still getting animations if (optional) USE=gif.
---- a/src/main.c
-+++ b/src/main.c
-@@ -20,2 +20,6 @@
- 
-+#ifdef IMV_BACKEND_LIBNSGIF
-+  imv_install_backend(imv, &imv_backend_libnsgif);
-+#endif
-+
- #ifdef IMV_BACKEND_FREEIMAGE
-@@ -39,6 +43,2 @@
- #endif
--
--#ifdef IMV_BACKEND_LIBNSGIF
--  imv_install_backend(imv, &imv_backend_libnsgif);
--#endif
- 

diff --git a/media-gfx/imv/imv-4.5.0.ebuild b/media-gfx/imv/imv-4.5.0.ebuild
index f9e9d37f7d2b..a6108c538e19 100644
--- a/media-gfx/imv/imv-4.5.0.ebuild
+++ b/media-gfx/imv/imv-4.5.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -13,12 +13,10 @@ S=${WORKDIR}/${PN}-v${PV}
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="amd64 arm64 ~riscv x86"
-IUSE="+X +freeimage gif heif icu jpeg jpegxl png svg test tiff wayland"
+IUSE="+X +freeimage heif icu jpeg jpegxl png svg test tiff wayland"
 REQUIRED_USE="|| ( X wayland )"
 RESTRICT="!test? ( test )"
 
-# bug #922496 wrt nsgif, kept for now but USE can be masked if old nsgif
-# removal is wanted (freeimage still allows non-animated gif display)
 RDEPEND="
        dev-libs/glib:2
        dev-libs/inih
@@ -31,7 +29,6 @@ RDEPEND="
                x11-libs/libxcb:=
        )
        freeimage? ( media-libs/freeimage )
-       gif? ( <media-libs/libnsgif-1:= )
        heif? ( media-libs/libheif:= )
        icu? ( dev-libs/icu:= )
        !icu? ( >=dev-libs/libgrapheme-2:= )
@@ -53,10 +50,6 @@ BDEPEND="
        wayland? ( dev-util/wayland-scanner )
 "
 
-PATCHES=(
-       "${FILESDIR}"/${PN}-4.3.1_p20211221-animated-gif.patch
-)
-
 src_prepare() {
        default
 
@@ -72,7 +65,6 @@ src_prepare() {
 src_configure() {
        local emesonargs=(
                $(meson_feature freeimage)
-               $(meson_feature gif libnsgif)
                $(meson_feature heif libheif)
                $(meson_feature jpeg libjpeg)
                $(meson_feature jpegxl libjxl)
@@ -82,6 +74,12 @@ src_configure() {
                $(meson_feature tiff libtiff)
                -Dunicode=$(usex icu{,} grapheme)
                -Dwindows=$(usex X $(usex wayland all x11) wayland)
+
+               # incompatible with >=libnsgif-1.0.0 and patches could use a
+               # proper review before using (upstream is currently inactive)
+               # See: https://github.com/gentoo/gentoo/pull/44086
+               # (note that can still view non-animated gif with USE=freeimage)
+               -Dlibnsgif=disabled
        )
 
        meson_src_configure

Reply via email to