ports/multimedia/kodi/files/patch-configure.ac
Carlos J. Puga Medina 0c72f3c8c7 multimedia/kodi: update to 17.1
- Add support for armv6 (RPi 1 and RPi 2)

PR:		218121
Submitted by:	Mikael Urankar <mikael.urankar@gmail.com>
Reviewed by:	swills
Approved by:	Mickael Maillot <mickael.maillot@gmail.com> (maintainer)
2017-04-03 22:35:11 +00:00

169 lines
6.7 KiB
Text

--- configure.ac.orig 2016-10-08 UTC
+++ configure.ac
@@ -564,12 +564,25 @@ case $host in
CORE_SYSTEM_NAME=linux
ARCH="x86-freebsd"
MAKE="gmake"
+ USE_STATIC_FFMPEG=1
;;
amd64-*-freebsd*)
target_platform=target_linux
CORE_SYSTEM_NAME=linux
ARCH="x86_64-freebsd"
MAKE="gmake"
+ USE_STATIC_FFMPEG=1
+ ;;
+ armv6-*-freebsd*)
+ target_platform=target_linux
+ ARCH="armv6-freebsd"
+ MAKE="gmake"
+ USE_STATIC_FFMPEG=1
+ use_arch="arm"
+ use_neon=no
+ use_gles=yes
+ use_gl=no
+ use_x11=no
;;
arm-apple-darwin*)
CORE_SYSTEM_NAME=ios
@@ -684,7 +697,7 @@ if test "$target_platform" = "target_ras
use_hardcoded_tables="yes"
use_openmax=no
CORE_SYSTEM_NAME=rbpi
- ARCH="arm"
+ ARCH="armv6-freebsd"
AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer])
USE_OMXLIB=1; AC_DEFINE([HAVE_OMXLIB],[1],["Define to 1 if OMX libs is enabled"])
USE_MMAL=1; AC_DEFINE([HAS_MMAL],[1],["Define to 1 if MMAL libs is enabled"])
@@ -753,10 +766,16 @@ fi
# platform specific flags
if echo "$ARCH" | grep -q "freebsd" ; then
LOCALBASE="${LOCALBASE:-/usr/local}"
- CFLAGS="$CFLAGS -I$LOCALBASE/include"
- CXXFLAGS="$CXXFLAGS -I$LOCALBASE/include"
- CPPFLAGS="$CPPFLAGS -I$LOCALBASE/include"
+ CFLAGS="$CFLAGS -idirafter$LOCALBASE/include"
+ CXXFLAGS="$CXXFLAGS -idirafter$LOCALBASE/include"
+ CPPFLAGS="$CPPFLAGS -idirafter$LOCALBASE/include"
LDFLAGS="$LDFLAGS -L$LOCALBASE/lib"
+ CC_FOR_BUILD="$CC"
+ CXX_FOR_BUILD="$CXX"
+ CFLAGS_FOR_BUILD="$CFLAGS"
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS"
+ LDFLAGS_FOR_BUILD="$LDFLAGS"
+ FFMPEG_OPTS="--cc=$CC --cxx=$CXX"
fi
if test "$host_vendor" = "apple" ; then
# standard application paths
@@ -796,8 +815,16 @@ if test "$host_vendor" = "apple" ; then
LIBS="$LIBS -framework CoreFoundation"
fi
elif test "$target_platform" = "target_raspberry_pi"; then
- ARCH="arm"
+ CXXFLAGS="$CXXFLAGS -I$LOCALBASE/include/interface/vcos/pthreads/ -I$LOCALBASE/include/interface/vcos -I$LOCALBASE/include/interface/ -I$LOCALBASE/include/interface/vmcs_host/linux"
+ ARCH="armv6-freebsd"
use_arch="arm"
+ FFMPEG_OPTS="--cc=$CC --cxx=$CXX --disable-fast-unaligned --disable-vfp --disable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape"
+ if test "$use_platform" = "raspberry-pi2"; then
+ CFLAGS="$CFLAGS -march=armv7a -mtune=cortex-a7 -mfpu=neon"
+ CXXFLAGS="$CXXFLAGS -march=armv7a -mtune=cortex-a7 -mfpu=neon"
+ FFMPEG_OPTS="${FFMPEG_OPTS} --enable-neon"
+ fi
+
elif test "$use_arch" = "arm"; then
CFLAGS="$CFLAGS -mno-apcs-stack-check"
CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
@@ -915,6 +942,7 @@ AC_LANG_POP([C++])
# Check inotify availability
AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
+AC_CHECK_LIB([inotify], [main],,)
# Python
if test -z "$PYTHON_NOVERSIONCHECK"; then
@@ -1163,12 +1191,13 @@ AS_CASE([x$use_libbluray],
)
#Check to see if libs are needed for functions that are often built-in to libc
-AC_SEARCH_LIBS([iconv_open],iconv,,AC_SEARCH_LIBS([libiconv_open],iconv,,AC_MSG_ERROR($missing_library)))
+AC_CHECK_LIB([iconv],[libiconv_open],,AC_MSG_ERROR($missing_library))
AC_SEARCH_LIBS([dlopen],dl)
AC_SEARCH_LIBS([clock_gettime],rt)
AC_SEARCH_LIBS([dn_expand], resolv)
AC_SEARCH_LIBS([_dn_expand], resolv)
AC_SEARCH_LIBS([__dn_expand],resolv)
+AC_SEARCH_LIBS([__atomic_load_8], [atomic])
# platform dependent libraries
if test "$host_vendor" = "apple" ; then
@@ -1552,7 +1581,7 @@ if test "${USE_STATIC_FFMPEG}" = "1"; th
if test "$cross_compiling" != "yes"; then
if test "$use_debug" != "yes"; then
- FFMPEG_OPTS="-r"
+ FFMPEG_OPTS="${FFMPEG_OPTS} -r"
fi
if test "$use_optimizations" != "yes"; then
FFMPEG_OPTS="${FFMPEG_OPTS} --disable-optimizations"
@@ -1563,7 +1592,7 @@ if test "${USE_STATIC_FFMPEG}" = "1"; th
SAVE_LIBS="$LIBS"
# check for system installed ffmpeg. We require minimum versions.
PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
- [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"],
+ [INCLUDES="$FFMPEG_CFLAGS $INCLUDES"; LIBS="$FFMPEG_LIBS $LIBS"; FFMPEG_FOUND="true"],
[FFMPEG_FOUND="false"])
if test "${USE_STATIC_FFMPEG}" = "1" && test "$FFMPEG_FOUND" = "true"; then
@@ -1590,7 +1619,11 @@ if test "${USE_STATIC_FFMPEG}" = "1"; th
elif test "$with_ffmpeg" = "force"; then
# always build our ffmpeg
AC_MSG_NOTICE("FFmpeg installation forced by user - installing our version")
- CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS}
+ if test "$use_arch" = "arm"; then
+ ASFLAGS="-no-integrated-as" CC="$CC" CPP="$CPP" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS} || exit 1
+ else
+ CC="$CC" CPP="$CPP" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS} || exit 1
+ fi
export PKG_CONFIG_PATH="${ffmpeg_build}/ffmpeg-install/lib/pkgconfig:$PKG_CONFIG_PATH"
elif test "$with_ffmpeg" != "no"; then
@@ -1603,7 +1636,7 @@ fi
if test "$FFMPEG_FOUND" != "true"; then
PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
- [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"],
+ [INCLUDES="$FFMPEG_CFLAGS $INCLUDES"; LIBS="$FFMPEG_LIBS $LIBS"; FFMPEG_FOUND="true"],
[AC_MSG_ERROR("ffmpeg not found")])
fi
@@ -1627,9 +1660,9 @@ fi
echo "Checking for SWIG installation"
AC_PATH_PROG(SWIG_EXE, swig, "none")
if test "$SWIG_EXE" = "none"; then
- AC_PATH_PROG(SWIG20_EXE, swig2.0, "none")
- if test "$SWIG20_EXE" != "none" ; then
- SWIG_EXE=$SWIG20_EXE
+ AC_PATH_PROG(SWIG30_EXE, swig3.0, "none")
+ if test "$SWIG30_EXE" != "none" ; then
+ SWIG_EXE=$SWIG30_EXE
fi
fi
if test "$SWIG_EXE" = "none"; then
@@ -1922,7 +1955,7 @@ if test "x$use_texturepacker" != "xno";
AC_PATH_PROG([TEXTUREPACKER], [TexturePacker], ["none"],
[$PATH$PATH_SEPARATOR${abs_top_srcdir}/tools/depends/native/TexturePacker/bin])
if test "$TEXTUREPACKER" = "none"; then
- make -C ${abs_top_srcdir}/tools/depends/native/TexturePacker
+ $MAKE -C ${abs_top_srcdir}/tools/depends/native/TexturePacker
TEXTUREPACKER="${abs_top_srcdir}/tools/depends/native/TexturePacker/bin/TexturePacker"
fi
if test -x "$TEXTUREPACKER"; then
@@ -2142,6 +2175,8 @@ if test "$host_vendor" = "apple" ; then
LIBS="$LIBS -L\$(abs_top_srcdir)/lib/ffmpeg/libswscale -lswscale"
fi
+LIBS=$(echo "$LIBS" | tr "\n" " ")
+
OUTPUT_FILES="Makefile \
Makefile.include \
addons/skin.estuary/media/Makefile \