Contents of /trunk/kdelibs/patches/kdelibs-4.9.4-giflib5.patch
Parent Directory | Revision Log
Revision 1992 -
(show annotations)
(download)
Wed Dec 12 08:44:11 2012 UTC (11 years, 9 months ago) by niro
File size: 3203 byte(s)
Wed Dec 12 08:44:11 2012 UTC (11 years, 9 months ago) by niro
File size: 3203 byte(s)
-fixed patch, do not install removed cmake file
1 | diff -Naur kdelibs-4.9.4/cmake/modules/FindGIF.cmake kdelibs-4.9.4-giflib5/cmake/modules/FindGIF.cmake |
2 | --- kdelibs-4.9.4/cmake/modules/FindGIF.cmake 2012-11-30 08:17:39.000000000 +0100 |
3 | +++ kdelibs-4.9.4-giflib5/cmake/modules/FindGIF.cmake 1970-01-01 01:00:00.000000000 +0100 |
4 | @@ -1,39 +0,0 @@ |
5 | -# - Try to find GIF |
6 | -# Once done this will define |
7 | -# |
8 | -# GIF_FOUND - system has GIF |
9 | -# GIF_INCLUDE_DIR - the GIF include directory |
10 | -# GIF_LIBRARIES - Libraries needed to use GIF |
11 | -# GIF_DEFINITIONS - Compiler switches required for using GIF |
12 | - |
13 | -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. |
14 | -# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. |
15 | - |
16 | -IF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) |
17 | - # Already in cache, be silent |
18 | - SET(GIF_FIND_QUIETLY TRUE) |
19 | -ENDIF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) |
20 | - |
21 | -FIND_PATH(GIF_INCLUDE_DIR gif_lib.h) |
22 | - |
23 | -SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4) |
24 | -FIND_LIBRARY(GIF_LIBRARIES NAMES ${POTENTIAL_GIF_LIBS}) |
25 | - |
26 | -IF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) |
27 | - SET(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}" "${CMAKE_REQUIRED_INCLUDES}") |
28 | - CHECK_STRUCT_MEMBER(GifFileType UserData gif_lib.h GIF_FOUND) |
29 | -ENDIF (GIF_INCLUDE_DIR AND GIF_LIBRARIES) |
30 | - |
31 | -IF (GIF_FOUND) |
32 | - IF (NOT GIF_FIND_QUIETLY) |
33 | - MESSAGE(STATUS "Found GIF: ${GIF_LIBRARIES}") |
34 | - ENDIF (NOT GIF_FIND_QUIETLY) |
35 | -ELSE (GIF_FOUND) |
36 | - IF (GIF_FIND_REQUIRED) |
37 | - MESSAGE(STATUS "Looked for GIF libraries named ${POTENTIAL_GIF_LIBS}.") |
38 | - MESSAGE(STATUS "Found no acceptable GIF library. This is fatal.") |
39 | - MESSAGE(FATAL_ERROR "Could NOT find GIF") |
40 | - ENDIF (GIF_FIND_REQUIRED) |
41 | -ENDIF (GIF_FOUND) |
42 | - |
43 | -MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARIES) |
44 | diff -Naur kdelibs-4.9.4/khtml/imload/decoders/gifloader.cpp kdelibs-4.9.4-giflib5/khtml/imload/decoders/gifloader.cpp |
45 | --- kdelibs-4.9.4/khtml/imload/decoders/gifloader.cpp 2012-11-30 08:17:38.000000000 +0100 |
46 | +++ kdelibs-4.9.4-giflib5/khtml/imload/decoders/gifloader.cpp 2012-12-10 20:34:12.463272621 +0100 |
47 | @@ -299,8 +299,12 @@ |
48 | return toRet; |
49 | } |
50 | |
51 | - |
52 | + |
53 | +#if GIFLIB_MAJOR >= 5 |
54 | + static unsigned int decode16Bit(unsigned char* signedLoc) |
55 | +#else |
56 | static unsigned int decode16Bit(char* signedLoc) |
57 | +#endif |
58 | { |
59 | unsigned char* loc = reinterpret_cast<unsigned char*>(signedLoc); |
60 | |
61 | @@ -348,7 +352,12 @@ |
62 | virtual int processEOF() |
63 | { |
64 | //Feed the buffered data to libUnGif |
65 | +#if GIFLIB_MAJOR >= 5 |
66 | + int ErrorCode; |
67 | + GifFileType* file = DGifOpen(this, gifReaderBridge, &ErrorCode); |
68 | +#else |
69 | GifFileType* file = DGifOpen(this, gifReaderBridge); |
70 | +#endif |
71 | |
72 | if (!file) |
73 | return Error; |
74 | diff -Naur kdelibs-4.9.4/cmake/modules/CMakeLists.txt kdelibs-4.9.4-giflib5/cmake/modules/CMakeLists.txt |
75 | --- kdelibs-4.9.4/cmake/modules/CMakeLists.txt 2012-11-30 08:17:39.000000000 +0100 |
76 | +++ kdelibs-4.9.4-giflib5/cmake/modules/CMakeLists.txt 2012-12-12 11:50:20.822358859 +0100 |
77 | @@ -47,7 +47,6 @@ |
78 | FindFlex.cmake |
79 | FindFontconfig.cmake |
80 | FindFreetype.cmake |
81 | - FindGIF.cmake |
82 | FindGLIB2.cmake |
83 | FindGMP.cmake |
84 | FindGObject.cmake |