[arch-commits] Commit in gif2png/trunk (PKGBUILD gif2png-2.5.1-libpng.patch)

Eric Bélanger eric at archlinux.org
Sun Apr 5 17:40:43 EDT 2009


    Date: Sunday, April 5, 2009 @ 17:40:43
  Author: eric
Revision: 33893

upgpkg: gif2png 2.5.1-2
    Added arch tag, Added license, FHS man pages, Fixed build issue, Added python optdepends

Added:
  gif2png/trunk/gif2png-2.5.1-libpng.patch
Modified:
  gif2png/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   21 +++++++++++++--------
 gif2png-2.5.1-libpng.patch |   30 ++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-05 21:37:34 UTC (rev 33892)
+++ PKGBUILD	2009-04-05 21:40:43 UTC (rev 33893)
@@ -4,16 +4,21 @@
 
 pkgname=gif2png
 pkgver=2.5.1
-pkgrel=1
+pkgrel=2
 pkgdesc="A GIF to PNG image format converter"
-depends=(libpng)
-source=(http://www.catb.org/~esr/$pkgname/$pkgname-$pkgver.tar.gz)
+arch=('i686' 'x86_64')
 url="http://www.catb.org/~esr/gif2png/"
-md5sums=('85bb8ee345fc41c218de19dda0164806')
+license=('ZLIB')
+depends=('libpng')
+optdepends=('python: for using web2png')
+source=(http://www.catb.org/~esr/$pkgname/$pkgname-$pkgver.tar.gz gif2png-2.5.1-libpng.patch)
+md5sums=('85bb8ee345fc41c218de19dda0164806' '0febd590ff529fbbb8be040b057349b2')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  ./configure --prefix=/usr
-  /usr/bin/make || return 1
-  /usr/bin/make prefix=$startdir/pkg/usr install
+  cd $srcdir/$pkgname-$pkgver
+  patch -p2 < ../gif2png-2.5.1-libpng.patch || return 1
+  ./configure --prefix=/usr --mandir=/usr/share/man || return 1
+  make || return 1
+  make DESTDIR=$pkgdir install || return 1
+  install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
 }

Added: gif2png-2.5.1-libpng.patch
===================================================================
--- gif2png-2.5.1-libpng.patch	                        (rev 0)
+++ gif2png-2.5.1-libpng.patch	2009-04-05 21:40:43 UTC (rev 33893)
@@ -0,0 +1,30 @@
+--- work/gif2png-2.5.1/gif2png.c.orig	2006-07-07 16:40:33.000000000 -0400
++++ work/gif2png-2.5.1/gif2png.c	2006-07-07 16:43:25.000000000 -0400
+@@ -135,7 +135,7 @@
+     unsigned long hist_maxvalue;
+     int passcount;
+     int errtype, errorcount = 0;
+-    png_text software;
++    png_text comment, software;
+ 
+     /* these volatile declarations prevent gcc warnings ("variable might be
+      *  clobbered by `longjmp' or `vfork'") */
+@@ -517,10 +517,15 @@
+ 	    j = s->size;
+ 	    if (j > 0 && data[j-1] == '\0')  /* some apps include a NULL in GIF comment */
+ 		--j;
+-	    if (j<500) {
+-		png_write_tEXt(png_ptr, "Comment", (png_charp)data, j);
++      if (j<1000) {
++        comment.compression = PNG_TEXT_COMPRESSION_NONE;
+ 	    } else {
+-		png_write_zTXt(png_ptr, "Comment", (png_charp)data, j, 0);
++        comment.compression = PNG_TEXT_COMPRESSION_zTXt;
++        comment.key = "Comment";
++        comment.text = data;
++        comment.text_length = j;
++
++        png_set_text(png_ptr, info_ptr, &comment, 1);
+ 	    }
+ 	    break;
+ 



More information about the arch-commits mailing list