Skip to content

Commit

Permalink
Detect X11 when ENV.x11 is requested; dump in --config.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Jan 11, 2010
1 parent d9dc06a commit 79766ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Homebrew/brew.h.rb
Original file line number Diff line number Diff line change
Expand Up @@ -504,3 +504,7 @@ def llvm_build
$1.to_i
end
end
def x11_installed?
Pathname.new('/usr/X11/lib/libpng.dylib').exist?
end
2 changes: 2 additions & 0 deletions Library/Homebrew/extend/ENV.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ 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?
# CPPFLAGS are the C-PreProcessor flags, *not* C++!
append 'CPPFLAGS', '-I/usr/X11R6/include'
append 'LDFLAGS', '-L/usr/X11R6/lib'
Expand Down
1 change: 1 addition & 0 deletions bin/brew
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}
GCC-4.2: #{gcc ? "build #{gcc}" : "N/A"}
LLVM: #{llvm ? "build #{llvm}" : "N/A" }
MacPorts or Fink? #{macports_or_fink_installed?}
X11 installed? #{x11_installed?}
EOS
end

Expand Down

0 comments on commit 79766ed

Please sign in to comment.