autotrace: use options dsl
This commit is contained in:
parent
26a30cbc3c
commit
dc99c823b3
1 changed files with 9 additions and 15 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue