From 606aafd713ef5ad807867a17c0a2cc988d9505c4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 27 Dec 2014 16:09:04 +0000 Subject: [PATCH] libevent: fix some strict audit failures. --- Formula/libevent.rb | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/Formula/libevent.rb b/Formula/libevent.rb index 90b5bd3946..eea4d15e2c 100644 --- a/Formula/libevent.rb +++ b/Formula/libevent.rb @@ -1,5 +1,3 @@ -require "formula" - class Libevent < Formula homepage "http://libevent.org" url "https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" @@ -22,24 +20,28 @@ class Libevent < Formula depends_on "libtool" => :build end - depends_on "doxygen" => :build if build.include? "enable-manpages" + depends_on "doxygen" => [:optional, :build] depends_on "pkg-config" => :build depends_on "openssl" option :universal - option "enable-manpages", "Install the libevent manpages (requires doxygen)" + 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 - # Enable manpage generation - patch :DATA if build.include? "enable-manpages" - 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", @@ -47,24 +49,9 @@ class Libevent < Formula system "make" system "make", "install" - if build.include? "enable-manpages" - system "make doxygen" + if build.with? "doxygen" + system "make", "doxygen" man3.install Dir["doxygen/man/man3/*.3"] end end end - -__END__ -diff --git a/Doxyfile b/Doxyfile -index 5d3865e..1442c19 100644 ---- a/Doxyfile -+++ b/Doxyfile -@@ -175,7 +175,7 @@ LATEX_HIDE_INDICES = NO - # If the GENERATE_MAN tag is set to YES (the default) Doxygen will - # generate man pages - --GENERATE_MAN = NO -+GENERATE_MAN = YES - - # The MAN_EXTENSION tag determines the extension that is added to - # the generated man pages (default is the subroutine's section .3)