aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brewkit.rb8
-rwxr-xr-xLibrary/Homebrew/install.rb24
2 files changed, 21 insertions, 11 deletions
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