Place X11 ahead of OpenGL when X11 is active

Fixes Homebrew/homebrew#29651.
This commit is contained in:
Jack Nagel 2014-05-28 09:20:44 -05:00
parent 2c61e3c02a
commit c90247aa44

View File

@ -167,8 +167,8 @@ module Superenv
paths << "#{HOMEBREW_PREFIX}/include"
paths << "#{effective_sysroot}/usr/include/libxml2" unless deps.include? "libxml2"
paths << "#{effective_sysroot}/usr/include/apache2" if MacOS::Xcode.without_clt?
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths << MacOS::X11.include.to_s << "#{MacOS::X11.include}/freetype2" if x11?
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths.to_path_s
end
@ -179,8 +179,8 @@ module Superenv
def determine_library_paths
paths = keg_only_deps.map { |dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/lib" }
paths << "#{HOMEBREW_PREFIX}/lib"
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths << MacOS::X11.lib.to_s if x11?
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths.to_path_s
end
@ -194,15 +194,15 @@ module Superenv
paths = []
paths << "#{effective_sysroot}/usr/include/libxml2" unless deps.include? "libxml2"
paths << "#{effective_sysroot}/usr/include/apache2" if MacOS::Xcode.without_clt?
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths << MacOS::X11.include.to_s << "#{MacOS::X11.include}/freetype2" if x11?
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers"
paths.to_path_s
end
def determine_cmake_library_path
paths = []
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths << MacOS::X11.lib.to_s if x11?
paths << "#{effective_sysroot}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
paths.to_path_s
end