aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMax Howell2009-10-03 16:15:29 +0100
committerMax Howell2009-10-03 16:16:02 +0100
commitc7864a33ee8a323ca0124d72eb22e2ec5f42ed4f (patch)
tree209a8f248a46b0b8630cd1e9eaafc9d131403da9 /Library/Homebrew
parent9fb1152f604353ea65cdc1914ee865a5615bdb10 (diff)
downloadhomebrew-c7864a33ee8a323ca0124d72eb22e2ec5f42ed4f.tar.bz2
Add to PKG_CONFIG_PATH for keg-only deps
Also prepending to these vars now too as for kegs that are duplicates of OS X libs, we need to give them the edge and put them first.
Diffstat (limited to 'Library/Homebrew')
-rwxr-xr-xLibrary/Homebrew/install.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb
index 86836831e..fc7cfc0ee 100755
--- a/Library/Homebrew/install.rb
+++ b/Library/Homebrew/install.rb
@@ -25,9 +25,9 @@ EOS
end
-def ENV_append key, value, separator = ' '
+def ENV_prepend key, value, separator = ' '
if ENV[key] and not ENV[key].empty?
- ENV[key] += separator+value
+ ENV[key] = value+separator+ENV[key]
else
ENV[key] = value
end
@@ -38,9 +38,10 @@ 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}", ':'
+ ENV_prepend 'LDFLAGS', "-L#{dep.lib}"
+ ENV_prepend 'CPPFLAGS', "-I#{dep.include}"
+ ENV_prepend 'PATH', "#{dep.bin}", ':'
+ ENV_prepend 'PKG_CONFIG_PATH', dep.lib+'pkgconfig', ':'
end
end