Fix many Android build issues
authorLoic Blot <loic.blot@unix-experience.fr>
Sun, 10 Jun 2018 14:59:34 +0000 (16:59 +0200)
committerLoic Blot <loic.blot@unix-experience.fr>
Sun, 10 Jun 2018 15:01:47 +0000 (17:01 +0200)
It remains one issue with MT itself and rtti

build/android/Makefile
build/android/jni/Application.mk
build/android/jni/Deps.mk
build/android/jni/Irrlicht.mk
build/android/patches/irrlicht-native_activity.patch

index df1b01ae95e8c2c4a017cb33f09e472137035259..5fe0321b728bdf2044c47f1478961c553a99c49c 100644 (file)
@@ -83,7 +83,7 @@ OGG_LIB = $(OGG_DIR)libs/$(TARGET_ABI)/libogg.so
 VORBIS_LIB = $(OGG_DIR)libs/$(TARGET_ABI)/libogg.so
 OGG_TIMESTAMP = $(OGG_DIR)timestamp
 OGG_TIMESTAMP_INT = $(ANDR_ROOT)/deps/ogg_timestamp
-OGG_URL_GIT = https://github.com/vincentjames501/libvorbis-libogg-android
+OGG_URL_GIT = https://gitlab.com/minetest/libvorbis-libogg-android
 
 IRRLICHT_REVISION = 5145
 IRRLICHT_DIR = $(ANDR_ROOT)/deps/irrlicht/
@@ -262,8 +262,10 @@ $(OGG_LIB): $(OGG_TIMESTAMP)
        cd ${OGG_DIR};                                                             \
        export APP_PLATFORM=${APP_PLATFORM};                                       \
        export TARGET_ABI=${TARGET_ABI};                                           \
-       ${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG}                                  \
-               NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1;                 \
+       ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh                    \
+               --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION}                     \
+               --platform=${APP_PLATFORM}                                             \
+               --install-dir=$${TOOLCHAIN};                                           \
        touch ${OGG_TIMESTAMP};                                                    \
        touch ${OGG_TIMESTAMP_INT};                                                \
        else                                                                       \
index dfe7afb3dcc6d29c7520f1bdc1b7d6902ca48c16..0d5e5100e1376976901ddc957782435b547fb377 100644 (file)
@@ -1,9 +1,6 @@
 APP_PLATFORM := ${APP_PLATFORM}
 APP_ABI := ${TARGET_ABI}
-APP_STL := gnustl_static
-NDK_TOOLCHAIN_VERSION := 4.9
-APP_DEPRECATED_HEADERS := true
+APP_STL := c++_static
 APP_MODULES := minetest
 
 APP_CPPFLAGS += -fexceptions
-APP_GNUSTL_FORCE_CPP_FEATURES := rtti
index 36af338b204c92d18f53d230c31fd84162279ff3..6a58c542810b83a8f73c4a9795aba59770b23fee 100644 (file)
@@ -1,8 +1,7 @@
 APP_PLATFORM := ${APP_PLATFORM}
 APP_ABI := ${TARGET_ABI}
-APP_STL := gnustl_static
-NDK_TOOLCHAIN_VERSION := 4.9
+APP_STL := c++_static
 APP_DEPRECATED_HEADERS := true
 
-APP_CLAFGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3
+APP_CFLAGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3
 APP_CPPFLAGS += -fexceptions
index a48c2902bb9dda4fe2f818c19c953b82564709ba..0bc56a2abedfe7f21a8ac28ca7710f7104463ee2 100644 (file)
@@ -1,7 +1,6 @@
 APP_PLATFORM := ${APP_PLATFORM}
 APP_ABI := ${TARGET_ABI}
-APP_STL := gnustl_static
-NDK_TOOLCHAIN_VERSION := 4.9
+APP_STL := c++_static
 APP_DEPRECATED_HEADERS := true
 APP_MODULES := Irrlicht
 
index 5e9699e4f4df71ed33d685da71b06c6fc0cb54bd..83c837886fbb357e0d7bd9e2c4685960cf0ddf49 100644 (file)
@@ -1,12 +1,13 @@
---- irrlicht/source/Irrlicht/CEGLManager.cpp.orig      2017-11-15 18:19:58.467279274 +0000
-+++ irrlicht/source/Irrlicht/CEGLManager.cpp   2017-11-15 18:19:54.175279087 +0000
-@@ -8,6 +8,9 @@
+--- irrlicht/source/Irrlicht/CEGLManager.cpp.orig      2018-06-10 16:58:11.357709173 +0200
++++ irrlicht/source/Irrlicht/CEGLManager.cpp   2018-06-10 16:58:25.100709843 +0200
+@@ -9,6 +9,10 @@
  #include "irrString.h"
  #include "os.h"
 +#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
 +#include <android/native_activity.h>
 +#endif
++
  namespace irr
  {
+ namespace video