2014-12-25 22:43:29 +00:00
|
|
|
class AprUtil < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Companion library to apr, the Apache Portable Runtime library"
|
2014-12-25 22:43:29 +00:00
|
|
|
homepage "https://apr.apache.org/"
|
2015-05-09 18:58:16 +00:00
|
|
|
url "https://www.apache.org/dyn/closer.cgi?path=apr/apr-util-1.5.4.tar.bz2"
|
|
|
|
sha256 "a6cf327189ca0df2fb9d5633d7326c460fe2b61684745fd7963e79a6dd0dc82e"
|
|
|
|
revision 1
|
2014-12-25 22:43:29 +00:00
|
|
|
|
2015-01-06 17:27:31 +00:00
|
|
|
bottle do
|
2015-09-21 14:19:21 +00:00
|
|
|
sha256 "f76d6d8ac0152f599ad59d2a4b0a8683741889bad402409c4ca2c18330c6b183" => :el_capitan
|
2015-05-10 05:05:31 +00:00
|
|
|
sha256 "6b043e4bf051fce17991f3cafb4ce7d235bf52e01b76e447b5a286f85a69cde9" => :yosemite
|
|
|
|
sha256 "aff874c3e72a5ec31b75c066d327771bc84b0a31fedc2243e4e21a56dee78eae" => :mavericks
|
|
|
|
sha256 "76f24ef98aebf89eb0b3c7d7fdc31f8074120c39708d8a513575e956fe50fc07" => :mountain_lion
|
2015-01-06 17:27:31 +00:00
|
|
|
end
|
|
|
|
|
2014-12-25 22:43:29 +00:00
|
|
|
keg_only :provided_by_osx, "Apple's CLT package contains apr."
|
|
|
|
|
2015-01-13 15:36:17 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-12-25 22:43:29 +00:00
|
|
|
depends_on "apr"
|
|
|
|
depends_on "openssl"
|
|
|
|
depends_on "postgresql" => :optional
|
|
|
|
|
|
|
|
def install
|
2015-01-13 15:36:17 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
|
|
|
|
2014-12-25 22:43:29 +00:00
|
|
|
# Stick it in libexec otherwise it pollutes lib with a .exp file.
|
|
|
|
args = %W[
|
|
|
|
--prefix=#{libexec}
|
|
|
|
--with-apr=#{Formula["apr"].opt_prefix}
|
|
|
|
--with-openssl=#{Formula["openssl"].opt_prefix}
|
|
|
|
]
|
|
|
|
|
|
|
|
args << "--with-pgsql=#{Formula["postgresql"].opt_prefix}" if build.with? "postgresql"
|
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/apu-1-config", "--link-libtool", "--libs"
|
|
|
|
end
|
|
|
|
end
|