homebrew-core/Formula/autotrace.rb
Derek Poon 22132b9cc3 autotrace: port to libpng 1.5
autotrace fails to build because libpng changed its API between 1.4 and 1.5.
Apply a patch from MacPorts to fix this.  Thanks to adamv for the solution.

Closes Homebrew/homebrew#16569.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-12-16 08:57:14 -08:00

30 lines
896 B
Ruby

require 'formula'
class Autotrace < Formula
homepage 'http://autotrace.sourceforge.net'
url 'http://downloads.sourceforge.net/project/autotrace/AutoTrace/0.31.1/autotrace-0.31.1.tar.gz'
sha1 '679e4912528030b86f23db5b99e60f8e7df883fd'
option 'without-imagemagick', 'Compile without ImageMagick'
depends_on 'imagemagick' unless build.include? 'without-imagemagick'
def patches
{
# Issue 16569: Use MacPorts patch to port input-png.c to libpng 1.5.
:p0 => 'https://trac.macports.org/export/100575/trunk/dports/graphics/autotrace/files/patch-libpng-1.5.diff'
}
end
def install
args = ["--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"]
args << "--without-magick" if build.include? 'without-imagemagick'
system "./configure", *args
system "make install"
end
end