mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Initial .bep and .patch files for ffsb. Added git as a dependency for libpak-0.9.2
This commit is contained in:
23
app-benchmarks/ffsb/ffsb-6.0-rc2.bep
Normal file
23
app-benchmarks/ffsb/ffsb-6.0-rc2.bep
Normal file
@@ -0,0 +1,23 @@
|
||||
DESCRIPTION="Flexible Filesystem Benchmark"
|
||||
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"
|
||||
BUILD {
|
||||
cd ffsb-6.0-rc2
|
||||
libtoolize --force --copy --install
|
||||
aclocal
|
||||
autoconf
|
||||
automake
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd ffsb-6.0-rc2
|
||||
make install
|
||||
}
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2004 International Business Machines Corp."
|
||||
118
app-benchmarks/ffsb/patches/ffsb-6.0-rc2.patch
Normal file
118
app-benchmarks/ffsb/patches/ffsb-6.0-rc2.patch
Normal file
@@ -0,0 +1,118 @@
|
||||
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.056360960 +0000
|
||||
+++ ffsb-6.0-rc2-haiku/fh.c 2010-09-23 13:15:37.648019968 +0000
|
||||
@@ -74,7 +74,9 @@
|
||||
int need_stats = ft_needs_stats(ft, SYS_OPEN) ||
|
||||
fs_needs_stats(fs, SYS_OPEN);
|
||||
|
||||
- flags |= O_LARGEFILE;
|
||||
+#ifndef __HAIKU__
|
||||
+ flags |= O_LARGEFILE;
|
||||
+#endif
|
||||
|
||||
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.053739520 +0000
|
||||
+++ ffsb-6.0-rc2-haiku/parser.c 2010-09-23 13:40:37.556007424 +0000
|
||||
@@ -320,7 +320,8 @@
|
||||
static int set_option(char *buf, config_options_t *options)
|
||||
{
|
||||
void *value;
|
||||
-
|
||||
+ value_list_t *tmp_list, *tmp_list2;
|
||||
+
|
||||
while (options->name) {
|
||||
switch (options->type) {
|
||||
case TYPE_WEIGHT:
|
||||
@@ -392,7 +393,6 @@
|
||||
INIT_LIST_HEAD(&lhead->list);
|
||||
options->value = lhead;
|
||||
}
|
||||
- value_list_t *tmp_list, *tmp_list2;
|
||||
tmp_list = malloc(sizeof(struct value_list));
|
||||
INIT_LIST_HEAD(&tmp_list->list);
|
||||
tmp_list->value = value;
|
||||
@@ -567,6 +567,7 @@
|
||||
static profile_config_t *parse(FILE *f)
|
||||
{
|
||||
char *buf;
|
||||
+ int is_option;
|
||||
profile_config_t *profile_conf;
|
||||
container_t *tmp_container;
|
||||
|
||||
@@ -575,9 +576,8 @@
|
||||
memcpy(profile_conf->global, global_options, sizeof(global_options));
|
||||
profile_conf->fs_container = NULL;
|
||||
profile_conf->tg_container = NULL;
|
||||
- int is_option;
|
||||
- buf = get_next_line(f);
|
||||
|
||||
+ buf = get_next_line(f);
|
||||
while (buf) {
|
||||
is_option = set_option(buf, profile_conf->global);
|
||||
tmp_container = search_group(buf, f);
|
||||
@@ -858,6 +858,7 @@
|
||||
profile_config_t *profile_conf = fc->profile_conf;
|
||||
ffsb_fs_t *fs = &fc->filesystems[num];
|
||||
value_list_t *tmp_list, *list_head;
|
||||
+ ffsb_tg_t *age_tg;
|
||||
|
||||
memset(fs, 0, sizeof(ffsb_fs_t));
|
||||
|
||||
@@ -908,9 +909,8 @@
|
||||
printf("No age threaggroup in profile");
|
||||
exit(1);
|
||||
}
|
||||
-
|
||||
age_cont = age_cont->child;
|
||||
- ffsb_tg_t *age_tg = ffsb_malloc(sizeof(ffsb_tg_t));
|
||||
+ age_tg = ffsb_malloc(sizeof(ffsb_tg_t));
|
||||
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.054788096 +0000
|
||||
+++ ffsb-6.0-rc2-haiku/util.c 2010-09-23 13:20:05.660078592 +0000
|
||||
@@ -187,26 +187,34 @@
|
||||
}
|
||||
|
||||
|
||||
-/* !!!! check portability */
|
||||
+ /* !!!! check portability */
|
||||
float getfsutil(char *dirname)
|
||||
{
|
||||
- struct statvfs64 fsdata;
|
||||
+#ifdef __HAIKU__
|
||||
+ struct statvfs fsdata;
|
||||
|
||||
+ statvfs(dirname, &fsdata);
|
||||
+#else
|
||||
+ struct statvfs64 fsdata;
|
||||
statvfs64(dirname, &fsdata);
|
||||
+#endif
|
||||
|
||||
-/* return (float)(fsdata.f_blocks-fsdata.f_bfree)/ */
|
||||
-/* (float)(fsdata.f_blocks-fsdata.f_bfree+fsdata.f_bavail); */
|
||||
- return (float) (((float)(fsdata.f_blocks - fsdata.f_bfree)) /
|
||||
- ((float)fsdata.f_blocks));
|
||||
+ /* return (float)(fsdata.f_blocks-fsdata.f_bfree)/ */
|
||||
+ /* (float)(fsdata.f_blocks-fsdata.f_bfree+fsdata.f_bavail); */
|
||||
}
|
||||
|
||||
uint64_t getfsutil_size(char *dirname)
|
||||
{
|
||||
+#ifdef __HAIKU__
|
||||
+ struct statvfs fsdata;
|
||||
+ statvfs(dirname, &fsdata);
|
||||
+#else
|
||||
struct statvfs64 fsdata;
|
||||
statvfs64(dirname, &fsdata);
|
||||
+#endif
|
||||
|
||||
return (fsdata.f_blocks - fsdata.f_bfree) * fsdata.f_bsize;
|
||||
-}
|
||||
+ }
|
||||
|
||||
int ffsb_system(char *command)
|
||||
{
|
||||
@@ -3,7 +3,8 @@ HOMEPAGE="http://ports.haiku-files.org/wiki/LibPak"
|
||||
SRC_URI="http://ports.haiku-files.org/raw-attachment/wiki/LibPak/libpak-0.9.2.zip"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="dev-libs/mercurial >= 1.6
|
||||
DEPEND="dev-vcs/mercurial >= 1.6
|
||||
dev-vcs/git >= 1.7.1
|
||||
dev-libs/libedit >= 20100424"
|
||||
CHECKSUM_MD5="7c42abb8d837ead79bf64e3c276b1170"
|
||||
BUILD {
|
||||
|
||||
Reference in New Issue
Block a user