summaryrefslogtreecommitdiffstats
path: root/libpng12/PKGBUILD
blob: a3a1e858464666c56ccb053f91001e1bbbf460a5 (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
# $Id: PKGBUILD 58551 2009-11-08 22:37:12Z eric $
# Maintainer: dorphell <dorphell@archlinux.org>
# Maintainer: Travis Willard <travis@archlinux.org>
# Maintainer: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=libpng12
_realname=libpng
pkgver=1.2.43
pkgrel=1
pkgdesc="A collection of routines used to create PNG format graphics files"
arch=('i686' 'x86_64')
url="http://www.libpng.org/pub/png/libpng.html"
license=('custom')
depends=('zlib')
options=('!libtool')
source=("http://downloads.sourceforge.net/sourceforge/${_realname}/${_realname}-${pkgver}.tar.bz2"
        "http://littlesvr.ca/apng/diff/libpng-1.2.43-apng.patch")
md5sums=('976909556e6613804d810405c1f72ce6'
         '0152337e035e9c767ca92521e3127502')


build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  # Add animated PNG (apng) support
  # see http://hp.vector.co.jp/authors/VA013651/freeSoftware/apng.html
  patch -Np0 -i "${srcdir}/libpng-1.2.43-apng.patch" || return 1

  libtoolize --force --copy || return 1
  aclocal || return 1
  autoconf || return 1
  automake --add-missing || return 1

  ./configure --prefix=/usr || return 1
  make ECHO=echo || return 1
  make ECHO=echo DESTDIR="${pkgdir}" install || return 1

  #cd contrib/pngminus
  #make ECHO=echo PNGLIB="-L${pkgdir}/usr/lib -lpng" -f makefile.std png2pnm pnm2png
  #install -m755 png2pnm pnm2png "${pkgdir}/usr/bin/"
  #install -D -m644 ../../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
  # only libs needed
  rm -rf ${pkgdir}/usr/lib/{libpng.so,libpng.a,pkgconfig}
  rm -rf ${pkgdir}/usr/{include,share,bin}
}