common: always set android ndk env vars

Also, add the ndk to PATH at the beginning, in case any other ndks are
already in it.

Fixes #176.
This commit is contained in:
Daniel Martí 2016-06-16 21:36:31 +01:00
parent 90ac5d3fa8
commit 882afebf76

View file

@ -1805,16 +1805,12 @@ def set_FDroidPopen_env(build=None):
for k, v in config['java_paths'].items(): for k, v in config['java_paths'].items():
env['JAVA%s_HOME' % k] = v env['JAVA%s_HOME' % k] = v
# Set up environment vars that depend on each build, only set the
# NDK env vars if the NDK is not already in the PATH
if build is not None: if build is not None:
path = build.ndk_path() path = build.ndk_path()
paths = orig_path.split(os.pathsep) paths = orig_path.split(os.pathsep)
if path in paths: if path not in paths:
return paths = [path] + paths
paths.append(path)
env['PATH'] = os.pathsep.join(paths) env['PATH'] = os.pathsep.join(paths)
for n in ['ANDROID_NDK', 'NDK', 'ANDROID_NDK_HOME']: for n in ['ANDROID_NDK', 'NDK', 'ANDROID_NDK_HOME']:
env[n] = build.ndk_path() env[n] = build.ndk_path()