New package: fbv-1.0b

This commit is contained in:
Duncaen 2015-12-02 00:47:51 +01:00
parent ea069975d5
commit 4a5bfe522e
3 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,62 @@
diff -wbBur gif.c gif.c
--- gif.c 2003-08-25 00:23:02.000000000 +0400
+++ gif.c 2014-05-29 18:39:41.337332872 +0400
@@ -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 @@
ColorMapObject *cmap;
int cmaps;
- gft=DGifOpenFileName(name);
+ gft=DGifOpenFileName(name, NULL);
if(gft==NULL){printf("err5\n"); gflush;} //////////
do
{
@@ -170,7 +170,7 @@
}
}
while( rt!= TERMINATE_RECORD_TYPE );
- DGifCloseFile(gft);
+ DGifCloseFile(gft, NULL);
return(FH_ERROR_OK);
}
@@ -184,7 +184,7 @@
int extcode;
GifRecordType rt;
- gft=DGifOpenFileName(name);
+ gft=DGifOpenFileName(name, NULL);
if(gft==NULL) gflush;
do
{
@@ -197,7 +197,7 @@
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 @@
}
}
while( rt!= TERMINATE_RECORD_TYPE );
- DGifCloseFile(gft);
+ DGifCloseFile(gft, NULL);
return(FH_ERROR_FORMAT);
}
#endif

View File

@ -0,0 +1,36 @@
From d048b0ee0272eac78f25cc8ba9535efa795d8bad Mon Sep 17 00:00:00 2001
From: =?utf8?q?Christian=20Gim=C3=A9nez?= <cnngimenez@gmail.com>
Date: Tue, 8 Jul 2014 19:00:52 -0300
Subject: [PATCH 1/1] For libpng 1.5.13 the jmpbuf pointer for the png_structp
doesn't exists, we need to use png_jmpbuf() function. See libpng-manual.txt
at the /usr/share/doc/libpng-xxxx directory.
---
png.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git png.c png.c
index 2b59269..52b6797 100644
--- png.c
+++ png.c
@@ -69,7 +69,7 @@ int fh_png_load(char *name,unsigned char *buffer, unsigned char ** alpha,int x,i
fclose(fh); return(FH_ERROR_FORMAT);
}
rp=0;
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
if(rp) free(rp);
@@ -161,7 +161,7 @@ int fh_png_getsize(char *name,int *x,int *y)
fclose(fh); return(FH_ERROR_FORMAT);
}
rp=0;
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
if(rp) free(rp);
--
2.4.10.GIT

26
srcpkgs/fbv/template Normal file
View File

@ -0,0 +1,26 @@
# Template file for 'fbv'
pkgname=fbv
version=1.0b
revision=1
build_style=gnu-configure
makedepends="libpng-devel libjpeg-turbo-devel giflib-devel"
short_desc="Framebuffer image viewer"
maintainer="Duncaen <duncaen@voidlinux.eu>"
license="GPL-2"
homepage="http://www.eclis.ch/fbv/"
distfiles="http://s-tech.elsat.net.pl/fbv/fbv-${version}.tar.gz"
checksum=9b55b9dafd5eb01562060d860e267e309a1876e8ba5ce4d3303484b94129ab3c
do_configure() {
sed -i '/^CFLAGS/d' Makefile
if [ "$CROSS_BUILD" ]; then
sed -i "s/^CC.*/CC=${XBPS_CROSS_TRIPLET}-gcc/" Makefile
sed -i "s/^cc/${XBPS_CROSS_TRIPLET}-gcc/" configure
fi
./configure --prefix=/usr --bindir=/usr/sbin --libs="-lgif"
}
do_install() {
vbin fbv
vman fbv.1
}