2014-12-25 22:43:29 +00:00
|
|
|
class Apr < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Apache Portable Runtime library"
|
2014-12-25 22:43:29 +00:00
|
|
|
homepage "https://apr.apache.org/"
|
2015-05-05 08:42:18 +00:00
|
|
|
url "https://www.apache.org/dyn/closer.cgi?path=apr/apr-1.5.2.tar.bz2"
|
|
|
|
sha256 "7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a"
|
2016-09-13 16:22:47 +00:00
|
|
|
revision 3
|
2014-12-25 22:43:29 +00:00
|
|
|
|
2015-01-06 17:27:31 +00:00
|
|
|
bottle do
|
2016-07-21 02:36:04 +00:00
|
|
|
cellar :any
|
2016-09-13 21:12:29 +00:00
|
|
|
sha256 "7421ebf15011c00fff76530a40fe78aca7ddec4d1c6dbf2327bc13ea22dbc361" => :sierra
|
2016-09-13 16:31:24 +00:00
|
|
|
sha256 "63628dded3e37b9768b32ca65837ef0c1adcd0aa6d065c5604315cfa6069ceda" => :el_capitan
|
|
|
|
sha256 "1364ce1a6a2786b9b6fcb10a2df966678383a650d99b369ee2cd811ded4afd57" => :yosemite
|
|
|
|
sha256 "a4e7a90d12fac10ac788be3472c3e77a12e2db1a889d7be45f521d8387df28a0" => :mavericks
|
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:34:19 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-12-25 22:43:29 +00:00
|
|
|
def install
|
2015-01-13 15:36:17 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2016-09-13 16:22:47 +00:00
|
|
|
ENV["SED"] = "sed" # prevent libtool from hardcoding sed path from superenv
|
2015-01-13 15:36:17 +00:00
|
|
|
|
2015-05-05 08:42:18 +00:00
|
|
|
# https://bz.apache.org/bugzilla/show_bug.cgi?id=57359
|
2014-12-25 22:43:29 +00:00
|
|
|
# The internal libtool throws an enormous strop if we don't do...
|
|
|
|
ENV.deparallelize
|
|
|
|
|
|
|
|
# Stick it in libexec otherwise it pollutes lib with a .exp file.
|
2015-01-13 15:36:17 +00:00
|
|
|
system "./configure", "--prefix=#{libexec}"
|
2014-12-25 22:43:29 +00:00
|
|
|
system "make", "install"
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
2016-08-29 16:13:56 +00:00
|
|
|
|
|
|
|
# No need for this to point to the versioned path.
|
|
|
|
inreplace libexec/"bin/apr-1-config", libexec, opt_libexec
|
2014-12-25 22:43:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-08-29 16:13:56 +00:00
|
|
|
assert_match opt_libexec.to_s, shell_output("#{bin}/apr-1-config --prefix")
|
2014-12-25 22:43:29 +00:00
|
|
|
end
|
|
|
|
end
|