diff options
| author | nibbles 2bits | 2012-08-25 09:09:15 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-25 09:20:13 -0700 |
| commit | 10cf8a10e95570c555b4f3ff1f3496ceb88331d1 (patch) | |
| tree | 0426d9926a2e5255fa973a8b4a6a6ccb0f1b2827 /Library | |
| parent | 951f9d369e661a6b6b3da2b3ff8381bb9b97063c (diff) | |
| download | homebrew-10cf8a10e95570c555b4f3ff1f3496ceb88331d1.tar.bz2 | |
ctail: fix build on ML due to apr-1-config
Ctail and Serf suffer from the ML bug where `apr-1-config --cpp`
returns a non-existent path. Serf is fixed. Add the same changes
to Ctail where `CPP` and `APR_LIBTOOL` get sane values, where
there are new deps on `libtool` and `automake`, and where
XCode-only installs get help finding the apr includes. Also
change from manual compile commands into using their Makefile
because it works correctly and was doing the same thing basically.
By using the `Makefile` we also get all the `apr-1-config --libs`
brought in which may be different for SL vs L vs ML.
cf. #13891
Fixes #14313
Closes #14451.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/ctail.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Library/Formula/ctail.rb b/Library/Formula/ctail.rb index 776dff3b0..cfc570cf0 100644 --- a/Library/Formula/ctail.rb +++ b/Library/Formula/ctail.rb @@ -1,15 +1,26 @@ require 'formula' class Ctail < Formula - url 'http://ctail.i-want-a-pony.com/downloads/ctail-0.1.0.tar.bz2' homepage 'http://ctail.i-want-a-pony.com/' - md5 'fc39139aeaf3400aa13b338e2266b976' + url 'http://ctail.i-want-a-pony.com/downloads/ctail-0.1.0.tar.bz2' + sha1 '4bd0373df88136b48cac721c98d34cefda27aff9' + + depends_on :automake + depends_on :libtool def install + if MacOS.mountain_lion? + # Fixes a bad path returned by `apr-1-config --cpp` on ML. + # https://github.com/mxcl/homebrew/issues/13586 + ENV['CPP'] = "#{ENV.cc} -E" + # Use HB libtool not the one from apr that also has a bad path. + ENV['APR_LIBTOOL'] = 'glibtool' + # Especially for Xcode-only, the apr hearders are needed by glibtool + ENV.append 'CPPFLAGS', "-I#{MacOS.sdk_path}/usr/include/apr-1" + end + system "./configure", "--prefix=#{prefix}", "--disable-debug" - system "/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc -g -Wall -Werror -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I. -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o ctail.lo ctail.c && touch ctail.lo" - system "/usr/share/apr-1/build-1/libtool --silent --mode=link gcc -o ctail ctail.lo -L/usr/lib -R/usr/lib -laprutil-1 -lexpat -liconv -lsqlite3 -L/usr/lib -R/usr/lib -lapr-1 -lpthread" - bin.mkpath - system "/usr/share/apr-1/build-1/libtool --silent --mode=install /usr/bin/install -c -m 755 ctail #{bin}" + system 'make' + system 'make install' end end |
