Superenv wrapper for sed
Fixes Mountain Lion specific sed issue. Provided scripts don't use the full-path to see we are fine. They never do though, that would assume too much.
This commit is contained in:
parent
1ec368759e
commit
4f06d131df
7
Library/ENV/4.3/sed
Executable file
7
Library/ENV/4.3/sed
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ $HOMEBREW_CCCFG == *s* ]]; then
|
||||||
|
# Fix issue with sed barfing on unicode characters on Mountain Lion
|
||||||
|
unset LC_ALL
|
||||||
|
export LC_CTYPE='C'
|
||||||
|
fi
|
||||||
|
exec /usr/bin/sed "$@"
|
||||||
@ -34,12 +34,6 @@ class << ENV
|
|||||||
delete('CDPATH') # avoid make issues that depend on changing directories
|
delete('CDPATH') # avoid make issues that depend on changing directories
|
||||||
delete('GREP_OPTIONS') # can break CMake
|
delete('GREP_OPTIONS') # can break CMake
|
||||||
delete('CLICOLOR_FORCE') # autotools doesn't like this
|
delete('CLICOLOR_FORCE') # autotools doesn't like this
|
||||||
|
|
||||||
if MacOS.mountain_lion?
|
|
||||||
# Fix issue with sed barfing on unicode characters on Mountain Lion
|
|
||||||
delete('LC_ALL')
|
|
||||||
ENV['LC_CTYPE'] = "C"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_build_environment
|
def setup_build_environment
|
||||||
@ -53,7 +47,7 @@ class << ENV
|
|||||||
ENV['PATH'] = determine_path
|
ENV['PATH'] = determine_path
|
||||||
ENV['PKG_CONFIG_PATH'] = determine_pkg_config_path
|
ENV['PKG_CONFIG_PATH'] = determine_pkg_config_path
|
||||||
ENV['HOMEBREW_CC'] = determine_cc
|
ENV['HOMEBREW_CC'] = determine_cc
|
||||||
ENV['HOMEBREW_CCCFG'] = 'b' if ARGV.build_bottle?
|
ENV['HOMEBREW_CCCFG'] = determine_cccfg
|
||||||
ENV['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacSystem.xcode43_without_clt?
|
ENV['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacSystem.xcode43_without_clt?
|
||||||
ENV['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
|
ENV['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
|
||||||
ENV['CMAKE_FRAMEWORK_PATH'] = "#{MacOS.sdk_path}/System/Library/Frameworks" if MacSystem.xcode43_without_clt?
|
ENV['CMAKE_FRAMEWORK_PATH'] = "#{MacOS.sdk_path}/System/Library/Frameworks" if MacSystem.xcode43_without_clt?
|
||||||
@ -155,6 +149,14 @@ class << ENV
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def determine_cccfg
|
||||||
|
s = ""
|
||||||
|
# Fix issue with sed barfing on unicode characters on Mountain Lion
|
||||||
|
s << 's' if MacOS.mountain_lion?
|
||||||
|
s << 'b' if ARGV.build_bottle?
|
||||||
|
s
|
||||||
|
end
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
||||||
### NO LONGER NECESSARY OR NO LONGER SUPPORTED
|
### NO LONGER NECESSARY OR NO LONGER SUPPORTED
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user