diff options
| author | Adam Vandenberg | 2010-07-30 21:12:08 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-07-30 21:12:08 -0700 |
| commit | 9de8a2b05892a0f93a20de4cbf541142cbee44f9 (patch) | |
| tree | 1ceade2c1abc5fd646f4973c0c9efcbadcd89f49 /Library | |
| parent | fb98ee1c614e8ae704e93f3409c86f962790ed1d (diff) | |
| download | homebrew-9de8a2b05892a0f93a20de4cbf541142cbee44f9.tar.bz2 | |
Update rrdtool to 1.4.4 and fix Ruby bindings
* Ruby bindings (may) now work against the system Ruby.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/rrdtool.rb | 69 |
1 files changed, 55 insertions, 14 deletions
diff --git a/Library/Formula/rrdtool.rb b/Library/Formula/rrdtool.rb index b9af06c40..6da951ecb 100644 --- a/Library/Formula/rrdtool.rb +++ b/Library/Formula/rrdtool.rb @@ -1,13 +1,13 @@ require 'formula' class Rrdtool <Formula - url 'http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.3.tar.gz' + url 'http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.4.tar.gz' homepage 'http://oss.oetiker.ch/rrdtool/index.en.html' - md5 '492cf946c72f85987238faa2c311b7bb' + md5 '93ad2fc2e9ddcd7d99c611fe30284a54' depends_on 'pkg-config' - depends_on 'glib' depends_on 'gettext' + depends_on 'glib' depends_on 'libxml2' depends_on 'expat' depends_on 'pango' @@ -15,23 +15,64 @@ class Rrdtool <Formula depends_on 'intltool' # Can use lua if it is found, but don't force users to install - # depends_on 'lua' => :optional + depends_on 'lua' => :optional if ARGV.include? "--lua" + + def patches + DATA # Ha-ha, but sleeping is annoying when running configure a lot + end def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-perl-site-install", - "--enable-ruby-site-install", - # Installing directly into Homebrew's Python's site-packages - # can break things, so we disable this for now. - # TODO: how to build Python support w/o installing it. - "--disable-python" + 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 + if Hardware.is_64_bit? and MACOS_VERSION >= 10.6 + ENV["ARCHFLAGS"] = "-arch x86_64" + else + ENV["ARCHFLAGS"] = "-arch i386" + end system "make install" + prefix.install "bindings/ruby/test.rb" end def test - # Test ruby support; currently fails. - system "ruby", "-e", "require 'RRD'" + system "ruby", prefix+"test.rb" + system "open test.png" + puts "You may want to `rm test.{rrd,png}`" end end + +__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!" |
