2011-09-09 12:25:06 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Scotch < Formula
|
|
|
|
homepage 'https://gforge.inria.fr/projects/scotch'
|
2012-02-10 07:01:58 +00:00
|
|
|
url 'https://gforge.inria.fr/frs/download.php/28933'
|
|
|
|
version '5.1.12'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '1fd9becbc14809fc080f4f69ca0d9c1c8726223f'
|
2011-09-09 12:25:06 +00:00
|
|
|
|
2012-07-06 14:14:49 +00:00
|
|
|
depends_on MPIDependency.new(:cc)
|
|
|
|
|
2011-09-09 12:25:06 +00:00
|
|
|
def install
|
2012-02-21 06:04:21 +00:00
|
|
|
cd 'src' do
|
|
|
|
ln_s 'Make.inc/Makefile.inc.i686_mac_darwin8', 'Makefile.inc'
|
2012-07-06 14:14:49 +00:00
|
|
|
|
|
|
|
# Use mpicc to compile everything
|
|
|
|
inreplace 'Makefile.inc' do |s|
|
|
|
|
s.change_make_var! 'CCS', ENV['MPICC']
|
|
|
|
s.change_make_var! 'CCP', ENV['MPICC']
|
|
|
|
s.change_make_var! 'CCD', ENV['MPICC']
|
|
|
|
end
|
|
|
|
|
|
|
|
system 'make', 'scotch'
|
|
|
|
system 'make', 'ptscotch'
|
|
|
|
system 'make', 'install', "prefix=#{prefix}"
|
2012-02-21 06:04:21 +00:00
|
|
|
end
|
2011-09-09 12:25:06 +00:00
|
|
|
end
|
|
|
|
end
|