aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
diff options
context:
space:
mode:
authorJack Nagel2014-06-09 14:55:01 -0500
committerJack Nagel2014-06-09 14:57:21 -0500
commit974b7e71ef11a09f188f0f5e40d609c0732b3406 (patch)
tree866260668ded948e6ab1bbcdb281842e2ab0b1f4 /Library/Homebrew/build.rb
parent13355c76ac6b0ed587aaa98b92c2adae2686ecc2 (diff)
downloadbrew-974b7e71ef11a09f188f0f5e40d609c0732b3406.tar.bz2
Use opt shortcut methods
Diffstat (limited to 'Library/Homebrew/build.rb')
-rw-r--r--Library/Homebrew/build.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 97b02a187..5054419fb 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -135,14 +135,13 @@ class Build
deps.each(&:modify_build_environment)
keg_only_deps.each do |dep|
- opt = dep.opt_prefix
- ENV.prepend_path 'PATH', "#{opt}/bin"
- ENV.prepend_path 'PKG_CONFIG_PATH', "#{opt}/lib/pkgconfig"
- ENV.prepend_path 'PKG_CONFIG_PATH', "#{opt}/share/pkgconfig"
- ENV.prepend_path 'ACLOCAL_PATH', "#{opt}/share/aclocal"
- ENV.prepend_path 'CMAKE_PREFIX_PATH', opt
- ENV.prepend 'LDFLAGS', "-L#{opt}/lib" if (opt/:lib).directory?
- ENV.prepend 'CPPFLAGS', "-I#{opt}/include" if (opt/:include).directory?
+ ENV.prepend_path "PATH", dep.opt_bin.to_s
+ ENV.prepend_path "PKG_CONFIG_PATH", "#{dep.opt_lib}/pkgconfig"
+ ENV.prepend_path "PKG_CONFIG_PATH", "#{dep.opt_share}/pkgconfig"
+ ENV.prepend_path "ACLOCAL_PATH", "#{dep.opt_share}/aclocal"
+ ENV.prepend_path "CMAKE_PREFIX_PATH", dep.opt_prefix.to_s
+ ENV.prepend "LDFLAGS", "-L#{dep.opt_lib}" if dep.opt_lib.directory?
+ ENV.prepend "CPPFLAGS", "-I#{dep.opt_include}" if dep.opt_include.directory?
end
end