diff options
| author | Nick Tzaperas | 2012-02-29 01:34:54 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-05-21 20:55:37 -0700 |
| commit | df1b20122cd805073d66ff2906ccdc339ff1a8f3 (patch) | |
| tree | 415a28d9562ec18716faa5320f43e55f881b2642 | |
| parent | 08c86fe6ba87cf8e9c35044073c8c06abced5659 (diff) | |
| download | homebrew-df1b20122cd805073d66ff2906ccdc339ff1a8f3.tar.bz2 | |
iozone 3.408
Closes #10585.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/iozone.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Library/Formula/iozone.rb b/Library/Formula/iozone.rb new file mode 100644 index 000000000..d17acf250 --- /dev/null +++ b/Library/Formula/iozone.rb @@ -0,0 +1,36 @@ +require 'formula' + +class Iozone < Formula + homepage 'http://www.iozone.org/' + url 'http://www.iozone.org/src/current/iozone3_408.tar' + md5 'ff3bc9a075db68b028e6cd5a833353d8' + + # Patch by @nijotz, adds O_DIRECT support when using -I flag. + # See: https://github.com/mxcl/homebrew/pull/10585 + def patches + DATA + end + + def install + system "make -C src/current macosx" + bin.install 'src/current/iozone' + man1.install 'docs/iozone.1' + end + + def test + `#{bin}/iozone -I -s 16M | grep -c O_DIRECT`.chomp == '1' + 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 +@@ -1810,7 +1810,7 @@ + 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; |
