aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-21 14:01:53 -0700
committerAdam Vandenberg2012-08-21 14:09:20 -0700
commit8c6fa25122e945931ffc5fe143fd626ec0f2936c (patch)
treeb1a3c0a2a3d7394d4c1b6d31b1a3b704e2e345cf /Library/Formula
parent249e2763de543a98df3703f920e319ee22927839 (diff)
downloadhomebrew-8c6fa25122e945931ffc5fe143fd626ec0f2936c.tar.bz2
rrdtool: use option dsl
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/rrdtool.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/Library/Formula/rrdtool.rb b/Library/Formula/rrdtool.rb
index eae6c3a1c..3a8823134 100644
--- a/Library/Formula/rrdtool.rb
+++ b/Library/Formula/rrdtool.rb
@@ -1,10 +1,12 @@
require 'formula'
class Rrdtool < Formula
- url 'http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz'
homepage 'http://oss.oetiker.ch/rrdtool/index.en.html'
+ url 'http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz'
sha1 'faab7df7696b69f85d6f89dd9708d7cf0c9a273b'
+ option 'lua', "Compile with lua support"
+
depends_on 'pkg-config' => :build
depends_on 'gettext'
depends_on 'glib'
@@ -14,15 +16,11 @@ class Rrdtool < Formula
depends_on :x11
# Can use lua if it is found, but don't force users to install
- depends_on 'lua' => :optional if ARGV.include? "--lua"
+ depends_on 'lua' => :optional if build.include? "lua"
# Ha-ha, but sleeping is annoying when running configure a lot
def patches; DATA; end
- def options
- [["--lua", "Compile with lua support."]]
- end
-
def install
ENV.libxml2
@@ -33,7 +31,10 @@ class Rrdtool < Formula
opoo "Using system Ruby. RRD module will be installed to /Library/Ruby/..." if which_ruby.realpath.to_s == ruby_path
opoo "Using system Perl. RRD module will be installed to /Library/Perl/..." if which_perl.to_s == "/usr/bin/perl"
- args = ["--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}"]
+ args = %W[
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ ]
args << "--enable-perl-site-install" if which_perl.to_s == "/usr/bin/perl"
args << "--enable-ruby-site-install" if which_ruby.realpath.to_s == ruby_path