From b0ae186a3dde2c47f1742b9125941792b46f42fd Mon Sep 17 00:00:00 2001
From: Adam Vandenberg
Date: Wed, 5 Mar 2014 21:28:31 -0800
Subject: use opt shortcuts
---
 Library/Formula/aiccu.rb             | 2 +-
 Library/Formula/apt-cacher-ng.rb     | 2 +-
 Library/Formula/arangodb.rb          | 2 +-
 Library/Formula/avidemux.rb          | 2 +-
 Library/Formula/aws-iam-tools.rb     | 2 +-
 Library/Formula/beansdb.rb           | 2 +-
 Library/Formula/beanstalk.rb         | 2 +-
 Library/Formula/bind.rb              | 2 +-
 Library/Formula/burp.rb              | 2 +-
 Library/Formula/cassandra.rb         | 2 +-
 Library/Formula/ccache.rb            | 2 +-
 Library/Formula/chruby.rb            | 4 ++--
 Library/Formula/clipper.rb           | 2 +-
 Library/Formula/coreutils.rb         | 4 ++--
 Library/Formula/couchdb-lucene.rb    | 2 +-
 Library/Formula/couchdb.rb           | 2 +-
 Library/Formula/couchpotatoserver.rb | 2 +-
 Library/Formula/curl-ca-bundle.rb    | 2 +-
 Library/Formula/dart.rb              | 2 +-
 Library/Formula/ddclient.rb          | 4 ++--
 Library/Formula/dnscrypt-proxy.rb    | 2 +-
 Library/Formula/dnsmasq.rb           | 2 +-
 Library/Formula/erlang.rb            | 2 +-
 Library/Formula/ettercap.rb          | 4 ++--
 Library/Formula/fail2ban.rb          | 2 +-
 Library/Formula/freediameter.rb      | 2 +-
 Library/Formula/fuseki.rb            | 2 +-
 Library/Formula/gdal.rb              | 4 ++--
 Library/Formula/gearman.rb           | 4 ++--
 Library/Formula/gitbucket.rb         | 4 ++--
 Library/Formula/glassfish.rb         | 4 ++--
 Library/Formula/gnu-sed.rb           | 4 ++--
 Library/Formula/gnu-tar.rb           | 2 +-
 Library/Formula/gpg-agent.rb         | 4 ++--
 Library/Formula/grails.rb            | 2 +-
 Library/Formula/grass.rb             | 4 ++--
 Library/Formula/groovy.rb            | 2 +-
 Library/Formula/h2.rb                | 2 +-
 Library/Formula/headphones.rb        | 2 +-
 Library/Formula/htmlcompressor.rb    | 4 ++--
 Library/Formula/influxdb.rb          | 4 ++--
 Library/Formula/ircd-hybrid.rb       | 2 +-
 Library/Formula/isc-dhcp.rb          | 4 ++--
 Library/Formula/jack.rb              | 2 +-
 Library/Formula/jboss-as.rb          | 4 ++--
 Library/Formula/jenkins.rb           | 2 +-
 Library/Formula/ledger.rb            | 2 +-
 Library/Formula/librasterlite.rb     | 2 +-
 Library/Formula/libspatialite.rb     | 8 ++++----
 Library/Formula/lighttpd.rb          | 2 +-
 Library/Formula/lldpd.rb             | 2 +-
 Library/Formula/mapnik.rb            | 4 ++--
 Library/Formula/mariadb.rb           | 2 +-
 Library/Formula/memcached.rb         | 2 +-
 Library/Formula/mongodb.rb           | 2 +-
 Library/Formula/mosquitto.rb         | 2 +-
 Library/Formula/mysql.rb             | 2 +-
 Library/Formula/nagios.rb            | 2 +-
 Library/Formula/netpbm.rb            | 2 +-
 Library/Formula/nexus.rb             | 2 +-
 Library/Formula/nginx.rb             | 2 +-
 Library/Formula/ntfs-3g.rb           | 2 +-
 Library/Formula/offline-imap.rb      | 2 +-
 Library/Formula/openvpn.rb           | 2 +-
 Library/Formula/passenger.rb         | 4 ++--
 Library/Formula/pdnsrec.rb           | 2 +-
 Library/Formula/percona-server.rb    | 2 +-
 Library/Formula/pgbouncer.rb         | 2 +-
 Library/Formula/pincaster.rb         | 2 +-
 Library/Formula/pocl.rb              | 2 +-
 Library/Formula/polipo.rb            | 2 +-
 Library/Formula/postgres-xc.rb       | 8 ++++----
 Library/Formula/postgresql.rb        | 2 +-
 Library/Formula/proftpd.rb           | 2 +-
 Library/Formula/pure-ftpd.rb         | 2 +-
 Library/Formula/pygobject3.rb        | 2 +-
 Library/Formula/pyqt5.rb             | 2 +-
 Library/Formula/qpdf.rb              | 2 +-
 Library/Formula/rabbitmq.rb          | 2 +-
 Library/Formula/redis.rb             | 2 +-
 Library/Formula/rethinkdb.rb         | 2 +-
 Library/Formula/ruby.rb              | 2 +-
 Library/Formula/scm-manager.rb       | 2 +-
 Library/Formula/ser2net.rb           | 2 +-
 Library/Formula/sickbeard.rb         | 2 +-
 Library/Formula/slony.rb             | 2 +-
 Library/Formula/sonar.rb             | 2 +-
 Library/Formula/spatialite-tools.rb  | 4 ++--
 Library/Formula/squid.rb             | 2 +-
 Library/Formula/sshguard.rb          | 2 +-
 Library/Formula/subversion.rb        | 4 ++--
 Library/Formula/tor.rb               | 2 +-
 Library/Formula/varnish.rb           | 2 +-
 Library/Formula/wildfly-as.rb        | 6 +++---
 Library/Formula/wxpython.rb          | 2 +-
 Library/Formula/yara.rb              | 2 +-
 96 files changed, 123 insertions(+), 123 deletions(-)
diff --git a/Library/Formula/aiccu.rb b/Library/Formula/aiccu.rb
index c20460083..a7922d170 100644
--- a/Library/Formula/aiccu.rb
+++ b/Library/Formula/aiccu.rb
@@ -27,7 +27,7 @@ class Aiccu < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/aiccu
+        #{opt_sbin}/aiccu
         start
         #{etc}/aiccu.conf
       
diff --git a/Library/Formula/apt-cacher-ng.rb b/Library/Formula/apt-cacher-ng.rb
index cc242699b..a44d1b1b5 100644
--- a/Library/Formula/apt-cacher-ng.rb
+++ b/Library/Formula/apt-cacher-ng.rb
@@ -44,7 +44,7 @@ class AptCacherNg < Formula
       
       ProgramArguments
       
-        #{opt_prefix}/sbin/apt-cacher-ng
+        #{opt_sbin}/apt-cacher-ng
         -c
         #{etc}/apt-cacher-ng
         foreground=1
diff --git a/Library/Formula/arangodb.rb b/Library/Formula/arangodb.rb
index 26ae63c5a..2529794ce 100644
--- a/Library/Formula/arangodb.rb
+++ b/Library/Formula/arangodb.rb
@@ -75,7 +75,7 @@ class Arangodb < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/sbin/arangod
+          #{opt_sbin}/arangod
           -c
           #{etc}/arangodb/arangod.conf
         
diff --git a/Library/Formula/avidemux.rb b/Library/Formula/avidemux.rb
index 74aef9f1f..c0da80ddc 100644
--- a/Library/Formula/avidemux.rb
+++ b/Library/Formula/avidemux.rb
@@ -53,7 +53,7 @@ class Avidemux < Formula
     mkdir 'buildCore' do
       args = std_cmake_args
       args << "-DAVIDEMUX_SOURCE_DIR=#{buildpath}"
