aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-09-03 12:06:27 +0530
committerManish Goregaokar <manishsmail@gmail.com>2018-09-11 19:34:38 +0530
commit11209c9fee52bab9eff850e96fc7711a4ec26dab (patch)
tree12615e1d45d3fdc2264cf322a3a0db8a843428e8
parent049eb6887e29d8409b1dfe55bc31803f1c3220da (diff)
downloadservo-11209c9fee52bab9eff850e96fc7711a4ec26dab.tar.gz
servo-11209c9fee52bab9eff850e96fc7711a4ec26dab.zip
Add gstreamer setup script; use
-rw-r--r--python/servo/command_base.py17
-rw-r--r--support/linux/gstreamer/.gitignore2
-rw-r--r--support/linux/gstreamer/gstreamer.sh4
3 files changed, 22 insertions, 1 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 7d81b5a29ef..e8c43b07595 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -476,6 +476,10 @@ class CommandBase(object):
bin_folder = path.join(destination_folder, "PFiles", "Mozilla research", "Servo Tech Demo")
return path.join(bin_folder, "servo{}".format(BIN_SUFFIX))
+ def check_gstreamer_lib(self):
+ return subprocess.call(["pkg-config", "gstreamer-1.0 >= 1.12"],
+ stdout=PIPE, stderr=PIPE) == 0
+
def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False):
"""Return an extended environment dictionary."""
env = os.environ.copy()
@@ -513,12 +517,23 @@ class CommandBase(object):
# Link LLVM
env["LIBCLANG_PATH"] = path.join(package_dir("llvm"), "lib")
- if is_windows():
if not os.environ.get("NATIVE_WIN32_PYTHON"):
env["NATIVE_WIN32_PYTHON"] = sys.executable
# Always build harfbuzz from source
env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true"
+ gstpath = path.join(os.getcwd(), "support", "linux", "gstreamer", "gstreamer")
+ if sys.platform == "linux2" and path.isdir(gstpath):
+ if True:
+ if "x86_64" not in (target or host_triple()):
+ raise Exception("We don't currently support using local gstreamer builds \
+ for non-x86_64, please file a bug")
+ extra_path += [path.join(gstpath, "bin")]
+ libpath = path.join(gstpath, "lib", "x86_64-linux-gnu")
+ extra_path += [libpath]
+ extra_lib += [libpath]
+ append_to_path_env(path.join(libpath, "pkgconfig"), env, "PKG_CONFIG_PATH")
+
if extra_path:
env["PATH"] = "%s%s%s" % (os.pathsep.join(extra_path), os.pathsep, env["PATH"])
diff --git a/support/linux/gstreamer/.gitignore b/support/linux/gstreamer/.gitignore
new file mode 100644
index 00000000000..3b805050af7
--- /dev/null
+++ b/support/linux/gstreamer/.gitignore
@@ -0,0 +1,2 @@
+gstreamer/
+
diff --git a/support/linux/gstreamer/gstreamer.sh b/support/linux/gstreamer/gstreamer.sh
new file mode 100644
index 00000000000..436f926b535
--- /dev/null
+++ b/support/linux/gstreamer/gstreamer.sh
@@ -0,0 +1,4 @@
+wget https://github.com/ferjm/gstreamer-1.14.1-ubuntu-trusty/raw/master/gstreamer.tar.gz
+tar -zxvf gstreamer.tar.gz
+rm gstreamer.tar.gz
+sed -i "s;prefix=/root/gstreamer;prefix=$PWD/gstreamer;g" $PWD/gstreamer/lib/x86_64-linux-gnu/pkgconfig/*.pc