Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Jan 25, 2025
1 parent 67a84c6 commit bfac7d9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ndk-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -9077,18 +9077,18 @@ EOF
uppm update
uppm install "$ANDROID_NDK_PKG"

if [ "$NATIVE_PLATFORM_KIND" = darwin ] ; then
ANDROID_NDK_TOOLCHAIN_HOST_TAG='darwin-x86_64'
else
ANDROID_NDK_TOOLCHAIN_HOST_TAG="linux-$NATIVE_PLATFORM_ARCH"
fi

f="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$ANDROID_NDK_TOOLCHAIN_HOST_TAG/sysroot/usr/include/time.h"

# https://github.com/termux/termux-packages/issues/21113
# https://github.com/termux/termux-packages/blob/master/ndk-patches/27c/time.h.patch
gsed -i '41c #if __ANDROID_API__ >= 35' "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/time.h"
gsed -i '53c #endif' "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/time.h"

case $NATIVE_PLATFORM_KIND in
darwin)
# https://github.com/android/ndk/issues/1549
# remove the yasm shipped with Android NDK and use our own
rm -rf "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/yasm"
;;
esac
gsed -i '41c #if __ANDROID_API__ >= 35' "$f"
gsed -i '53c #endif' "$f"
fi
else
ANDROID_NDK_HOME="$1"
Expand Down

0 comments on commit bfac7d9

Please sign in to comment.