mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1114382 - Implement |mach bootstrap| for mobile/android on OS X with macports package manager. r=nalexander
This commit is contained in:
parent
aef8aba2ab
commit
2be3682a46
@ -409,14 +409,49 @@ class OSXBootstrapper(BaseBootstrapper):
|
||||
self.run_as_root([self.port, 'select', '--set', 'clang', 'mp-' + MACPORTS_CLANG_PACKAGE])
|
||||
|
||||
def ensure_macports_mobile_android_packages(self):
|
||||
raise NotImplementedError("We don't yet support bootstrapping Firefox for Android with Macports. " +
|
||||
"We don't know of a package that installs the Java 7 JDK. " +
|
||||
"See https://bugzilla.mozilla.org/show_bug.cgi?id=1114382.")
|
||||
# Multi-part process:
|
||||
# 1. System packages.
|
||||
# 2. Android SDK and NDK.
|
||||
# 3. Android packages.
|
||||
|
||||
import android
|
||||
|
||||
# 1. System packages.
|
||||
packages = [
|
||||
'wget',
|
||||
]
|
||||
self._ensure_macports_packages(packages)
|
||||
|
||||
# Verify the presence of java and javac.
|
||||
if not self.which('java') or not self.which('javac'):
|
||||
raise Exception('You need to have Java version 1.7 or later installed. Please visit http://www.java.com/en/download/mac_download.jsp to get the latest version.')
|
||||
|
||||
# 2. The user may have an external Android SDK (in which case we save
|
||||
# them a lengthy download), or they may have already completed the
|
||||
# download. We unpack to ~/.mozbuild/{android-sdk-linux, android-ndk-r10e}.
|
||||
mozbuild_path = os.environ.get('MOZBUILD_STATE_PATH', os.path.expanduser(os.path.join('~', '.mozbuild')))
|
||||
self.sdk_path = os.environ.get('ANDROID_SDK_HOME', os.path.join(mozbuild_path, 'android-sdk-macosx'))
|
||||
self.ndk_path = os.environ.get('ANDROID_NDK_HOME', os.path.join(mozbuild_path, 'android-ndk-r10e'))
|
||||
self.sdk_url = 'https://dl.google.com/android/android-sdk_r24.0.1-macosx.zip'
|
||||
is_64bits = sys.maxsize > 2**32
|
||||
if is_64bits:
|
||||
self.ndk_url = android.android_ndk_url('darwin')
|
||||
else:
|
||||
raise Exception('You need a 64-bit version of Mac OS X to build Firefox for Android.')
|
||||
|
||||
android.ensure_android_sdk_and_ndk(path=mozbuild_path,
|
||||
sdk_path=self.sdk_path, sdk_url=self.sdk_url,
|
||||
ndk_path=self.ndk_path, ndk_url=self.ndk_url)
|
||||
|
||||
# 3. We expect the |android| tool to at
|
||||
# ~/.mozbuild/android-sdk-macosx/tools/android.
|
||||
android_tool = os.path.join(self.sdk_path, 'tools', 'android')
|
||||
android.ensure_android_packages(android_tool=android_tool)
|
||||
|
||||
def suggest_macports_mobile_android_mozconfig(self):
|
||||
raise NotImplementedError("We don't yet support bootstrapping Firefox for Android with Macports. " +
|
||||
"We don't know of a package that installs the Java 7 JDK." +
|
||||
"See https://bugzilla.mozilla.org/show_bug.cgi?id=1114382.")
|
||||
import android
|
||||
android.suggest_mozconfig(sdk_path=self.sdk_path,
|
||||
ndk_path=self.ndk_path)
|
||||
|
||||
def ensure_package_manager(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user