diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | etc/homebrew/Brewfile | 3 | ||||
-rw-r--r-- | python/servo/build_commands.py | 11 |
3 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md index 5e85abaf920..5ff8d4137dd 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ NOTE: run these steps after you've cloned the project locally. ``` sh cd servo bash etc/install_macos_gstreamer.sh +brew bundle install --file=etc/homebrew/Brewfile pip install virtualenv ``` diff --git a/etc/homebrew/Brewfile b/etc/homebrew/Brewfile new file mode 100644 index 00000000000..008f8628d59 --- /dev/null +++ b/etc/homebrew/Brewfile @@ -0,0 +1,3 @@ +# Runtime dependencies + +brew "xz" diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index f5c6e2aa749..6cd4bdc7c45 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -872,6 +872,17 @@ def copy_dependencies(binary_path, lib_path, gst_root): if is_system_library(f): continue full_path = resolve_rpath(f, gst_root) + # fixme(mukilan): this is a temporary solution to a bug + # in the official gstreamer packages. Few gstreamer dylibs + # like 'libavcodec.59.dylib' have absolute paths to liblzma + # instead of @rpath based to be relocatable. The homebrew + # prefix is configurable in general and is /opt/homebrew + # on Apple Silicon + if full_path == "/usr/local/opt/xz/lib/liblzma.5.dylib" and ( + not path.exists("/usr/local/opt/xz") + and path.exists("/opt/homebrew/")): + full_path = "/opt/homebrew/lib/liblzma.5.dylib" + need_relinked = set(otool(full_path)) new_path = path.join(lib_path, path.basename(full_path)) if not path.exists(new_path): |