From 261a28063b6deb3670ee33aa9afc19e771917998 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 2 Sep 2012 01:01:48 -0700 Subject: libcaca: fix SHA1, option, test and X dependency. --- Library/Formula/libcaca.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Library/Formula/libcaca.rb') diff --git a/Library/Formula/libcaca.rb b/Library/Formula/libcaca.rb index 4e0a6383e..1ba029fb1 100644 --- a/Library/Formula/libcaca.rb +++ b/Library/Formula/libcaca.rb @@ -6,9 +6,14 @@ class Libcaca < Formula version '0.99b18' sha1 '0cbf8075c01d59b53c3cdfec7df9818696a41128' - depends_on 'pkg-config' => :build - depends_on 'imlib2' - depends_on :x11 + option 'with-imlib2', 'Build with Imlib2 support' + + depends_on :x11 if MacOS::X11.installed? or build.include? "with-imlib2" + + if build.include? "with-imlib2" + depends_on 'pkg-config' => :build + depends_on 'imlib2' => :optional + end fails_with :llvm do cause "Unsupported inline asm: input constraint with a matching output constraint of incompatible type" @@ -38,6 +43,10 @@ class Libcaca < Formula ENV.j1 # Or install can fail making the same folder at the same time system "make install" end + + def test + system "#{bin}/img2txt", "--version" + end end __END__ -- cgit v1.2.3