public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 2/3] package/kodi: allow build with giflib 6.x
Date: Sun, 15 Mar 2026 14:11:06 +0100	[thread overview]
Message-ID: <20260315131107.3959487-2-bernd@kuhls.net> (raw)
In-Reply-To: <20260315131107.3959487-1-bernd@kuhls.net>

These patches fix build errors which would be introduced by the upcoming
bump of giflib to 6.1.2.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 ...rePacker-allow-build-with-giflib-6.x.patch | 71 +++++++++++++++++++
 ...rePacker-allow-build-with-giflib-6.x.patch | 71 +++++++++++++++++++
 2 files changed, 142 insertions(+)
 create mode 100644 package/kodi-texturepacker/0001-TexturePacker-allow-build-with-giflib-6.x.patch
 create mode 100644 package/kodi/0002-TexturePacker-allow-build-with-giflib-6.x.patch

diff --git a/package/kodi-texturepacker/0001-TexturePacker-allow-build-with-giflib-6.x.patch b/package/kodi-texturepacker/0001-TexturePacker-allow-build-with-giflib-6.x.patch
new file mode 100644
index 0000000000..5a23237375
--- /dev/null
+++ b/package/kodi-texturepacker/0001-TexturePacker-allow-build-with-giflib-6.x.patch
@@ -0,0 +1,71 @@
+From 29492cbd20d4c90a9c00a30ab525d4d0e81a968b Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi@heitbaum.com>
+Date: Sun, 15 Mar 2026 11:38:16 +0000
+Subject: [PATCH] TexturePacker: allow build with giflib 6.x
+
+Current #if clauses are written with a maximum of giflib 5 written in,
+update the to >= to allow for newer versiosn of the giflib api.
+
+Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
+
+Upstream: https://github.com/xbmc/xbmc/pull/28016
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ .../native/TexturePacker/src/decoder/GifHelper.cpp        | 8 ++++----
+ .../depends/native/TexturePacker/src/decoder/GifHelper.h  | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+index eb513134b3eb8..b216ecbcef7fa 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
++++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+@@ -52,7 +52,7 @@ GifHelper::~GifHelper()
+ bool GifHelper::Open(GifFileType*& gif, void *dataPtr, InputFunc readFunc)
+ {
+   int err = 0;
+-#if GIFLIB_MAJOR == 5
++#if GIFLIB_MAJOR >= 5
+   gif = DGifOpen(dataPtr, readFunc, &err);
+ #else
+   gif = DGifOpen(dataPtr, readFunc);
+@@ -73,7 +73,7 @@ void GifHelper::Close(GifFileType* gif)
+ {
+   int err = 0;
+   int reason = 0;
+-#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1
++#if (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || GIFLIB_MAJOR >= 6
+   err = DGifCloseFile(gif, &reason);
+ #else
+   err = DGifCloseFile(gif);
+@@ -181,7 +181,7 @@ bool GifHelper::Slurp(GifFileType* gif)
+   if (DGifSlurp(gif) == GIF_ERROR)
+   {
+     int reason = 0;
+-#if GIFLIB_MAJOR == 5
++#if GIFLIB_MAJOR >= 5
+     reason = gif->Error;
+ #else
+     reason = GifLastError();
+@@ -246,7 +246,7 @@ bool GifHelper::GcbToFrame(GifFrame &frame, unsigned int imgIdx)
+ 
+   if (m_gif->ImageCount > 0)
+   {
+-#if GIFLIB_MAJOR == 5
++#if GIFLIB_MAJOR >= 5
+     GraphicsControlBlock gcb;
+     if (DGifSavedExtensionToGCB(m_gif, imgIdx, &gcb))
+     {
+diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.h b/tools/depends/native/TexturePacker/src/decoder/GifHelper.h
+index 6124b69e46296..ce5dca3394b41 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.h
++++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.h
+@@ -128,7 +128,7 @@ class GifHelper
+   bool PrepareTemplate(GifFrame &frame);
+   void Release();
+ 
+-#if GIFLIB_MAJOR != 5
++#if GIFLIB_MAJOR < 5
+   /*
+   taken from giflib 5.1.0
+   */
diff --git a/package/kodi/0002-TexturePacker-allow-build-with-giflib-6.x.patch b/package/kodi/0002-TexturePacker-allow-build-with-giflib-6.x.patch
new file mode 100644
index 0000000000..5a23237375
--- /dev/null
+++ b/package/kodi/0002-TexturePacker-allow-build-with-giflib-6.x.patch
@@ -0,0 +1,71 @@
+From 29492cbd20d4c90a9c00a30ab525d4d0e81a968b Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi@heitbaum.com>
+Date: Sun, 15 Mar 2026 11:38:16 +0000
+Subject: [PATCH] TexturePacker: allow build with giflib 6.x
+
+Current #if clauses are written with a maximum of giflib 5 written in,
+update the to >= to allow for newer versiosn of the giflib api.
+
+Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
+
+Upstream: https://github.com/xbmc/xbmc/pull/28016
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ .../native/TexturePacker/src/decoder/GifHelper.cpp        | 8 ++++----
+ .../depends/native/TexturePacker/src/decoder/GifHelper.h  | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+index eb513134b3eb8..b216ecbcef7fa 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
++++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+@@ -52,7 +52,7 @@ GifHelper::~GifHelper()
+ bool GifHelper::Open(GifFileType*& gif, void *dataPtr, InputFunc readFunc)
+ {
+   int err = 0;
+-#if GIFLIB_MAJOR == 5
++#if GIFLIB_MAJOR >= 5
+   gif = DGifOpen(dataPtr, readFunc, &err);
+ #else
+   gif = DGifOpen(dataPtr, readFunc);
+@@ -73,7 +73,7 @@ void GifHelper::Close(GifFileType* gif)
+ {
+   int err = 0;
+   int reason = 0;
+-#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1
++#if (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || GIFLIB_MAJOR >= 6
+   err = DGifCloseFile(gif, &reason);
+ #else
+   err = DGifCloseFile(gif);
+@@ -181,7 +181,7 @@ bool GifHelper::Slurp(GifFileType* gif)
+   if (DGifSlurp(gif) == GIF_ERROR)
+   {
+     int reason = 0;
+-#if GIFLIB_MAJOR == 5
++#if GIFLIB_MAJOR >= 5
+     reason = gif->Error;
+ #else
+     reason = GifLastError();
+@@ -246,7 +246,7 @@ bool GifHelper::GcbToFrame(GifFrame &frame, unsigned int imgIdx)
+ 
+   if (m_gif->ImageCount > 0)
+   {
+-#if GIFLIB_MAJOR == 5
++#if GIFLIB_MAJOR >= 5
+     GraphicsControlBlock gcb;
+     if (DGifSavedExtensionToGCB(m_gif, imgIdx, &gcb))
+     {
+diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.h b/tools/depends/native/TexturePacker/src/decoder/GifHelper.h
+index 6124b69e46296..ce5dca3394b41 100644
+--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.h
++++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.h
+@@ -128,7 +128,7 @@ class GifHelper
+   bool PrepareTemplate(GifFrame &frame);
+   void Release();
+ 
+-#if GIFLIB_MAJOR != 5
++#if GIFLIB_MAJOR < 5
+   /*
+   taken from giflib 5.1.0
+   */
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-03-15 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-15 13:11 [Buildroot] [PATCH 1/3] package/giflib: update tarball URL Bernd Kuhls
2026-03-15 13:11 ` Bernd Kuhls [this message]
2026-03-15 13:11 ` [Buildroot] [PATCH 3/3] package/giflib: security bump version to 6.1.2 Bernd Kuhls
2026-04-01 18:43 ` [Buildroot] [PATCH 1/3] package/giflib: update tarball URL Julien Olivain via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260315131107.3959487-2-bernd@kuhls.net \
    --to=bernd@kuhls.net \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox