ffmpeg&libav: Remove custom strtod broken on arm

Defining a custom strtod on arm when using hard float breaks
since the function is marked in system headers as expecting a
soft abi. Hopefully strtod works on Android 5.0+ so the strtod
workaround is no longer needed.

Fixes #179.
This commit is contained in:
Fredrik Fornwall 2016-03-24 21:42:59 -04:00
parent 1b3fe9854c
commit a5be048988
4 changed files with 71 additions and 11 deletions

View File

@ -1,28 +1,38 @@
TERMUX_PKG_HOMEPAGE=https://www.ffmpeg.org/
TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multimedia formats and protocols"
TERMUX_PKG_VERSION=3.0
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/FFmpeg/FFmpeg/releases/download/n${TERMUX_PKG_VERSION}/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_FOLDERNAME=ffmpeg-$TERMUX_PKG_VERSION
# libbz2 is used by matroska decoder:
TERMUX_PKG_DEPENDS="openssl, libbz2, libx264, xvidcore, libvorbis, libfaac, liblzma, libmp3lame"
TERMUX_PKG_DEPENDS="openssl, libbz2, libx264, xvidcore, libvorbis, libfaac, libmp3lame, liblzma"
TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="share/ffmpeg/examples"
TERMUX_PKG_CONFLICTS="libav"
termux_step_configure () {
cd $TERMUX_PKG_BUILDDIR
local _EXTRA_CONFIGURE_FLAGS=""
if [ $TERMUX_ARCH = "arm" ]; then
_ARCH="armeabi-v7a"
_EXTRA_CONFIGURE_FLAGS="--enable-neon"
elif [ $TERMUX_ARCH = "i686" ]; then
_ARCH="x86"
else
# Specify --disable-asm to prevent text relocations on i686,
# see https://trac.ffmpeg.org/ticket/4928
_EXTRA_CONFIGURE_FLAGS="--disable-asm"
elif [ $TERMUX_ARCH = "aarch64" ]; then
_ARCH=$TERMUX_ARCH
_EXTRA_CONFIGURE_FLAGS="--enable-neon"
else
echo "Unsupported arch $TERMUX_ARCH"
exit 1
fi
# --disable-asm to prevent text relocations
$TERMUX_PKG_SRCDIR/configure \
--arch=${_ARCH} \
--cross-prefix=${TERMUX_HOST_PLATFORM}- \
--disable-asm \
--disable-avdevice \
--disable-ffserver \
--disable-static \
--disable-symver \
@ -37,6 +47,7 @@ termux_step_configure () {
--enable-openssl \
--enable-shared \
--prefix=$TERMUX_PREFIX \
--target-os=linux
--target-os=linux \
$_EXTRA_CONFIGURE_FLAGS
}

View File

@ -0,0 +1,19 @@
Avoid issue with strtod on arm:
https://github.com/termux/termux-packages/issues/179
diff -u -r ../ffmpeg-3.0/configure ./configure
--- ../ffmpeg-3.0/configure 2016-02-14 21:29:37.000000000 -0500
+++ ./configure 2016-03-24 20:44:33.472274113 -0400
@@ -4814,12 +4814,6 @@
probe_libc host_
test -n "$host_libc_type" && enable host_libc_$host_libc_type
-case $libc_type in
- bionic)
- add_compat strtod.o strtod=avpriv_strtod
- ;;
-esac
-
# hacks for compiler/libc/os combinations
if enabled_all tms470 libc_glibc; then

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://libav.org/
TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multimedia formats and protocols"
TERMUX_PKG_VERSION=11.6
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_BUILD_REVISION=3
TERMUX_PKG_SRCURL=http://libav.org/releases/libav-${TERMUX_PKG_VERSION}.tar.xz
# libbz2 is used by matroska decoder:
TERMUX_PKG_DEPENDS="openssl, libbz2, libx264, xvidcore, libvorbis, libfaac, libmp3lame"
@ -9,18 +9,28 @@ TERMUX_PKG_CONFLICTS="ffmpeg"
termux_step_configure () {
cd $TERMUX_PKG_BUILDDIR
# Specify --disable-asm to prevent text relocations on i686,
# see https://trac.ffmpeg.org/ticket/4928
# For libav we do it also for arm and aarch64 since text
# relocations happens there as well (while ffmpeg doesn't
# create text relocations even with asm for those).
local _EXTRA_CONFIGURE_FLAGS="--disable-asm"
if [ $TERMUX_ARCH = "arm" ]; then
_ARCH="armeabi-v7a"
elif [ $TERMUX_ARCH = "i686" ]; then
_ARCH="x86"
else
elif [ $TERMUX_ARCH = "aarch64" ]; then
_ARCH=$TERMUX_ARCH
else
echo "Unsupported arch $TERMUX_ARCH"
exit 1
fi
# --disable-asm to prevent text relocations
$TERMUX_PKG_SRCDIR/configure \
--arch=${_ARCH} \
--cross-prefix=${TERMUX_HOST_PLATFORM}- \
--disable-asm \
--disable-avdevice \
--disable-avserver \
--disable-static \
@ -36,6 +46,7 @@ termux_step_configure () {
--enable-openssl \
--enable-shared \
--prefix=$TERMUX_PREFIX \
--target-os=linux
--target-os=linux \
$_EXTRA_CONFIGURE_FLAGS
}

View File

@ -0,0 +1,19 @@
Avoid issue with strtod on arm:
https://github.com/termux/termux-packages/issues/179
diff -u -r ../libav-11.6/configure ./configure
--- ../libav-11.6/configure 2016-02-26 18:05:55.000000000 -0500
+++ ./configure 2016-03-24 20:59:15.095178594 -0400
@@ -3673,12 +3673,6 @@
probe_libc host_
test -n "$host_libc_type" && enable host_libc_$host_libc_type
-case $libc_type in
- bionic)
- add_compat strtod.o strtod=avpriv_strtod
- ;;
-esac
-
# hacks for compiler/libc/os combinations
if enabled_all tms470 libc_glibc; then