blob: 3f967b51c67cfb0590a1441bd61b0f42aab7d1df (
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
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Daniel Kirchner <daniel AT ekpyron DOT org>
_android_arch=x86
pkgname=android-${_android_arch}-libpng
pkgver=1.6.40
pkgrel=1
pkgdesc="A collection of routines used to create PNG format graphics (android)"
arch=('any')
url="http://www.libpng.org/pub/png/libpng.html"
license=('custom')
depends=("android-${_android_arch}-zlib")
options=(!strip !buildflags staticlibs !emptydirs)
makedepends=('android-configure')
source=("http://downloads.sourceforge.net/sourceforge/libpng/libpng-$pkgver.tar.xz")
sha256sums=('535b479b2467ff231a3ec6d92a525906fb8ef27978be4f66dbe05d3f3a01b3a1')
build() {
cd "$srcdir/libpng-$pkgver"
source android-env ${_android_arch}
android-${_android_arch}-configure \
--enable-unversioned-links \
--enable-unversioned-libpng-pc\
--enable-unversioned-libpng-config \
--enable-hardware-optimizations
make $MAKEFLAGS
}
package () {
cd "${srcdir}/libpng-${pkgver}"
source android-env ${_android_arch}
make DESTDIR="$pkgdir" install
sed -i "s|include/libpng|include|g" "${pkgdir}"/${ANDROID_PREFIX_LIB}/pkgconfig/libpng.pc
rm -r "${pkgdir}"/${ANDROID_PREFIX_BIN}
rm -r "${pkgdir}"/${ANDROID_PREFIX_SHARE}
mv -f "${pkgdir}"/${ANDROID_PREFIX_INCLUDE}/libpng16/ "${pkgdir}"/${ANDROID_PREFIX_INCLUDE}/libpng/
rm -f "${pkgdir}"/${ANDROID_PREFIX_INCLUDE}/*.h
rm -f "${pkgdir}"/${ANDROID_PREFIX_LIB}/libpng.{a,so}
mv -f "${pkgdir}"/${ANDROID_PREFIX_LIB}/libpng16.a "${pkgdir}"/${ANDROID_PREFIX_LIB}/libpng.a
mv -f "${pkgdir}"/${ANDROID_PREFIX_LIB}/libpng16.so "${pkgdir}"/${ANDROID_PREFIX_LIB}/libpng.so
rm -f "${pkgdir}"/${ANDROID_PREFIX_LIB}/pkgconfig/libpng16.pc
sed -i 's|include16|include/libpng|g' "${pkgdir}"/${ANDROID_PREFIX_LIB}/pkgconfig/libpng.pc
sed -i 's|lpng16|lpng|g' "${pkgdir}"/${ANDROID_PREFIX_LIB}/pkgconfig/libpng.pc
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
}
|