aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2012-08-31 14:12:03 -0400
committerMax Howell2012-08-31 14:12:28 -0400
commiteab09fc267b0cb13b3f8ba3fb9aec07065948408 (patch)
treed113d7a9cc741ae705094214ad36983ee4296611
parentb6a924bff1a881aadcbc24f0e3ecefb9fd459d7e (diff)
downloadhomebrew-eab09fc267b0cb13b3f8ba3fb9aec07065948408.tar.bz2
Cram GL headers and includes into superenv
Fixes #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.
-rwxr-xr-xLibrary/ENV/4.3/cc4
-rw-r--r--Library/Homebrew/cmd/--env.rb4
-rw-r--r--Library/Homebrew/superenv.rb10
3 files changed, 14 insertions, 4 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index ffc5884be..ec53fe882 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -135,7 +135,9 @@ class Cmd
end
end
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
def cppflags
all = cmake_prefixes.map{|prefix| "#{prefix}/include" }
diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb
index 758a27527..fe1b9991b 100644
--- a/Library/Homebrew/cmd/--env.rb
+++ b/Library/Homebrew/cmd/--env.rb
@@ -19,8 +19,8 @@ module Homebrew extend self
end
def build_env_keys env
- %w[ CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS SDKROOT
- CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH MAKEFLAGS
+ %w[ CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS SDKROOT MAKEFLAGS
+ CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH HOMEBREW_BUILD_FROM_SOURCE
HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE HOMEBREW_USE_CLANG
HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb
index e8e15c21f..9b7ec0a23 100644
--- a/Library/Homebrew/superenv.rb
+++ b/Library/Homebrew/superenv.rb
@@ -51,6 +51,7 @@ class << ENV
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_INCLUDE_PATH'] = determine_cmake_include_path
+ ENV['CMAKE_LIBRARY_PATH'] = determine_cmake_library_path
ENV['ACLOCAL_PATH'] = determine_aclocal_path
ENV['VERBOSE'] = '1' if ARGV.verbose?
end
@@ -135,10 +136,17 @@ class << ENV
paths << "#{MacSystem.x11_prefix}/include/freetype2" if x11?
paths << "#{sdk}/usr/include/libxml2" unless deps.include? 'libxml2'
# 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
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
paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/aclocal" }
paths << "#{HOMEBREW_PREFIX}/share/aclocal"