diff options
author | root <root@rshg054.dnsready.net> | 2012-02-06 23:14:50 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-06 23:14:50 +0000 |
commit | 1fa6edfba8d1e31ca1c0d59e8202cd3c62ccf393 (patch) | |
tree | 8d7ccc2dc9d08a4c3cde26aa01c887e9a0fc2fa1 /extra/gif2png | |
parent | bdb5b3e66f6afa586ea147f69af5e4ba388f7615 (diff) |
Mon Feb 6 23:14:50 UTC 2012
Diffstat (limited to 'extra/gif2png')
-rw-r--r-- | extra/gif2png/PKGBUILD | 14 | ||||
-rw-r--r-- | extra/gif2png/gif2png-2.5.5-libpng15.patch | 41 |
2 files changed, 50 insertions, 5 deletions
diff --git a/extra/gif2png/PKGBUILD b/extra/gif2png/PKGBUILD index 3c96df76f..fcc3b3dde 100644 --- a/extra/gif2png/PKGBUILD +++ b/extra/gif2png/PKGBUILD @@ -1,24 +1,28 @@ -# $Id: PKGBUILD 143743 2011-11-28 19:26:51Z giovanni $ +# $Id: PKGBUILD 149145 2012-02-05 23:59:19Z giovanni $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: eric <eric@archlinux.org> # Contributor: Andrew Rose <ody@netrux.com> pkgname=gif2png -pkgver=2.5.4 -pkgrel=2 +pkgver=2.5.5 +pkgrel=1 pkgdesc="A GIF to PNG image format converter" arch=('i686' 'x86_64') url="http://www.catb.org/~esr/gif2png/" license=('ZLIB') depends=('libpng') optdepends=('python2: for using web2png') -source=("http://www.catb.org/~esr/${pkgname}/${pkgname}-${pkgver}.tar.gz") -md5sums=('d63ea3fc6b6119589e8d4d6fead30df9') +source=("http://www.catb.org/~esr/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'gif2png-2.5.5-libpng15.patch') +md5sums=('cfb4c003966866b6069d3707bfb12435' + '5b3467b97157f9a7978a230b934bc488') build() { cd "${srcdir}/${pkgname}-${pkgver}" sed -i 's#env python#env python2#' web2png + patch -Np1 -i ${srcdir}/gif2png-2.5.5-libpng15.patch + ./configure --prefix=/usr \ --mandir=/usr/share/man make diff --git a/extra/gif2png/gif2png-2.5.5-libpng15.patch b/extra/gif2png/gif2png-2.5.5-libpng15.patch new file mode 100644 index 000000000..58ca43186 --- /dev/null +++ b/extra/gif2png/gif2png-2.5.5-libpng15.patch @@ -0,0 +1,41 @@ +--- a/gif2png.c 2012-01-29 00:02:06.000000000 +0100 ++++ b/gif2png.c 2012-02-06 00:49:14.000000000 +0100 +@@ -12,6 +12,7 @@ + #include <unistd.h> /* for isatty() */ + #include <sys/stat.h> + #include <utime.h> ++#include <zlib.h> + + #if !defined(TRUE) + #define FALSE 0 +@@ -122,8 +123,8 @@ + int colors_used = 0; + byte remap[MAXCMSIZE]; + int low_prec; +- png_struct *png_ptr = xalloc(sizeof (png_struct)); +- png_info *info_ptr = xalloc(sizeof (png_info)); ++ png_struct *png_ptr; ++ png_info *info_ptr; + int p; + int gray_bitdepth; + png_color pal_rgb[MAXCMSIZE], *pltep; +@@ -138,6 +139,19 @@ + png_text software; + png_text comment; + ++ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); ++ if (png_ptr == NULL) { ++ fprintf(stderr, "gif2png: fatal error, out of memory\n"); ++ fprintf(stderr, "gif2png: exiting ungracefully\n"); ++ exit(1); ++ } ++ info_ptr = png_create_info_struct(png_ptr); ++ if (info_ptr == NULL) { ++ fprintf(stderr, "gif2png: fatal error, out of memory\n"); ++ fprintf(stderr, "gif2png: exiting ungracefully\n"); ++ exit(1); ++ } ++ + /* these volatile declarations prevent gcc warnings ("variable might be + * clobbered by `longjmp' or `vfork'") */ + volatile int gray = TRUE; |