librhash: Update from 1.3.5 to 1.3.6
[termux-packages] / packages / ffmpeg / build.sh
CommitLineData
af52bea3 1TERMUX_PKG_HOMEPAGE=https://ffmpeg.org
351bc9db 2TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multimedia formats and protocols"
af52bea3 3# NOTE: mpv has to be rebuilt and version bumped after updating ffmpeg.
6227c7e3
FF
4TERMUX_PKG_VERSION=3.4.2
5TERMUX_PKG_SHA256=2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740
b55a2fee 6TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
351bc9db 7# libbz2 is used by matroska decoder:
49ac27c7
FF
8# libvpx is the VP8 & VP9 video encoder for WebM, see
9# https://trac.ffmpeg.org/wiki/Encode/VP8 and https://trac.ffmpeg.org/wiki/Encode/VP9
bdf36953 10TERMUX_PKG_DEPENDS="libbz2, libsoxr, libx264, libx265, xvidcore, libvorbis, libmp3lame, libopus, libvpx, libgnutls, libandroid-glob"
351bc9db 11TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="share/ffmpeg/examples"
47b2c44e 12TERMUX_PKG_CONFLICTS="libav"
351bc9db
FF
13
14termux_step_configure () {
15 cd $TERMUX_PKG_BUILDDIR
a5be0489 16
0488a6f5
FF
17 export ASFLAGS="-no-integrated-as"
18
a5be0489 19 local _EXTRA_CONFIGURE_FLAGS=""
351bc9db
FF
20 if [ $TERMUX_ARCH = "arm" ]; then
21 _ARCH="armeabi-v7a"
a5be0489 22 _EXTRA_CONFIGURE_FLAGS="--enable-neon"
351bc9db
FF
23 elif [ $TERMUX_ARCH = "i686" ]; then
24 _ARCH="x86"
a5be0489
FF
25 # Specify --disable-asm to prevent text relocations on i686,
26 # see https://trac.ffmpeg.org/ticket/4928
27 _EXTRA_CONFIGURE_FLAGS="--disable-asm"
ed0fc1fd
FF
28 elif [ $TERMUX_ARCH = "x86_64" ]; then
29 _ARCH="x86_64"
a5be0489 30 elif [ $TERMUX_ARCH = "aarch64" ]; then
351bc9db 31 _ARCH=$TERMUX_ARCH
a5be0489
FF
32 _EXTRA_CONFIGURE_FLAGS="--enable-neon"
33 else
71430aa6 34 termux_error_exit "Unsupported arch: $TERMUX_ARCH"
351bc9db 35 fi
a5be0489 36
45409e84
FF
37 # --disable-lzma to avoid problem with shared library clashes, see
38 # https://github.com/termux/termux-packages/issues/511
39 # Only used for LZMA compression support for tiff decoder.
351bc9db
FF
40 $TERMUX_PKG_SRCDIR/configure \
41 --arch=${_ARCH} \
0488a6f5
FF
42 --as=$AS \
43 --cc=$CC \
44 --cxx=$CXX \
351bc9db 45 --cross-prefix=${TERMUX_HOST_PLATFORM}- \
a5be0489 46 --disable-avdevice \
351bc9db
FF
47 --disable-ffserver \
48 --disable-static \
e73b0067 49 --disable-symver \
45409e84 50 --disable-lzma \
351bc9db 51 --enable-cross-compile \
7653098a 52 --enable-gnutls \
351bc9db 53 --enable-gpl \
bc0596c1 54 --enable-libmp3lame \
351bc9db 55 --enable-libvorbis \
c842d781 56 --enable-libopus \
351bc9db 57 --enable-libx264 \
318a000b 58 --enable-libx265 \
351bc9db 59 --enable-libxvid \
56862a32 60 --enable-libvpx \
351bc9db 61 --enable-shared \
bdf36953 62 --enable-libsoxr \
351bc9db 63 --prefix=$TERMUX_PREFIX \
5794a3f9 64 --target-os=android \
620ba4f4 65 --extra-libs="-landroid-glob" \
a5be0489 66 $_EXTRA_CONFIGURE_FLAGS
351bc9db
FF
67}
68