Cram GL headers and includes into superenv
Fixes Homebrew/homebrew#14554. We justify doing this because pre 10.8 X11 came with GL for all Homebrew-capable systems and as such is a default that we'd prefer not to have to address.
This commit is contained in:
parent
139fcf189c
commit
30b53cf92a
@ -135,7 +135,9 @@ class Cmd
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
def ldflags
|
def ldflags
|
||||||
cmake_prefixes.map{|prefix| "#{prefix}/lib" }.to_flags('-L')
|
libs = cmake_prefixes.map{|prefix| "#{prefix}/lib" }
|
||||||
|
libs += ENV['CMAKE_LIBRARY_PATH'].split(':')
|
||||||
|
libs.to_flags('-L')
|
||||||
end
|
end
|
||||||
def cppflags
|
def cppflags
|
||||||
all = cmake_prefixes.map{|prefix| "#{prefix}/include" }
|
all = cmake_prefixes.map{|prefix| "#{prefix}/include" }
|
||||||
|
|||||||
@ -19,8 +19,8 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def build_env_keys env
|
def build_env_keys env
|
||||||
%w[ CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS SDKROOT
|
%w[ CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS SDKROOT MAKEFLAGS
|
||||||
CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH MAKEFLAGS
|
CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
|
||||||
MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH HOMEBREW_BUILD_FROM_SOURCE
|
MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH HOMEBREW_BUILD_FROM_SOURCE
|
||||||
HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE HOMEBREW_USE_CLANG
|
HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE HOMEBREW_USE_CLANG
|
||||||
HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
|
HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
|
||||||
|
|||||||
@ -51,6 +51,7 @@ class << ENV
|
|||||||
ENV['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
|
ENV['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
|
||||||
ENV['CMAKE_FRAMEWORK_PATH'] = "#{MacOS.sdk_path}/System/Library/Frameworks" if MacSystem.xcode43_without_clt?
|
ENV['CMAKE_FRAMEWORK_PATH'] = "#{MacOS.sdk_path}/System/Library/Frameworks" if MacSystem.xcode43_without_clt?
|
||||||
ENV['CMAKE_INCLUDE_PATH'] = determine_cmake_include_path
|
ENV['CMAKE_INCLUDE_PATH'] = determine_cmake_include_path
|
||||||
|
ENV['CMAKE_LIBRARY_PATH'] = determine_cmake_library_path
|
||||||
ENV['ACLOCAL_PATH'] = determine_aclocal_path
|
ENV['ACLOCAL_PATH'] = determine_aclocal_path
|
||||||
ENV['VERBOSE'] = '1' if ARGV.verbose?
|
ENV['VERBOSE'] = '1' if ARGV.verbose?
|
||||||
end
|
end
|
||||||
@ -135,10 +136,17 @@ class << ENV
|
|||||||
paths << "#{MacSystem.x11_prefix}/include/freetype2" if x11?
|
paths << "#{MacSystem.x11_prefix}/include/freetype2" if x11?
|
||||||
paths << "#{sdk}/usr/include/libxml2" unless deps.include? 'libxml2'
|
paths << "#{sdk}/usr/include/libxml2" unless deps.include? 'libxml2'
|
||||||
# TODO prolly shouldn't always do this?
|
# TODO prolly shouldn't always do this?
|
||||||
paths << "#{sdk}/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7" if MacSystem.xcode43_without_clt?
|
paths << "#{sdk}/System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7" if MacSystem.xcode43_without_clt?
|
||||||
|
paths << "#{sdk}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/"
|
||||||
paths.to_path_s
|
paths.to_path_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def determine_cmake_library_path
|
||||||
|
sdk = MacOS.sdk_path if MacSystem.xcode43_without_clt?
|
||||||
|
# things expect to find GL headers since X11 used to be a default, so we add them
|
||||||
|
%W{#{sdk}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries}.to_path_s
|
||||||
|
end
|
||||||
|
|
||||||
def determine_aclocal_path
|
def determine_aclocal_path
|
||||||
paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/aclocal" }
|
paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/aclocal" }
|
||||||
paths << "#{HOMEBREW_PREFIX}/share/aclocal"
|
paths << "#{HOMEBREW_PREFIX}/share/aclocal"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user