aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/john-jumbo.rb23
1 files changed, 13 insertions, 10 deletions
diff --git a/Library/Formula/john-jumbo.rb b/Library/Formula/john-jumbo.rb
index 4ce7fa2a7..8111d5d9d 100644
--- a/Library/Formula/john-jumbo.rb
+++ b/Library/Formula/john-jumbo.rb
@@ -24,21 +24,24 @@ class JohnJumbo < Formula
def install
ENV.deparallelize
- arch = MacOS.prefer_64_bit? ? '64' : 'sse2'
- arch += '-opencl'
-
+ arch = MacOS.prefer_64_bit? ? "64-opencl" : "sse2-opencl"
target = "macosx-x86-#{arch}"
- cd 'src' do
- inreplace 'Makefile' do |s|
- s.change_make_var! "CC", ENV.cc
- if MacOS.version > :leopard && ENV.compiler != :clang
- s.change_make_var! "OMPFLAGS", "-fopenmp -msse2 -D_FORTIFY_SOURCE=0"
- end
+ args = %W[-C src clean CC=#{ENV.cc} #{target}]
+
+ if MacOS.version >= :snow_leopard
+ case ENV.compiler
+ when :clang
+ # no openmp support
+ when :gcc, :llvm
+ args << "OMPFLAGS=-fopenmp -msse2 -D_FORTIFY_SOURCE=0"
+ else
+ args << "OMPFLAGS=-fopenmp -msse2"
end
- system "make", "clean", target
end
+ system "make", *args
+
# Remove the README symlink and install the real file
rm 'README'
prefix.install 'doc/README'