aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike McQuaid2013-08-08 21:58:22 +0100
committerMike McQuaid2013-08-08 21:58:47 +0100
commit18c64aa3216d69ba9c780795e1bb0ccc11b6f36b (patch)
treed6c8b287ddc4a1b2e8eb8377d3e69277b935baca /Library/Formula
parent674926a2580feee043d0ed2bd8fa129a10d088dc (diff)
downloadhomebrew-18c64aa3216d69ba9c780795e1bb0ccc11b6f36b.tar.bz2
gpac: make X11 support optional.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gpac.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Formula/gpac.rb b/Library/Formula/gpac.rb
index 3a7fce34e..eb626116c 100644
--- a/Library/Formula/gpac.rb
+++ b/Library/Formula/gpac.rb
@@ -15,7 +15,7 @@ class Gpac < Formula
head 'https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac'
- depends_on :x11
+ depends_on :x11 => MacOS::X11.installed? ? :recommended : :optional
depends_on 'pkg-config' => :build
depends_on 'a52dec' => :optional
@@ -34,11 +34,14 @@ class Gpac < Formula
args = ["--disable-wx",
"--prefix=#{prefix}",
- "--mandir=#{man}",
- # gpac build system is barely functional
- "--extra-cflags=-I#{MacOS::X11.include}",
- # Force detection of X libs on 64-bit kernel
- "--extra-ldflags=-L#{MacOS::X11.lib}"]
+ "--mandir=#{man}"]
+
+ if build.with? 'x11'
+ # gpac build system is barely functional
+ args << "--extra-cflags=-I#{MacOS::X11.include}",
+ # Force detection of X libs on 64-bit kernel
+ args << "--extra-ldflags=-L#{MacOS::X11.lib}"
+ end
chmod 0700, "configure"
system "./configure", *args