summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-07-16 00:59:32 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-16 14:09:19 -0700
commitb8b597ec729ca1b2d52a8d900a8898173c042043 (patch)
tree52251479fa81175e64a7ee929f302de37be7fdac /packaging
parentf8ce5788b8173f25c987b020072fa914a16ee8dc (diff)
downloadsubsurface-b8b597ec729ca1b2d52a8d900a8898173c042043.tar.gz
Sanitize openssl building for android
The openssl build step polluted the variable space, and overrode the CC env, thus breaking the build if you did build openssl in the same session. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/android/build.sh23
1 files changed, 10 insertions, 13 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index c96f861eb..2d7eadf49 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -28,9 +28,11 @@ export ARCH=${1-arm}
if [ "$ARCH" = "arm" ] ; then
QT_ARCH="armv7"
BUILDCHAIN=arm-linux-androideabi
+ OPENSSL_MACHINE="armv7"
elif [ "$ARCH" = "x86" ] ; then
QT_ARCH=$ARCH
BUILDCHAIN=i686-linux-android
+ OPENSSL_MACHINE="i686"
fi
export QT5_ANDROID_BIN=${QT5_ANDROID}/android_${QT_ARCH}/bin
@@ -125,20 +127,15 @@ if [ ! -e openssl-build-$ARCH ] ; then
fi
if [ ! -e $PKG_CONFIG_LIBDIR/libssl.pc ] ; then
pushd openssl-build-$ARCH
- if [ "$ARCH" = "arm" ] ; then
- export MACHINE="armv7l"
- else
- export MACHINE="x86"
- fi
- export SYSTEM=android
- export ARCH=$ARCH
- export CROSS_COMPILE="$ARCH-linux-androideabi-"
- export ANDROID_DEV="$ANDROID_NDK/platforms/android-14/arch-$ARCH/usr"
- export HOSTCC=gcc
- export ANDROID_NDK=$SUBSURFACE_SOURCE/../android-ndk-r10e
- export CC=gcc
perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
- bash -x ./config shared no-comp no-hw no-engine --openssldir=$PREFIX
+ # Use env to make all these temporary, so they don't pollute later builds.
+ env SYSTEM=android \
+ CROSS_COMPILE="${BUILDCHAIN}-" \
+ MACHINE=$OPENSSL_MACHINE \
+ HOSTCC=gcc \
+ CC=gcc \
+ ANDROID_DEV=$PREFIX \
+ bash -x ./config shared no-comp no-hw no-engine --openssldir=$PREFIX
make depend
make
make install