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.
This commit is contained in:
Max Howell 2012-09-03 13:24:38 -04:00
parent c35f6cb9d5
commit fdadd7e9dd

View File

@ -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