ports/kde4 (3.0): kopete: Fix build with giflib 5.1.0
commit fd82958d0a33572f110e482bef84f19198ac947f Author: Alan Mizrahi <alan+crux@mizrahi.com.ve> Date: Thu Sep 11 10:56:54 2014 +0900 kopete: Fix build with giflib 5.1.0 diff --git a/kopete/.md5sum b/kopete/.md5sum index 9dc04a0..51608c6 100644 --- a/kopete/.md5sum +++ b/kopete/.md5sum @@ -1 +1,2 @@ 4cbc098427b5a2d96e1bad7c1c093234 kopete-4.13.3.tar.xz +212a4c911bbe97b8e664a998da47dea2 kopete-libgif51.patch diff --git a/kopete/Pkgfile b/kopete/Pkgfile index b15a4d4..47d18b2 100644 --- a/kopete/Pkgfile +++ b/kopete/Pkgfile @@ -6,8 +6,8 @@ name=kopete version=4.13.3 -release=1 -source=(http://download.kde.org/stable/$version/src/$name-$version.tar.xz) +release=2 +source=(http://download.kde.org/stable/$version/src/$name-$version.tar.xz kopete-libgif51.patch) build() { # To prevent compilation of a particular component, set DO_NOT_COMPILE @@ -17,6 +17,8 @@ build() { [ -n "$DO_NOT_COMPILE" ] && DO_NOT_COMPILE="`echo $DO_NOT_COMPILE | awk -F\ '{for(i=1;i<=NF;i++)printf("-DBUILD_%s=OFF%s",$i,i<NF?" ":"")}'`" + patch -d $name-$version -p1 -i $SRC/kopete-libgif51.patch + mkdir build; cd build cmake ../$name-$version \ diff --git a/kopete/kopete-libgif51.patch b/kopete/kopete-libgif51.patch new file mode 100644 index 0000000..29f9f39 --- /dev/null +++ b/kopete/kopete-libgif51.patch @@ -0,0 +1,53 @@ +commit 0d4f91d8b957a749ee375be5294e330182c61f4c +Author: Raymond Wooninck <tittiatcoke@gmail.com> +Date: Fri Sep 5 23:40:51 2014 +0200 + + Make Kopete build with giflib 5.1.0 and up. + + REVIEW: 120047 + CCBUG: 335519 + +diff --git a/protocols/wlm/wlmchatsession.cpp b/protocols/wlm/wlmchatsession.cpp +index 4843791..0c09bf6 100644 +--- a/protocols/wlm/wlmchatsession.cpp ++++ b/protocols/wlm/wlmchatsession.cpp +@@ -487,6 +487,16 @@ printGifErrorMessage() + #endif // HAVE_GIFLIB + } + ++static int ++closeGif(GifFileType* file) ++{ ++#if ((GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || GIFLIB_MAJOR > 5) ++ return EGifCloseFile(file, NULL); ++#else ++ return EGifCloseFile(file); ++#endif ++} ++ + /* stolen from kpaint write_to_gif() */ + void + WlmChatSession::convertToGif( const QPixmap & ink, QString filename) +@@ -557,7 +567,7 @@ WlmChatSession::convertToGif( const QPixmap & ink, QString filename) + screenColourmap); + + if (status != GIF_OK) { +- EGifCloseFile(GifFile); ++ closeGif(GifFile); + return; + } + +@@ -580,11 +590,11 @@ WlmChatSession::convertToGif( const QPixmap & ink, QString filename) + + if (status != GIF_OK) { + printGifErrorMessage(); +- EGifCloseFile(GifFile); ++ closeGif(GifFile); + return; + } + +- if (EGifCloseFile(GifFile) != GIF_OK) { ++ if (closeGif(GifFile) != GIF_OK) { + printGifErrorMessage(); + return; + }
participants (1)
-
crux@crux.nu