-      args << "-DGETTEXT_INCLUDE_DIR=#{Formula['gettext'].opt_prefix}/include"
+      args << "-DGETTEXT_INCLUDE_DIR=#{Formula["gettext"].opt_include}"
       # Todo: We could depend on SDL and then remove the `-DSDL=OFF` arguments
       # but I got build errors about NSview.
       args << "-DSDL=OFF"
diff --git a/Library/Formula/aws-iam-tools.rb b/Library/Formula/aws-iam-tools.rb
index f21ce314f..3ffba59be 100644
--- a/Library/Formula/aws-iam-tools.rb
+++ b/Library/Formula/aws-iam-tools.rb
@@ -34,7 +34,7 @@ class AwsIamTools < AmazonWebServicesFormula
       * On Zsh, add them to `~/.zprofile` instead.
 
     export JAVA_HOME="$(/usr/libexec/java_home)"
-    export AWS_IAM_HOME="#{opt_prefix}/libexec"
+    export AWS_IAM_HOME="#{opt_libexec}"
     export AWS_CREDENTIAL_FILE=$HOME/.aws-credentials-master
     EOS
   end
diff --git a/Library/Formula/beansdb.rb b/Library/Formula/beansdb.rb
index d3b626330..fdb75e4dc 100644
--- a/Library/Formula/beansdb.rb
+++ b/Library/Formula/beansdb.rb
@@ -35,7 +35,7 @@ class Beansdb < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/beansdb
+        #{opt_bin}/beansdb
         -p
         7900
         -H
diff --git a/Library/Formula/beanstalk.rb b/Library/Formula/beanstalk.rb
index 15f5aa0b9..5508cf23c 100644
--- a/Library/Formula/beanstalk.rb
+++ b/Library/Formula/beanstalk.rb
@@ -22,7 +22,7 @@ class Beanstalk < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/beanstalkd
+          #{opt_bin}/beanstalkd
         
         RunAtLoad
         
diff --git a/Library/Formula/bind.rb b/Library/Formula/bind.rb
index be0df9730..3b5f2cdfd 100644
--- a/Library/Formula/bind.rb
+++ b/Library/Formula/bind.rb
@@ -255,7 +255,7 @@ class Bind < Formula
       
       ProgramArguments
       
-        #{opt_prefix}/sbin/named
+        #{opt_sbin}/named
         -f
         -c
         #{etc}/named.conf
diff --git a/Library/Formula/burp.rb b/Library/Formula/burp.rb
index 6d99771c9..0a58f4ee6 100644
--- a/Library/Formula/burp.rb
+++ b/Library/Formula/burp.rb
@@ -41,7 +41,7 @@ class Burp < Formula
       
       ProgramArguments
       
-        #{opt_prefix}/bin/burp
+        #{opt_bin}/burp
         -a
         t
       
diff --git a/Library/Formula/cassandra.rb b/Library/Formula/cassandra.rb
index 45c5b66ad..7c906c175 100644
--- a/Library/Formula/cassandra.rb
+++ b/Library/Formula/cassandra.rb
@@ -58,7 +58,7 @@ class Cassandra < Formula
 
         ProgramArguments
         
-            #{opt_prefix}/bin/cassandra
+            #{opt_bin}/cassandra
             -f
         
 
diff --git a/Library/Formula/ccache.rb b/Library/Formula/ccache.rb
index 11ce58736..3e13e90fd 100644
--- a/Library/Formula/ccache.rb
+++ b/Library/Formula/ccache.rb
@@ -36,7 +36,7 @@ class Ccache < Formula
   def caveats; <<-EOS.undent
     To install symlinks for compilers that will automatically use
     ccache, prepend this directory to your PATH:
-      #{opt_prefix}/libexec
+      #{opt_libexec}
 
     If this is an upgrade and you have previously added the symlinks to
     your PATH, you may need to modify it to the path specified above so
diff --git a/Library/Formula/chruby.rb b/Library/Formula/chruby.rb
index c86b13842..888dc0a3c 100644
--- a/Library/Formula/chruby.rb
+++ b/Library/Formula/chruby.rb
@@ -14,7 +14,7 @@ class Chruby < Formula
   def caveats; <<-EOS.undent
     Add the following to the ~/.bashrc or ~/.zshrc file:
 
-      source #{opt_prefix}/share/chruby/chruby.sh
+      source #{opt_share}/chruby/chruby.sh
 
     By default chruby will search for Rubies installed into /opt/rubies/ or
     ~/.rubies/. For non-standard installation locations, simply set the RUBIES
@@ -34,7 +34,7 @@ class Chruby < Formula
     To enable auto-switching of Rubies specified by .ruby-version files,
     add the following to ~/.bashrc or ~/.zshrc:
 
-      source #{opt_prefix}/share/chruby/auto.sh
+      source #{opt_share}/chruby/auto.sh
     EOS
   end
 end
diff --git a/Library/Formula/clipper.rb b/Library/Formula/clipper.rb
index 139d0af95..92b71f518 100644
--- a/Library/Formula/clipper.rb
+++ b/Library/Formula/clipper.rb
@@ -30,7 +30,7 @@ class Clipper < Formula
       #{HOMEBREW_PREFIX}
       ProgramArguments
       
-        #{opt_prefix}/bin/clipper
+        #{opt_bin}/clipper
         --address
         127.0.0.1
         --port
diff --git a/Library/Formula/coreutils.rb b/Library/Formula/coreutils.rb
index 92b4762cf..07f448121 100644
--- a/Library/Formula/coreutils.rb
+++ b/Library/Formula/coreutils.rb
@@ -33,12 +33,12 @@ class Coreutils < Formula
     If you really need to use these commands with their normal names, you
     can add a "gnubin" directory to your PATH from your bashrc like:
 
-        PATH="#{opt_prefix}/libexec/gnubin:$PATH"
+        PATH="#{opt_libexec}/gnubin:$PATH"
 
     Additionally, you can access their man pages with normal names if you add
     the "gnuman" directory to your MANPATH from your bashrc as well:
 
-        MANPATH="#{opt_prefix}/libexec/gnuman:$MANPATH"
+        MANPATH="#{opt_libexec}/gnuman:$MANPATH"
 
     EOS
   end
diff --git a/Library/Formula/couchdb-lucene.rb b/Library/Formula/couchdb-lucene.rb
index 4ed4377df..6d46b08d1 100644
--- a/Library/Formula/couchdb-lucene.rb
+++ b/Library/Formula/couchdb-lucene.rb
@@ -44,7 +44,7 @@ class CouchdbLucene < Formula
         
         ProgramArguments
         
-          #{opt_prefix}/bin/run
+          #{opt_bin}/run
         
         StandardOutPath
         /dev/null
diff --git a/Library/Formula/couchdb.rb b/Library/Formula/couchdb.rb
index 836efd905..aff6d7fb5 100644
--- a/Library/Formula/couchdb.rb
+++ b/Library/Formula/couchdb.rb
@@ -67,7 +67,7 @@ class Couchdb < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/couchdb
+        #{opt_bin}/couchdb
       
       RunAtLoad
       
diff --git a/Library/Formula/couchpotatoserver.rb b/Library/Formula/couchpotatoserver.rb
index 06c979cd4..f87911b3a 100644
--- a/Library/Formula/couchpotatoserver.rb
+++ b/Library/Formula/couchpotatoserver.rb
@@ -22,7 +22,7 @@ class Couchpotatoserver < Formula
         Label
         #{plist_name}
         Program
-        #{opt_prefix}/bin/couchpotatoserver
+        #{opt_bin}/couchpotatoserver
         ProgramArguments
         
           --quiet
diff --git a/Library/Formula/curl-ca-bundle.rb b/Library/Formula/curl-ca-bundle.rb
index 9b2027bbe..513c3c3ff 100644
--- a/Library/Formula/curl-ca-bundle.rb
+++ b/Library/Formula/curl-ca-bundle.rb
@@ -12,7 +12,7 @@ class CurlCaBundle < Formula
   def caveats; <<-EOS.undent
     To use these certificates with OpenSSL:
 
