Skip to content

Commit

Permalink
Fix linking against X11 cairo in preference to ours
Browse files Browse the repository at this point in the history
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#14639.
  • Loading branch information
mxcl committed Sep 3, 2012
1 parent af75527 commit 988a527
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Library/ENV/4.3/cc
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 988a527

Please sign in to comment.