aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/servo/build_commands.py27
-rw-r--r--python/servo/package_commands.py6
2 files changed, 33 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:
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py
index 98ad57eee4b..a05e64ec8cf 100644
--- a/python/servo/package_commands.py
+++ b/python/servo/package_commands.py
@@ -230,6 +230,11 @@ class PackageCommands(CommandBase):
raise Exception("Magic Leap builds need the MAGICLEAP_SDK environment variable")
if not env.get("MLCERT"):
raise Exception("Magic Leap builds need the MLCERT environment variable")
+ # GStreamer configuration
+ env.setdefault("GSTREAMER_DIR", path.join(
+ self.get_target_dir(), "magicleap", target, "native", "gstreamer-1.16.0"
+ ))
+
mabu = path.join(env.get("MAGICLEAP_SDK"), "mabu")
packages = [
"./support/magicleap/Servo3D/Servo3D.package",
@@ -244,6 +249,7 @@ class PackageCommands(CommandBase):
mabu,
"-o", target_dir,
"-t", build_type,
+ "GSTREAMER_DIR=" + env["GSTREAMER_DIR"],
package
]
try: