2011-09-09 12:25:06 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Scotch < Formula
|
|
|
|
homepage 'https://gforge.inria.fr/projects/scotch'
|
2013-01-10 00:07:46 +00:00
|
|
|
url 'https://gforge.inria.fr/frs/download.php/31831/scotch_6.0.0.tar.gz'
|
|
|
|
sha1 'eb32d846bb14449245b08c81e740231f7883fea6'
|
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
|
|
|
|
|
|
|
inreplace 'Makefile.inc' do |s|
|
2013-01-10 00:07:46 +00:00
|
|
|
s.change_make_var! 'CCS', ENV['CC']
|
2012-07-06 14:14:49 +00:00
|
|
|
s.change_make_var! 'CCP', ENV['MPICC']
|
|
|
|
s.change_make_var! 'CCD', ENV['MPICC']
|
2013-01-10 00:07:46 +00:00
|
|
|
# OS X doesn't implement pthread_barriers required by Scotch
|
|
|
|
s.slice! '-DCOMMON_PTHREAD'
|
|
|
|
s.slice! '-DSCOTCH_PTHREAD'
|
2012-07-06 14:14:49 +00:00
|
|
|
end
|
2013-01-10 00:07:46 +00:00
|
|
|
system 'make', 'scotch','VERBOSE=ON'
|
|
|
|
system 'make', 'ptscotch','VERBOSE=ON'
|
2012-07-06 14:14:49 +00:00
|
|
|
system 'make', 'install', "prefix=#{prefix}"
|
2012-02-21 06:04:21 +00:00
|
|
|
end
|
2011-09-09 12:25:06 +00:00
|
|
|
end
|
|
|
|
end
|