aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-10 19:54:26 -0600
committerJack Nagel2013-12-10 19:55:12 -0600
commitaf2a3327ff1350328c46d5a2f18b477693ad8449 (patch)
treec2cb4945bbf1d50cdf2ea2cc2eb4ad3305d37a28 /Library
parent0e6acdec0fe65e25a6bd56300e243ca7a87734b2 (diff)
downloadhomebrew-af2a3327ff1350328c46d5a2f18b477693ad8449.tar.bz2
sdl: only regenerate configure when building with X11
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/sdl.rb21
1 files changed, 14 insertions, 7 deletions
diff --git a/Library/Formula/sdl.rb b/Library/Formula/sdl.rb
index 5f0b500e4..8663d3e44 100644
--- a/Library/Formula/sdl.rb
+++ b/Library/Formula/sdl.rb
@@ -5,16 +5,23 @@ class Sdl < Formula
url 'http://www.libsdl.org/release/SDL-1.2.15.tar.gz'
sha1 '0c5f193ced810b0d7ce3ab06d808cbb5eef03a2c'
- head 'http://hg.libsdl.org/SDL', :branch => 'SDL-1.2', :using => :hg
+ head do
+ url 'http://hg.libsdl.org/SDL', :branch => 'SDL-1.2', :using => :hg
- depends_on :autoconf
- depends_on :automake
- depends_on :libtool
+ depends_on :autoconf
+ depends_on :automake
+ depends_on :libtool
+ end
option 'with-x11-driver', 'Compile with support for X11 video driver'
option :universal
- depends_on :x11 if build.with? 'x11-driver'
+ if build.with? 'x11-driver'
+ depends_on :x11
+ depends_on :autoconf
+ depends_on :automake
+ depends_on :libtool
+ end
def patches
p = []
@@ -22,7 +29,7 @@ class Sdl < Formula
# Related ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085
p << "http://bugzilla-attachments.libsdl.org/attachment.cgi?id=1320" if MacOS.version >= :mavericks
# Fix build against recent libX11; requires regenerating configure script
- p << "http://hg.libsdl.org/SDL/raw-rev/91ad7b43317a"
+ p << "http://hg.libsdl.org/SDL/raw-rev/91ad7b43317a" if build.with? 'x11-driver'
p
end
@@ -34,7 +41,7 @@ class Sdl < Formula
ENV.universal_binary if build.universal?
- system "./autogen.sh"
+ system "./autogen.sh" if build.head? or build.with? 'x11-driver'
args = %W[--prefix=#{prefix}]
args << "--disable-nasm" unless MacOS.version >= :mountain_lion # might work with earlier, might only work with new clang