-      export SSL_CERT_FILE=#{opt_prefix}/share/ca-bundle.crt
+      export SSL_CERT_FILE=#{opt_share}/ca-bundle.crt
     EOS
   end
 end
diff --git a/Library/Formula/dart.rb b/Library/Formula/dart.rb
index 69300341a..8200400a5 100644
--- a/Library/Formula/dart.rb
+++ b/Library/Formula/dart.rb
@@ -21,7 +21,7 @@ class Dart < Formula
 
   def caveats; <<-EOS.undent
     To use with IntelliJ, set the Dart home to:
-      #{opt_prefix}/libexec
+      #{opt_libexec}
     EOS
   end
 
diff --git a/Library/Formula/ddclient.rb b/Library/Formula/ddclient.rb
index 64c928067..777964189 100644
--- a/Library/Formula/ddclient.rb
+++ b/Library/Formula/ddclient.rb
@@ -38,7 +38,7 @@ class Ddclient < Formula
   def caveats; <<-EOS.undent
     For ddclient to work, you will need to create a configuration file
     in #{etc}/ddclient, a sample configuration can be found in
-    #{opt_prefix}/share/doc/ddclient.
+    #{opt_share}/doc/ddclient.
 
     Note: don't enable daemon mode in the configuration file; see
     additional information below.
@@ -62,7 +62,7 @@ class Ddclient < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/ddclient
+        #{opt_sbin}/ddclient
         -file
         #{etc}/ddclient/ddclient.conf
       
diff --git a/Library/Formula/dnscrypt-proxy.rb b/Library/Formula/dnscrypt-proxy.rb
index bc2622fc9..3bfa30e56 100644
--- a/Library/Formula/dnscrypt-proxy.rb
+++ b/Library/Formula/dnscrypt-proxy.rb
@@ -66,7 +66,7 @@ class DnscryptProxy < Formula
         
         ProgramArguments
         
-          #{opt_prefix}/sbin/dnscrypt-proxy
+          #{opt_sbin}/dnscrypt-proxy
           --local-address=127.0.0.1:53
           --user=nobody
         
diff --git a/Library/Formula/dnsmasq.rb b/Library/Formula/dnsmasq.rb
index a2128a57c..5a1bff888 100644
--- a/Library/Formula/dnsmasq.rb
+++ b/Library/Formula/dnsmasq.rb
@@ -57,7 +57,7 @@ class Dnsmasq < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/sbin/dnsmasq
+          #{opt_sbin}/dnsmasq
           --keep-in-foreground
         
         KeepAlive
diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb
index c674ab8c4..c1a78ff93 100644
--- a/Library/Formula/erlang.rb
+++ b/Library/Formula/erlang.rb
@@ -97,7 +97,7 @@ class Erlang < Formula
 
   def caveats; <<-EOS.undent
     Man pages can be found in:
-      #{opt_prefix}/lib/erlang/man
+      #{opt_lib}/erlang/man
 
     Access them with `erl -man`, or add this directory to MANPATH.
     EOS
diff --git a/Library/Formula/ettercap.rb b/Library/Formula/ettercap.rb
index 74d0dba9f..c444972f4 100644
--- a/Library/Formula/ettercap.rb
+++ b/Library/Formula/ettercap.rb
@@ -19,12 +19,12 @@ class Ettercap < Formula
   end
 
   def install
-    libnet = Formula['libnet']
+    libnet = Formula['libnet'].opt_lib
 
     args = ['..'] + std_cmake_args + [
       "-DINSTALL_SYSCONFDIR=#{etc}",
       '-DENABLE_GTK=OFF',
-      "-DHAVE_LIBNET:FILEPATH=#{libnet.opt_prefix}/lib/libnet.dylib"
+      "-DHAVE_LIBNET:FILEPATH=#{libnet}/libnet.dylib"
     ]
 
     mkdir "build" do
diff --git a/Library/Formula/fail2ban.rb b/Library/Formula/fail2ban.rb
index 9d1827c27..45aacc719 100644
--- a/Library/Formula/fail2ban.rb
+++ b/Library/Formula/fail2ban.rb
@@ -39,7 +39,7 @@ class Fail2ban < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/fail2ban-client
+          #{opt_bin}/fail2ban-client
           -x
           start
         
diff --git a/Library/Formula/freediameter.rb b/Library/Formula/freediameter.rb
index 9b0e2eab7..7f3adf140 100644
--- a/Library/Formula/freediameter.rb
+++ b/Library/Formula/freediameter.rb
@@ -68,7 +68,7 @@ class Freediameter < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/freeDiameterd
+          #{opt_bin}/freeDiameterd
         
         KeepAlive
         
diff --git a/Library/Formula/fuseki.rb b/Library/Formula/fuseki.rb
index cd6348212..3ce9e781c 100644
--- a/Library/Formula/fuseki.rb
+++ b/Library/Formula/fuseki.rb
@@ -74,7 +74,7 @@ class Fuseki < Formula
         
         ProgramArguments
         
-          #{opt_prefix}/bin/fuseki-server
+          #{opt_bin}/fuseki-server
           --config
           /usr/local/etc/fuseki.ttl
         
diff --git a/Library/Formula/gdal.rb b/Library/Formula/gdal.rb
index 91654a00f..7a93cee6b 100644
--- a/Library/Formula/gdal.rb
+++ b/Library/Formula/gdal.rb
@@ -209,8 +209,8 @@ class Gdal < Formula
     #
     # Fortunately, this can be remedied using LDFLAGS.
     sqlite = Formula["sqlite"]
-    ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib -lsqlite3"
-    ENV.append 'CFLAGS', "-I#{sqlite.opt_prefix}/include"
+    ENV.append 'LDFLAGS', "-L#{sqlite.opt_lib} -lsqlite3"
+    ENV.append 'CFLAGS', "-I#{sqlite.opt_include}"
     # Needed by libdap
     ENV.libxml2 if build.include? 'complete'
 
diff --git a/Library/Formula/gearman.rb b/Library/Formula/gearman.rb
index 37a976835..81f1987dc 100644
--- a/Library/Formula/gearman.rb
+++ b/Library/Formula/gearman.rb
@@ -19,7 +19,7 @@ class Gearman < Formula
     args = ["--prefix=#{prefix}"]
     args << "--without-mysql" unless build.with? 'mysql'
     if build.with? 'postgresql'
-      pg_config = "#{Formula['postgresql'].opt_prefix}/bin/pg_config"
+      pg_config = "#{Formula["postgresql"].opt_bin}/pg_config"
       args << "--with-postgresql=#{pg_config}"
     end
     system "./configure", *args
@@ -44,7 +44,7 @@ class Gearman < Formula
         Label
         #{plist_name}
         Program
-        #{opt_prefix}/sbin/gearmand
+        #{opt_sbin}/gearmand
         RunAtLoad
         
       
diff --git a/Library/Formula/gitbucket.rb b/Library/Formula/gitbucket.rb
index cd5a8bcf0..11324b307 100644
--- a/Library/Formula/gitbucket.rb
+++ b/Library/Formula/gitbucket.rb
@@ -13,7 +13,7 @@ class Gitbucket < Formula
   def install
     if build.head?
       system "ant"
-      libexec.install 'war/target/gitbucket.war', '.'
+      libexec.install "war/target/gitbucket.war", "."
     else
       libexec.install "gitbucket.war"
     end
@@ -33,7 +33,7 @@ class Gitbucket < Formula
           /usr/bin/java
           -Dmail.smtp.starttls.enable=true
           -jar
-          #{opt_prefix}/libexec/gitbucket.war
+          #{opt_libexec}/gitbucket.war
           --host=127.0.0.1
           --port=8080
           --https=true
diff --git a/Library/Formula/glassfish.rb b/Library/Formula/glassfish.rb
index 004248450..c4ca0b1c5 100644
--- a/Library/Formula/glassfish.rb
+++ b/Library/Formula/glassfish.rb
@@ -16,10 +16,10 @@ class Glassfish < Formula
 
   def caveats; <<-EOS.undent
     The home of GlassFish Application Server 4 is:
