summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdolecek <jdolecek>2011-01-02 17:45:05 +0000
committerjdolecek <jdolecek>2011-01-02 17:45:05 +0000
commitd4436e37041ff68600fe0c1324820a9060eca9d3 (patch)
tree49c55e76adc6276caf439a0529c10007b3f71deb
parent75994ebbfbd7d0b5fe02c90ce70c67c74595c06c (diff)
downloadpkgsrc-d4436e37041ff68600fe0c1324820a9060eca9d3.tar.gz
make compile on systems without O_DIRECT (i.e. Mac OS 10.6)
-rw-r--r--benchmarks/bonnie++/Makefile3
-rw-r--r--benchmarks/bonnie++/distinfo4
-rw-r--r--benchmarks/bonnie++/patches/patch-ac27
-rw-r--r--benchmarks/bonnie++/patches/patch-ad14
4 files changed, 46 insertions, 2 deletions
diff --git a/benchmarks/bonnie++/Makefile b/benchmarks/bonnie++/Makefile
index a9205713c04..f37af657143 100644
--- a/benchmarks/bonnie++/Makefile
+++ b/benchmarks/bonnie++/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.24 2010/04/01 06:34:14 obache Exp $
+# $NetBSD: Makefile,v 1.25 2011/01/02 17:45:05 jdolecek Exp $
#
DISTNAME= bonnie++-1.03e
+PKGREVISION= 1
CATEGORIES= benchmarks
MASTER_SITES= http://www.coker.com.au/bonnie++/
EXTRACT_SUFX= .tgz
diff --git a/benchmarks/bonnie++/distinfo b/benchmarks/bonnie++/distinfo
index 982f1eac05d..58c500c6753 100644
--- a/benchmarks/bonnie++/distinfo
+++ b/benchmarks/bonnie++/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.8 2010/04/01 06:34:14 obache Exp $
+$NetBSD: distinfo,v 1.9 2011/01/02 17:45:05 jdolecek Exp $
SHA1 (bonnie++-1.03e.tgz) = cf172c262fea075a83df12d5bde337bacba78ea6
RMD160 (bonnie++-1.03e.tgz) = c7dfdd5826ef1033f1cae168ee9c1fe07877a10f
Size (bonnie++-1.03e.tgz) = 80956 bytes
SHA1 (patch-aa) = 2edc5fb589af0d8fbeaba89e3fd38f01a6115090
SHA1 (patch-ab) = 3e4b04443a0fd413722819943df502172f6cab1f
+SHA1 (patch-ac) = fdefe448f39136f2975add1abbf1dcb3aaa93b2b
+SHA1 (patch-ad) = ca1a3515bfa39539bbc3cd571328e1ef530b4f76
diff --git a/benchmarks/bonnie++/patches/patch-ac b/benchmarks/bonnie++/patches/patch-ac
new file mode 100644
index 00000000000..d7d019ed70e
--- /dev/null
+++ b/benchmarks/bonnie++/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1 2011/01/02 17:45:06 jdolecek Exp $
+
+--- bon_io.cpp.orig 2011-01-02 17:27:11.000000000 +0000
++++ bon_io.cpp
+@@ -318,7 +318,9 @@ CFileOp::CFileOp(BonTimer &timer, int fi
+ , m_isopen(false)
+ , m_name(NULL)
+ , m_sync(use_sync)
++#ifdef O_DIRECT
+ , m_use_direct_io(use_direct_io)
++#endif
+ , m_chunk_bits(chunk_bits)
+ , m_chunk_size(1 << m_chunk_bits)
+ , m_chunks_per_file(Unit / m_chunk_size * IOFileSize)
+@@ -393,10 +395,12 @@ int CFileOp::m_open(CPCCHAR base_name, i
+ createFlag = OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS;
+ #else
+ flags = O_RDWR | O_CREAT | O_EXCL;
++#ifdef O_DIRECT
+ if(m_use_direct_io)
+ {
+ flags |= O_DIRECT;
+ }
++#endif /* O_DIRECT */
+ #endif
+ }
+ else
diff --git a/benchmarks/bonnie++/patches/patch-ad b/benchmarks/bonnie++/patches/patch-ad
new file mode 100644
index 00000000000..fc0577515d6
--- /dev/null
+++ b/benchmarks/bonnie++/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1 2011/01/02 17:45:06 jdolecek Exp $
+
+--- bon_io.h.orig 2011-01-02 17:28:45.000000000 +0000
++++ bon_io.h
+@@ -33,7 +33,9 @@ private:
+ bool m_isopen;
+ char *m_name;
+ bool m_sync;
++#ifdef O_DIRECT
+ bool m_use_direct_io;
++#endif
+ const int m_chunk_bits, m_chunk_size;
+ int m_chunks_per_file, m_total_chunks;
+ int m_last_file_chunks;