2010-02-28 16:54:17 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Rrdtool < Formula
|
2010-07-31 04:12:08 +00:00
|
|
|
url 'http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.4.tar.gz'
|
2010-02-28 16:54:17 +00:00
|
|
|
homepage 'http://oss.oetiker.ch/rrdtool/index.en.html'
|
2010-07-31 04:12:08 +00:00
|
|
|
md5 '93ad2fc2e9ddcd7d99c611fe30284a54'
|
2010-02-28 16:54:17 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-02-28 16:54:17 +00:00
|
|
|
depends_on 'gettext'
|
2010-07-31 04:12:08 +00:00
|
|
|
depends_on 'glib'
|
2010-02-28 16:54:17 +00:00
|
|
|
depends_on 'libxml2'
|
|
|
|
depends_on 'expat'
|
|
|
|
depends_on 'pango'
|
|
|
|
depends_on 'libpng'
|
|
|
|
depends_on 'intltool'
|
|
|
|
|
2010-07-01 16:20:32 +00:00
|
|
|
# Can use lua if it is found, but don't force users to install
|
2010-07-31 04:12:08 +00:00
|
|
|
depends_on 'lua' => :optional if ARGV.include? "--lua"
|
|
|
|
|
|
|
|
def patches
|
|
|
|
DATA # Ha-ha, but sleeping is annoying when running configure a lot
|
|
|
|
end
|
2010-07-01 16:20:32 +00:00
|
|
|
|
2010-08-10 20:05:20 +00:00
|
|
|
def options
|
|
|
|
[["--lua", "Compile with lua support."]]
|
|
|
|
end
|
|
|
|
|
2010-02-28 16:54:17 +00:00
|
|
|
def install
|
2010-07-31 04:12:08 +00:00
|
|
|
which_perl = `/usr/bin/which perl`.chomp
|
|
|
|
which_ruby = `/usr/bin/which ruby`.chomp
|
|
|
|
|
|
|
|
opoo "Using system Ruby. RRD module will be installed to /Library/Ruby/..." if which_ruby == "/usr/bin/ruby"
|
|
|
|
opoo "Using system Perl. RRD module will be installed to /Library/Perl/..." if which_perl == "/usr/bin/perl"
|
|
|
|
|
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
|
|
|
args << "--enable-perl-site-install" if which_perl == "/usr/bin/perl"
|
|
|
|
args << "--enable-ruby-site-install" if which_ruby == "/usr/bin/ruby"
|
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
|
|
|
|
# Needed to build proper Ruby bundle
|
2010-08-08 04:04:37 +00:00
|
|
|
ENV["ARCHFLAGS"] = snow_leopard_64? ? "-arch x86_64" : "-arch i386"
|
2010-07-01 16:20:32 +00:00
|
|
|
|
2010-02-28 16:54:17 +00:00
|
|
|
system "make install"
|
2010-07-31 04:12:08 +00:00
|
|
|
prefix.install "bindings/ruby/test.rb"
|
2010-02-28 16:54:17 +00:00
|
|
|
end
|
2010-07-01 16:20:32 +00:00
|
|
|
|
|
|
|
def test
|
2010-07-31 04:12:08 +00:00
|
|
|
system "ruby", prefix+"test.rb"
|
|
|
|
system "open test.png"
|
|
|
|
puts "You may want to `rm test.{rrd,png}`"
|
2010-07-01 16:20:32 +00:00
|
|
|
end
|
2010-02-28 16:54:17 +00:00
|
|
|
end
|
2010-07-31 04:12:08 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/configure b/configure
|
|
|
|
index 7487ad2..e7b85c1 100755
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
|
|
|
@@ -31663,18 +31663,6 @@ $as_echo_n "checking in... " >&6; }
|
|
|
|
{ $as_echo "$as_me:$LINENO: result: and out again" >&5
|
|
|
|
$as_echo "and out again" >&6; }
|
|
|
|
|
|
|
|
-echo $ECHO_N "ordering CD from http://tobi.oetiker.ch/wish $ECHO_C" 1>&6
|
|
|
|
-sleep 1
|
|
|
|
-echo $ECHO_N ".$ECHO_C" 1>&6
|
|
|
|
-sleep 1
|
|
|
|
-echo $ECHO_N ".$ECHO_C" 1>&6
|
|
|
|
-sleep 1
|
|
|
|
-echo $ECHO_N ".$ECHO_C" 1>&6
|
|
|
|
-sleep 1
|
|
|
|
-echo $ECHO_N ".$ECHO_C" 1>&6
|
|
|
|
-sleep 1
|
|
|
|
-{ $as_echo "$as_me:$LINENO: result: just kidding ;-)" >&5
|
|
|
|
-$as_echo " just kidding ;-)" >&6; }
|
|
|
|
echo
|
|
|
|
echo "----------------------------------------------------------------"
|
|
|
|
echo "Config is DONE!"
|