[packages/fbv] - added giflib5 patch (adjust Open/Close API for giflib 5+); release 8
qboosh
qboosh at pld-linux.org
Wed Apr 12 21:19:05 CEST 2023
commit aae494675f492702a2b048853ae190bbef6ee32f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 12 21:21:43 2023 +0200
- added giflib5 patch (adjust Open/Close API for giflib 5+); release 8
fbv-giflib5.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
fbv.spec | 16 +++++++++------
2 files changed, 71 insertions(+), 6 deletions(-)
---
diff --git a/fbv.spec b/fbv.spec
index 68060b6..07ac9ac 100644
--- a/fbv.spec
+++ b/fbv.spec
@@ -2,15 +2,16 @@ Summary: FrameBuffer Viewer
Summary(pl.UTF-8): Przeglądarka obrazków dla framebuffera
Name: fbv
Version: 1.0b
-Release: 7
-License: GPL
+Release: 8
+License: GPL v2+
Group: Applications/Graphics
Source0: http://s-tech.elsat.net.pl/fbv/%{name}-%{version}.tar.gz
# Source0-md5: 3e466375b930ec22be44f1041e77b55d
Patch0: %{name}-nocenter.patch
Patch1: %{name}-libpng15.patch
+Patch2: %{name}-giflib5.patch
URL: http://s-tech.elsat.net.pl/
-BuildRequires: giflib-devel
+BuildRequires: giflib-devel >= 5
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: util-linux
@@ -28,6 +29,7 @@ Obsługuje pliki PNG, JPEG, GIF i BMP.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
# it's not autoconf script
@@ -37,7 +39,9 @@ Obsługuje pliki PNG, JPEG, GIF i BMP.
--mandir=%{_mandir}
%{__make} \
- CC="%{__cc} %{rpmcflags}"
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -D_GNU_SOURCE" \
+ LDFLAGS="%{rpmldflags} %{rpmcflags}"
%install
rm -rf $RPM_BUILD_ROOT
@@ -52,5 +56,5 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc ChangeLog README TODO
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man1/*
+%attr(755,root,root) %{_bindir}/fbv
+%{_mandir}/man1/fbv.1*
diff --git a/fbv-giflib5.patch b/fbv-giflib5.patch
new file mode 100644
index 0000000..4da9049
--- /dev/null
+++ b/fbv-giflib5.patch
@@ -0,0 +1,61 @@
+--- fbv-1.0b/gif.c.orig 2003-08-24 22:23:02.000000000 +0200
++++ fbv-1.0b/gif.c 2023-04-12 21:15:20.080578085 +0200
+@@ -31,10 +31,10 @@
+ #include <string.h>
+ #define min(a,b) ((a) < (b) ? (a) : (b))
+ #define gflush return(FH_ERROR_FILE);
+-#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
+-#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
++#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
++#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
+ #define agflush return(FH_ERROR_FORMAT);
+-#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
++#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
+
+
+ int fh_gif_id(char *name)
+@@ -81,7 +81,7 @@ int fh_gif_load(char *name,unsigned char
+ ColorMapObject *cmap;
+ int cmaps;
+
+- gft=DGifOpenFileName(name);
++ gft=DGifOpenFileName(name, NULL);
+ if(gft==NULL){printf("err5\n"); gflush;} //////////
+ do
+ {
+@@ -170,7 +170,7 @@ int fh_gif_load(char *name,unsigned char
+ }
+ }
+ while( rt!= TERMINATE_RECORD_TYPE );
+- DGifCloseFile(gft);
++ DGifCloseFile(gft, NULL);
+ return(FH_ERROR_OK);
+ }
+
+@@ -184,7 +184,7 @@ int fh_gif_getsize(char *name,int *x,int
+ int extcode;
+ GifRecordType rt;
+
+- gft=DGifOpenFileName(name);
++ gft=DGifOpenFileName(name, NULL);
+ if(gft==NULL) gflush;
+ do
+ {
+@@ -197,7 +197,7 @@ int fh_gif_getsize(char *name,int *x,int
+ px=gft->Image.Width;
+ py=gft->Image.Height;
+ *x=px; *y=py;
+- DGifCloseFile(gft);
++ DGifCloseFile(gft, NULL);
+ return(FH_ERROR_OK);
+ break;
+ case EXTENSION_RECORD_TYPE:
+@@ -210,7 +210,7 @@ int fh_gif_getsize(char *name,int *x,int
+ }
+ }
+ while( rt!= TERMINATE_RECORD_TYPE );
+- DGifCloseFile(gft);
++ DGifCloseFile(gft, NULL);
+ return(FH_ERROR_FORMAT);
+ }
+ #endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fbv.git/commitdiff/aae494675f492702a2b048853ae190bbef6ee32f
More information about the pld-cvs-commit
mailing list