From cdf768bc328f01e64e9f74551ff4b40d5cf0da70 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 7 Aug 2010 16:50:45 -0700 Subject: Put /usr/X11/bin in PATH when requesting X11. --- Library/Homebrew/extend/ENV.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index a05f02d98..f668fb092 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -151,9 +151,12 @@ module HomebrewEnvExtension def libxml2 append_to_cflags ' -I/usr/include/libxml2' end + def x11 opoo "You do not have X11 installed, this formula may not build." if not x11_installed? - + + # There are some config scripts (e.g. freetype) here that should go in the path + ENV.prepend 'PATH', '/usr/X11/bin', ':' # CPPFLAGS are the C-PreProcessor flags, *not* C++! append 'CPPFLAGS', '-I/usr/X11R6/include' append 'LDFLAGS', '-L/usr/X11R6/lib' @@ -161,6 +164,7 @@ module HomebrewEnvExtension append 'CMAKE_PREFIX_PATH', '/usr/X11R6', ':' end alias_method :libpng, :x11 + # we've seen some packages fail to build when warnings are disabled! def enable_warnings remove_from_cflags '-w' -- cgit v1.2.3