john: enable OpenCL and OpenMP support for --jumbo

Closes Homebrew/homebrew#19105.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Felix Bünemann 2013-04-10 16:30:03 +02:00 committed by Adam Vandenberg
parent 04a008679a
commit f76469f608

View file

@ -26,9 +26,16 @@ class John < Formula
def install
ENV.deparallelize
arch = Hardware.is_64_bit? ? '64' : 'sse2'
arch += '-opencl' if build.include? 'jumbo'
cd 'src' do
system "make", "clean", "macosx-x86-#{arch}", "CC=#{ENV.cc}"
inreplace 'Makefile' do |s|
s.change_make_var! "CC", ENV.cc
if build.include?('jumbo') && MacOS.version != :leopard && ENV.compiler != :clang
s.change_make_var! "OMPFLAGS", "-fopenmp -msse2 -D_FORTIFY_SOURCE=0"
end
end
system "make", "clean", "macosx-x86-#{arch}"
end
# Remove the README symlink and install the real file