libextractor: build giflib plugin
authorDaniel Golle <redacted>
Fri, 12 Jun 2015 06:00:39 +0000 (08:00 +0200)
committerDaniel Golle <redacted>
Fri, 12 Jun 2015 06:03:05 +0000 (08:03 +0200)
Cherry-picked r34095 'Add giflib-5.1.0 compatibility' into patches to
fix build against recent versions of giflib.

Signed-off-by: Daniel Golle <redacted>
libs/libextractor/Makefile
libs/libextractor/patches/001-backport-support-for-giflib-5-1.patch [new file with mode: 0644]

index 266e443cf55cad0c9e2b86937c7914e84b4ea58b..1bb15c71d9f431cfa71a7b0b832b96f2e8ce95ce 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libextractor
 PKG_VERSION:=1.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 # ToDo:
-# - package missing optional dependencies: libexiv2, giflib, gsf, librpm, smf, tidy
+# - package missing optional dependencies: libexiv2, gsf, librpm, smf, tidy
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
@@ -29,6 +29,7 @@ PLUGINS:= \
        deb \
        dvi \
        flac:+libflac \
+       gif:+giflib \
        gstreamer:+libgstreamer1:+libgst1app:+libgst1pbutils:+libgst1tag \
        it \
        jpeg:+libjpeg \
diff --git a/libs/libextractor/patches/001-backport-support-for-giflib-5-1.patch b/libs/libextractor/patches/001-backport-support-for-giflib-5-1.patch
new file mode 100644 (file)
index 0000000..7b7a2df
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/src/plugins/gif_extractor.c
++++ b/src/plugins/gif_extractor.c
+@@ -78,7 +78,11 @@ EXTRACTOR_gif_extract_method (struct EXT
+   if (gif_file == NULL || gif_error != 0)
+   {
+     if (gif_file != NULL)
++#if GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1
+       EGifCloseFile (gif_file);
++#else
++      EGifCloseFile (gif_file, NULL);
++#endif
+     return; /* not a GIF */
+   }
+ #endif
+@@ -133,7 +137,11 @@ EXTRACTOR_gif_extract_method (struct EXT
+              DGifGetExtensionNext(gif_file, &ext)) &&
+             (NULL != ext) ) ; /* keep going */
+     }
++#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1
+   DGifCloseFile (gif_file);
++#else
++  DGifCloseFile (gif_file, NULL);
++#endif
+ }
+ /* end of gif_extractor.c */
git clone https://git.99rst.org/PROJECT