# Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=libpng pkgver=1.5.14 pkgrel=0 pkgdesc="Portable Network Graphics library" url="http://www.libpng.org/" arch="all" license="GPL" depends= depends_dev="zlib-dev" makedepends="$depends_dev gawk" subpackages="$pkgname-doc $pkgname-dev" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz http://downloads.sourceforge.net/project/libpng-apng/libpng15/$pkgver/libpng-$pkgver-apng.patch.gz libpng15-CVE-2013-6954.patch " _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done gunzip -c "$srcdir"/libpng-$pkgver-apng.patch.gz | patch -p1 || return 1 } build() { cd "$_builddir" ./configure --prefix=/usr \ || return 1 make } package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1 rm -f "$pkgdir"/usr/lib/*.la } md5sums="27e76e0223d654093ffeb2f3daa56cc3 libpng-1.5.14.tar.gz 89fbc11f19ec1f181587bdde1dd9402f libpng-1.5.14-apng.patch.gz 8cdbf47318e9f4710a957a4704f1dd6e libpng15-CVE-2013-6954.patch"