https://bugs.gentoo.org/953503
https://gitlab.gnome.org/GNOME/gegl/-/issues/418
https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/232

From 7f5d9e8ae2ebf0d8b4f4c4209609eb82443a5b5a Mon Sep 17 00:00:00 2001
From: Alfred Wingate <parona@protonmail.com>
Date: Mon, 6 Oct 2025 02:12:08 +0300
Subject: [PATCH] gif-load: don't embed libnsgif directly

This means building against system libnsgif is possible. These are all the
changes needed because the subproject was already properly setup, just
partly unused.

assert.h header was implicitly included from gif.c and lzw.c.

Fixes: https://gitlab.gnome.org/GNOME/gegl/-/issues/418
Signed-off-by: Alfred Wingate <parona@protonmail.com>
--- a/operations/external/gif-load.c
+++ b/operations/external/gif-load.c
@@ -49,10 +49,8 @@ property_int (frame_delay, _("frame-delay"), 100)
 #include <gegl-op.h>
 #include <gegl-gio-private.h>
 
-/* since libnsgif is nice and simple we directly embed it in the .so  */
-#include "subprojects/libnsgif/nsgif.h"
-#include "subprojects/libnsgif/gif.c"
-#include "subprojects/libnsgif/lzw.c"
+#include <assert.h>
+#include <nsgif.h>
 
 #define IO_BUFFER_SIZE 4096
 
-- 
2.51.0

