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:
parent
c35f6cb9d5
commit
fdadd7e9dd
@ -17,7 +17,6 @@ end
|
|||||||
def cmake_prefixes
|
def cmake_prefixes
|
||||||
@prefixes ||= ENV['CMAKE_PREFIX_PATH'].split(':').reject do |path|
|
@prefixes ||= ENV['CMAKE_PREFIX_PATH'].split(':').reject do |path|
|
||||||
case path
|
case path
|
||||||
when '/usr/local' then !nclt?
|
|
||||||
when '/usr', '/', "#$sdkroot/usr" then true
|
when '/usr', '/', "#$sdkroot/usr" then true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -131,6 +130,9 @@ class Cmd
|
|||||||
end
|
end
|
||||||
def cppflags
|
def cppflags
|
||||||
all = cmake_prefixes.map{|prefix| "#{prefix}/include" }
|
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} }
|
opt = all.select{|prefix| prefix =~ %r{^#$brewfix/opt} }
|
||||||
sys = all - opt + ENV['CMAKE_INCLUDE_PATH'].split(':')
|
sys = all - opt + ENV['CMAKE_INCLUDE_PATH'].split(':')
|
||||||
# we want our keg-only includes to be found before system includes so that
|
# we want our keg-only includes to be found before system includes so that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user