diff options
| author | Adam Vandenberg | 2010-01-11 11:28:37 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-01-11 11:36:35 -0800 |
| commit | 79766ede79650f10b576aa3a76d6eda66210ca90 (patch) | |
| tree | 65a6775790a802dfa062fc0707e1bb18b6ffd924 /Library | |
| parent | d9dc06a0a7e276d504836091b8edd50cb9df10d0 (diff) | |
| download | homebrew-79766ede79650f10b576aa3a76d6eda66210ca90.tar.bz2 | |
Detect X11 when ENV.x11 is requested; dump in --config.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.h.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 2ae9ed669..cad038360 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -504,3 +504,7 @@ def llvm_build $1.to_i end end + +def x11_installed? + Pathname.new('/usr/X11/lib/libpng.dylib').exist? +end diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 9fbd04749..09d8a7beb 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -164,6 +164,8 @@ module HomebrewEnvExtension 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? + # CPPFLAGS are the C-PreProcessor flags, *not* C++! append 'CPPFLAGS', '-I/usr/X11R6/include' append 'LDFLAGS', '-L/usr/X11R6/lib' |
