summaryrefslogtreecommitdiffstats
path: root/redhat/libraries/libksquirrel
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/libraries/libksquirrel')
-rw-r--r--redhat/libraries/libksquirrel/libksquirrel-3.5.13.2-fix_giflib5_support.patch114
-rw-r--r--redhat/libraries/libksquirrel/libksquirrel-3.5.13.2.spec2
2 files changed, 116 insertions, 0 deletions
diff --git a/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2-fix_giflib5_support.patch b/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2-fix_giflib5_support.patch
new file mode 100644
index 000000000..dc65f1928
--- /dev/null
+++ b/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2-fix_giflib5_support.patch
@@ -0,0 +1,114 @@
+--- trinity-libksquirrel-3.5.13.2/kernel/kls_gif/fmt_codec_gif.cpp.giflib5 2013-06-07 20:05:31.000000000 +0200
++++ trinity-libksquirrel-3.5.13.2/kernel/kls_gif/fmt_codec_gif.cpp 2013-08-24 17:58:13.978555540 +0200
+@@ -43,14 +43,26 @@
+ /* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */
+ #if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
+ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
++#if GIFLIB_MAJOR > 4
++static void PrintGifError(int ErrorCode)
++#else
+ static void PrintGifError(void)
++#endif
+ {
++#if GIFLIB_MAJOR > 4
++ char *Err = GifErrorString(ErrorCode);
++#else
+ char *Err = GifErrorString();
++#endif
+
+ if (Err != NULL) {
+ fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
+ } else {
++#if GIFLIB_MAJOR > 4
++ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", ErrorCode);
++#else
+ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError());
++#endif
+ }
+ }
+ #endif
+@@ -107,7 +119,12 @@
+ buf = 0;
+ saved = 0;
+
++#if GIFLIB_MAJOR > 4
++ int ErrorCode;
++ gif = DGifOpenFileName(file.c_str(), &ErrorCode);
++#else
+ gif = DGifOpenFileName(file.c_str());
++#endif
+
+ // for safety...
+ if(!gif)
+@@ -198,7 +215,11 @@
+ {
+ if (DGifGetRecordType(gif, &record) == GIF_ERROR)
+ {
++#if GIFLIB_MAJOR > 4
++ PrintGifError(gif->Error);
++#else
+ PrintGifError();
++#endif
+ return SQE_R_BADFILE;
+ }
+
+@@ -207,7 +228,11 @@
+ case IMAGE_DESC_RECORD_TYPE:
+ if(DGifGetImageDesc(gif) == GIF_ERROR)
+ {
++#if GIFLIB_MAJOR > 4
++ PrintGifError(gif->Error);
++#else
+ PrintGifError();
++#endif
+ return SQE_R_BADFILE;
+ }
+
+@@ -243,7 +268,11 @@
+ case EXTENSION_RECORD_TYPE:
+ if(DGifGetExtension(gif, &ExtCode, &Extension) == GIF_ERROR)
+ {
++#if GIFLIB_MAJOR > 4
++ PrintGifError(gif->Error);
++#else
+ PrintGifError();
++#endif
+ return SQE_R_BADFILE;
+ }
+
+@@ -287,7 +316,11 @@
+ {
+ if(DGifGetExtensionNext(gif, &Extension) == GIF_ERROR)
+ {
++#if GIFLIB_MAJOR > 4
++ PrintGifError(gif->Error);
++#else
+ PrintGifError();
++#endif
+ return SQE_R_BADFILE;
+ }
+ }
+@@ -366,7 +399,11 @@
+ {
+ if(DGifGetLine(gif, buf, Width) == GIF_ERROR)
+ {
++#if GIFLIB_MAJOR > 4
++ PrintGifError(gif->Error);
++#else
+ PrintGifError();
++#endif
+ memset(scan, 255, im->w * sizeof(RGBA));
+ return SQE_R_BADFILE;
+ }
+@@ -439,7 +476,11 @@
+ if(DGifGetLine(gif, buf, Width) == GIF_ERROR)
+ {
+ memset(scan, 255, im->w * sizeof(RGBA));
++#if GIFLIB_MAJOR > 4
++ PrintGifError(gif->Error);
++#else
+ PrintGifError();
++#endif
+ return SQE_R_BADFILE;
+ }
+ else
diff --git a/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2.spec b/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2.spec
index 2d3f5691e..d6794dbd2 100644
--- a/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2.spec
+++ b/redhat/libraries/libksquirrel/libksquirrel-3.5.13.2.spec
@@ -41,6 +41,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
Patch0: libksquirrel-3.5.13-detect_netpbm.patch
+Patch1: libksquirrel-3.5.13.2-fix_giflib5_support.patch
BuildRequires: trinity-tqtinterface-devel >= %{tde_version}
BuildRequires: trinity-arts-devel >= 1:1.5.10
@@ -155,6 +156,7 @@ Tools for KSquirrel.
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%patch0 -p1 -b .netpbm
+%patch1 -p1 -b .giflib5
%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"