From 3cff52859e26bfcc8a625d08b8d040d5838a319e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karen/=E3=81=82=E3=81=91=E3=81=BF?= Date: Wed, 13 Oct 2021 18:04:45 -0700 Subject: [PATCH] qemu: Enable the SDL UI frontend by default on OS X < 10.5. QEMU normally enables the Cocoa UI frontend by default when building for OS X, but this is unusable on < 10.5 due to missing features on these OS X versions. This change allows users building QEMU for 10.4.x to have a UI by default (like what you would get building it for >= 10.5), instead of having to remember to specify the --with-sdl build flag. Otherwise, OS X 10.4.x users who run `brew install qemu` without this commit will end up building headless/VNC-only binaries of QEMU, which they may not expect. --- Library/Formula/qemu.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Library/Formula/qemu.rb b/Library/Formula/qemu.rb index 7039ed8700..c65c415e39 100644 --- a/Library/Formula/qemu.rb +++ b/Library/Formula/qemu.rb @@ -16,7 +16,12 @@ class Qemu < Formula depends_on "glib" depends_on "pixman" depends_on "vde" => :optional - depends_on "sdl" => :optional + if MacOS.version < :leopard + # Enable the SDL UI by default on OS X versions older than 10.5 because the Cocoa UI (which is otherwise enabled by default) is unavailable on these OS X versions. + depends_on "sdl" => :recommended + else + depends_on "sdl" => :optional + end depends_on "gtk+" => :optional depends_on "libssh2" => :optional @@ -46,7 +51,7 @@ def install --disable-guest-agent ] - # Cocoa UI uses features that require 10.5 or newer + # The Cocoa UI uses features that require OS X 10.5 or newer, so we only enable it by default on those OS X versions. if MacOS.version > :tiger args << "--enable-cocoa" else