diff --git a/Formula/avidemux.rb b/Formula/avidemux.rb
index f1b29b84317b3..128ea1548830d 100644
--- a/Formula/avidemux.rb
+++ b/Formula/avidemux.rb
@@ -133,7 +133,7 @@ def install
mkdir_p app/"MacOS"
cp_r "./cmake/osx/Avidemux2.6", app/"MacOS/Avidemux2.6.app"
chmod 0755, app/"MacOS/Avidemux2.6.app"
- cp_r Formula['qt'].opt_prefix/"lib/QtGui.framework/Resources/qt_menu.nib", app/"MacOS/" if build.with? 'qt'
+ cp_r "#{Formula['qt'].opt_lib}/QtGui.framework/Resources/qt_menu.nib", app/"MacOS/" if build.with? 'qt'
cp "./cmake/osx/Info.plist", app
(app/"Resources").install_symlink bin, lib
cp Dir["./cmake/osx/*.icns"], app/"Resources/"
diff --git a/Formula/bash-git-prompt.rb b/Formula/bash-git-prompt.rb
index ab9a3bc44e1be..a63ea39d2b272 100644
--- a/Formula/bash-git-prompt.rb
+++ b/Formula/bash-git-prompt.rb
@@ -16,9 +16,9 @@ def install
def caveats; <<-EOS.undent
You should add the following to your .bashrc (or equivalent):
- if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
+ if [ -f "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" ]; then
GIT_PROMPT_THEME=Default
- source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
+ source "$(brew --prefix bash-git-prompt)/share/gitprompt.sh"
fi
EOS
end
diff --git a/Formula/dar.rb b/Formula/dar.rb
index 59b7f277a27f4..775a74eb2f854 100644
--- a/Formula/dar.rb
+++ b/Formula/dar.rb
@@ -25,8 +25,8 @@ class Dar < Formula
depends_on "upx" => :build if build.with? "upx"
def install
- ENV.prepend_path 'PATH', "#{Formula['gnu-sed'].opt_prefix}/libexec/gnubin"
- ENV.prepend_path 'PATH', "#{Formula['coreutils'].libexec}/gnubin" if build.with? "docs"
+ ENV.prepend_path 'PATH', "#{Formula['gnu-sed'].opt_libexec}/gnubin"
+ ENV.prepend_path 'PATH', "#{Formula['coreutils'].opt_libexec}/gnubin" if build.with? "docs"
ENV.libstdcxx if ENV.compiler == :clang && MacOS.version >= :mavericks
args = %W[
diff --git a/Formula/easy-tag.rb b/Formula/easy-tag.rb
index 0d461e310c3e6..b7d7bcf2eac6b 100644
--- a/Formula/easy-tag.rb
+++ b/Formula/easy-tag.rb
@@ -23,7 +23,7 @@ class EasyTag < Formula
depends_on "wavpack" => :optional
def install
- ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].lib}/python2.7/site-packages"
+ ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make"
diff --git a/Formula/emscripten.rb b/Formula/emscripten.rb
index 7b49fd818b8a1..d0cbb906b99b2 100644
--- a/Formula/emscripten.rb
+++ b/Formula/emscripten.rb
@@ -86,7 +86,8 @@ def install
end
def caveats; <<-EOS.undent
- Manually set LLVM_ROOT to \"#{opt_prefix}/libexec/llvm/bin\"
+ Manually set LLVM_ROOT to
+ #{opt_libexec}/llvm/bin
in ~/.emscripten after running `emcc` for the first time.
EOS
end
diff --git a/Formula/gcc.rb b/Formula/gcc.rb
index c691849ac662b..acb4a21ac805f 100644
--- a/Formula/gcc.rb
+++ b/Formula/gcc.rb
@@ -129,7 +129,7 @@ def install
args << "--disable-nls" if build.without? "nls"
if build.with?("java") || build.with?("all-languages")
- args << "--with-ecj-jar=#{Formula["ecj"].opt_prefix}/share/java/ecj.jar"
+ args << "--with-ecj-jar=#{Formula["ecj"].opt_share}/java/ecj.jar"
end
if build.without?("multilib") || !MacOS.prefer_64_bit?
diff --git a/Formula/git-flow-avh.rb b/Formula/git-flow-avh.rb
index 68e735718d804..114165e4f2a8b 100644
--- a/Formula/git-flow-avh.rb
+++ b/Formula/git-flow-avh.rb
@@ -26,7 +26,7 @@ def install
system "make", "prefix=#{libexec}", "install"
(bin/'git-flow').write <<-EOS.undent
#!/bin/bash
- export FLAGS_GETOPT_CMD=#{HOMEBREW_PREFIX}/opt/gnu-getopt/bin/getopt
+ export FLAGS_GETOPT_CMD=#{Formula["gnu-getopt"].opt_bin}/getopt
exec "#{libexec}/bin/git-flow" "$@"
EOS
diff --git a/Formula/gnome-doc-utils.rb b/Formula/gnome-doc-utils.rb
index 4b78c3834037e..d7b4617cc82be 100644
--- a/Formula/gnome-doc-utils.rb
+++ b/Formula/gnome-doc-utils.rb
@@ -26,7 +26,7 @@ class GnomeDocUtils < Formula
def install
# Find our docbook catalog
ENV['XML_CATALOG_FILES'] = "#{etc}/xml/catalog"
- ENV.append_path 'PYTHONPATH', HOMEBREW_PREFIX/"opt/libxml2/lib/python2.7/site-packages"
+ ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages"
system "./configure", "--prefix=#{prefix}",
"--disable-scrollkeeper",
diff --git a/Formula/gst-libav.rb b/Formula/gst-libav.rb
index a20b6866ebfd0..c6a935ee6bb3a 100644
--- a/Formula/gst-libav.rb
+++ b/Formula/gst-libav.rb
@@ -43,6 +43,6 @@ def install
end
test do
- system Formula["gstreamer"].opt_prefix/"bin/gst-inspect-1.0", "libav"
+ system "#{Formula["gstreamer"].opt_bin}/gst-inspect-1.0", "libav"
end
end
diff --git a/Formula/ircd-irc2.rb b/Formula/ircd-irc2.rb
index bc6ec76473302..086c9f494de6a 100644
--- a/Formula/ircd-irc2.rb
+++ b/Formula/ircd-irc2.rb
@@ -62,7 +62,7 @@ def plist; <<-EOS.undent
#{plist_name}
ProgramArguments
- #{opt_prefix}/sbin/ircd
+ #{opt_sbin}/ircd
-t
RunAtLoad
diff --git a/Formula/itstool.rb b/Formula/itstool.rb
index bae0f26ee1738..fe89ea552a351 100644
--- a/Formula/itstool.rb
+++ b/Formula/itstool.rb
@@ -23,8 +23,7 @@ class Itstool < Formula
depends_on 'libxml2' => 'with-python'
def install
- ENV.append_path 'PYTHONPATH', "#{Formula["libxml2"].lib}/python2.7/site-packages"
-
+ ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages"
system "./autogen.sh" if build.head?
system "./configure", "--prefix=#{prefix}"
system "make install"
diff --git a/Formula/keybase.rb b/Formula/keybase.rb
index 8fab9666df714..e354f13a8896f 100644
--- a/Formula/keybase.rb
+++ b/Formula/keybase.rb
@@ -20,7 +20,7 @@ def install
(bin/"keybase").write <<-EOS.undent
#!/bin/sh
export KEYBASE_BIN="#{bin}/keybase"
- exec "#{HOMEBREW_PREFIX}/opt/node/bin/node" "#{libexec}/bin/main.js" "$@"
+ exec "#{Formula["node"].opt_bin}/node" "#{libexec}/bin/main.js" "$@"
EOS
end
diff --git a/Formula/knot.rb b/Formula/knot.rb
index 03d0e85b7736a..a0eb00b2e819e 100644
--- a/Formula/knot.rb
+++ b/Formula/knot.rb
@@ -90,7 +90,7 @@ def plist; <<-EOS.undent
ProgramArguments
- #{opt_prefix}/sbin/knotd
+ #{opt_sbin}/knotd
-c
#{etc}/knot.conf
diff --git a/Formula/liblwgeom.rb b/Formula/liblwgeom.rb
index 3f0c83795ffb3..7576ba5c9d812 100644
--- a/Formula/liblwgeom.rb
+++ b/Formula/liblwgeom.rb
@@ -59,7 +59,7 @@ def install
]
if build.head?
- args << "--with-pgconfig=#{Formula["postgresql"].opt_prefix.realpath}/bin/pg_config"
+ args << "--with-pgconfig=#{Formula["postgresql"].opt_bin}/pg_config"
end
system './autogen.sh'
diff --git a/Formula/mysql-cluster.rb b/Formula/mysql-cluster.rb
index b9ea34059cf8b..7b1fe0782fb5d 100644
--- a/Formula/mysql-cluster.rb
+++ b/Formula/mysql-cluster.rb
@@ -127,7 +127,7 @@ def caveats; <<-EOS.undent
Set up databases to run AS YOUR USER ACCOUNT with:
unset TMPDIR
- mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql-cluster)" --datadir=#{var}/mysql-cluster/mysqld_data --tmpdir=/tmp
+ mysql_install_db --verbose --user=`whoami` --basedir="#{opt_prefix}" --datadir=#{var}/mysql-cluster/mysqld_data --tmpdir=/tmp
For a first cluster, you may start with a single MySQL Server (mysqld),
a pair of Data Nodes (ndbd) and a single management node (ndb_mgmd):
diff --git a/Formula/nginx.rb b/Formula/nginx.rb
index 4bd3b0354e09e..e44beecab47f6 100644
--- a/Formula/nginx.rb
+++ b/Formula/nginx.rb
@@ -124,16 +124,16 @@ def post_install
def passenger_caveats; <<-EOS.undent
To activate Phusion Passenger, add this to #{etc}/nginx/nginx.conf, inside the 'http' context:
- passenger_root #{HOMEBREW_PREFIX}/opt/passenger/libexec/lib/phusion_passenger/locations.ini;
+ passenger_root #{Formula["passenger"].opt_libexec}/lib/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby;
EOS
end
def caveats
s = <<-EOS.undent
- Docroot is: #{HOMEBREW_PREFIX}/var/www
+ Docroot is: #{var}/www
- The default port has been set in #{HOMEBREW_PREFIX}/etc/nginx/nginx.conf to 8080 so that
+ The default port has been set in #{etc}/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
EOS
s << passenger_caveats if build.with? "passenger"
diff --git a/Formula/pgtap.rb b/Formula/pgtap.rb
index a42d605b19a37..0173b60f7b495 100644
--- a/Formula/pgtap.rb
+++ b/Formula/pgtap.rb
@@ -41,7 +41,7 @@ def install
system './Build', 'install'
end
- pg_config = Formula["postgresql"].opt_prefix/'bin/pg_config'
+ pg_config = "#{Formula["postgresql"].opt_bin}/pg_config"
system "make", "PG_CONFIG=#{pg_config}"
system "make", "PG_CONFIG=#{pg_config}", "install"
end
diff --git a/Formula/pow.rb b/Formula/pow.rb
index d7cce9292f91f..8f06dae37e98f 100644
--- a/Formula/pow.rb
+++ b/Formula/pow.rb
@@ -12,7 +12,7 @@ def install
(bin/"pow").write <<-EOS.undent
#!/bin/sh
export POW_BIN="#{bin}/pow"
- exec "#{HOMEBREW_PREFIX}/opt/node/bin/node" "#{libexec}/lib/command.js" "$@"
+ exec "#{Formula["node"].opt_bin}/node" "#{libexec}/lib/command.js" "$@"
EOS
end
diff --git a/Formula/pygtkglext.rb b/Formula/pygtkglext.rb
index 4495cfc4a581c..81768de438570 100644
--- a/Formula/pygtkglext.rb
+++ b/Formula/pygtkglext.rb
@@ -11,7 +11,7 @@ class Pygtkglext < Formula
depends_on 'pygobject'
def install
- ENV['PYGTK_CODEGEN'] = Formula["pygobject"].opt_prefix/'bin/pygobject-codegen-2.0'
+ ENV['PYGTK_CODEGEN'] = "#{Formula["pygobject"].opt_bin}/pygobject-codegen-2.0"
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
diff --git a/Formula/pyqt.rb b/Formula/pyqt.rb
index 01d7c50f2edfe..0f2e7cfdd8652 100644
--- a/Formula/pyqt.rb
+++ b/Formula/pyqt.rb
@@ -34,7 +34,7 @@ def install
end
Language::Python.each_python(build) do |python, version|
- ENV.append_path "PYTHONPATH", HOMEBREW_PREFIX/"opt/sip/lib/python#{version}/site-packages"
+ ENV.append_path "PYTHONPATH", "#{Formula["sip"].opt_lib}/python#{version}/site-packages"
args = ["--confirm-license",
"--bindir=#{bin}",
diff --git a/Formula/python.rb b/Formula/python.rb
index 2eab4f1f595d0..d222e15eba962 100644
--- a/Formula/python.rb
+++ b/Formula/python.rb
@@ -234,7 +234,7 @@ def distutils_fix_superenv(args)
# superenv handles that cc finds includes/libs!
inreplace "setup.py",
"do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
- "do_readline = '#{HOMEBREW_PREFIX}/opt/readline/lib/libhistory.dylib'"
+ "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'"
end
def distutils_fix_stdenv
diff --git a/Formula/python3.rb b/Formula/python3.rb
index 354bba5b30180..f3978ae9a4d69 100644
--- a/Formula/python3.rb
+++ b/Formula/python3.rb
@@ -192,7 +192,7 @@ def distutils_fix_superenv(args)
# superenv makes cc always find includes/libs!
inreplace "setup.py",
"do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
- "do_readline = '#{HOMEBREW_PREFIX}/opt/readline/lib/libhistory.dylib'"
+ "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'"
end
def distutils_fix_stdenv
diff --git a/Formula/shrewsoft-vpn-client.rb b/Formula/shrewsoft-vpn-client.rb
index 5235f0c2ee2f9..5b93d46da01e5 100644
--- a/Formula/shrewsoft-vpn-client.rb
+++ b/Formula/shrewsoft-vpn-client.rb
@@ -79,7 +79,7 @@ def plist; <<-EOF.undent
net.shrew.iked
ProgramArguments
- #{opt_prefix}/sbin/iked
+ #{opt_sbin}/iked
-F
RunAtLoad
diff --git a/Formula/xplanetfx.rb b/Formula/xplanetfx.rb
index 5712f289595d7..b7782bb24db6a 100644
--- a/Formula/xplanetfx.rb
+++ b/Formula/xplanetfx.rb
@@ -37,8 +37,8 @@ def install
prefix.install "bin", "share"
- path = "#{Formula["coreutils"].opt_prefix}/libexec/gnubin"
- path += ":#{Formula["gnu-sed"].opt_prefix}/libexec/gnubin" if build.with?("gnu-sed")
+ path = "#{Formula["coreutils"].opt_libexec}/gnubin"
+ path += ":#{Formula["gnu-sed"].opt_libexec}/gnubin" if build.with?("gnu-sed")
if build.with?("perlmagick")
perl_version = `/usr/bin/perl -e 'printf "%vd", $^V;'`
ENV.prepend_create_path "PERL5LIB", "#{HOMEBREW_PREFIX}/lib/perl5/site_perl/#{perl_version}"
diff --git a/Formula/zenity.rb b/Formula/zenity.rb
index 5f1d6ca51b3e3..86a674d4f815b 100644
--- a/Formula/zenity.rb
+++ b/Formula/zenity.rb
@@ -13,12 +13,9 @@ class Zenity < Formula
depends_on 'scrollkeeper'
def install
- ENV.append_path 'PYTHONPATH', HOMEBREW_PREFIX/"opt/libxml2/lib/python2.7/site-packages"
-
+ ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages"
system "./configure", "--prefix=#{prefix}"
-
system "make"
system "make install"
end
-
end