homebrew-core/Formula/mathgl.rb
Kyle Kauffman dcf5e67d4d mathgl 1.11.2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-04-18 21:02:47 -07:00

23 lines
585 B
Ruby

require 'formula'
class Mathgl < Formula
homepage 'http://mathgl.sourceforge.net/'
url 'http://downloads.sourceforge.net/mathgl/mathgl-1.11.2.tar.gz'
md5 'acd33e68911d9506f60d769dce23f95e'
depends_on 'gsl'
def install
ENV.x11
ENV['LIBS'] = '-lz'
# Fixed upstream: this line can be removed when v2 is released
inreplace ["mgl/mgl_export.cpp", "mgl/mgl_data_png.cpp"] do |s|
s.gsub! /#include <png.h>/, "#include <zlib.h>\n#include <png.h>"
end
system "./configure", "--prefix=#{prefix}"
system "make"
system "make install"
end
end