浏览代码

libextractor: build giflib plugin

Cherry-picked r34095 'Add giflib-5.1.0 compatibility' into patches to
fix build against recent versions of giflib.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle 9 年前
父节点
当前提交
939f2e2dc5
共有 2 个文件被更改,包括 29 次插入2 次删除
  1. 3
    2
      libs/libextractor/Makefile
  2. 26
    0
      libs/libextractor/patches/001-backport-support-for-giflib-5-1.patch

+ 3
- 2
libs/libextractor/Makefile 查看文件

@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=libextractor
11 11
 PKG_VERSION:=1.3
12
-PKG_RELEASE:=2
12
+PKG_RELEASE:=3
13 13
 
14 14
 # ToDo:
15
-# - package missing optional dependencies: libexiv2, giflib, gsf, librpm, smf, tidy
15
+# - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy
16 16
 
17 17
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 18
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
@@ -29,6 +29,7 @@ PLUGINS:= \
29 29
 	deb \
30 30
 	dvi \
31 31
 	flac:+libflac \
32
+	gif:+giflib \
32 33
 	gstreamer:+libgstreamer1:+libgst1app:+libgst1pbutils:+libgst1tag \
33 34
 	it \
34 35
 	jpeg:+libjpeg \

+ 26
- 0
libs/libextractor/patches/001-backport-support-for-giflib-5-1.patch 查看文件

@@ -0,0 +1,26 @@
1
+--- a/src/plugins/gif_extractor.c
2
++++ b/src/plugins/gif_extractor.c
3
+@@ -78,7 +78,11 @@ EXTRACTOR_gif_extract_method (struct EXT
4
+   if (gif_file == NULL || gif_error != 0)
5
+   {
6
+     if (gif_file != NULL)
7
++#if GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1
8
+       EGifCloseFile (gif_file);
9
++#else
10
++      EGifCloseFile (gif_file, NULL);
11
++#endif
12
+     return; /* not a GIF */
13
+   }
14
+ #endif
15
+@@ -133,7 +137,11 @@ EXTRACTOR_gif_extract_method (struct EXT
16
+ 	       DGifGetExtensionNext(gif_file, &ext)) &&
17
+ 	      (NULL != ext) ) ; /* keep going */
18
+     }
19
++#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1
20
+   DGifCloseFile (gif_file);
21
++#else
22
++  DGifCloseFile (gif_file, NULL);
23
++#endif
24
+ }
25
+ 
26
+ /* end of gif_extractor.c */