-      #{opt_prefix}/libexec
+      #{opt_libexec}
 
     You may want to add the following to your .bash_profile:
-      export GLASSFISH_HOME=#{opt_prefix}/libexec
+      export GLASSFISH_HOME=#{opt_libexec}
       export PATH=${PATH}:${GLASSFISH_HOME}/bin
 
     Note: The support scripts used by GlassFish Application Server 4
diff --git a/Library/Formula/gnu-sed.rb b/Library/Formula/gnu-sed.rb
index 1bdbbd35d..ec7cde157 100644
--- a/Library/Formula/gnu-sed.rb
+++ b/Library/Formula/gnu-sed.rb
@@ -26,12 +26,12 @@ class GnuSed < Formula
     If you need to use these commands with their normal names, you
     can add a "gnubin" directory to your PATH from your bashrc like:
 
-        PATH="#{opt_prefix}/libexec/gnubin:$PATH"
+        PATH="#{opt_libexec}/gnubin:$PATH"
 
     Additionally, you can access their man pages with normal names if you add
     the "gnuman" directory to your MANPATH from your bashrc as well:
 
-        MANPATH="#{opt_prefix}/libexec/gnuman:$MANPATH"
+        MANPATH="#{opt_libexec}/gnuman:$MANPATH"
 
     EOS
   end
diff --git a/Library/Formula/gnu-tar.rb b/Library/Formula/gnu-tar.rb
index 975391cda..5b65f844d 100644
--- a/Library/Formula/gnu-tar.rb
+++ b/Library/Formula/gnu-tar.rb
@@ -29,7 +29,7 @@ class GnuTar < Formula
     If you really need to use it as 'tar', you can add a 'gnubin' directory
     to your PATH from your bashrc like:
 
-        PATH="#{opt_prefix}/libexec/gnubin:$PATH"
+        PATH="#{opt_libexec}/gnubin:$PATH"
     EOS
   end
 end
diff --git a/Library/Formula/gpg-agent.rb b/Library/Formula/gpg-agent.rb
index 9a436fa16..cc1a14838 100644
--- a/Library/Formula/gpg-agent.rb
+++ b/Library/Formula/gpg-agent.rb
@@ -24,8 +24,8 @@ class GpgAgent < Formula
     system "./configure", "--disable-dependency-tracking",
                           "--prefix=#{prefix}",
                           "--enable-agent-only",
-                          "--with-pinentry-pgm=#{Formula['pinentry'].opt_prefix}/bin/pinentry",
-                          "--with-scdaemon-pgm=#{Formula['gnupg2'].opt_prefix}/libexec/scdaemon"
+                          "--with-pinentry-pgm=#{Formula["pinentry"].opt_bin}/pinentry",
+                          "--with-scdaemon-pgm=#{Formula["gnupg2"].opt_libexec}/scdaemon"
     system "make install"
   end
 end
diff --git a/Library/Formula/grails.rb b/Library/Formula/grails.rb
index 7ea3b2598..d164a95d8 100644
--- a/Library/Formula/grails.rb
+++ b/Library/Formula/grails.rb
@@ -14,7 +14,7 @@ class Grails < Formula
 
   def caveats; <<-EOS.undent
     The GRAILS_HOME directory is:
-      #{opt_prefix}/libexec
+      #{opt_libexec}
     EOS
   end
 end
diff --git a/Library/Formula/grass.rb b/Library/Formula/grass.rb
index 06018bb07..1c9c360a0 100644
--- a/Library/Formula/grass.rb
+++ b/Library/Formula/grass.rb
@@ -57,7 +57,7 @@ class Grass < Formula
       "--with-lapack",
       "--with-sqlite",
       "--with-odbc",
-      "--with-geos=#{Formula["geos"].opt_prefix}/bin/geos-config",
+      "--with-geos=#{Formula["geos"].opt_bin}/geos-config",
       "--with-png",
       "--with-readline-includes=#{readline}/include",
       "--with-readline-libs=#{readline}/lib",
@@ -78,7 +78,7 @@ class Grass < Formula
     if headless? or build.without? 'wxmac'
       args << "--without-wxwidgets"
     else
-      args << "--with-wxwidgets=#{Formula["wxmac"].opt_prefix}/bin/wx-config"
+      args << "--with-wxwidgets=#{Formula["wxmac"].opt_bin}/wx-config"
     end
 
     args << "--enable-64bit" if MacOS.prefer_64_bit?
diff --git a/Library/Formula/groovy.rb b/Library/Formula/groovy.rb
index 419f0b516..89ea7e735 100644
--- a/Library/Formula/groovy.rb
+++ b/Library/Formula/groovy.rb
@@ -27,7 +27,7 @@ class Groovy < Formula
   def caveats
     <<-EOS.undent
       You should set the environment variable GROOVY_HOME to
-        #{opt_prefix}/libexec
+        #{opt_libexec}
     EOS
   end
 end
diff --git a/Library/Formula/h2.rb b/Library/Formula/h2.rb
index 603ad6c50..63222cbee 100644
--- a/Library/Formula/h2.rb
+++ b/Library/Formula/h2.rb
@@ -38,7 +38,7 @@ class H2 < Formula
         
         ProgramArguments
         
-            #{opt_prefix}/bin/h2
+            #{opt_bin}/h2
             -tcp
             -web
             -pg
diff --git a/Library/Formula/headphones.rb b/Library/Formula/headphones.rb
index 65a9ab01f..f0f2bbb6b 100644
--- a/Library/Formula/headphones.rb
+++ b/Library/Formula/headphones.rb
@@ -30,7 +30,7 @@ class Headphones < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/headphones
+        #{opt_bin}/headphones
         -q
         -d
         --nolaunch
diff --git a/Library/Formula/htmlcompressor.rb b/Library/Formula/htmlcompressor.rb
index efe44a05a..093196f3b 100644
--- a/Library/Formula/htmlcompressor.rb
+++ b/Library/Formula/htmlcompressor.rb
@@ -18,12 +18,12 @@ class Htmlcompressor < Formula
     if build.include? 'yuicompressor'
       yui = Formula["yuicompressor"]
       yui_jar = "yuicompressor-#{yui.version}.jar"
-      ln_s "#{yui.opt_prefix}/libexec/#{yui_jar}", "#{libexec}/#{yui_jar}"
+      ln_s "#{yui.opt_libexec}/#{yui_jar}", "#{libexec}/#{yui_jar}"
     end
 
     if build.include? 'closure-compiler'
       closure = Formula["closure-compiler"]
-      ln_s "#{closure.opt_prefix}/libexec/build/compiler.jar", "#{libexec}/compiler.jar"
+      ln_s "#{closure.opt_libexec}/build/compiler.jar", "#{libexec}/compiler.jar"
     end
   end
 
diff --git a/Library/Formula/influxdb.rb b/Library/Formula/influxdb.rb
index 77e4413d0..392caa951 100644
--- a/Library/Formula/influxdb.rb
+++ b/Library/Formula/influxdb.rb
@@ -35,7 +35,7 @@ class Influxdb < Formula
     inreplace "config.toml.sample" do |s|
       s.gsub! "/tmp/influxdb/development/db", "#{var}/influxdb/data"
       s.gsub! "/tmp/influxdb/development/raft", "#{var}/influxdb/raft"
-      s.gsub! "./admin", "#{opt_prefix}/share/admin"
+      s.gsub! "./admin", "#{opt_share}/admin"
     end
 
     bin.install "daemon" => "influxdb"
@@ -62,7 +62,7 @@ class Influxdb < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/influxdb
+          #{opt_bin}/influxdb
           -config=#{etc}/influxdb.conf
         
         RunAtLoad
