mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add mach bootstrap-gstreamer
This commit is contained in:
parent
1913ac706c
commit
eba68a1a49
5 changed files with 30 additions and 6 deletions
|
@ -91,6 +91,7 @@ sudo apt install git curl autoconf libx11-dev \
|
|||
```
|
||||
|
||||
If you using a version prior to **Ubuntu 17.04** or **Debian Sid**, replace `libssl1.0-dev` with `libssl-dev`.
|
||||
Additionally, you'll need a local copy of GStreamer with a version later than 12.0. You can place it in `support/linux/gstreamer/gstreamer`, or run `./mach bootstrap-gstreamer` to set it up.
|
||||
|
||||
If you are using **Ubuntu 16.04** run `export HARFBUZZ_SYS_NO_PKG_CONFIG=1` before building to avoid an error with harfbuzz.
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ from servo.util import extract, download_file, host_triple
|
|||
|
||||
|
||||
def check_gstreamer_lib():
|
||||
subprocess.call(["pkg-config", "gstreamer-1.0 >= 1.12"],
|
||||
return subprocess.call(["pkg-config", "gstreamer-1.0 >= 1.12"],
|
||||
stdout=PIPE, stderr=PIPE) == 0
|
||||
|
||||
def run_as_root(command):
|
||||
|
@ -56,7 +56,12 @@ def install_salt_dependencies(context, force):
|
|||
install_linux_deps(context, pkgs_apt, pkgs_dnf, force)
|
||||
|
||||
def gstreamer(context, force=False):
|
||||
pass
|
||||
cur = os.curdir
|
||||
gstdir = os.path.join(cur, "support", "linux", "gstreamer")
|
||||
if not os.path.isdir(os.path.join(gstdir, "gstreamer", "lib")):
|
||||
os.chdir(gstdir)
|
||||
subprocess.call(["bash", "gstreamer.sh"])
|
||||
os.chdir(cur)
|
||||
|
||||
def linux(context, force=False):
|
||||
# Please keep these in sync with the packages in README.md
|
||||
|
|
|
@ -64,6 +64,15 @@ class MachCommands(CommandBase):
|
|||
def bootstrap_salt(self, force=False):
|
||||
return bootstrap.bootstrap(self.context, force=force, specific="salt")
|
||||
|
||||
@Command('bootstrap-gstreamer',
|
||||
description='Set up a local copy of the gstreamer libraries (linux only).',
|
||||
category='bootstrap')
|
||||
@CommandArgument('--force', '-f',
|
||||
action='store_true',
|
||||
help='Boostrap without confirmation')
|
||||
def bootstrap_gstreamer(self, force=False):
|
||||
return bootstrap.bootstrap(self.context, force=force, specific="gstreamer")
|
||||
|
||||
@Command('bootstrap-android',
|
||||
description='Install the Android SDK and NDK.',
|
||||
category='bootstrap')
|
||||
|
|
|
@ -65,6 +65,7 @@ files = [
|
|||
"./resources/hsts_preload.json",
|
||||
"./tests/wpt/metadata/MANIFEST.json",
|
||||
"./support/android/openssl.sh",
|
||||
"./support/linux/gstreamer/gstreamer.sh",
|
||||
# Upstream code from Khronos/WebGL uses tabs for indentation
|
||||
"./tests/wpt/webgl/tests",
|
||||
# Our import script is not currently respecting the lint.
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
wget https://github.com/ferjm/gstreamer-1.14.1-ubuntu-trusty/raw/master/gstreamer.tar.gz
|
||||
tar -zxvf gstreamer.tar.gz
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
|
||||
wget https://github.com/ferjm/gstreamer-1.14.1-ubuntu-trusty/raw/master/gstreamer.tar.gz -O gstreamer.tar.gz
|
||||
tar -zxf 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
|
||||
sed -i "s;prefix=/root/gstreamer;prefix=${PWD}/gstreamer;g" ${PWD}/gstreamer/lib/x86_64-linux-gnu/pkgconfig/*.pc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue