Commit dea97f14 authored by Thomas Guillem's avatar Thomas Guillem Committed by Geoffrey Métais

build: libcompat hack only for armv{6|7}

(cherry picked from commit b3316271)
parent 0ae99fbd
...@@ -653,6 +653,11 @@ fi ...@@ -653,6 +653,11 @@ fi
echo "Building NDK" echo "Building NDK"
HAVE_LIBCOMPAT=
if [ "${ANDROID_API}" = "android-9" ] && [ "${ANDROID_ABI}" = "armeabi-v7a" -o "${ANDROID_ABI}" = "armeabi" ] ; then
HAVE_LIBCOMPAT=1
fi
$ANDROID_NDK/ndk-build -C libvlc \ $ANDROID_NDK/ndk-build -C libvlc \
VLC_SRC_DIR="$VLC_SRC_DIR" \ VLC_SRC_DIR="$VLC_SRC_DIR" \
ANDROID_SYS_HEADERS="$ANDROID_SYS_HEADERS" \ ANDROID_SYS_HEADERS="$ANDROID_SYS_HEADERS" \
...@@ -672,11 +677,12 @@ $ANDROID_NDK/ndk-build -C libvlc \ ...@@ -672,11 +677,12 @@ $ANDROID_NDK/ndk-build -C libvlc \
HAVE_64=${HAVE_64} \ HAVE_64=${HAVE_64} \
NDK_PROJECT_PATH=jni \ NDK_PROJECT_PATH=jni \
NDK_TOOLCHAIN_VERSION=${GCCVER} \ NDK_TOOLCHAIN_VERSION=${GCCVER} \
NDK_DEBUG=${NDK_DEBUG} NDK_DEBUG=${NDK_DEBUG} \
HAVE_LIBCOMPAT=${HAVE_LIBCOMPAT}
checkfail "ndk-build failed" checkfail "ndk-build failed"
if [ "${ANDROID_API}" = "android-9" ] && [ "${ANDROID_ABI}" = "armeabi-v7a" -o "${ANDROID_ABI}" = "armeabi" ] ; then if [ "${HAVE_LIBCOMPAT}" = "1" ];then
$ANDROID_NDK/ndk-build -C libvlc \ $ANDROID_NDK/ndk-build -C libvlc \
APP_BUILD_SCRIPT=libcompat/Android.mk \ APP_BUILD_SCRIPT=libcompat/Android.mk \
APP_PLATFORM=${ANDROID_API} \ APP_PLATFORM=${ANDROID_API} \
......
...@@ -46,7 +46,9 @@ LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \ ...@@ -46,7 +46,9 @@ LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \
-lmicrodns \ -lmicrodns \
$(EXTRA_LDFLAGS) $(EXTRA_LDFLAGS)
ifeq ($(HAVE_LIBCOMPAT), 1)
LOCAL_SHARED_LIBRARIES:= libcompat.7 LOCAL_SHARED_LIBRARIES:= libcompat.7
endif
LOCAL_STATIC_LIBRARIES:= libdemuxdump2_plugin LOCAL_STATIC_LIBRARIES:= libdemuxdump2_plugin
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
...@@ -85,9 +87,11 @@ include $(BUILD_SHARED_LIBRARY) ...@@ -85,9 +87,11 @@ include $(BUILD_SHARED_LIBRARY)
# DUMMY COMPAT LIB # # DUMMY COMPAT LIB #
#################### ####################
ifeq ($(HAVE_LIBCOMPAT), 1)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := libcompat.7 LOCAL_MODULE := libcompat.7
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
endif
################ ################
# PRIVATE LIBS # # PRIVATE LIBS #
......
...@@ -188,6 +188,9 @@ public class LibVLC extends VLCObject<LibVLC.Event> { ...@@ -188,6 +188,9 @@ public class LibVLC extends VLCObject<LibVLC.Event> {
try { try {
System.loadLibrary("compat.7"); System.loadLibrary("compat.7");
} catch (Throwable ignored) {}
try {
System.loadLibrary("vlc"); System.loadLibrary("vlc");
System.loadLibrary("vlcjni"); System.loadLibrary("vlcjni");
} catch (UnsatisfiedLinkError ule) { } catch (UnsatisfiedLinkError ule) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment