diff options
author | B. Watson <yalhcru@gmail.com> | 2015-11-22 07:25:03 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-11-28 07:26:17 +0700 |
commit | 3c1c6ee37354d19a87335c8c055fd76f820b8de2 (patch) | |
tree | b795b7a3a7f7370c5e90c2f4ec53ecd4447abb0b /graphics/fbv | |
parent | 6b480b2a6cb1b16cd4bfafa5f415758c6746e2f7 (diff) | |
download | slackbuilds-3c1c6ee37354d19a87335c8c055fd76f820b8de2.tar.gz |
graphics/fbv: Fix compile issue.
Diffstat (limited to 'graphics/fbv')
-rw-r--r-- | graphics/fbv/fbv.SlackBuild | 8 | ||||
-rw-r--r-- | graphics/fbv/giflib5_api.diff | 66 | ||||
-rw-r--r-- | graphics/fbv/png16_api.diff | 21 |
3 files changed, 95 insertions, 0 deletions
diff --git a/graphics/fbv/fbv.SlackBuild b/graphics/fbv/fbv.SlackBuild index 0bde96e9a0..90252b9f35 100644 --- a/graphics/fbv/fbv.SlackBuild +++ b/graphics/fbv/fbv.SlackBuild @@ -57,6 +57,14 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Check for new giflib API, apply patch only if needed. This changed +# between Slack 14.1 and 14.2. +grep -q DGifOpenFileName.*Error /usr/include/gif_lib.h && \ + patch -p1 < $CWD/giflib5_api.diff + +# Patch is needed for linpng-1.6, and does no harm on 1.4. +patch -p1 < $CWD/png16_api.diff + # Man page is missing a few options, and --help output is wrong. # Also next/prev/quit options weren't documented in either place. patch -p1 < $CWD/manhelp.diff diff --git a/graphics/fbv/giflib5_api.diff b/graphics/fbv/giflib5_api.diff new file mode 100644 index 0000000000..6de9afd0ed --- /dev/null +++ b/graphics/fbv/giflib5_api.diff @@ -0,0 +1,66 @@ +diff -Naur fbv-1.0b/gif.c fbv-1.0b.patched/gif.c +--- fbv-1.0b/gif.c 2003-08-24 16:23:02.000000000 -0400 ++++ fbv-1.0b.patched/gif.c 2015-11-22 12:16:54.093999000 -0500 +@@ -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 { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); } ++#define mgrflush { int dummy; free(lb); free(slb); DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); } + #define agflush return(FH_ERROR_FORMAT); +-#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } ++#define agrflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); } + + + int fh_gif_id(char *name) +@@ -80,8 +80,9 @@ + GifRecordType rt; + ColorMapObject *cmap; + int cmaps; ++ int dummyopenarg; + +- gft=DGifOpenFileName(name); ++ gft=DGifOpenFileName(name, &dummyopenarg); + if(gft==NULL){printf("err5\n"); gflush;} ////////// + do + { +@@ -170,7 +171,7 @@ + } + } + while( rt!= TERMINATE_RECORD_TYPE ); +- DGifCloseFile(gft); ++ DGifCloseFile(gft, &dummyopenarg); + return(FH_ERROR_OK); + } + +@@ -183,8 +184,9 @@ + GifByteType *extension; + int extcode; + GifRecordType rt; ++ int dummyopenarg; + +- gft=DGifOpenFileName(name); ++ gft=DGifOpenFileName(name, &dummyopenarg); + if(gft==NULL) gflush; + do + { +@@ -197,7 +199,7 @@ + px=gft->Image.Width; + py=gft->Image.Height; + *x=px; *y=py; +- DGifCloseFile(gft); ++ DGifCloseFile(gft, &dummyopenarg); + return(FH_ERROR_OK); + break; + case EXTENSION_RECORD_TYPE: +@@ -210,7 +212,7 @@ + } + } + while( rt!= TERMINATE_RECORD_TYPE ); +- DGifCloseFile(gft); ++ DGifCloseFile(gft, &dummyopenarg); + return(FH_ERROR_FORMAT); + } + #endif diff --git a/graphics/fbv/png16_api.diff b/graphics/fbv/png16_api.diff new file mode 100644 index 0000000000..235b343666 --- /dev/null +++ b/graphics/fbv/png16_api.diff @@ -0,0 +1,21 @@ +diff -Naur fbv-1.0b/png.c fbv-1.0b.patched/png.c +--- fbv-1.0b/png.c 2003-08-24 16:22:22.000000000 -0400 ++++ fbv-1.0b.patched/png.c 2015-11-22 12:21:33.247999000 -0500 +@@ -69,7 +69,7 @@ + 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 @@ + 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); |