From 7a886c2ddbfe48e106d9aa39ccc6ddc512b0b6c2 Mon Sep 17 00:00:00 2001 From: nibbles 2bits Date: Sat, 12 May 2012 02:21:11 -0700 Subject: log4cxx: fix compile error with clang using autogen.sh log4cxx building universal fails to link because the software uses old libtool scripts that craft one compile command missing both of the arch flags. * Add conditional deps on automake & libtool * Add a system call to `autogen.sh` to update the scripts * Note in comments the upstream bug report. * Tested on Lion 10.7.4 with clang and llvm. Fixes #12127. Closes #12211. Signed-off-by: Jack Nagel --- Library/Formula/log4cxx.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Library') diff --git a/Library/Formula/log4cxx.rb b/Library/Formula/log4cxx.rb index b751e4101..fd840d884 100644 --- a/Library/Formula/log4cxx.rb +++ b/Library/Formula/log4cxx.rb @@ -10,6 +10,11 @@ class Log4cxx < Formula cause "Fails with 'collect2: ld terminated with signal 11 [Segmentation fault]'" end + if ARGV.build_head? and MacOS.xcode_version >= "4.3" + depends_on "automake" => :build + depends_on "libtool" => :build + end + def options [ ["--universal", "Build for both 32 & 64 bit Intel."] @@ -19,6 +24,10 @@ class Log4cxx < Formula def install ENV.universal_binary if ARGV.build_universal? + # Fixes build error with clang, old libtool scripts. cf. #12127 + # Reported upstream here: https://issues.apache.org/jira/browse/LOGCXX-396 + # Remove at: unknown, waiting for developer comments. + system './autogen.sh' system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", # Docs won't install on OS X -- cgit v1.2.3