forked from Ensembl/homebrew-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apr.rb
39 lines (30 loc) · 1.24 KB
/
apr.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class Apr < Formula
desc "Apache Portable Runtime library"
homepage "https://apr.apache.org/"
url "http://archive.apache.org/dist/apr/apr-1.6.2.tar.bz2"
sha256 "09109cea377bab0028bba19a92b5b0e89603df9eab05c0f7dbd4dd83d48dcebd"
revision 1
keg_only :provided_by_macos, "Apple's CLT package contains apr"
depends_on "util-linux" => :recommended if OS.linux? # for libuuid
def install
ENV["SED"] = "sed" # prevent libtool from hardcoding sed path from superenv
# https://bz.apache.org/bugzilla/show_bug.cgi?id=57359
# The internal libtool throws an enormous strop if we don't do...
ENV.deparallelize
if OS.linux? && build.bottle?
# Prevent hardcoded /usr/bin/gcc-4.8 compiler
ENV["CC"] = "cc"
end
# Stick it in libexec otherwise it pollutes lib with a .exp file.
system "./configure", "--prefix=#{libexec}"
system "make", "install"
bin.install_symlink Dir["#{libexec}/bin/*"]
lib.install_symlink Dir["#{libexec}/lib/*.so*"] unless OS.mac?
rm Dir[libexec/"lib/*.la"]
# No need for this to point to the versioned path.
inreplace libexec/"bin/apr-1-config", libexec, opt_libexec
end
test do
assert_match opt_libexec.to_s, shell_output("#{bin}/apr-1-config --prefix")
end
end