summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b257b2547a3fd6eaa36890bb1d3646d2857a728e (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
52
53
54
55
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>

_android_arch=x86

pkgname=android-${_android_arch}-libtheora
pkgver=1.2.0
pkgrel=1
pkgdesc="An open video codec developed by the Xiph.org (Android ${_android_arch})"
arch=('any')
url="http://xiph.org"
license=("BSD")
groups=('android-libtheora')
depends=("android-${_android_arch}-libvorbis")
makedepends=('android-configure')
options=(!strip !buildflags staticlibs)
source=("http://downloads.xiph.org/releases/theora/libtheora-${pkgver}.tar.xz")
md5sums=('ec64ed07bffb5f45dca0ae7faa68f814')

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

    autoreconf -fiv -I m4
}

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

    extra_options=

    # Platform specific patches
    case "${_android_arch}" in
        armv7a-eabi)
             extra_options="${extra_options} --disable-asm"
            ;;
        *)
            ;;
    esac

    android-${_android_arch}-configure \
        --disable-examples \
        ${extra_options}
    make $MAKEFLAGS
}

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

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