Skip to content

Commit

Permalink
Updates mathgl to version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kristensen committed Sep 17, 2012
1 parent 81f9a64 commit 019c984
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Library/Formula/mathgl.rb
Expand Up @@ -2,22 +2,23 @@

class Mathgl < Formula
homepage 'http://mathgl.sourceforge.net/'
url 'http://downloads.sourceforge.net/mathgl/mathgl-1.11.2.tar.gz'
sha1 '16b9ab58e654c5b91374f8a35eafc33630d7f5c0'
url 'http://downloads.sourceforge.net/mathgl/mathgl-2.0.3.tar.gz'
sha1 'c032cf53de3f6d3d5e45f6ff9e26889617770f02'

depends_on 'cmake' => :build
depends_on 'gsl'
depends_on :libpng

def install
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
# 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 "./configure", "--prefix=#{prefix}"
system "cmake", ".", *std_cmake_args
system "make install"
end

Expand Down

0 comments on commit 019c984

Please sign in to comment.