2010-02-28 16:54:17 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Rrdtool < Formula
|
2011-07-05 08:49:25 +00:00
|
|
|
url 'http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz'
|
2010-02-28 16:54:17 +00:00
|
|
|
homepage 'http://oss.oetiker.ch/rrdtool/index.en.html'
|
2011-07-05 08:49:25 +00:00
|
|
|
md5 '4d116dba9a0888d8aaac179e35d3980a'
|
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'
|
2011-03-14 21:14:41 +00:00
|
|
|
depends_on 'intltool'
|
2010-02-28 16:54:17 +00:00
|
|
|
depends_on 'expat'
|
|
|
|
depends_on 'pango'
|
|
|
|
|
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"
|
|
|
|
|
2011-03-14 21:14:41 +00:00
|
|
|
# Ha-ha, but sleeping is annoying when running configure a lot
|
|
|
|
def patches; DATA; 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
|
2011-03-14 21:14:41 +00:00
|
|
|
ENV.libxml2
|
|
|
|
ENV.x11
|
|
|
|
|
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"
|
|
|
|
|
2011-08-30 19:01:15 +00:00
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}"]
|
2010-07-31 04:12:08 +00:00
|
|
|
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
|
2011-03-18 17:30:47 +00:00
|
|
|
ENV["ARCHFLAGS"] = MacOS.prefer_64_bit? ? "-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!"
|