chiark / gitweb /
311985d4c22d20eaeb50fbc69a46121462cf5554
[termux-packages] / packages / libvpx / build.sh
1 TERMUX_PKG_HOMEPAGE=https://www.webmproject.org
2 TERMUX_PKG_DESCRIPTION="VP8 & VP9 Codec SDK"
3 TERMUX_PKG_VERSION=1.6.1
4 TERMUX_PKG_SRCURL=https://github.com/webmproject/libvpx/archive/v${TERMUX_PKG_VERSION}.tar.gz
5 TERMUX_PKG_SHA256=cda8bb6f0e4848c018177d3a576fa83ed96d762554d7010fe4cfb9d70c22e588
6 TERMUX_PKG_FOLDERNAME=libvpx-${TERMUX_PKG_VERSION}
7
8 termux_step_configure () {
9         # Force fresh install of header files:
10         rm -Rf $TERMUX_PREFIX/include/vpx
11
12         if [ $TERMUX_ARCH = "arm" ]; then
13                 _CONFIGURE_TARGET="--target=armv7-android-gcc"
14         elif [ $TERMUX_ARCH = "i686" ]; then
15                 export AS=yasm
16                 export LD=$CC
17                 _CONFIGURE_TARGET="--target=x86-android-gcc"
18         elif [ $TERMUX_ARCH = "aarch64" ]; then
19                 _CONFIGURE_TARGET="--force-target=arm64-v8a-android-gcc"
20         elif [ $TERMUX_ARCH = "x86_64" ]; then
21                 export AS=yasm
22                 export LD=$CC
23                 _CONFIGURE_TARGET="--target=x86_64-android-gcc"
24         else
25                 termux_error_exit "Unsupported arch: $TERMUX_ARCH"
26         fi
27
28         # For --disable-realtime-only, see
29         # https://bugs.chromium.org/p/webm/issues/detail?id=800
30         # "The issue is that on android we soft enable realtime only.
31         #  [..] You can enable non-realtime by setting --disable-realtime-only"
32         # Discovered in https://github.com/termux/termux-packages/issues/554
33         $TERMUX_PKG_SRCDIR/configure \
34                 --sdk-path=$NDK \
35                 $_CONFIGURE_TARGET \
36                 --prefix=$TERMUX_PREFIX \
37                 --disable-examples \
38                 --disable-realtime-only \
39                 --enable-vp8 \
40                 --enable-shared \
41                 --enable-small
42 }