diff options
| author | Jack Nagel | 2014-06-09 14:55:01 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-09 14:57:21 -0500 |
| commit | fa0c13874a38ebbb84a56d7aa8ed6d1674935968 (patch) | |
| tree | 18d4c9c01adaeff1d9a863f28a19cea1a327ec42 /Library/Homebrew | |
| parent | 2523f1d79c60bb0055c0718ccc7cfb2220159675 (diff) | |
| download | homebrew-fa0c13874a38ebbb84a56d7aa8ed6d1674935968.tar.bz2 | |
Use opt shortcut methods
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/build.rb | 15 |
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 |
