diff options
| -rw-r--r-- | Library/Formula/glib.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/readline.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/brewkit.rb | 8 | ||||
| -rwxr-xr-x | Library/Homebrew/install.rb | 24 |
4 files changed, 28 insertions, 13 deletions
diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb index 155240fc7..3d61fa225 100644 --- a/Library/Formula/glib.rb +++ b/Library/Formula/glib.rb @@ -16,8 +16,6 @@ class Glib <Formula depends_on 'gettext' def install - ENV.gnu_gettext - # Snow Leopard libiconv doesn't have a 64bit version of the libiconv_open # function, which breaks things for us, so we build our own # http://www.mail-archive.com/gtk-list@gnome.org/msg28747.html diff --git a/Library/Formula/readline.rb b/Library/Formula/readline.rb index 78105ee3a..e771de192 100644 --- a/Library/Formula/readline.rb +++ b/Library/Formula/readline.rb @@ -5,6 +5,13 @@ class Readline <Formula @homepage='http://tiswww.case.edu/php/chet/readline/rltop.html' @md5='b7f65a48add447693be6e86f04a63019' + def keg_only? ; <<-EOS +OS X provides the BSD Readline library. In order to prevent conflicts when +programs look for libreadline we are defaulting this GNU Readline installation +to keg-only. + EOS + end + def install system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index ebf2235ed..41422ed9e 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -143,14 +143,6 @@ module HomebrewEnvExtension def enable_warnings remove_from_cflags '-w' end - # so yeah, GNU gettext is a funny one, if you want to use it, you need to - # call this function, see gettext.rb for info. - def gnu_gettext - gettext = Formula.factory 'gettext' - ENV['LDFLAGS'] += " -L#{gettext.lib}" - ENV['CPPFLAGS'] = "#{ENV['CPPFLAGS']} -I#{gettext.include}" - ENV['PATH'] += ":#{gettext.bin}" - end private def append key, value diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 575fbe8f3..008d5663c 100755 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -21,9 +21,27 @@ link it into the Homebrew prefix: EOS end -def install f - build_time = nil +def ENV_append key, value, separator = ' ' + if ENV[key] and not ENV[key].empty? + ENV[key] += separator+value + else + ENV[key] = value + end +end + + +def install f + f.deps.each do |dep| + dep = Formula.factory dep + if dep.keg_only? + ENV_append 'LDFLAGS', "-L#{dep.lib}" + ENV_append 'CPPFLAGS', "-I#{dep.include}" + ENV_append 'PATH', "#{dep.bin}", ':' + end + end + + build_time = nil begin f.brew do if ARGV.flag? '--interactive' @@ -87,7 +105,7 @@ def install f end if f.keg_only? - ohai 'Caveats', text_for_keg_only_formula(f) + ohai 'Caveats', text_for_keg_only_formula(f).chomp show_summary_heading = true else begin |
