summaryrefslogtreecommitdiff
path: root/libre/kdenetwork-kopete-libre/giflib5.patch
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-08-04 22:53:50 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-08-04 22:53:50 -0600
commitd7d9365dc74f003258efd61e4d420b5936780c6a (patch)
treead9a0a260fe5cdfb66a62ca97457d9f623eb92fc /libre/kdenetwork-kopete-libre/giflib5.patch
parentc1d1095398535dc6f9de11f5f9ffe7a4573ff6d3 (diff)
parent7232ebf03772d0a7f1602a6032636c8df7f796c4 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre/kdenetwork-kopete-libre/giflib5.patch')
-rw-r--r--libre/kdenetwork-kopete-libre/giflib5.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/libre/kdenetwork-kopete-libre/giflib5.patch b/libre/kdenetwork-kopete-libre/giflib5.patch
new file mode 100644
index 000000000..231aefbc2
--- /dev/null
+++ b/libre/kdenetwork-kopete-libre/giflib5.patch
@@ -0,0 +1,67 @@
+From: Raymond Wooninck <tittiatcoke@gmail.com>
+Date: Sun, 17 Mar 2013 12:24:09 +0000
+Subject: Enable building with giflib v5
+X-Git-Tag: v4.10.80
+X-Git-Url: http://quickgit.kde.org/?p=kopete.git&a=commitdiff&h=47ceec53aa5ee6b84a753fdbf735e44558513fe2
+---
+Enable building with giflib v5
+
+REVIEW: 7066
+
+svn path=/trunk/KDE/kdenetwork/kopete/; revision=1344846
+---
+
+
+--- a/protocols/wlm/wlmchatsession.cpp
++++ b/protocols/wlm/wlmchatsession.cpp
+@@ -65,6 +65,10 @@
+ #include "wlmchatsessioninkaction.h"
+ #ifdef HAVE_GIFLIB
+ #include <gif_lib.h>
++/* old giflib has no GIFLIB_MAJOR, define to avoid cpp warnings */
++#ifndef GIFLIB_MAJOR
++#define GIFLIB_MAJOR 4
++#endif
+ #endif
+
+ WlmChatSession::WlmChatSession (Kopete::Protocol * protocol,
+@@ -467,11 +471,15 @@
+ {
+ #ifdef HAVE_GIFLIB
+ #ifdef HAVE_GIF_ERROR_STRING // giflib 4.2.0+
++#if GIFLIB_MAJOR >= 5
++ fprintf(stderr, "GIF-LIB error (exact reporting not implemented)\n");
++#else
+ const char * errorString = GifErrorString();
+ if (errorString)
+ fprintf(stderr, "GIF-LIB error: %s\n", errorString);
+ else
+ fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
++#endif
+ #else // older giflib versions, libungif
+ PrintGifError();
+ #endif // HAVE_GIF_ERROR_STRING
+@@ -483,6 +491,10 @@
+ WlmChatSession::convertToGif( const QPixmap & ink, QString filename)
+ {
+ #ifdef HAVE_GIFLIB
++#if GIFLIB_MAJOR >= 5
++#define FreeMapObject GifFreeMapObject
++#define MakeMapObject GifMakeMapObject
++#endif
+ int i, status;
+ GifFileType *GifFile;
+ ColorMapObject *screenColourmap;
+@@ -525,7 +537,11 @@
+ }
+ }
+
++#if GIFLIB_MAJOR >= 5
++ GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0, NULL);
++#else
+ GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0);
++#endif
+ if (!GifFile) {
+ FreeMapObject(imageColourmap);
+ FreeMapObject(screenColourmap);
+