aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2012-08-13 10:47:06 -0500
committerJack Nagel2012-08-13 10:47:06 -0500
commit441a0cc5e7d5a2f973a6494ae222629c57c5ffa8 (patch)
treec55507fe5f5fef2ed31936006b504ec7cb627e73 /Library/Formula
parentdc2fe93b9349ac50a98ad64e5bd7c89cbf8ac8cb (diff)
downloadhomebrew-441a0cc5e7d5a2f973a6494ae222629c57c5ffa8.tar.bz2
libevent: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libevent.rb30
1 files changed, 14 insertions, 16 deletions
diff --git a/Library/Formula/libevent.rb b/Library/Formula/libevent.rb
index 8a10a6d2b..36edc48a3 100644
--- a/Library/Formula/libevent.rb
+++ b/Library/Formula/libevent.rb
@@ -7,37 +7,35 @@ class Libevent < Formula
head 'git://levent.git.sourceforge.net/gitroot/levent/levent'
- fails_with :llvm do
- build 2326
- cause "Undefined symbol '_current_base' reported during linking."
- end
-
- if ARGV.build_head?
+ if build.head?
depends_on :automake
depends_on :libtool
end
- depends_on "doxygen" => :build if ARGV.include? '--enable-manpages'
+ depends_on "doxygen" => :build if build.include? 'enable-manpages'
- # Enable manpage generation
- def patches
- DATA if ARGV.include? '--enable-manpages'
+ option :universal
+ option 'enable-manpages', 'Install the libevent manpages (requires doxygen)'
+
+ fails_with :llvm do
+ build 2326
+ cause "Undefined symbol '_current_base' reported during linking."
end
- def options
- [["--enable-manpages", "Install the libevent manpages"],
- ["--universal", "Builds a universal binary"]]
+ # Enable manpage generation
+ def patches
+ DATA if build.include? 'enable-manpages'
end
def install
- ENV.universal_binary if ARGV.build_universal?
+ ENV.universal_binary if build.universal?
ENV.j1
- system "./autogen.sh" if ARGV.build_head?
+ system "./autogen.sh" if build.head?
system "./configure", "--prefix=#{prefix}"
system "make"
system "make install"
- if ARGV.include? '--enable-manpages'
+ if build.include? 'enable-manpages'
system "make doxygen"
man3.install Dir['doxygen/man/man3/*.3']
end