2012-01-04 00:59:32 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class AdolC < Formula
|
2012-01-26 07:25:54 +00:00
|
|
|
homepage 'https://projects.coin-or.org/ADOL-C'
|
2012-06-09 10:52:10 +00:00
|
|
|
url 'http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.3.0.tgz'
|
|
|
|
sha1 'd9124ce0b199cb8b841a9a9ec10d1fb31ed11b49'
|
2012-01-04 00:59:32 +00:00
|
|
|
|
2012-01-26 07:25:54 +00:00
|
|
|
head 'https://projects.coin-or.org/svn/ADOL-C/trunk/', :using => :svn
|
|
|
|
|
|
|
|
depends_on 'colpack'
|
|
|
|
|
2012-01-04 00:59:32 +00:00
|
|
|
def install
|
2013-01-26 21:52:14 +00:00
|
|
|
# Make our own realpath script
|
|
|
|
(buildpath/'realpath').write <<-EOS.undent
|
|
|
|
#!/usr/bin/python
|
|
|
|
import os,sys
|
|
|
|
print os.path.realpath(sys.argv[1])
|
|
|
|
EOS
|
|
|
|
system "chmod +x ./realpath"
|
|
|
|
|
2012-06-09 10:52:10 +00:00
|
|
|
# Configure may get automatically regenerated. So patch configure.ac also.
|
|
|
|
inreplace %w(configure configure.ac) do |s|
|
2013-01-26 21:52:14 +00:00
|
|
|
s.gsub! "readlink -f", "/#{buildpath}/realpath"
|
2012-01-26 07:25:54 +00:00
|
|
|
s.gsub! "lib64", "lib"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--enable-sparse",
|
|
|
|
"--with-colpack=#{HOMEBREW_PREFIX}"
|
2012-01-04 00:59:32 +00:00
|
|
|
system "make install"
|
2012-01-26 07:25:54 +00:00
|
|
|
system "make test"
|
2012-01-04 00:59:32 +00:00
|
|
|
end
|
|
|
|
end
|