mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Consume official GStreamer binaries on MacOS
This PR re-enables support for the gstreamer mediastack in macOS by consuming the official binary '.pkg' files from gstreamer.freedesktop.org To maintain symmetry with other platforms, the '.pkg' files are uploaded to servo-build-deps and fetched from there using the new script 'etc/install_macos_gstreamer.sh'. Unlike the Homebrew version, the official GStreamer is distributed as a 'relocatable' framework i.e the dylibs all have @rpath-relative install names and also link to other dylibs using @rpath relative path. To address this difference the 'servo' binary needs to be patched with 'install_name_tool' to add an LC_RPATH command that sets the relative paths that the dynamic linker should search when trying to satify dependencies. In Servo's case, this will be a path relative to the 'servo' binary itself i.e '@executable_path/lib/' The additional 'lib' is due to a flaw in the gstreamer packaging where the install names of some of the dylibs have the prefix '@rpath/lib' and some of them just have '@rpath'. This PR also fixes a couple of issues present in the `mach build` process on MacOS: 1. `mach build` process was not copying transitive dependencies of servo binary but only the first level dylibs 2. `mach build` process didn't patch the links to dylibs in servo binary (and dependencies). This meant though (some) dylibs were copied to local path, the binary still loaded the dylibs from system GStreamer installation i.e homebrew instead of the copieds dylibs The build and runtime dependencies in etc/homebrew/Brewfile and etc/homebrew/Brewfile-build have also been removed in This PR. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
This commit is contained in:
parent
425b0fe641
commit
8cfb19a8fb
11 changed files with 198 additions and 144 deletions
|
@ -1,10 +0,0 @@
|
|||
# Runtime dependencies
|
||||
|
||||
brew "gnutls"
|
||||
brew "gstreamer"
|
||||
brew "gst-plugins-base"
|
||||
brew "gst-libav"
|
||||
brew "gst-plugins-bad"
|
||||
brew "gst-plugins-good"
|
||||
brew "gst-rtsp-server"
|
||||
brew "openssl"
|
|
@ -1,12 +0,0 @@
|
|||
# Build dependencies (that are not also runtime dependencies)
|
||||
|
||||
brew "autoconf@2.13"
|
||||
brew "automake"
|
||||
brew "cmake"
|
||||
brew "pkg-config"
|
||||
brew "llvm"
|
||||
brew "yasm"
|
||||
brew "zlib"
|
||||
|
||||
# For sccache
|
||||
brew "openssl@1.1"
|
19
etc/install_macos_gstreamer.sh
Executable file
19
etc/install_macos_gstreamer.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/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 https://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
VERSION=1.22.2
|
||||
URL_BASE=https://github.com/servo/servo-build-deps/releases/download/macOS
|
||||
|
||||
cd /tmp
|
||||
curl -L "${URL_BASE}/gstreamer-1.0-${VERSION}-universal.pkg" -o gstreamer.pkg
|
||||
curl -L "${URL_BASE}/gstreamer-1.0-devel-${VERSION}-universal.pkg" \
|
||||
-o gstreamer-dev.pkg
|
||||
sudo installer -pkg 'gstreamer.pkg' -target /
|
||||
sudo installer -pkg 'gstreamer-dev.pkg' -target /
|
Loading…
Add table
Add a link
Reference in a new issue