summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/libpng-static/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/libre/libpng-static/PKGBUILD b/libre/libpng-static/PKGBUILD
new file mode 100644
index 000000000..63f73c5a4
--- /dev/null
+++ b/libre/libpng-static/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Márcio Silva <coadde@parabola.nu>
+# based of libpng
+
+_pkgname=libpng
+pkgname=libpng-static
+pkgver=1.6.21
+_apngver=1.6.21
+pkgrel=1
+pkgdesc="A collection of routines used to create PNG format graphics files (static libraries only)"
+arch=('i686' 'x86_64' 'armv7h')
+url="http://www.libpng.org/pub/png/libpng.html"
+license=('custom')
+depends=('libpng')
+source=(http://downloads.sourceforge.net/sourceforge/$_pkgname/$_pkgname-$pkgver.tar.xz{,.asc}
+ http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-$_apngver-apng.patch.gz)
+md5sums=('3bacb4728f6694a64ad9052769d6a4ce'
+ 'SKIP'
+ '360346394543ec0a880f61830541608f')
+validpgpkeys=('8048643BA2C840F4F92A195FF54984BFA16C640F')
+
+prepare() {
+ cd $_pkgname-$pkgver
+
+ # Add animated PNG (apng) support. Required by Iceweasel
+ # see http://sourceforge.net/projects/libpng-apng/
+ patch -Np1 -i ../libpng-$_apngver-apng.patch
+}
+
+build() {
+ cd $_pkgname-$pkgver
+
+ ./configure --prefix=/usr --enable-static
+ make
+}
+
+check() {
+ cd $_pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ cd contrib/pngminus
+ make PNGLIB="-L$pkgdir/usr/lib -lpng" -f makefile.std png2pnm pnm2png
+
+ # remove conflicting files
+ rm -vr ${pkgdir}/usr/{bin,include,lib/pkgconfig,share}
+ rm -v ${pkgdir}/usr/lib/lib*.so*
+}