Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: cross-bootstrap.sh

Issue 29537638: Issue 6226 - Use mesonbuild as a build system (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Support NDK r16b Created April 25, 2018, 10:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.md ('k') | cross/r16b/android-arm.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cross-bootstrap.sh
===================================================================
new file mode 100755
--- /dev/null
+++ b/cross-bootstrap.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+
+dir=`dirname $0`
+if [ -z "$dir" ]; then
+ dir = "."
+fi
+pushd $dir
+
+NDK_VERSION=r16b
+
+if [ -z "$ANDROID_NDK_ROOT" ]; then
+
+ case `uname` in
+ Darwin)
+ URL=https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-darwin-x86_64.zip
+ ;;
+ Linux)
+ URL=https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+ if [ ! -f "third_party/android-ndk-$NDK_VERSION.zip" ]; then
+ echo "Downloading NDK..."
+ wget $URL -O third_party/android-ndk-$NDK_VERSION.zip
+ fi
+ if [ ! -d "third_party/android-ndk-$NDK_VERSION" ]; then
+ echo "Unzipping NDK"
+ unzip -q third_party/android-ndk-$NDK_VERSION.zip -d third_party
+ fi
+ ANDROID_NDK_ROOT=`pwd`/third_party/android-ndk-$NDK_VERSION
+fi
+
+for file in cross/$NDK_VERSION/*.in ; do
+ outfile=`dirname $file`/../`basename $file .in`
+ sed s#@ANDROID_NDK_ROOT@#$ANDROID_NDK_ROOT#g < $file > $outfile
+done
+
+popd
+
+echo
+echo "Please do this before proceeding:"
+echo "export ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT"
+
« no previous file with comments | « README.md ('k') | cross/r16b/android-arm.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld