diff --git a/Library/Formula/botan.rb b/Library/Formula/botan.rb index 0bd89113dd..f443b08d45 100644 --- a/Library/Formula/botan.rb +++ b/Library/Formula/botan.rb @@ -13,8 +13,14 @@ class Botan < Formula args = ["--prefix=#{prefix}"] args << "--cpu=x86_64" if MacOS.prefer_64_bit? args << "--enable-debug" if ARGV.include? "--enable-debug" + # The --cc option needs "clang" or "gcc" and not the full path. + args << "--cc=#{ENV.compiler.to_s}" system "./configure.py", *args - system "make install" + # "-soname" can lead to issues like https://github.com/mxcl/homebrew/issues/11972 + inreplace "Makefile", "-Wl,-soname", "-dynamiclib -install_name " + # A hack to force them use our CFLAGS. MACH_OPT is empty in the Makefile + # but used for each call to cc/ld. + system "make", "install", "MACH_OPT=#{ENV.cflags}" end end