aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/apr-1-config15
-rw-r--r--Library/Formula/ctail.rb10
-rw-r--r--Library/Formula/serf.rb16
-rw-r--r--Library/Homebrew/superenv.rb10
4 files changed, 27 insertions, 24 deletions
diff --git a/Library/ENV/4.3/apr-1-config b/Library/ENV/4.3/apr-1-config
new file mode 100755
index 000000000..40ad6478e
--- /dev/null
+++ b/Library/ENV/4.3/apr-1-config
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [[ "$HOMEBREW_CCCFG" == *a* ]]; then
+ case "$1" in
+ --cc) echo "cc";;
+ --cpp) echo "cpp";;
+ --includedir) echo "$HOMEBREW_SDKROOT/usr/include/apr-1";;
+ --includes) echo "-isystem$HOMEBREW_SDKROOT/usr/include/apr-1";;
+ --apr-libtool) echo "glibtool";;
+ *)
+ exec xcrun apr-1-config "$@";;
+ esac
+else
+ exec /usr/bin/apr-1-config "$@"
+fi
diff --git a/Library/Formula/ctail.rb b/Library/Formula/ctail.rb
index cfc570cf0..d62c52cc1 100644
--- a/Library/Formula/ctail.rb
+++ b/Library/Formula/ctail.rb
@@ -9,16 +9,6 @@ class Ctail < Formula
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 'make'
system 'make install'
diff --git a/Library/Formula/serf.rb b/Library/Formula/serf.rb
index d407b79b6..c20b89239 100644
--- a/Library/Formula/serf.rb
+++ b/Library/Formula/serf.rb
@@ -9,20 +9,16 @@ class Serf < Formula
depends_on :libtool
+ def apr_bin
+ superbin or "/usr/bin"
+ end
+
def install
ENV.universal_binary if build.universal?
- 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", "--disable-debug",
"--disable-dependency-tracking",
- "--prefix=#{prefix}"
+ "--prefix=#{prefix}",
+ "--with-apr=#{apr_bin}"
system "make install"
end
end
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb
index 5161e7e6c..e8e15c21f 100644
--- a/Library/Homebrew/superenv.rb
+++ b/Library/Homebrew/superenv.rb
@@ -11,14 +11,14 @@ require 'macos'
# 7) Simpler formula that *just work*
# 8) Build-system agnostic configuration of the tool-chain
-def superenv_bin
+def superbin
@bin ||= (HOMEBREW_REPOSITORY/"Library/ENV").children.reject{|d| d.basename.to_s > MacOS::Xcode.version }.max
end
def superenv?
not MacOS::Xcode.bad_xcode_select_path? and # because xcrun won't work
not MacOS::Xcode.folder.nil? and # because xcrun won't work
- superenv_bin and superenv_bin.directory? and
+ superbin and superbin.directory? and
not ARGV.include? "--env=std"
end
@@ -97,7 +97,7 @@ class << ENV
end
def determine_path
- paths = [superenv_bin]
+ paths = [superbin]
if MacSystem.xcode43_without_clt?
paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
@@ -156,9 +156,11 @@ class << ENV
def determine_cccfg
s = ""
+ s << 'b' if ARGV.build_bottle?
# Fix issue with sed barfing on unicode characters on Mountain Lion
s << 's' if MacOS.mountain_lion?
- s << 'b' if ARGV.build_bottle?
+ # Fix issue with 10.8 apr-1-config having broken paths
+ s << 'a' if MacOS.cat == :mountainlion
s
end