aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-05-19 12:31:05 -0500
committerJack Nagel2014-05-19 12:31:05 -0500
commitaa053f44e51b792a196fe23e560a02e06b56e153 (patch)
treef7c07f86d52f14d6b3ae5ebab0013b2275f0b462
parent4b228811a89e52a7dcd1bafb9d78fd89ed11b619 (diff)
downloadhomebrew-aa053f44e51b792a196fe23e560a02e06b56e153.tar.bz2
john-jumbo: remove inreplace
-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'