diff options
author | David Spencer <baildon.research@googlemail.com> | 2015-06-25 13:31:18 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-17 09:40:16 +0700 |
commit | cc1707cc681c034751cb8089a5aa30af21462b7f (patch) | |
tree | 0ce2c4dcb3a18d8ff170532b8d206024d7063fac /gis | |
parent | e26179588bfb045120060316d2fc20a4380b99f0 (diff) |
gis/xplanet: Patched for giflib-5.x.
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Diffstat (limited to 'gis')
-rw-r--r-- | gis/xplanet/giflib6.patch | 141 | ||||
-rw-r--r-- | gis/xplanet/xplanet.SlackBuild | 4 |
2 files changed, 145 insertions, 0 deletions
diff --git a/gis/xplanet/giflib6.patch b/gis/xplanet/giflib6.patch new file mode 100644 index 0000000000000..653b9c8dc7d67 --- /dev/null +++ b/gis/xplanet/giflib6.patch @@ -0,0 +1,141 @@ +diff -wbBur xplanet-1.3.0/src/libimage/gif.c xplanet-1.3.0.my/src/libimage/gif.c +--- xplanet-1.3.0/src/libimage/gif.c 2006-03-26 01:50:51.000000000 +0300 ++++ xplanet-1.3.0.my/src/libimage/gif.c 2014-05-29 18:59:14.830652716 +0400 +@@ -20,7 +20,7 @@ + + #include <stdio.h> + #include <stdlib.h> +- ++#define FALSE 0 + #include <gif_lib.h> + + /* +@@ -42,11 +42,11 @@ + int color_index; + unsigned char *ptr = NULL; + +- infile = DGifOpenFileName(filename); ++ infile = DGifOpenFileName(filename, NULL); + + if (infile == NULL) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + +@@ -54,7 +54,7 @@ + { + if (DGifGetRecordType(infile, &record_type) == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + +@@ -63,7 +63,7 @@ + case IMAGE_DESC_RECORD_TYPE: + if (DGifGetImageDesc(infile) == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + +@@ -107,14 +107,14 @@ + GifByteType *ext; + if (DGifGetExtension(infile, &ext_code, &ext) == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + while (ext != NULL) + { + if (DGifGetExtensionNext(infile, &ext) == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + } +@@ -154,7 +154,7 @@ + + free(buffer); + +- DGifCloseFile(infile); ++ DGifCloseFile(infile, NULL); + return(1); + } + +@@ -178,7 +178,7 @@ + return(0); + } + +- colormap = MakeMapObject(colormap_size, NULL); ++ colormap = GifMakeMapObject(colormap_size, NULL); + + for (i = 0; i < width * height; i++) + { +@@ -187,10 +187,10 @@ + blue[i] = (GifByteType) rgb[3*i+2]; + } + +- if (QuantizeBuffer(width, height, &colormap_size, red, green, blue, ++ if (GifQuantizeBuffer(width, height, &colormap_size, red, green, blue, + buffer, colormap->Colors) == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + +@@ -198,24 +198,24 @@ + free(green); + free(blue); + +- outfile = EGifOpenFileName((char *) filename, FALSE); ++ outfile = EGifOpenFileName((char *) filename, FALSE, NULL); + if (outfile == NULL) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + + if (EGifPutScreenDesc(outfile, width, height, colormap_size, 0, colormap) + == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + + if (EGifPutImageDesc(outfile, 0, 0, width, height, FALSE, NULL) + == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + +@@ -224,7 +224,7 @@ + { + if (EGifPutLine(outfile, ptr, width) == GIF_ERROR) + { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return(0); + } + ptr += width; +@@ -232,8 +232,8 @@ + + EGifSpew(outfile); + +- if (EGifCloseFile(outfile) == GIF_ERROR) +- PrintGifError(); ++ if (EGifCloseFile(outfile, NULL) == GIF_ERROR) ++ printf("%s\n", GifErrorString(GIF_ERROR)); + + free(buffer); + diff --git a/gis/xplanet/xplanet.SlackBuild b/gis/xplanet/xplanet.SlackBuild index a97b5ba314c77..1b2e4531749e2 100644 --- a/gis/xplanet/xplanet.SlackBuild +++ b/gis/xplanet/xplanet.SlackBuild @@ -50,6 +50,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Patch for giflib 5.x from Arch Linux (thanks!) +# https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib6.patch?h=packages/xplanet +patch -p1 < $CWD/giflib6.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ |