aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2012-08-24 15:45:32 -0700
committerCharlie Sharpsteen2012-08-24 19:38:04 -0700
commit1a4bec274b884b29c8af8ada2e9d0a2b73dc4674 (patch)
tree2bbd4dbcb3858d1498adc15712b71c9578c85109 /Library
parent430b3fb7b5ca0649c351efcfaad439183c566b7c (diff)
downloadhomebrew-1a4bec274b884b29c8af8ada2e9d0a2b73dc4674.tar.bz2
graphviz: Use options DSL
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/graphviz.rb21
1 files changed, 6 insertions, 15 deletions
diff --git a/Library/Formula/graphviz.rb b/Library/Formula/graphviz.rb
index 5a5b6addf..10ab5cb18 100644
--- a/Library/Formula/graphviz.rb
+++ b/Library/Formula/graphviz.rb
@@ -1,33 +1,24 @@
require 'formula'
-def build_bindings?
- ARGV.include? '--with-bindings' and not ARGV.include? '--without-bindings'
-end
-
class Graphviz < Formula
homepage 'http://graphviz.org/'
url 'http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz'
sha1 '4725d88a13e071ee22e632de551d4a55ca08ee7d'
option :universal
+ option 'with-bindings', 'Build Perl/Python/Ruby/etc. bindings'
+ option 'with-pangocairo', 'Build with Pango/Cairo for alternate PDF output'
depends_on :libpng
depends_on 'pkg-config' => :build
- depends_on 'pango' if ARGV.include? '--with-pangocairo'
- depends_on 'swig' if build_bindings?
+ depends_on 'pango' if build.include? 'with-pangocairo'
+ depends_on 'swig' if build.include? 'with-bindings'
fails_with :clang do
build 318
end
- def options
- [
- ["--with-pangocairo", "Build with Pango/Cairo for alternate PDF output"],
- ["--with[out]-bindings", "Build Perl/Python/Ruby/etc. bindings (default on Lion; may not work on earlier systems)"]
- ]
- end
-
def patches
{ :p0 => "https://trac.macports.org/export/78507/trunk/dports/graphics/graphviz-gui/files/patch-project.pbxproj.diff",
:p1 => DATA}
@@ -41,8 +32,8 @@ class Graphviz < Formula
"--with-qt=no",
"--without-x",
"--with-quartz"]
- args << "--disable-swig" unless build_bindings?
- args << "--without-pangocairo" unless ARGV.include? '--with-pangocairo'
+ args << "--disable-swig" unless build.include? 'with-bindings'
+ args << "--without-pangocairo" unless build.include? 'with-pangocairo'
system "./configure", *args
system "make install"