diff --git a/Library/Formula/ircd-hybrid.rb b/Library/Formula/ircd-hybrid.rb
index 9fb577106..9733de17b 100644
--- a/Library/Formula/ircd-hybrid.rb
+++ b/Library/Formula/ircd-hybrid.rb
@@ -47,7 +47,7 @@ class IrcdHybrid < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/ircd
+        #{opt_sbin}/ircd
       
       RunAtLoad
       
diff --git a/Library/Formula/isc-dhcp.rb b/Library/Formula/isc-dhcp.rb
index 996c7c59a..29e4a8bae 100644
--- a/Library/Formula/isc-dhcp.rb
+++ b/Library/Formula/isc-dhcp.rb
@@ -104,7 +104,7 @@ class IscDhcp < Formula
     Label#{plist_name}
     ProgramArguments
       
-        #{opt_prefix}/sbin/dhcpd
+        #{opt_sbin}/dhcpd
         -f
       
     Disabled
@@ -126,7 +126,7 @@ class IscDhcp < Formula
     Label#{plist_name}
     ProgramArguments
       
-        #{opt_prefix}/sbin/dhcpd
+        #{opt_sbin}/dhcpd
         -f
         -6
         -cf
diff --git a/Library/Formula/jack.rb b/Library/Formula/jack.rb
index 8d09711bd..5c4d8ea32 100644
--- a/Library/Formula/jack.rb
+++ b/Library/Formula/jack.rb
@@ -34,7 +34,7 @@ class Jack < Formula
       #{prefix}
       ProgramArguments
       
-        #{opt_prefix}/bin/jackd
+        #{opt_bin}/jackd
         -d
         coreaudio
       
diff --git a/Library/Formula/jboss-as.rb b/Library/Formula/jboss-as.rb
index 3abb8f76d..6e343d092 100644
--- a/Library/Formula/jboss-as.rb
+++ b/Library/Formula/jboss-as.rb
@@ -13,10 +13,10 @@ class JbossAs < Formula
 
   def caveats; <<-EOS.undent
     The home of JBoss Application Server 7 is:
-      #{opt_prefix}/libexec
+      #{opt_libexec}
 
     You may want to add the following to your .bash_profile:
-      export JBOSS_HOME=#{opt_prefix}/libexec
+      export JBOSS_HOME=#{opt_libexec}
       export PATH=${PATH}:${JBOSS_HOME}/bin
 
     Note: The support scripts used by JBoss Application Server 7 have
diff --git a/Library/Formula/jenkins.rb b/Library/Formula/jenkins.rb
index 752bd7111..9db7a42b5 100644
--- a/Library/Formula/jenkins.rb
+++ b/Library/Formula/jenkins.rb
@@ -30,7 +30,7 @@ class Jenkins < Formula
           /usr/bin/java
           -Dmail.smtp.starttls.enable=true
           -jar
-          #{opt_prefix}/libexec/jenkins.war
+          #{opt_libexec}/jenkins.war
           --httpListenAddress=127.0.0.1
           --httpPort=8080
         
diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb
index cb96ae7b8..13726f0e4 100644
--- a/Library/Formula/ledger.rb
+++ b/Library/Formula/ledger.rb
@@ -54,7 +54,7 @@ class Ledger < Formula
       if build.with? 'libofx'
         args << "--enable-ofx"
         # the libofx.h appears to have moved to a subdirectory
-        ENV.append 'CXXFLAGS', "-I#{Formula["libofx"].opt_prefix}/include/libofx"
+        ENV.append 'CXXFLAGS', "-I#{Formula["libofx"].opt_include}/libofx"
       end
       system "./configure", "--disable-debug", "--disable-dependency-tracking",
                             "--prefix=#{prefix}", *args
diff --git a/Library/Formula/librasterlite.rb b/Library/Formula/librasterlite.rb
index fe8975d2b..d69772076 100644
--- a/Library/Formula/librasterlite.rb
+++ b/Library/Formula/librasterlite.rb
@@ -13,7 +13,7 @@ class Librasterlite < Formula
   def install
     # Ensure Homebrew SQLite libraries are found before the system SQLite
     sqlite = Formula["sqlite"]
-    ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib"
+    ENV.append 'LDFLAGS', "-L#{sqlite.opt_lib}"
     system "./configure", "--disable-dependency-tracking",
                           "--prefix=#{prefix}"
     system "make install"
diff --git a/Library/Formula/libspatialite.rb b/Library/Formula/libspatialite.rb
index eef5b1492..89e4cab3e 100644
--- a/Library/Formula/libspatialite.rb
+++ b/Library/Formula/libspatialite.rb
@@ -39,13 +39,13 @@ class Libspatialite < Formula
 
     # Ensure Homebrew's libsqlite is found before the system version.
     sqlite = Formula["sqlite"]
-    ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib"
-    ENV.append 'CFLAGS', "-I#{sqlite.opt_prefix}/include"
+    ENV.append 'LDFLAGS', "-L#{sqlite.opt_lib}"
+    ENV.append 'CFLAGS', "-I#{sqlite.opt_include}"
 
     unless build.without? 'liblwgeom'
       lwgeom = Formula["liblwgeom"]
