From 3786d6772f43dcbbc8722f46efca7fb5f8eb71f0 Mon Sep 17 00:00:00 2001 From: Neophytos Kolokotronis Date: Thu, 5 Mar 2015 19:31:01 +0000 Subject: [PATCH] xplanet: rebuild against giflib 5.1.1 --- xplanet/PKGBUILD | 22 ++++--- xplanet/giflib5.patch | 141 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+), 10 deletions(-) create mode 100644 xplanet/giflib5.patch diff --git a/xplanet/PKGBUILD b/xplanet/PKGBUILD index 030ed7807..2e35a9247 100644 --- a/xplanet/PKGBUILD +++ b/xplanet/PKGBUILD @@ -1,28 +1,30 @@ -# -# Platform Packages for Chakra, part of chakra-project.org -# -# maintainer abveritas@chakra-project.org +# Contributions from Arch: https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/xplanet pkgname=xplanet pkgver=1.3.0 -pkgrel=2 +pkgrel=3 pkgdesc="An Xearth wannabe" arch=('x86_64') url="http://xplanet.sourceforge.net/" license=('GPL') -depends=('pango' 'libungif' 'libtiff' 'perl' 'libxss') -source=("http://downloads.sourceforge.net/project/xplanet/xplanet/$pkgver/xplanet-$pkgver.tar.gz") -md5sums=('41f7db2ccd1d8b4b989cacaf9adfe692') +depends=('pango' 'giflib' 'libtiff' 'libxss') +source=("http://downloads.sourceforge.net/project/xplanet/xplanet/$pkgver/xplanet-$pkgver.tar.gz" + 'giflib5.patch') +md5sums=('41f7db2ccd1d8b4b989cacaf9adfe692' + 'c9b4504224bb5a8d6c3442fdaf1b9542') + +prepare() { + cd $srcdir/$pkgname-$pkgver + patch -p1 <$srcdir/giflib5.patch +} build() { cd "${srcdir}/$pkgname-$pkgver" - ./configure --prefix=/usr --with-freetype make } package() { cd "${srcdir}/$pkgname-$pkgver" - make prefix=${pkgdir}/usr install } diff --git a/xplanet/giflib5.patch b/xplanet/giflib5.patch new file mode 100644 index 000000000..13ff49765 --- /dev/null +++ b/xplanet/giflib5.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 + #include +- ++#define FALSE 0 + #include + + /* +@@ -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); + \ No newline at end of file