Convert ffsb to working recipe

This commit is contained in:
Chris Roberts
2013-11-25 01:13:28 -07:00
parent dcf237cb82
commit 1b9b7e5e23
2 changed files with 93 additions and 26 deletions

View File

@@ -1,25 +1,57 @@
DESCRIPTION="Flexible Filesystem Benchmark"
SUMMARY="Flexible Filesystem Benchmark"
DESCRIPTION="
The Flexible Filesystem Benchmark (FFSB) is a cross-platform
filesystem performance measurement tool. It uses customizable profiles
to measure of different workloads, and it supports multiple groups of
threads across multiple filesystems.
"
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2004 International Business Machines Corp."
HOMEPAGE="http://sourceforge.net/projects/ffsb"
SRC_URI="http://downloads.sourceforge.net/project/ffsb/ffsb/ffsb-6.0-rc2/ffsb-6.0-rc2.tar.bz2"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="cabfc1021c2ec6c6b168fefc84210891"
ARCHITECTURES="x86 ?x86_gcc2 ?x86_64"
PROVIDES="
ffsb = $portVersion
cmd:ffsb = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
haiku_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:libtoolize
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:make
cmd:gcc
"
SOURCE_DIR="ffsb-6.0-rc2"
PATCHES="ffsb-6.0_rc2.patchset"
BUILD()
{
cd ffsb-6.0-rc2
libtoolize --force --copy --install
aclocal
autoconf
automake
./configure --prefix=`finddir B_COMMON_DIRECTORY`
runConfigure ./configure
make
}
INSTALL()
{
cd ffsb-6.0-rc2
make install
mkdir -p $docDir
cp -af README $docDir
}
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2004 International Business Machines Corp."

View File

@@ -1,7 +1,14 @@
diff -urN ffsb-6.0-rc2/fh.c ffsb-6.0-rc2-haiku/fh.c
--- ffsb-6.0-rc2/fh.c 2008-10-27 20:17:05.051118080 +0000
+++ ffsb-6.0-rc2-haiku/fh.c 2010-09-23 14:01:27.966262784 +0000
@@ -74,7 +74,9 @@
From ed4728017e63bf8b6046da6542287a22ceeb1944 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 24 Nov 2013 23:50:21 -0700
Subject: applying patch ffsb-6.0-rc2.patch
diff --git a/fh.c b/fh.c
index f99b455..a1e8236 100644
--- a/fh.c
+++ b/fh.c
@@ -74,7 +74,9 @@ static int fhopenhelper(char *filename, char *bufflags, int flags,
int need_stats = ft_needs_stats(ft, SYS_OPEN) ||
fs_needs_stats(fs, SYS_OPEN);
@@ -12,10 +19,11 @@ diff -urN ffsb-6.0-rc2/fh.c ffsb-6.0-rc2-haiku/fh.c
if (need_stats)
gettimeofday(&start, NULL);
diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
--- ffsb-6.0-rc2/parser.c 2008-10-27 20:17:05.048234496 +0000
+++ ffsb-6.0-rc2-haiku/parser.c 2010-09-23 14:01:27.976486400 +0000
@@ -320,7 +320,8 @@
diff --git a/parser.c b/parser.c
index 8f3f086..98d8479 100644
--- a/parser.c
+++ b/parser.c
@@ -320,7 +320,8 @@ static container_t *init_container(void)
static int set_option(char *buf, config_options_t *options)
{
void *value;
@@ -25,7 +33,7 @@ diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
while (options->name) {
switch (options->type) {
case TYPE_WEIGHT:
@@ -392,7 +393,6 @@
@@ -392,7 +393,6 @@ out:
INIT_LIST_HEAD(&lhead->list);
options->value = lhead;
}
@@ -33,7 +41,7 @@ diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
tmp_list = malloc(sizeof(struct value_list));
INIT_LIST_HEAD(&tmp_list->list);
tmp_list->value = value;
@@ -567,6 +567,7 @@
@@ -567,6 +567,7 @@ double get_config_double(config_options_t *config, char *name)
static profile_config_t *parse(FILE *f)
{
char *buf;
@@ -41,7 +49,7 @@ diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
profile_config_t *profile_conf;
container_t *tmp_container;
@@ -575,9 +576,8 @@
@@ -575,9 +576,8 @@ static profile_config_t *parse(FILE *f)
memcpy(profile_conf->global, global_options, sizeof(global_options));
profile_conf->fs_container = NULL;
profile_conf->tg_container = NULL;
@@ -52,7 +60,7 @@ diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
while (buf) {
is_option = set_option(buf, profile_conf->global);
tmp_container = search_group(buf, f);
@@ -858,6 +858,7 @@
@@ -858,6 +858,7 @@ static void init_filesys(ffsb_config_t *fc, int num)
profile_config_t *profile_conf = fc->profile_conf;
ffsb_fs_t *fs = &fc->filesystems[num];
value_list_t *tmp_list, *list_head;
@@ -60,7 +68,7 @@ diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
memset(fs, 0, sizeof(ffsb_fs_t));
@@ -910,7 +911,7 @@
@@ -910,7 +911,7 @@ static void init_filesys(ffsb_config_t *fc, int num)
}
age_cont = age_cont->child;
@@ -69,10 +77,11 @@ diff -urN ffsb-6.0-rc2/parser.c ffsb-6.0-rc2-haiku/parser.c
init_threadgroup(fc, age_cont->config, age_tg, 0);
fs->aging_tg = age_tg;
fs->age_fs = 1;
diff -urN ffsb-6.0-rc2/util.c ffsb-6.0-rc2-haiku/util.c
--- ffsb-6.0-rc2/util.c 2008-10-27 20:17:05.049283072 +0000
+++ ffsb-6.0-rc2-haiku/util.c 2010-09-23 14:09:14.267386880 +0000
@@ -190,9 +190,14 @@
diff --git a/util.c b/util.c
index df5d755..84b6513 100644
--- a/util.c
+++ b/util.c
@@ -190,9 +190,14 @@ double cpu_so_far_children(void)
/* !!!! check portability */
float getfsutil(char *dirname)
{
@@ -88,7 +97,7 @@ diff -urN ffsb-6.0-rc2/util.c ffsb-6.0-rc2-haiku/util.c
/* return (float)(fsdata.f_blocks-fsdata.f_bfree)/ */
/* (float)(fsdata.f_blocks-fsdata.f_bfree+fsdata.f_bavail); */
@@ -202,8 +207,13 @@
@@ -202,8 +207,13 @@ float getfsutil(char *dirname)
uint64_t getfsutil_size(char *dirname)
{
@@ -102,3 +111,29 @@ diff -urN ffsb-6.0-rc2/util.c ffsb-6.0-rc2-haiku/util.c
return (fsdata.f_blocks - fsdata.f_bfree) * fsdata.f_bsize;
}
--
1.8.3.4
From bac090a21efe6efaa5334b357d8c0ec73a5135b0 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 24 Nov 2013 23:52:13 -0700
Subject: Update configure.in for newer autotools
diff --git a/configure.in b/configure.in
index 668e080..96514e8 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
AM_INIT_AUTOMAKE(ffsb, 6.0-RC2)
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
dnl need to define _ALL_SOURCE and _THREAD_SAFE on AIX
--
1.8.3.4