-      ENV.append 'LDFLAGS', "-L#{lwgeom.opt_prefix}/lib"
-      ENV.append 'CFLAGS', "-I#{lwgeom.opt_prefix}/include"
+      ENV.append 'LDFLAGS', "-L#{lwgeom.opt_lib}"
+      ENV.append 'CFLAGS', "-I#{lwgeom.opt_include}"
     end
 
     args = %W[
diff --git a/Library/Formula/lighttpd.rb b/Library/Formula/lighttpd.rb
index 86240841f..25f8a8a59 100644
--- a/Library/Formula/lighttpd.rb
+++ b/Library/Formula/lighttpd.rb
@@ -105,7 +105,7 @@ class Lighttpd < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/lighttpd
+        #{opt_bin}/lighttpd
         -D
         -f
         #{config_path}lighttpd.conf
diff --git a/Library/Formula/lldpd.rb b/Library/Formula/lldpd.rb
index 1aa2d24d2..59fcf1e24 100644
--- a/Library/Formula/lldpd.rb
+++ b/Library/Formula/lldpd.rb
@@ -49,7 +49,7 @@ class Lldpd < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/lldpd
+        #{opt_sbin}/lldpd
         #{additional_args}
       
       RunAtLoad
diff --git a/Library/Formula/mapnik.rb b/Library/Formula/mapnik.rb
index f6039d934..0ff0648df 100644
--- a/Library/Formula/mapnik.rb
+++ b/Library/Formula/mapnik.rb
@@ -65,8 +65,8 @@ class Mapnik < Formula
     else
       args << "CAIRO=False"
     end
-    args << "GDAL_CONFIG=#{Formula["gdal"].opt_prefix}/bin/gdal-config" if build.with? 'gdal'
-    args << "PG_CONFIG=#{Formula["postgresql"].opt_prefix}/bin/pg_config" if build.with? 'postgresql'
+    args << "GDAL_CONFIG=#{Formula["gdal"].opt_bin}/gdal-config" if build.with? 'gdal'
+    args << "PG_CONFIG=#{Formula["postgresql"].opt_bin}/pg_config" if build.with? 'postgresql'
 
     system "python", "scons/scons.py", "configure", *args
     system "python", "scons/scons.py", "install"
diff --git a/Library/Formula/mariadb.rb b/Library/Formula/mariadb.rb
index 61e7e8b00..2b0bb6f7d 100644
--- a/Library/Formula/mariadb.rb
+++ b/Library/Formula/mariadb.rb
@@ -163,7 +163,7 @@ class Mariadb < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/mysqld_safe
+        #{opt_bin}/mysqld_safe
         --bind-address=127.0.0.1
       
       RunAtLoad
diff --git a/Library/Formula/memcached.rb b/Library/Formula/memcached.rb
index 126f79cd4..b1981fe16 100644
--- a/Library/Formula/memcached.rb
+++ b/Library/Formula/memcached.rb
@@ -40,7 +40,7 @@ class Memcached < Formula
       
       ProgramArguments
       
-        #{opt_prefix}/bin/memcached
+        #{opt_bin}/memcached
         -l
         localhost
       
diff --git a/Library/Formula/mongodb.rb b/Library/Formula/mongodb.rb
index ec428b0fe..48d9616f4 100644
--- a/Library/Formula/mongodb.rb
+++ b/Library/Formula/mongodb.rb
@@ -113,7 +113,7 @@ class Mongodb < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/mongod
+        #{opt_bin}/mongod
         --config
         #{etc}/mongod.conf
       
diff --git a/Library/Formula/mosquitto.rb b/Library/Formula/mosquitto.rb
index d213c2d23..fd244d673 100644
--- a/Library/Formula/mosquitto.rb
+++ b/Library/Formula/mosquitto.rb
@@ -47,7 +47,7 @@ class Mosquitto < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/mosquitto
+        #{opt_sbin}/mosquitto
         -c
         #{etc}/mosquitto/mosquitto.conf
       
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
index f054e43f9..f9c9fad3d 100644
--- a/Library/Formula/mysql.rb
+++ b/Library/Formula/mysql.rb
@@ -152,7 +152,7 @@ class Mysql < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/mysqld_safe
+        #{opt_bin}/mysqld_safe
         --bind-address=127.0.0.1
       
       RunAtLoad
diff --git a/Library/Formula/nagios.rb b/Library/Formula/nagios.rb
index acab74cfd..34f12d573 100644
--- a/Library/Formula/nagios.rb
+++ b/Library/Formula/nagios.rb
@@ -54,7 +54,7 @@ class Nagios < Formula
             #{plist_name}
             ProgramArguments
             
-                    #{opt_prefix}/bin/nagios
+                    #{opt_bin}/nagios
                     #{nagios_etc}/nagios.cfg
             
             RunAtLoad
diff --git a/Library/Formula/netpbm.rb b/Library/Formula/netpbm.rb
index 19d5d4a53..033ba8ec6 100644
--- a/Library/Formula/netpbm.rb
+++ b/Library/Formula/netpbm.rb
@@ -27,7 +27,7 @@ class Netpbm < Formula
       s.change_make_var! "PNGLIB", "-lpng"
       s.change_make_var! "ZLIB", "-lz"
       s.change_make_var! "JASPERLIB", "-ljasper"
-      s.change_make_var! "JASPERHDR_DIR", "#{Formula["jasper"].opt_prefix}/include/jasper"
+      s.change_make_var! "JASPERHDR_DIR", "#{Formula["jasper"].opt_include}/jasper"
     end
 
     ENV.deparallelize
diff --git a/Library/Formula/nexus.rb b/Library/Formula/nexus.rb
index bf305e40f..5d9266080 100644
--- a/Library/Formula/nexus.rb
+++ b/Library/Formula/nexus.rb
@@ -27,7 +27,7 @@ class Nexus < Formula
         com.sonatype.nexus
         ProgramArguments
         
-          #{opt_prefix}/bin/nexus
+          #{opt_bin}/nexus
           start
         
         RunAtLoad
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index 18596aad3..8966c1647 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -153,7 +153,7 @@ class Nginx < Formula
         
         ProgramArguments
         
-            #{opt_prefix}/bin/nginx
+            #{opt_bin}/nginx
             -g
             daemon off;
         
diff --git a/Library/Formula/ntfs-3g.rb b/Library/Formula/ntfs-3g.rb
index 8afb73dbd..c0912b2d0 100644
--- a/Library/Formula/ntfs-3g.rb
+++ b/Library/Formula/ntfs-3g.rb
@@ -46,7 +46,7 @@ class Ntfs3g < Formula
         GROUP_ID=`/usr/bin/stat -f %g /dev/console`
       fi
 
-      #{opt_prefix}/bin/ntfs-3g \\
+      #{opt_bin}/ntfs-3g \\
         -o volname="${VOLUME_NAME}" \\
         -o local \\
         -o negative_vncache \\
diff --git a/Library/Formula/offline-imap.rb b/Library/Formula/offline-imap.rb
index 3f57ddb0b..380de33d9 100644
--- a/Library/Formula/offline-imap.rb
+++ b/Library/Formula/offline-imap.rb
@@ -35,7 +35,7 @@ class OfflineImap < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/offlineimap
+          #{opt_bin}/offlineimap
         
         StartInterval
         300
diff --git a/Library/Formula/openvpn.rb b/Library/Formula/openvpn.rb
index a344b5219..c6cff0c82 100644
--- a/Library/Formula/openvpn.rb
+++ b/Library/Formula/openvpn.rb
@@ -61,7 +61,7 @@ class Openvpn < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/openvpn
+        #{opt_sbin}/openvpn
         --config
         #{etc}/openvpn/openvpn.conf
       
diff --git a/Library/Formula/passenger.rb b/Library/Formula/passenger.rb
index 15c31e871..1f37759d5 100644
--- a/Library/Formula/passenger.rb
+++ b/Library/Formula/passenger.rb
@@ -43,8 +43,8 @@ class Passenger < Formula
 
   def caveats; <<-EOS.undent
     To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
-      LoadModule passenger_module #{opt_prefix}/libexec/buildout/apache2/mod_passenger.so
-      PassengerRoot #{opt_prefix}/libexec/lib/phusion_passenger/locations.ini
+      LoadModule passenger_module #{opt_libexec}/buildout/apache2/mod_passenger.so
+      PassengerRoot #{opt_libexec}/lib/phusion_passenger/locations.ini
       PassengerDefaultRuby /usr/bin/ruby
 
     To activate Phusion Passenger for Nginx, run:
diff --git a/Library/Formula/pdnsrec.rb b/Library/Formula/pdnsrec.rb
index 4b8f17d00..54922de5f 100644
--- a/Library/Formula/pdnsrec.rb
+++ b/Library/Formula/pdnsrec.rb
@@ -18,7 +18,7 @@ class Pdnsrec < Formula
     # Include Lua if requested
     if build.include? 'with-lua'
       ENV['LUA'] = "1"
-      ENV['LUA_CPPFLAGS_CONFIG'] = "-I#{Formula["lua"].opt_prefix}/include"
+      ENV['LUA_CPPFLAGS_CONFIG'] = "-I#{Formula["lua"].opt_include}"
       ENV['LUA_LIBS_CONFIG'] = "-llua"
     end
 
diff --git a/Library/Formula/percona-server.rb b/Library/Formula/percona-server.rb
index f4115f61c..e83d02820 100644
--- a/Library/Formula/percona-server.rb
+++ b/Library/Formula/percona-server.rb
@@ -152,7 +152,7 @@ class PerconaServer < Formula
       Label
       #{plist_name}
       Program
-      #{opt_prefix}/bin/mysqld_safe
+      #{opt_bin}/mysqld_safe
       RunAtLoad
       
       WorkingDirectory
diff --git a/Library/Formula/pgbouncer.rb b/Library/Formula/pgbouncer.rb
index b3bb2b5f0..87e988720 100644
--- a/Library/Formula/pgbouncer.rb
+++ b/Library/Formula/pgbouncer.rb
@@ -44,7 +44,7 @@ class Pgbouncer < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/pgbouncer
+          #{opt_bin}/pgbouncer
           -d
           -q
           #{etc}/pgbouncer.ini
diff --git a/Library/Formula/pincaster.rb b/Library/Formula/pincaster.rb
index c1727fedd..c5997400a 100644
--- a/Library/Formula/pincaster.rb
+++ b/Library/Formula/pincaster.rb
@@ -31,7 +31,7 @@ class Pincaster < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/pincaster
+          #{opt_bin}/pincaster
           #{etc}/pincaster.conf
         
         RunAtLoad
diff --git a/Library/Formula/pocl.rb b/Library/Formula/pocl.rb
index c05c34416..5333a4957 100644
--- a/Library/Formula/pocl.rb
+++ b/Library/Formula/pocl.rb
@@ -35,7 +35,7 @@ class Pocl < Formula
       }
     EOS
     system "#{bin}/pocl-standalone -h head.h -o foo.bc foo.cl"
