diff options
| author | samueljohn | 2012-06-25 12:41:47 +0200 |
|---|---|---|
| committer | Jack Nagel | 2012-07-19 23:08:39 -0500 |
| commit | 89b60370ef7eccfebf78efc7e5754be603dc10ff (patch) | |
| tree | 363e81c3931e94b783f0d376efe0461dbb81c123 | |
| parent | 42c62f77d4b51d971013c819a7997af43088c6a2 (diff) | |
| download | homebrew-89b60370ef7eccfebf78efc7e5754be603dc10ff.tar.bz2 | |
botan: fix xcode-only install
- botan's configure.py ignores our CFLAGS and switches the compiler to
llvm :-/ We can use the MACH_OPT variable to insert our CLFAGS and
make this build with Xcode-only setups.
- Using ENV.compiler.to_s for the compiler string.
- Fixing the "ld: unknown option soname" issue when using clang.
Closes #13065.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Formula/botan.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Formula/botan.rb b/Library/Formula/botan.rb index 0bd89113d..f443b08d4 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 |
