[packages/kodi] add upstream patch to fix build with giflib >= 6
atler
atler at pld-linux.org
Thu Jul 30 21:48:34 CEST 2026
commit 4aedacdd273e0a5410b2dd4f9e94bbd11955af83
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Jul 30 21:47:15 2026 +0200
add upstream patch to fix build with giflib >= 6
giflib6.patch | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
kodi.spec | 2 ++
2 files changed, 69 insertions(+)
---
diff --git a/kodi.spec b/kodi.spec
index a0e777d..8f3786e 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -81,6 +81,7 @@ Source5: http://mirrors.kodi.tv/build-deps/sources/commons-lang3-%{commons_lang_
# Source5-md5: ec63dbb802ed3e188388213f2657966b
Source6: http://mirrors.kodi.tv/build-deps/sources/commons-text-%{commons_text_ver}-bin.tar.gz
# Source6-md5: 941495aeab3bc15ab7ef60db789b51d3
+Patch0: giflib6.patch
URL: https://kodi.tv/
BuildRequires: EGL-devel
%{?with_gbm:BuildRequires: Mesa-libgbm-devel}
@@ -256,6 +257,7 @@ Pliki nagłówkowe Kodi.
%prep
%setup -q -n xbmc-%{version}-%{codename} -a1 -a2 -a3
+%patch -P0 -p1
%{__rm} -r lib/win32
diff --git a/giflib6.patch b/giflib6.patch
new file mode 100644
index 0000000..476dcfa
--- /dev/null
+++ b/giflib6.patch
@@ -0,0 +1,67 @@
+From 29492cbd20d4c90a9c00a30ab525d4d0e81a968b Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi at 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 at heitbaum.com>
+---
+ .../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
+ */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kodi.git/commitdiff/4aedacdd273e0a5410b2dd4f9e94bbd11955af83
More information about the pld-cvs-commit
mailing list