aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2012-09-03 13:24:38 -0400
committerMax Howell2012-09-03 15:12:31 -0400
commitfdadd7e9dd1e833ce55554249d82e1513b906efb (patch)
tree1f69e57fafac01508551a716141d847611a83083
parentc35f6cb9d531799ce0e50eb1754a092eab8725d3 (diff)
downloadbrew-fdadd7e9dd1e833ce55554249d82e1513b906efb.tar.bz2
Fix linking against X11 cairo in preference to ours
Amateur mistake where I forgot that the system library path is read AFTER the -L library path, so /usr/local/lib was after /opt/X11/lib and the wrong cairo was used. This only affects CLT /usr/local installs with XQuartz installed. Fixes Homebrew/homebrew#14639.
-rwxr-xr-xLibrary/ENV/4.3/cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 027587b4e..12cbb5bf5 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -17,7 +17,6 @@ end
def cmake_prefixes
@prefixes ||= ENV['CMAKE_PREFIX_PATH'].split(':').reject do |path|
case path
- when '/usr/local' then !nclt?
when '/usr', '/', "#$sdkroot/usr" then true
end
end
@@ -131,6 +130,9 @@ class Cmd
end
def cppflags
all = cmake_prefixes.map{|prefix| "#{prefix}/include" }
+ # we need to do this for cppflags and not ldflags as here we use -isystem
+ # but with ld we can only set -L.
+ all.delete('/usr/local') unless nclt?
opt = all.select{|prefix| prefix =~ %r{^#$brewfix/opt} }
sys = all - opt + ENV['CMAKE_INCLUDE_PATH'].split(':')
# we want our keg-only includes to be found before system includes so that