mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-01-24 01:42:15 +08:00
50 lines
1.5 KiB
Bash
50 lines
1.5 KiB
Bash
_pkgbasename=libpng
|
|
pkgname=lib32-$_pkgbasename
|
|
pkgver=1.6.27
|
|
_apngver=${pkgver}
|
|
_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=('lib32-gcc-libs')
|
|
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=('90099cb7dfb36bf223f4791429d45c6a'
|
|
'c8c894fb92dd1e99ba0c653bb0b8d98b')
|
|
|
|
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"
|
|
}
|