ffmpeg: Build with --enable-gnutls
[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.
2577a7bb 4TERMUX_PKG_VERSION=3.3.2
7653098a 5TERMUX_PKG_REVISION=2
b55a2fee 6TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
2577a7bb 7TERMUX_PKG_SHA256=1998de1ab32616cbf2ff86efc3f1f26e76805ec5dc51e24c041c79edd8262785
05f3b9f0 8TERMUX_PKG_FOLDERNAME=ffmpeg-$TERMUX_PKG_VERSION
351bc9db 9# libbz2 is used by matroska decoder:
49ac27c7
FF
10# libvpx is the VP8 & VP9 video encoder for WebM, see
11# https://trac.ffmpeg.org/wiki/Encode/VP8 and https://trac.ffmpeg.org/wiki/Encode/VP9
7653098a 12TERMUX_PKG_DEPENDS="libbz2, libx264, libx265, xvidcore, libvorbis, libmp3lame, libopus, libvpx, libgnutls"
351bc9db 13TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="share/ffmpeg/examples"
47b2c44e 14TERMUX_PKG_CONFLICTS="libav"
351bc9db
FF
15
16termux_step_configure () {
17 cd $TERMUX_PKG_BUILDDIR
a5be0489 18
0488a6f5
FF
19 export ASFLAGS="-no-integrated-as"
20
a5be0489 21 local _EXTRA_CONFIGURE_FLAGS=""
351bc9db
FF
22 if [ $TERMUX_ARCH = "arm" ]; then
23 _ARCH="armeabi-v7a"
a5be0489 24 _EXTRA_CONFIGURE_FLAGS="--enable-neon"
351bc9db
FF
25 elif [ $TERMUX_ARCH = "i686" ]; then
26 _ARCH="x86"
a5be0489
FF
27 # Specify --disable-asm to prevent text relocations on i686,
28 # see https://trac.ffmpeg.org/ticket/4928
29 _EXTRA_CONFIGURE_FLAGS="--disable-asm"
ed0fc1fd
FF
30 elif [ $TERMUX_ARCH = "x86_64" ]; then
31 _ARCH="x86_64"
a5be0489 32 elif [ $TERMUX_ARCH = "aarch64" ]; then
351bc9db 33 _ARCH=$TERMUX_ARCH
a5be0489
FF
34 _EXTRA_CONFIGURE_FLAGS="--enable-neon"
35 else
71430aa6 36 termux_error_exit "Unsupported arch: $TERMUX_ARCH"
351bc9db 37 fi
a5be0489 38
45409e84
FF
39 # --disable-lzma to avoid problem with shared library clashes, see
40 # https://github.com/termux/termux-packages/issues/511
41 # Only used for LZMA compression support for tiff decoder.
351bc9db
FF
42 $TERMUX_PKG_SRCDIR/configure \
43 --arch=${_ARCH} \
0488a6f5
FF
44 --as=$AS \
45 --cc=$CC \
46 --cxx=$CXX \
351bc9db 47 --cross-prefix=${TERMUX_HOST_PLATFORM}- \
a5be0489 48 --disable-avdevice \
351bc9db
FF
49 --disable-ffserver \
50 --disable-static \
e73b0067 51 --disable-symver \
45409e84 52 --disable-lzma \
351bc9db 53 --enable-cross-compile \
7653098a 54 --enable-gnutls \
351bc9db 55 --enable-gpl \
bc0596c1 56 --enable-libmp3lame \
351bc9db 57 --enable-libvorbis \
c842d781 58 --enable-libopus \
351bc9db 59 --enable-libx264 \
318a000b 60 --enable-libx265 \
351bc9db 61 --enable-libxvid \
56862a32 62 --enable-libvpx \
351bc9db
FF
63 --enable-shared \
64 --prefix=$TERMUX_PREFIX \
5794a3f9 65 --target-os=android \
a5be0489 66 $_EXTRA_CONFIGURE_FLAGS
351bc9db
FF
67}
68