summaryrefslogtreecommitdiff
path: root/benchmarks/randread
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/randread')
-rw-r--r--benchmarks/randread/Makefile14
-rw-r--r--benchmarks/randread/PLIST2
-rw-r--r--benchmarks/randread/distinfo14
-rw-r--r--benchmarks/randread/patches/patch-Makefile31
-rw-r--r--benchmarks/randread/patches/patch-aa12
-rw-r--r--benchmarks/randread/patches/patch-ab34
-rw-r--r--benchmarks/randread/patches/patch-filelist.c16
-rw-r--r--benchmarks/randread/patches/patch-filelist__test.c15
-rw-r--r--benchmarks/randread/patches/patch-test.c15
9 files changed, 97 insertions, 56 deletions
diff --git a/benchmarks/randread/Makefile b/benchmarks/randread/Makefile
index 8f8b2ace012..0b817677374 100644
--- a/benchmarks/randread/Makefile
+++ b/benchmarks/randread/Makefile
@@ -1,13 +1,14 @@
-# $NetBSD: Makefile,v 1.10 2010/03/21 16:29:39 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2011/02/03 14:15:12 obache Exp $
#
-DISTNAME= randread-0.1
+DISTNAME= randread-0.2
CATEGORIES= benchmarks
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=randread/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://randread.sourceforge.net/
COMMENT= Program to help benchmark random disk read performance
+LICENSE= public-domain
NOT_FOR_PLATFORM= Interix-*-*
@@ -15,11 +16,18 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
PKG_DESTDIR_SUPPORT= user-destdir
BUILD_TARGET= randread
-WRKSRC= ${WRKDIR}
+WRKSRC= ${WRKDIR}/${DISTNAME}
INSTALLATION_DIRS= sbin
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/randread ${DESTDIR}${PREFIX}/sbin
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(PKGSRC_RUN_TEST:M[yY][eE][sS])
+TEST_TARGET= test
+BUILDLINK_DEPMETHOD.check= build
+.include "../../devel/check/buildlink3.mk"
+.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/benchmarks/randread/PLIST b/benchmarks/randread/PLIST
index bf7289fbac9..3e0f601bde4 100644
--- a/benchmarks/randread/PLIST
+++ b/benchmarks/randread/PLIST
@@ -1,2 +1,2 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2002/06/25 05:13:27 grant Exp $
+@comment $NetBSD: PLIST,v 1.2 2011/02/03 14:15:12 obache Exp $
sbin/randread
diff --git a/benchmarks/randread/distinfo b/benchmarks/randread/distinfo
index d84daecd75f..c5c247713b8 100644
--- a/benchmarks/randread/distinfo
+++ b/benchmarks/randread/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.4 2010/12/30 08:20:42 obache Exp $
+$NetBSD: distinfo,v 1.5 2011/02/03 14:15:12 obache Exp $
-SHA1 (randread-0.1.tar.gz) = fefdf7ebeda6767a85215898e67606745f57d149
-RMD160 (randread-0.1.tar.gz) = 012cfc71799affe061bff87a511c6298a7d61361
-Size (randread-0.1.tar.gz) = 3490 bytes
-SHA1 (patch-aa) = 9d29d08e0830320c3e9964b80c008f2b1b95711c
-SHA1 (patch-ab) = 2f7193cfb153d45c14b9fac960260c0244bc6a1f
+SHA1 (randread-0.2.tar.gz) = 5085d07cb6c4395d018addb4ab81f060473ea620
+RMD160 (randread-0.2.tar.gz) = e8806da27cc231748b9416b16949c4921abc1d91
+Size (randread-0.2.tar.gz) = 8112 bytes
+SHA1 (patch-Makefile) = 0b709cc55687b274eda350cd263477644964c6e9
+SHA1 (patch-filelist.c) = eee8bb8586cdcc568e8cf44965465d5f1885cd93
+SHA1 (patch-filelist__test.c) = 15bf7f34db587812061f2e9aa5bf743c72ad458a
+SHA1 (patch-test.c) = 0257aea93fdc12840c12e3818672fc8e4c2fb232
diff --git a/benchmarks/randread/patches/patch-Makefile b/benchmarks/randread/patches/patch-Makefile
new file mode 100644
index 00000000000..535b7f3b448
--- /dev/null
+++ b/benchmarks/randread/patches/patch-Makefile
@@ -0,0 +1,31 @@
+$NetBSD: patch-Makefile,v 1.1 2011/02/03 14:15:12 obache Exp $
+
+* proper CPPFLAGS and LDFLAGS will be set by pkgsrc
+* honor CFLAGS
+
+--- Makefile.orig 2002-09-11 04:55:38.000000000 +0000
++++ Makefile
+@@ -2,11 +2,11 @@
+
+ # Add alternative directories for includes files and libraries.
+-CPPFLAGS=-I/usr/pkg/include
+-LDFLAGS=-L/usr/pkg/lib
++CPPFLAGS?=-I/usr/pkg/include
++LDFLAGS?=-L/usr/pkg/lib
+
+ CC=cc ${CPPFLAGS}
+
+ randread: randread.c
+- ${CC} -g -Wall -o randread randread.c filelist.c
++ ${CC} ${CFLAGS} -Wall -o randread randread.c filelist.c
+
+ tarfile: clean
+@@ -18,6 +18,6 @@ tarfile: clean
+ #
+ test::
+- ${CC} -g -Wall -o test test.c ${LDFLAGS} -lcheck
+- ${CC} -g -Wall -o filelist_test filelist_test.c filelist.c \
++ ${CC} ${CFLAGS} -Wall -o test test.c ${LDFLAGS} -lcheck
++ ${CC} ${CFLAGS} -Wall -o filelist_test filelist_test.c filelist.c \
+ ${LDFLAGS} -lcheck
+ ./test
diff --git a/benchmarks/randread/patches/patch-aa b/benchmarks/randread/patches/patch-aa
deleted file mode 100644
index 8b992994e1f..00000000000
--- a/benchmarks/randread/patches/patch-aa
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2002/06/25 05:13:28 grant Exp $
-
---- Makefile.orig Fri Jun 21 17:12:37 2002
-+++ Makefile Wed Jun 26 01:00:37 2002
-@@ -1,6 +1,6 @@
-
- randread: randread.c
-- cc -g -Wall -o randread randread.c
-+ ${CC} ${CFLAGS} -Wall -o randread randread.c
-
- tarfile: clean
- tar cf - . | gzip -9 > ../randread.tar.gz
diff --git a/benchmarks/randread/patches/patch-ab b/benchmarks/randread/patches/patch-ab
deleted file mode 100644
index c2de3ad0724..00000000000
--- a/benchmarks/randread/patches/patch-ab
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2010/12/30 08:20:42 obache Exp $
-
---- randread.c.orig 2002-06-21 07:11:29.000000000 +0000
-+++ randread.c
-@@ -3,7 +3,11 @@
- * by the author, Curt Sampson <cjs@cynic.net>.
- */
-
-+#include <sys/types.h>
- #include <sys/disklabel.h>
-+#ifdef __DragonFly__
-+#include <sys/disklabel32.h>
-+#endif
- #include <sys/ioctl.h>
- #include <sys/stat.h>
- #include <sys/time.h>
-@@ -100,9 +104,17 @@ int run_test()
- */
- int get_char_device_blocks(int filedes)
- {
-+#ifdef __DragonFly__
-+ struct disklabel32 label;
-+#else
- struct disklabel label;
-+#endif
-
-+#ifdef __DragonFly__
-+ if (ioctl(filedes, DIOCGDINFO32, &label) == -1)
-+#else
- if (ioctl(filedes, DIOCGDINFO, &label) == -1)
-+#endif
- return -1;
-
- /* Hack to make it ignore what this returns. */
diff --git a/benchmarks/randread/patches/patch-filelist.c b/benchmarks/randread/patches/patch-filelist.c
new file mode 100644
index 00000000000..f53a46bcb78
--- /dev/null
+++ b/benchmarks/randread/patches/patch-filelist.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-filelist.c,v 1.1 2011/02/03 14:15:12 obache Exp $
+
+--- filelist.c.orig 2002-09-11 05:15:12.000000000 +0000
++++ filelist.c
+@@ -7,9 +7,10 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <strings.h>
++#include <string.h>
+ #include <unistd.h>
+
+ #include "filelist.h"
diff --git a/benchmarks/randread/patches/patch-filelist__test.c b/benchmarks/randread/patches/patch-filelist__test.c
new file mode 100644
index 00000000000..50b79a1176c
--- /dev/null
+++ b/benchmarks/randread/patches/patch-filelist__test.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-filelist__test.c,v 1.1 2011/02/03 14:15:12 obache Exp $
+
+* suite_free is not required by check>=0.9.0, everything will be freed when
+ srunner_free is called.
+
+--- filelist_test.c.orig 2002-09-11 05:15:40.000000000 +0000
++++ filelist_test.c
+@@ -177,7 +177,6 @@ int main(void)
+ srunner_run_all (sr, CK_NORMAL);
+ num_failed = srunner_ntests_failed (sr);
+ srunner_free (sr);
+- suite_free (s);
+
+ return num_failed;
+ }
diff --git a/benchmarks/randread/patches/patch-test.c b/benchmarks/randread/patches/patch-test.c
new file mode 100644
index 00000000000..9b46db0a27f
--- /dev/null
+++ b/benchmarks/randread/patches/patch-test.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-test.c,v 1.1 2011/02/03 14:15:12 obache Exp $
+
+* suite_free is not required by check>=0.9.0, everything will be freed when
+ srunner_free is called.
+
+--- test.c.orig 2002-07-11 08:23:49.000000000 +0000
++++ test.c
+@@ -31,7 +31,6 @@ int main(void)
+ srunner_run_all (sr, CK_NORMAL);
+ num_failed = srunner_ntests_failed (sr);
+ srunner_free (sr);
+- suite_free (s);
+
+ return num_failed;
+ }