From 4130315f9df2c71c28fd315514949e29edcd58b9 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Wed, 3 Jan 2018 00:53:56 +0100 Subject: [PATCH] ndk-stl: Attempt to fix math.h problem (#1149) --- packages/ndk-stl/build.sh | 4 +++- packages/ndk-stl/math-header.diff | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 packages/ndk-stl/math-header.diff diff --git a/packages/ndk-stl/build.sh b/packages/ndk-stl/build.sh index c70e0417..0de9168b 100644 --- a/packages/ndk-stl/build.sh +++ b/packages/ndk-stl/build.sh @@ -1,13 +1,15 @@ TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html TERMUX_PKG_DESCRIPTION="Header files from the Android NDK needed for compiling C++ programs using STL" TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION -TERMUX_PKG_REVISION=3 +TERMUX_PKG_REVISION=4 TERMUX_PKG_NO_DEVELSPLIT=yes termux_step_extract_into_massagedir () { mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ cp -Rf $TERMUX_STANDALONE_TOOLCHAIN/include/c++/4.9.x/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ + ( cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ && patch -p1 < $TERMUX_PKG_BUILDER_DIR/math-header.diff ) + # Revert the patch for that's only used for using g++ # from the ndk (https://github.com/android-ndk/ndk/issues/215): cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/c++/v1/ diff --git a/packages/ndk-stl/math-header.diff b/packages/ndk-stl/math-header.diff new file mode 100644 index 00000000..33618e59 --- /dev/null +++ b/packages/ndk-stl/math-header.diff @@ -0,0 +1,24 @@ +diff -u -r ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/cmath ./cmath +--- ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/cmath 2018-01-03 00:47:31.973545021 +0100 ++++ ./cmath 2018-01-03 00:48:02.453189261 +0100 +@@ -302,7 +302,7 @@ + */ + + #include <__config> +-#include ++#include + + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) + #pragma GCC system_header +diff -u -r ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/math.h ./math.h +--- ../../../../../../../../../massage-pristine/data/data/com.termux/files/usr/include/c++/v1/math.h 2018-01-03 00:47:31.985544880 +0100 ++++ ./math.h 2018-01-03 00:48:24.732929153 +0100 +@@ -298,7 +298,7 @@ + #pragma GCC system_header + #endif + +-#include_next ++#include <../../math.h> + + #ifdef __cplusplus + -- 2.11.0