libav: Fix x86_64 build
[termux-packages] / packages / libav / build.sh
CommitLineData
59f0d218
FF
1TERMUX_PKG_HOMEPAGE=http://libav.org/
2TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multimedia formats and protocols"
4f367c6e 3TERMUX_PKG_VERSION=11.6
bb27a0ec 4TERMUX_PKG_BUILD_REVISION=4
59f0d218
FF
5TERMUX_PKG_SRCURL=http://libav.org/releases/libav-${TERMUX_PKG_VERSION}.tar.xz
6# libbz2 is used by matroska decoder:
bc0596c1 7TERMUX_PKG_DEPENDS="openssl, libbz2, libx264, xvidcore, libvorbis, libfaac, libmp3lame"
9da06063 8TERMUX_PKG_CONFLICTS="ffmpeg"
59f0d218
FF
9
10termux_step_configure () {
11 cd $TERMUX_PKG_BUILDDIR
a5be0489
FF
12
13 # Specify --disable-asm to prevent text relocations on i686,
14 # see https://trac.ffmpeg.org/ticket/4928
15 # For libav we do it also for arm and aarch64 since text
16 # relocations happens there as well (while ffmpeg doesn't
17 # create text relocations even with asm for those).
18 local _EXTRA_CONFIGURE_FLAGS="--disable-asm"
19
59f0d218
FF
20 if [ $TERMUX_ARCH = "arm" ]; then
21 _ARCH="armeabi-v7a"
22 elif [ $TERMUX_ARCH = "i686" ]; then
23 _ARCH="x86"
d72c0a31 24 elif [ $TERMUX_ARCH = "aarch64" -o $TERMUX_ARCH = "x86_64" ]; then
9da06063 25 _ARCH=$TERMUX_ARCH
a5be0489
FF
26 else
27 echo "Unsupported arch $TERMUX_ARCH"
28 exit 1
59f0d218 29 fi
a5be0489 30
59f0d218
FF
31 $TERMUX_PKG_SRCDIR/configure \
32 --arch=${_ARCH} \
33 --cross-prefix=${TERMUX_HOST_PLATFORM}- \
59f0d218
FF
34 --disable-avdevice \
35 --disable-avserver \
36 --disable-static \
37 --disable-symver \
38 --enable-cross-compile \
39 --enable-gpl \
bc0596c1 40 --enable-libmp3lame \
59f0d218
FF
41 --enable-libfaac \
42 --enable-libvorbis \
43 --enable-libx264 \
44 --enable-libxvid \
45 --enable-nonfree \
46 --enable-openssl \
47 --enable-shared \
48 --prefix=$TERMUX_PREFIX \
a5be0489
FF
49 --target-os=linux \
50 $_EXTRA_CONFIGURE_FLAGS
59f0d218
FF
51}
52