-    system "\"#{Formula["llvm"].opt_prefix}/bin/llvm-dis\" < foo.bc | grep foo_workgroup"
+    system "\"#{Formula["llvm"].opt_bin}/llvm-dis\" < foo.bc | grep foo_workgroup"
     system "pkg-config pocl --modversion | grep #{version}"
   end
 end
diff --git a/Library/Formula/polipo.rb b/Library/Formula/polipo.rb
index 489b45859..2db9e91f0 100644
--- a/Library/Formula/polipo.rb
+++ b/Library/Formula/polipo.rb
@@ -34,7 +34,7 @@ class Polipo < Formula
         
         ProgramArguments
         
-          #{opt_prefix}/bin/polipo
+          #{opt_bin}/polipo
         
       
     
diff --git a/Library/Formula/postgres-xc.rb b/Library/Formula/postgres-xc.rb
index e522ccb7a..8fdaa87f5 100644
--- a/Library/Formula/postgres-xc.rb
+++ b/Library/Formula/postgres-xc.rb
@@ -167,7 +167,7 @@ class PostgresXc < Formula
       #{plist_name(name)}
       ProgramArguments
       
-        #{opt_prefix}/bin/gtm
+        #{opt_bin}/gtm
         -D
         #{var}/postgres-xc/#{name}
         -l
@@ -195,7 +195,7 @@ class PostgresXc < Formula
       #{plist_name(name)}
       ProgramArguments
       
-        #{opt_prefix}/bin/gtm_proxy
+        #{opt_bin}/gtm_proxy
         -D
         #{var}/postgres-xc/#{name}
         -n
@@ -229,7 +229,7 @@ class PostgresXc < Formula
       #{plist_name(name)}
       ProgramArguments
       
-        #{opt_prefix}/bin/postgres
+        #{opt_bin}/postgres
         -i
         -C
         -D
@@ -259,7 +259,7 @@ class PostgresXc < Formula
       #{plist_name(name)}
       ProgramArguments
       
-        #{opt_prefix}/bin/postgres
+        #{opt_bin}/postgres
         -i
         -X
         -D
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb
index fc0a2e92b..50dc5997e 100644
--- a/Library/Formula/postgresql.rb
+++ b/Library/Formula/postgresql.rb
@@ -115,7 +115,7 @@ class Postgresql < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/postgres
+        #{opt_bin}/postgres
         -D
         #{var}/postgres
         -r
diff --git a/Library/Formula/proftpd.rb b/Library/Formula/proftpd.rb
index 781eb5603..552a361d4 100644
--- a/Library/Formula/proftpd.rb
+++ b/Library/Formula/proftpd.rb
@@ -31,7 +31,7 @@ class Proftpd < Formula
         
         ProgramArguments
         
-          #{opt_prefix}/bin/proftpd
+          #{opt_bin}/proftpd
         
         UserName
         root
diff --git a/Library/Formula/pure-ftpd.rb b/Library/Formula/pure-ftpd.rb
index ca4993047..d24f28490 100644
--- a/Library/Formula/pure-ftpd.rb
+++ b/Library/Formula/pure-ftpd.rb
@@ -44,7 +44,7 @@ class PureFtpd < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/sbin/pure-ftpd
+          #{opt_sbin}/pure-ftpd
           -A -j -z
         
         RunAtLoad
diff --git a/Library/Formula/pygobject3.rb b/Library/Formula/pygobject3.rb
index d187d5e59..9af8d1101 100644
--- a/Library/Formula/pygobject3.rb
+++ b/Library/Formula/pygobject3.rb
@@ -96,7 +96,7 @@ class Pygobject3 < Formula
     pythons.each do |python, version|
       unless Formula[python].installed?
         ENV["PYTHONPATH"] = HOMEBREW_PREFIX/"lib/python#{version}/site-packages"
-        ENV.append_path "PYTHONPATH", "#{opt_prefix}/lib/python#{version}/site-packages"
+        ENV.append_path "PYTHONPATH", "#{opt_lib}/python#{version}/site-packages"
       end
       system python, "test.py"
     end
diff --git a/Library/Formula/pyqt5.rb b/Library/Formula/pyqt5.rb
index 440f451af..89a420c78 100644
--- a/Library/Formula/pyqt5.rb
+++ b/Library/Formula/pyqt5.rb
@@ -46,7 +46,7 @@ class Pyqt5 < Formula
                # To avoid conflicts with PyQt (for Qt4):
                "--sipdir=#{share}/sip/Qt5/",
                # sip.h could not be found automatically
-               "--sip-incdir=#{Formula["sip"].opt_prefix}/include",
+               "--sip-incdir=#{Formula["sip"].opt_include}",
                # Make sure the qt5 version of qmake is found.
                # If qt4 is linked it will pickup that version otherwise.
                "--qmake=#{Formula["qt5"].bin}/qmake",
diff --git a/Library/Formula/qpdf.rb b/Library/Formula/qpdf.rb
index f2ac76ab4..be310c662 100644
--- a/Library/Formula/qpdf.rb
+++ b/Library/Formula/qpdf.rb
@@ -9,7 +9,7 @@ class Qpdf < Formula
 
   def install
     # find Homebrew's libpcre
-    ENV.append 'LDFLAGS', "-L#{Formula["pcre"].opt_prefix}/lib"
+    ENV.append 'LDFLAGS', "-L#{Formula["pcre"].opt_lib}"
 
     system "./configure", "--prefix=#{prefix}"
     system "make"
diff --git a/Library/Formula/rabbitmq.rb b/Library/Formula/rabbitmq.rb
index 748c26fd0..7cf2897ee 100644
--- a/Library/Formula/rabbitmq.rb
+++ b/Library/Formula/rabbitmq.rb
@@ -67,7 +67,7 @@ class Rabbitmq < Formula
         Label
         #{plist_name}
         Program
-        #{opt_prefix}/sbin/rabbitmq-server
+        #{opt_sbin}/rabbitmq-server
         RunAtLoad
         
         EnvironmentVariables
diff --git a/Library/Formula/redis.rb b/Library/Formula/redis.rb
index 7154f9f42..af7fa3401 100644
--- a/Library/Formula/redis.rb
+++ b/Library/Formula/redis.rb
@@ -56,7 +56,7 @@ class Redis < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/redis-server
+          #{opt_bin}/redis-server
           #{etc}/redis.conf
         
         RunAtLoad
diff --git a/Library/Formula/rethinkdb.rb b/Library/Formula/rethinkdb.rb
index b0254dc6b..5111d368a 100644
--- a/Library/Formula/rethinkdb.rb
+++ b/Library/Formula/rethinkdb.rb
@@ -37,7 +37,7 @@ class Rethinkdb < Formula
       #{plist_name}
       ProgramArguments
       
-          #{opt_prefix}/bin/rethinkdb
+          #{opt_bin}/rethinkdb
           -d
           #{var}/rethinkdb
       
diff --git a/Library/Formula/ruby.rb b/Library/Formula/ruby.rb
index e544320a3..46f3ccba0 100644
--- a/Library/Formula/ruby.rb
+++ b/Library/Formula/ruby.rb
@@ -70,7 +70,7 @@ class Ruby < Formula
 
   def caveats; <<-EOS.undent
     By default, gem installed executables will be placed into:
-      #{opt_prefix}/bin
+      #{opt_bin}
 
     You may want to add this to your PATH. After upgrades, you can run
       gem pristine --all --only-executables
diff --git a/Library/Formula/scm-manager.rb b/Library/Formula/scm-manager.rb
index a971588ac..20ac4781f 100644
--- a/Library/Formula/scm-manager.rb
+++ b/Library/Formula/scm-manager.rb
@@ -49,7 +49,7 @@ class ScmManager < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/bin/scm-server
+          #{opt_bin}/scm-server
           start
         
         RunAtLoad
