lib32/lib32-libpng/PKGBUILD
Neofytos Kolokotronis d899ac1b43 lib32-libpng: 1.19.21
2016-01-24 22:44:15 +01:00

50 lines
1.5 KiB
Bash

_pkgbasename=libpng
pkgname=lib32-$_pkgbasename
pkgver=1.6.21
_apngver=1.6.21
_libversion=16
pkgrel=1
pkgdesc="A collection of routines used to create PNG format graphics files (32-bit)"
arch=('x86_64')
url="http://www.libpng.org/pub/png/libpng.html"
license=('custom')
depends=('lib32-zlib' $_pkgbasename=$pkgver 'sh')
makedepends=(gcc-multilib)
options=('!libtool')
source=("http://downloads.sourceforge.net/sourceforge/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.xz"
"http://downloads.sourceforge.net/sourceforge/apng/libpng-${_apngver}-apng.patch.gz")
md5sums=('3bacb4728f6694a64ad9052769d6a4ce'
'7c44c3950c1886115c33ee2ab4d8417d')
build() {
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
cd "${srcdir}/${_pkgbasename}-${pkgver}"
# Add animated PNG (apng) support
# see http://sourceforge.net/projects/apng/
patch -Np0 -i "${srcdir}/libpng-${_apngver}-apng.patch"
./configure --prefix=/usr --libdir=/usr/lib32 --program-suffix=-32 --disable-static
make
}
package() {
cd "${srcdir}/${_pkgbasename}-${pkgver}"
make DESTDIR="${pkgdir}" install
cd contrib/pngminus
make PNGLIB="-L${pkgdir}/usr/lib32 -lpng" -f makefile.std png2pnm pnm2png
rm -rf "${pkgdir}"/usr/{include,share}
rm "$pkgdir/usr/bin/libpng-config"
ln -s "libpng${_libversion}-config-32" "$pkgdir/usr/bin/libpng-config-32"
mkdir -p "$pkgdir/usr/share/licenses"
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}