From aa053f44e51b792a196fe23e560a02e06b56e153 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 19 May 2014 12:31:05 -0500 Subject: john-jumbo: remove inreplace --- Library/Formula/john-jumbo.rb | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'Library/Formula') 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' -- cgit v1.2.3