termux-packages/packages/libvpx/build.sh

43 lines
1.4 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://www.webmproject.org
TERMUX_PKG_DESCRIPTION="VP8 & VP9 Codec SDK"
2017-01-30 00:03:53 +01:00
TERMUX_PKG_VERSION=1.6.1
2015-11-17 21:42:18 +01:00
TERMUX_PKG_SRCURL=https://github.com/webmproject/libvpx/archive/v${TERMUX_PKG_VERSION}.tar.gz
2017-01-30 00:03:53 +01:00
TERMUX_PKG_SHA256=cda8bb6f0e4848c018177d3a576fa83ed96d762554d7010fe4cfb9d70c22e588
2015-11-17 21:42:18 +01:00
TERMUX_PKG_FOLDERNAME=libvpx-${TERMUX_PKG_VERSION}
2015-06-13 01:03:31 +02:00
termux_step_configure () {
# Force fresh install of header files:
rm -Rf $TERMUX_PREFIX/include/vpx
2015-06-13 01:03:31 +02:00
if [ $TERMUX_ARCH = "arm" ]; then
2015-12-17 23:06:01 +01:00
_CONFIGURE_TARGET="--target=armv7-android-gcc"
2015-06-13 01:03:31 +02:00
elif [ $TERMUX_ARCH = "i686" ]; then
export AS=yasm
export LD=$CC
2015-12-17 23:06:01 +01:00
_CONFIGURE_TARGET="--target=x86-android-gcc"
elif [ $TERMUX_ARCH = "aarch64" ]; then
_CONFIGURE_TARGET="--force-target=arm64-v8a-android-gcc"
elif [ $TERMUX_ARCH = "x86_64" ]; then
export AS=yasm
export LD=$CC
_CONFIGURE_TARGET="--target=x86_64-android-gcc"
2015-06-13 01:03:31 +02:00
else
termux_error_exit "Unsupported arch: $TERMUX_ARCH"
2015-06-13 01:03:31 +02:00
fi
# For --disable-realtime-only, see
# https://bugs.chromium.org/p/webm/issues/detail?id=800
# "The issue is that on android we soft enable realtime only.
# [..] You can enable non-realtime by setting --disable-realtime-only"
# Discovered in https://github.com/termux/termux-packages/issues/554
2015-06-13 01:03:31 +02:00
$TERMUX_PKG_SRCDIR/configure \
--sdk-path=$NDK \
2015-12-17 23:06:01 +01:00
$_CONFIGURE_TARGET \
2015-06-13 01:03:31 +02:00
--prefix=$TERMUX_PREFIX \
--disable-examples \
--disable-realtime-only \
--enable-vp8 \
2015-06-13 01:03:31 +02:00
--enable-shared \
--enable-small
}