From 79a0f76d26d43c7f6e38a60fbe2ec6bed1510543 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Sun, 7 Jan 2024 22:25:22 +0100 Subject: Fix the build on Ubuntu 20.04 (#31019) Ubuntu 20.04 doesn't have a new enough version of GStreamer, so automatically disable media when running on that platform. This also cleans up the media detection a bit, putting the result in a `enable-media` variable and moving some of the logic into the build scripts themselves rather than the platform module. --- python/servo/build_commands.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'python/servo/build_commands.py') diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 2ce671bf119..07e4a4011f3 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -58,7 +58,6 @@ class MachCommands(CommandBase): def build(self, build_type: BuildType, jobs=None, params=None, no_package=False, verbose=False, very_verbose=False, libsimpleservo=False, **kwargs): opts = params or [] - has_media_stack = "media-gstreamer" in self.features if build_type.is_release(): opts += ["--release"] @@ -74,7 +73,7 @@ class MachCommands(CommandBase): if very_verbose: opts += ["-vv"] - env = self.build_env(is_build=True) + env = self.build_env() self.ensure_bootstrapped() self.ensure_clobbered() @@ -173,7 +172,7 @@ class MachCommands(CommandBase): status = 1 # copy needed gstreamer DLLs in to servo.exe dir - if has_media_stack: + if self.enable_media: print("Packaging gstreamer DLLs") if not package_gstreamer_dlls(env, servo_exe_dir, target_triple): status = 1 @@ -189,7 +188,7 @@ class MachCommands(CommandBase): servo_bin_dir = os.path.dirname(servo_path) assert os.path.exists(servo_bin_dir) - if has_media_stack: + if self.enable_media: print("Packaging gstreamer dylibs") if not package_gstreamer_dylibs(self.cross_compile_target, servo_path): return 1 -- cgit v1.2.3