mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-07 02:22:37 -05:00
73 lines
1.9 KiB
Ruby
73 lines
1.9 KiB
Ruby
class Libevent < Formula
|
|
desc "Asynchronous event library"
|
|
homepage "http://libevent.org"
|
|
url "https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz"
|
|
sha256 "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "5519f9a4cf854b58dbb6c9d61d76d49d4c3dbfdea58e13e9eae80bd25b47d358" => :tiger_altivec
|
|
sha256 "7ae120a547abcce07b0ab176336f06b09e6773b41b24b041c898bac776013f94" => :tiger_g3
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/libevent/libevent.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "doxygen" => [:optional, :build]
|
|
depends_on "pkg-config" => :build
|
|
depends_on "openssl3"
|
|
|
|
option :universal
|
|
option "with-doxygen", "Build and install the manpages (using Doxygen)"
|
|
|
|
deprecated_option "enable-manpages" => "with-doxygen"
|
|
|
|
fails_with :llvm do
|
|
build 2326
|
|
cause "Undefined symbol '_current_base' reported during linking."
|
|
end
|
|
|
|
def install
|
|
ENV.universal_binary if build.universal?
|
|
ENV.j1
|
|
|
|
if build.with? "doxygen"
|
|
inreplace "Doxyfile", /GENERATE_MAN\s*=\s*NO/, "GENERATE_MAN = YES"
|
|
end
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--disable-debug-mode",
|
|
"--prefix=#{prefix}"
|
|
system "make"
|
|
system "make", "install"
|
|
|
|
if build.with? "doxygen"
|
|
system "make", "doxygen"
|
|
man3.install Dir["doxygen/man/man3/*.3"]
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
#include <event2/event.h>
|
|
|
|
int main()
|
|
{
|
|
struct event_base *base;
|
|
base = event_base_new();
|
|
event_base_free(base);
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cc, "test.c", "-L#{lib}", "-levent", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|