lib32/lib32-libpng/PKGBUILD

50 lines
1.5 KiB
Bash
Raw Normal View History

_pkgbasename=libpng
pkgname=lib32-$_pkgbasename
2016-01-25 05:44:15 +08:00
pkgver=1.6.21
_apngver=1.6.21
2015-11-15 05:27:59 +08:00
_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')
2016-01-25 05:44:15 +08:00
source=("http://downloads.sourceforge.net/sourceforge/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.xz"
2015-11-15 05:27:59 +08:00
"http://downloads.sourceforge.net/sourceforge/apng/libpng-${_apngver}-apng.patch.gz")
2016-01-25 05:44:15 +08:00
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
2015-11-15 05:27:59 +08:00
# see http://sourceforge.net/projects/apng/
patch -Np0 -i "${srcdir}/libpng-${_apngver}-apng.patch"
2014-12-02 10:59:48 +08:00
./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
2014-12-02 10:59:48 +08:00
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"
}