mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Bootstrap pkg-config and cmake on MacOS (#30497)
These need to be installed in order to build so we can install them via Homebrew. Do this by simply restoring the Homebrew bootstrapping logic we had in place previously. Fixes #27171.
This commit is contained in:
parent
67a36dd9b1
commit
aadf48bd4d
4 changed files with 19 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -58,5 +58,8 @@ Sessionx.vim
|
|||
# Layout debugger trace files
|
||||
layout_trace*
|
||||
|
||||
# Package managers
|
||||
support/macos/Brewfile.lock.json
|
||||
|
||||
# direnv
|
||||
.envrc
|
||||
|
|
|
@ -25,7 +25,7 @@ manually, try the [manual build setup][manual-build].
|
|||
- Install [Xcode](https://developer.apple.com/xcode/)
|
||||
- Install [Homebrew](https://brew.sh/)
|
||||
- Run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
|
||||
- Run `pip install virtualenv`
|
||||
- Run `pip3 install virtualenv`
|
||||
- Run `./mach bootstrap`<br/>
|
||||
*Note: This will install the recommended version of GStreamer globally on your system.*
|
||||
|
||||
|
|
|
@ -55,7 +55,19 @@ class MacOS(Base):
|
|||
return True
|
||||
|
||||
def _platform_bootstrap(self, _force: bool) -> bool:
|
||||
return self._platform_bootstrap_gstreamer(False)
|
||||
installed_something = False
|
||||
try:
|
||||
brewfile = os.path.join(util.SERVO_ROOT, "support", "macos", "Brewfile")
|
||||
output = subprocess.check_output(
|
||||
['brew', 'bundle', 'install', "--file", brewfile]
|
||||
).decode("utf-8")
|
||||
print(output)
|
||||
installed_something = "Installing" in output
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Could not run homebrew. Is it installed?")
|
||||
raise e
|
||||
installed_something |= self._platform_bootstrap_gstreamer(False)
|
||||
return installed_something
|
||||
|
||||
def _platform_bootstrap_gstreamer(self, force: bool) -> bool:
|
||||
if not force and self.is_gstreamer_installed(cross_compilation_target=None):
|
||||
|
|
2
support/macos/Brewfile
Normal file
2
support/macos/Brewfile
Normal file
|
@ -0,0 +1,2 @@
|
|||
brew "cmake"
|
||||
brew "pkg-config"
|
Loading…
Add table
Add a link
Reference in a new issue