[packages/fbida] - fix build with giflib 5.x (patch from ArchLinux) - fix app-defaults location - rel 10

baggins baggins at pld-linux.org
Fri Jan 31 15:21:50 CET 2014


commit a6ba8a7a7d00612259f420b7b07fd4351faae078
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Jan 31 15:21:24 2014 +0100

    - fix build with giflib 5.x (patch from ArchLinux)
    - fix app-defaults location
    - rel 10

 fbida-giflib.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 fbida.spec         |  8 ++++---
 2 files changed, 66 insertions(+), 3 deletions(-)
---
diff --git a/fbida.spec b/fbida.spec
index cf57a51..69fdecb 100644
--- a/fbida.spec
+++ b/fbida.spec
@@ -21,7 +21,7 @@ Summary:	fbida - a few applications for viewing and editing images
 Summary(pl.UTF-8):	fbida - kilka aplikacji do oglądania i edycji obrazków
 Name:		fbida
 Version:	2.09
-Release:	9
+Release:	10
 License:	GPL
 Group:		Applications/Graphics
 Source0:	http://www.kraxel.org/releases/fbida/%{name}-%{version}.tar.gz
@@ -29,6 +29,7 @@ Source0:	http://www.kraxel.org/releases/fbida/%{name}-%{version}.tar.gz
 Patch0:		%{name}-config-noforce.patch
 Patch1:		%{name}-desktop.patch
 Patch2:		format-security.patch
+Patch3:		%{name}-giflib.patch
 URL:		http://www.kraxel.org/blog/linux/fbida/
 BuildRequires:	ImageMagick-devel
 %{?with_curl:BuildRequires:	curl-devel}
@@ -36,7 +37,7 @@ BuildRequires:	fontconfig-devel
 BuildRequires:	freetype-devel >= 2.0.0
 # -Wno-pointer-sign
 BuildRequires:	gcc >= 5:4.0
-%{?with_gif:BuildRequires:	giflib4-devel}
+%{?with_gif:BuildRequires:	giflib-devel}
 BuildRequires:	libexif-devel >= 1:0.6.9
 BuildRequires:	libjpeg-devel
 %{?with_pcd:BuildRequires:	libpcd-devel >= 1:1.0.1}
@@ -54,7 +55,7 @@ BuildRequires:	which
 BuildRequires:	xorg-lib-libXpm-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_appdefsdir	/usr/share/X11/app-defaults
+%define		_appdefsdir	/etc/X11/app-defaults
 
 %description
 The fbida project contains a few applications for viewing and editing
@@ -126,6 +127,7 @@ Dostępne jest też trochę podstawowych funkcji edycyjnych.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 CFLAGS="%{rpmcflags}" \
diff --git a/fbida-giflib.patch b/fbida-giflib.patch
new file mode 100644
index 0000000..60a45ea
--- /dev/null
+++ b/fbida-giflib.patch
@@ -0,0 +1,61 @@
+diff -Naur fbida-2.09-orig/rd/read-gif.c fbida-2.09/rd/read-gif.c
+--- fbida-2.09-orig/rd/read-gif.c	2013-07-29 16:43:26.949362012 -0400
++++ fbida-2.09/rd/read-gif.c	2013-07-29 16:43:43.669166969 -0400
+@@ -13,6 +13,14 @@
+     int w,h;
+ };
+ 
++static void
++localPrintGifError(void)
++{
++    int ErrorCode=0;
++    GifErrorString(ErrorCode);
++    fprintf(stderr, "\nGIF-LIB error: %i.\n", ErrorCode);
++}
++
+ static GifRecordType
+ gif_fileread(struct gif_state *h)
+ {
+@@ -25,7 +33,7 @@
+ 	if (GIF_ERROR == DGifGetRecordType(h->gif,&RecordType)) {
+ 	    if (debug)
+ 		fprintf(stderr,"gif: DGifGetRecordType failed\n");
+-	    PrintGifError();
++	    localPrintGifError();
+ 	    return -1;
+ 	}
+ 	switch (RecordType) {
+@@ -42,7 +50,7 @@
+ 		if (rc == GIF_ERROR) {
+ 		    if (debug)
+ 			fprintf(stderr,"gif: DGifGetExtension failed\n");
+-		    PrintGifError();
++		    localPrintGifError();
+ 		    return -1;
+ 		}
+ 		if (debug) {
+@@ -93,12 +101,13 @@
+     struct gif_state *h;
+     GifRecordType RecordType;
+     int i, image = 0;
+-    
++    int Error;
++
+     h = malloc(sizeof(*h));
+     memset(h,0,sizeof(*h));
+ 
+     h->infile = fp;
+-    h->gif = DGifOpenFileHandle(fileno(fp));
++    h->gif = DGifOpenFileHandle(fileno(fp), &Error);
+     h->row = malloc(h->gif->SWidth * sizeof(GifPixelType));
+ 
+     while (0 == image) {
+@@ -108,7 +117,7 @@
+ 	    if (GIF_ERROR == DGifGetImageDesc(h->gif)) {
+ 		if (debug)
+ 		    fprintf(stderr,"gif: DGifGetImageDesc failed\n");
+-		PrintGifError();
++		localPrintGifError();
+ 	    }
+ 	    if (NULL == h->gif->SColorMap &&
+ 		NULL == h->gif->Image.ColorMap) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fbida.git/commitdiff/a6ba8a7a7d00612259f420b7b07fd4351faae078



More information about the pld-cvs-commit mailing list