diff --git a/Library/Formula/ser2net.rb b/Library/Formula/ser2net.rb
index 5e6dd25df..922ef6efb 100644
--- a/Library/Formula/ser2net.rb
+++ b/Library/Formula/ser2net.rb
@@ -38,7 +38,7 @@ class Ser2net < Formula
         
         ProgramArguments
         
-            #{opt_prefix}/sbin/ser2net
+            #{opt_sbin}/ser2net
             -p
             12345
         
diff --git a/Library/Formula/sickbeard.rb b/Library/Formula/sickbeard.rb
index 20234d96f..1155d5927 100644
--- a/Library/Formula/sickbeard.rb
+++ b/Library/Formula/sickbeard.rb
@@ -25,7 +25,7 @@ class Sickbeard < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/bin/sickbeard
+        #{opt_bin}/sickbeard
         -q
         --nolaunch
         -p
diff --git a/Library/Formula/slony.rb b/Library/Formula/slony.rb
index 910afcfe7..827325d27 100644
--- a/Library/Formula/slony.rb
+++ b/Library/Formula/slony.rb
@@ -10,7 +10,7 @@ class Slony < Formula
   def install
     postgres = Formula['postgresql']
     system "./configure", "--disable-debug",
-                          "--with-pgconfigdir=#{postgres.opt_prefix}/bin",
+                          "--with-pgconfigdir=#{postgres.opt_bin}",
                           "--prefix=#{prefix}"
     system "make install"
   end
diff --git a/Library/Formula/sonar.rb b/Library/Formula/sonar.rb
index db70e3457..af98add60 100644
--- a/Library/Formula/sonar.rb
+++ b/Library/Formula/sonar.rb
@@ -37,7 +37,7 @@ class Sonar < Formula
         #{plist_name}
         ProgramArguments
         
-        #{opt_prefix}/bin/sonar
+        #{opt_bin}/sonar
         start
         
         RunAtLoad
diff --git a/Library/Formula/spatialite-tools.rb b/Library/Formula/spatialite-tools.rb
index 6be9dbb6b..3716f8859 100644
--- a/Library/Formula/spatialite-tools.rb
+++ b/Library/Formula/spatialite-tools.rb
@@ -14,8 +14,8 @@ class SpatialiteTools < Formula
     ENV.append 'LDFLAGS', '-liconv'
     # Ensure Homebrew SQLite is found before system SQLite.
     sqlite = Formula["sqlite"]
-    ENV.append 'LDFLAGS', "-L#{sqlite.opt_prefix}/lib"
-    ENV.append 'CFLAGS', "-I#{sqlite.opt_prefix}/include"
+    ENV.append 'LDFLAGS', "-L#{sqlite.opt_lib}"
+    ENV.append 'CFLAGS', "-I#{sqlite.opt_include}"
 
     system "./configure", "--disable-dependency-tracking",
                           "--prefix=#{prefix}"
diff --git a/Library/Formula/squid.rb b/Library/Formula/squid.rb
index 7bcad60c6..1d37a81b5 100644
--- a/Library/Formula/squid.rb
+++ b/Library/Formula/squid.rb
@@ -53,7 +53,7 @@ class Squid < Formula
       #{plist_name}
       ProgramArguments
       
-        #{opt_prefix}/sbin/squid
+        #{opt_sbin}/squid
         -N
         -d 1
       
diff --git a/Library/Formula/sshguard.rb b/Library/Formula/sshguard.rb
index fc0020fd3..c53d23baf 100644
--- a/Library/Formula/sshguard.rb
+++ b/Library/Formula/sshguard.rb
@@ -54,7 +54,7 @@ class Sshguard < Formula
       
       ProgramArguments
       
-        #{opt_prefix}/sbin/sshguard
+        #{opt_sbin}/sshguard
         -l
         #{log_path}
       
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 0db1e9afd..1a1c0a525 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -180,7 +180,7 @@ class Subversion < Formula
       system "make", "install-swig-pl", "DESTDIR=#{prefix}"
       # Some of the libraries get installed into the wrong place, they end up having the
       # prefix in the directory name twice.
-      mv Dir.glob("#{prefix}/#{lib}/*"), "#{lib}"
+      mv Dir["#{prefix}/#{lib}/*"], "#{lib}"
     end
 
     if build.include? 'java'
@@ -203,7 +203,7 @@ class Subversion < Formula
   def caveats
     s = <<-EOS.undent
       svntools have been installed to:
-        #{opt_prefix}/libexec
+        #{opt_libexec}
     EOS
 
     if build.include? 'perl'
diff --git a/Library/Formula/tor.rb b/Library/Formula/tor.rb
index 518101850..cc609b99d 100644
--- a/Library/Formula/tor.rb
+++ b/Library/Formula/tor.rb
@@ -53,7 +53,7 @@ class Tor < Formula
         
         ProgramArguments
         
-            #{opt_prefix}/bin/tor
+            #{opt_bin}/tor
         
         WorkingDirectory
         #{HOMEBREW_PREFIX}
diff --git a/Library/Formula/varnish.rb b/Library/Formula/varnish.rb
index 5629ad3ee..76f54f068 100644
--- a/Library/Formula/varnish.rb
+++ b/Library/Formula/varnish.rb
@@ -25,7 +25,7 @@ class Varnish < Formula
         #{plist_name}
         ProgramArguments
         
-          #{opt_prefix}/sbin/varnishd
+          #{opt_sbin}/varnishd
           -n
           #{var}/varnish
           -f
diff --git a/Library/Formula/wildfly-as.rb b/Library/Formula/wildfly-as.rb
index ab478dfb4..1512dc93b 100644
--- a/Library/Formula/wildfly-as.rb
+++ b/Library/Formula/wildfly-as.rb
@@ -12,15 +12,15 @@ class WildflyAs < Formula
 
   def caveats; <<-EOS.undent
     The home of WildFly Application Server 8 is:
-      #{opt_prefix}/libexec
+      #{opt_libexec}
     You may want to add the following to your .bash_profile:
-      export JBOSS_HOME=#{opt_prefix}/libexec
+      export JBOSS_HOME=#{opt_libexec}
       export PATH=${PATH}:${JBOSS_HOME}/bin
     EOS
   end
 
   test do
-    system "#{opt_prefix}/libexec/bin/standalone.sh --version | grep #{version}"
+    system "#{opt_libexec}/bin/standalone.sh --version | grep #{version}"
   end
 
 end
diff --git a/Library/Formula/wxpython.rb b/Library/Formula/wxpython.rb
index e01e9e72f..d8ddcb84a 100644
--- a/Library/Formula/wxpython.rb
+++ b/Library/Formula/wxpython.rb
@@ -28,7 +28,7 @@ class Wxpython < Formula
     args = [
       "WXPORT=osx_cocoa",
       # Reference our wx-config
-      "WX_CONFIG=#{Formula["wxmac"].opt_prefix}/bin/wx-config",
+      "WX_CONFIG=#{Formula["wxmac"].opt_bin}/wx-config",
       # At this time Wxmac is installed Unicode only
       "UNICODE=1",
       # Some scripts (e.g. matplotlib) expect to `import wxversion`, which is
diff --git a/Library/Formula/yara.rb b/Library/Formula/yara.rb
index e04e2c5fa..db92d5e59 100644
--- a/Library/Formula/yara.rb
+++ b/Library/Formula/yara.rb
@@ -12,7 +12,7 @@ class Yara < Formula
     ENV.append 'CFLAGS', '-std=gnu89' if ENV.compiler == :clang
 
     # find Homebrew's libpcre
-    ENV.append 'LDFLAGS', "-L#{Formula["pcre"].opt_prefix}/lib -lpcre"
+    ENV.append 'LDFLAGS', "-L#{Formula["pcre"].opt_lib} -lpcre"
 
     system "./configure", "--disable-debug",
                           "--disable-dependency-tracking",
-- 
cgit v1.2.3