diff options
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index c5274544916..206d00250e6 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -583,6 +583,11 @@ class MachCommands(CommandBase): env.setdefault("OPENSSL_VERSION", "1.0.2k") env.setdefault("OPENSSL_STATIC", "1") + # GStreamer configuration + env.setdefault("GSTREAMER_DIR", path.join(target_path, target, "native", "gstreamer-1.16.0")) + env.setdefault("GSTREAMER_URL", "https://servo-deps.s3.amazonaws.com/gstreamer/gstreamer-magicleap-1.16.0-20190808-110815.tgz") + env.setdefault("PKG_CONFIG_PATH", path.join(env["GSTREAMER_DIR"], "system", "lib64", "pkgconfig")) + # Override the linker set in .cargo/config env.setdefault("CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER", path.join(ml_support, "fake-ld.sh")) @@ -594,6 +599,28 @@ class MachCommands(CommandBase): if status: return status + # Download prebuilt Gstreamer if necessary + if not os.path.exists(path.join(env["GSTREAMER_DIR"], "system")): + if not os.path.exists(env["GSTREAMER_DIR"] + ".tgz"): + check_call([ + 'curl', + '-L', + '-f', + '-o', env["GSTREAMER_DIR"] + ".tgz", + env["GSTREAMER_URL"], + ]) + check_call([ + 'mkdir', + '-p', + env["GSTREAMER_DIR"], + ]) + check_call([ + 'tar', + 'xzf', + env["GSTREAMER_DIR"] + ".tgz", + '-C', env["GSTREAMER_DIR"], + ]) + if very_verbose: print (["Calling", "cargo", "build"] + opts) for key in env: |