homebrew-core/Formula/log4cxx.rb
nibbles 2bits 70c7a58c1f 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 Homebrew/homebrew#12127.
Closes Homebrew/homebrew#12211.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 13:27:06 -05:00

37 lines
1.1 KiB
Ruby

require 'formula'
class Log4cxx < Formula
url 'http://www.apache.org/dyn/closer.cgi?path=logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz'
homepage 'http://logging.apache.org/log4cxx/index.html'
md5 'b30ffb8da3665178e68940ff7a61084c'
fails_with :llvm do
build 2334
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."]
]
end
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
"--disable-doxygen"
system "make install"
end
end