summaryrefslogtreecommitdiff
path: root/staging/gd
diff options
context:
space:
mode:
Diffstat (limited to 'staging/gd')
-rw-r--r--staging/gd/PKGBUILD31
-rw-r--r--staging/gd/libpng14.patch12
2 files changed, 43 insertions, 0 deletions
diff --git a/staging/gd/PKGBUILD b/staging/gd/PKGBUILD
new file mode 100644
index 000000000..d2c40835a
--- /dev/null
+++ b/staging/gd/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 146845 2012-01-18 20:23:55Z ibiru $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+
+pkgname=gd
+pkgver=2.0.36RC1
+pkgrel=5
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('libpng' 'fontconfig' 'libjpeg')
+optdepends=('perl: bdftogd script')
+options=('!libtool')
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'libpng14.patch')
+md5sums=('e876979ca3130623a4e7866d9579171a'
+ '7921556f4960e8d66cf4fb67ea7101b5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i ${srcdir}/libpng14.patch
+ ./configure --prefix=/usr --without-xpm
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/gd/libpng14.patch b/staging/gd/libpng14.patch
new file mode 100644
index 000000000..19a3fda91
--- /dev/null
+++ b/staging/gd/libpng14.patch
@@ -0,0 +1,12 @@
+diff -Nur gd-2.0.36RC1.orig/gd_png.c gd-2.0.36RC1/gd_png.c
+--- gd-2.0.36RC1.orig/gd_png.c 2007-11-27 10:30:34.000000000 +0200
++++ gd-2.0.36RC1/gd_png.c 2010-01-17 17:14:11.000000000 +0200
+@@ -151,7 +151,7 @@
+ return NULL;
+ }
+
+- if (!png_check_sig (sig, 8)) { /* bad signature */
++ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+ return NULL; /* bad signature */
+ }
+