From dc99c823b343a9266df9e7bbe0b67d78197081c1 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 30 Jul 2012 14:08:07 -0700 Subject: [PATCH] autotrace: use options dsl --- Formula/autotrace.rb | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/Formula/autotrace.rb b/Formula/autotrace.rb index fa9a0f7647..bd5ffad7b6 100644 --- a/Formula/autotrace.rb +++ b/Formula/autotrace.rb @@ -1,27 +1,21 @@ require 'formula' -def without_imagemagick? - ARGV.include? '--without-imagemagick' -end - class Autotrace < Formula - url 'http://downloads.sourceforge.net/project/autotrace/AutoTrace/0.31.1/autotrace-0.31.1.tar.gz' homepage 'http://autotrace.sourceforge.net' - md5 '54eabbb38d2076ded6d271e1ee4d0783' + url 'http://downloads.sourceforge.net/project/autotrace/AutoTrace/0.31.1/autotrace-0.31.1.tar.gz' + sha1 '679e4912528030b86f23db5b99e60f8e7df883fd' - depends_on 'imagemagick' unless without_imagemagick? + option 'without-imagemagick', 'Compile without ImageMagick' - def options - [['--without-imagemagick', 'Compile without ImageMagick (non-bloaty)']] - end + depends_on 'imagemagick' unless build.include? 'without-imagemagick' def install - args = [ "--disable-debug", - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" ] + args = ["--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}"] - args << "--without-magick" if without_imagemagick? + args << "--without-magick" if build.include? 'without-imagemagick' system "./configure", *args system "make install"