summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe2eb39e73b3051b97174f88f3f05815937c8c5a (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
51
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: drakkan <nicola.murino at gmail dot com>

_android_arch=x86

pkgname=android-${_android_arch}-libwebp
pkgver=1.4.0
pkgrel=2
arch=('any')
pkgdesc="WebP library and conversion tools (Android ${_android_arch})"
url="https://developers.google.com/speed/webp/"
license=("BSD")
groups=(android-libwebp)
depends=("android-${_android_arch}-libjpeg-turbo"
         "android-${_android_arch}-libpng"
         "android-${_android_arch}-libtiff"
         "android-${_android_arch}-giflib")
makedepends=('android-configure')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/webmproject/libwebp/archive/v${pkgver}.tar.gz")
md5sums=('9778f9be63f04f16f9ca3a4f36503399')

prepare() {
    cd "$srcdir/libwebp-${pkgver}"
    source android-env ${_android_arch}

    NOCONFIGURE=1 ./autogen.sh
}

build() {
    cd "$srcdir/libwebp-${pkgver}"
    source android-env ${_android_arch}

    android-${_android_arch}-configure \
        --with-pic \
        --enable-swap-16bit-csp \
        --enable-experimental \
        --enable-libwebp{mux,demux,decoder,extras}
    make $MAKEFLAGS
}

package() {
    cd "$srcdir/libwebp-${pkgver}"
    source android-env ${_android_arch}

    make DESTDIR="$pkgdir" install
    rm -r "${pkgdir}/${ANDROID_PREFIX_BIN}"
    rm -r "${pkgdir}/${ANDROID_PREFIX_SHARE}"
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
    ${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}