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