85 lines
2.6 KiB
Ruby
85 lines
2.6 KiB
Ruby
class Rrdtool < Formula
|
|
desc "Round Robin Database"
|
|
homepage "https://oss.oetiker.ch/rrdtool/index.en.html"
|
|
url "https://github.com/oetiker/rrdtool-1.x/releases/download/v1.6.0/rrdtool-1.6.0.tar.gz"
|
|
sha256 "cd948e89cd2d8825fab4a6fb0323f810948d934af7d92c9ee8b5e9e1350e52d7"
|
|
|
|
bottle do
|
|
sha256 "328ea9b56ce467ee468df5bda24f3673fcad99d84d35b3d2366a2ad7b42ee54a" => :sierra
|
|
sha256 "9647245353e70af2aa0f352374e998811151121f7b471e7ea0cadb865727bb38" => :el_capitan
|
|
sha256 "76f4843dd99e86cf07b2ef100deff5b2178541013cb978b3d77940e1b7bb34b5" => :yosemite
|
|
sha256 "1bcde0f4b65abdcb032903bbc986df86f3d8813b93c1581bd752b03e57e9f3fe" => :mavericks
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/oetiker/rrdtool-1.x.git"
|
|
depends_on "automake" => :build
|
|
depends_on "autoconf" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "glib"
|
|
depends_on "pango"
|
|
depends_on "lua" => :optional
|
|
|
|
env :userpaths # For perl, ruby
|
|
|
|
# Ha-ha, but sleeping is annoying when running configure a lot
|
|
patch :DATA
|
|
|
|
def install
|
|
# fatal error: 'ruby/config.h' file not found
|
|
ENV.delete("SDKROOT")
|
|
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--disable-tcl
|
|
--with-tcllib=/usr/lib
|
|
--disable-perl-site-install
|
|
--disable-ruby-site-install
|
|
]
|
|
|
|
system "./bootstrap" if build.head?
|
|
system "./configure", *args
|
|
|
|
# Needed to build proper Ruby bundle
|
|
ENV["ARCHFLAGS"] = "-arch #{MacOS.preferred_arch}"
|
|
|
|
system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}", "install"
|
|
prefix.install "bindings/ruby/test.rb"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/rrdtool", "create", "temperature.rrd", "--step", "300",
|
|
"DS:temp:GAUGE:600:-273:5000", "RRA:AVERAGE:0.5:1:1200",
|
|
"RRA:MIN:0.5:12:2400", "RRA:MAX:0.5:12:2400", "RRA:AVERAGE:0.5:12:2400"
|
|
system "#{bin}/rrdtool", "dump", "temperature.rrd"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/configure b/configure
|
|
index 266754d..d21ab33 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -23868,18 +23868,6 @@ $as_echo_n "checking in... " >&6; }
|
|
{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: just kidding ;-)" >&5
|
|
-$as_echo " just kidding ;-)" >&6; }
|
|
echo
|
|
echo "----------------------------------------------------------------"
|
|
echo "Config is DONE!"
|