aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorWillem Deconinck2012-07-06 16:14:49 +0200
committerCharlie Sharpsteen2012-07-29 09:34:24 -0700
commit203e28ed764cf4117b914c515f323d4ce5fe5647 (patch)
treecce97d5eb8612edfe8b3c5dbe1b67794d3a1962e /Library/Formula
parent49f50a525307e624d5842fa4ea5977df40a92cad (diff)
downloadhomebrew-203e28ed764cf4117b914c515f323d4ce5fe5647.tar.bz2
scotch: Depend on MPIDependency
Closes #13241. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/scotch.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/Library/Formula/scotch.rb b/Library/Formula/scotch.rb
index 1a5227a83..655d109eb 100644
--- a/Library/Formula/scotch.rb
+++ b/Library/Formula/scotch.rb
@@ -6,12 +6,22 @@ class Scotch < Formula
version '5.1.12'
md5 'f873ff2bad519f9be7bc7b117bbe0bc4'
+ depends_on MPIDependency.new(:cc)
+
def install
cd 'src' do
ln_s 'Make.inc/Makefile.inc.i686_mac_darwin8', 'Makefile.inc'
- system 'make scotch'
- system 'make ptscotch'
- system "make", "install", "prefix=#{prefix}"
+
+ # 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}"
end
end
end