summaryrefslogtreecommitdiff
path: root/libre/libpng-static/PKGBUILD
blob: 63f73c5a46a4f8f072ef546473a9e0f92478fa75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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*
}