ebuild: pass through android variables
Android exports a bunch of env vars to set the location of source code.
Make sure we pass those down as the 3rd party compiler relies on it.
BUG=24614250
TEST=building packages works w/out errors
Change-Id: Ib0e1741626b9ad25a49ef2c8abf7494e2efc8a27
diff --git a/usr/lib/portage/pym/portage/package/ebuild/config.py b/usr/lib/portage/pym/portage/package/ebuild/config.py
index b75d28c..f3633ed 100644
--- a/usr/lib/portage/pym/portage/package/ebuild/config.py
+++ b/usr/lib/portage/pym/portage/package/ebuild/config.py
@@ -383,6 +383,10 @@
env_d = getconfig(os.path.join(eroot, "etc", "profile.env"),
tolerant=tolerant, expand=False) or {}
expand_map = env_d.copy()
+
+ # Hack in some env vars.
+ # https://bugs.gentoo.org/492854
+ expand_map.update(dict((k, v) for k, v in os.environ.items() if k.startswith('ANDROID_')))
self._expand_map = expand_map
# Allow make.globals to set default paths relative to ${EPREFIX}.