bochs: make sdl2 dependency optional (#12507)

SDL is only required for graphical use. Many people use Bochs for text-based debugging.
This commit is contained in:
Ron Mordechai 2017-04-22 16:30:30 +02:00 committed by Mike McQuaid
parent 4c264bc64e
commit 647efc11dc

View file

@ -12,14 +12,14 @@ class Bochs < Formula
end
option "with-gdb-stub", "Enable GDB Stub"
option "without-sdl2", "Disable graphical support"
depends_on "pkg-config" => :build
depends_on "sdl2"
depends_on "sdl2" => :recommended
def install
args = %W[
--prefix=#{prefix}
--with-sdl2
--with-nogui
--enable-disasm
--disable-docbook
@ -48,6 +48,8 @@ class Bochs < Formula
--with-term
]
args << "--with-sdl2" if build.with? "sdl2"
if build.with? "gdb-stub"
args << "--enable-gdb-stub"
else