aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChongyu Zhu2013-02-07 11:52:38 +0800
committerAdam Vandenberg2013-02-06 21:26:22 -0800
commitac444cca5aadedba47df6c5ecffdddc31bcfeb23 (patch)
treef52885bf6d7950ba1f0e7e8e529e200999517051
parent314260f1696f38498d61f1d8912a40682c1f67ea (diff)
downloadhomebrew-ac444cca5aadedba47df6c5ecffdddc31bcfeb23.tar.bz2
zbar: x11 is optional
Closes #17653. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/zbar.rb24
1 files changed, 17 insertions, 7 deletions
diff --git a/Library/Formula/zbar.rb b/Library/Formula/zbar.rb
index 919e62594..3ec07872a 100644
--- a/Library/Formula/zbar.rb
+++ b/Library/Formula/zbar.rb
@@ -5,19 +5,29 @@ class Zbar < Formula
url 'http://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2'
sha1 '273b47c26788faba4325baecc34063e27a012963'
- depends_on :x11
+ depends_on :x11 => :optional
depends_on 'pkg-config' => :build
depends_on 'jpeg'
depends_on 'imagemagick'
depends_on 'ufraw'
def install
- system "./configure", "--disable-dependency-tracking",
- "--prefix=#{prefix}",
- "--without-python",
- "--without-qt",
- "--disable-video",
- "--without-gtk"
+ args = %W[
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ --without-python
+ --without-qt
+ --disable-video
+ --without-gtk
+ ]
+
+ if build.with? 'x11'
+ args << '--with-x'
+ else
+ args << '--without-x'
+ end
+
+ system "./configure", *args
system "make install"
end
end