superenv fix for broken 10.8 apr-1-config
serf requires you to explicitly tell it where to find the supertool because otherwise it has a hardcoded /usr/bin/apr-1-config (:P), ctail however is sensible and searches the PATH so now it's as though we do nothing special in that formula. Nice.
This commit is contained in:
parent
ae17944e06
commit
f6ded076df
15
Library/ENV/4.3/apr-1-config
Executable file
15
Library/ENV/4.3/apr-1-config
Executable file
@ -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
|
@ -11,14 +11,14 @@ require 'macos'
|
|||||||
# 7) Simpler formula that *just work*
|
# 7) Simpler formula that *just work*
|
||||||
# 8) Build-system agnostic configuration of the tool-chain
|
# 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
|
@bin ||= (HOMEBREW_REPOSITORY/"Library/ENV").children.reject{|d| d.basename.to_s > MacOS::Xcode.version }.max
|
||||||
end
|
end
|
||||||
|
|
||||||
def superenv?
|
def superenv?
|
||||||
not MacOS::Xcode.bad_xcode_select_path? and # because xcrun won't work
|
not MacOS::Xcode.bad_xcode_select_path? and # because xcrun won't work
|
||||||
not MacOS::Xcode.folder.nil? 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"
|
not ARGV.include? "--env=std"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ class << ENV
|
|||||||
end
|
end
|
||||||
|
|
||||||
def determine_path
|
def determine_path
|
||||||
paths = [superenv_bin]
|
paths = [superbin]
|
||||||
if MacSystem.xcode43_without_clt?
|
if MacSystem.xcode43_without_clt?
|
||||||
paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
|
paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
|
||||||
paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
|
paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
|
||||||
@ -156,9 +156,11 @@ class << ENV
|
|||||||
|
|
||||||
def determine_cccfg
|
def determine_cccfg
|
||||||
s = ""
|
s = ""
|
||||||
|
s << 'b' if ARGV.build_bottle?
|
||||||
# Fix issue with sed barfing on unicode characters on Mountain Lion
|
# Fix issue with sed barfing on unicode characters on Mountain Lion
|
||||||
s << 's' if MacOS.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
|
s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user