2014-07-29 05:09:41 +00:00
|
|
|
require "formula"
|
2012-02-29 09:34:54 +00:00
|
|
|
|
|
|
|
class Iozone < Formula
|
2014-07-29 05:09:41 +00:00
|
|
|
homepage "http://www.iozone.org/"
|
|
|
|
url "http://www.iozone.org/src/current/iozone3_428.tar"
|
|
|
|
sha1 "0238f938d35eff5371ebd22a98769d8b8bfc00d7"
|
2012-02-29 09:34:54 +00:00
|
|
|
|
|
|
|
# Patch by @nijotz, adds O_DIRECT support when using -I flag.
|
2013-12-14 18:13:11 +00:00
|
|
|
# See: https://github.com/Homebrew/homebrew/pull/10585
|
2014-03-19 17:07:53 +00:00
|
|
|
patch :DATA
|
2012-02-29 09:34:54 +00:00
|
|
|
|
|
|
|
def install
|
2014-07-29 05:09:41 +00:00
|
|
|
cd "src/current" do
|
2012-10-23 16:46:32 +00:00
|
|
|
system "make", "macosx", "CC=#{ENV.cc}"
|
2014-07-29 05:09:41 +00:00
|
|
|
bin.install "iozone"
|
|
|
|
(share/"iozone").install "Generate_Graphs", "client_list", "gengnuplot.sh", "gnu3d.dem", "gnuplot.dem", "gnuplotps.dem", "iozone_visualizer.pl", "report.pl"
|
2012-10-23 16:46:32 +00:00
|
|
|
end
|
2014-07-29 05:09:41 +00:00
|
|
|
man1.install "docs/iozone.1"
|
2012-02-29 09:34:54 +00:00
|
|
|
end
|
|
|
|
|
2013-03-26 15:52:44 +00:00
|
|
|
test do
|
2014-05-04 19:12:41 +00:00
|
|
|
assert_match /File size set to 16384 kB/, shell_output("#{bin}/iozone -I -s 16M")
|
2012-02-29 09:34:54 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/src/current/iozone.c 2011-12-16 09:17:05.000000000 -0800
|
|
|
|
+++ b/src/current/iozone.c 2012-02-28 16:57:58.000000000 -0800
|
2012-10-23 14:01:23 +00:00
|
|
|
@@ -1820,7 +1810,7 @@
|
2012-02-29 09:34:54 +00:00
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
#if ! defined(DONT_HAVE_O_DIRECT)
|
|
|
|
-#if defined(linux) || defined(__AIX__) || defined(IRIX) || defined(IRIX64) || defined(Windows) || defined(__FreeBSD__) || defined(solaris)
|
|
|
|
+#if defined(linux) || defined(__AIX__) || defined(IRIX) || defined(IRIX64) || defined(Windows) || defined(__FreeBSD__) || defined(solaris) || defined(macosx)
|
|
|
|
direct_flag++;
|
|
|
|
sprintf(splash[splash_line++],"\tO_DIRECT feature enabled\n");
|
|
|
|
break;
|