From 03b83a9f01d28f53704a3fd92991eeee3c68996e Mon Sep 17 00:00:00 2001 From: Kyle Ambroff-Kao Date: Thu, 26 Sep 2019 09:07:08 -0700 Subject: [PATCH] bonnie++ 1.98 (#4169) Added a patch to enable large file support on Haiku. Now exports additional benchmarking tools: * generate_randfile * getc_putc * getc_putc_helper --- ...ie++-1.03e.recipe => bonnie++-1.98.recipe} | 18 ++++-- .../bonnie++/patches/bonnie++-1.98.patchset | 60 +++++++++++++++++++ 2 files changed, 73 insertions(+), 5 deletions(-) rename app-benchmarks/bonnie++/{bonnie++-1.03e.recipe => bonnie++-1.98.recipe} (79%) create mode 100644 app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset diff --git a/app-benchmarks/bonnie++/bonnie++-1.03e.recipe b/app-benchmarks/bonnie++/bonnie++-1.98.recipe similarity index 79% rename from app-benchmarks/bonnie++/bonnie++-1.03e.recipe rename to app-benchmarks/bonnie++/bonnie++-1.98.recipe index b4597dc59..b92e83778 100644 --- a/app-benchmarks/bonnie++/bonnie++-1.03e.recipe +++ b/app-benchmarks/bonnie++/bonnie++-1.98.recipe @@ -18,17 +18,21 @@ HOMEPAGE="http://www.coker.com.au/bonnie++/" COPYRIGHT="1990 Tim Bray 1999 Russell Coker" LICENSE="GNU GPL v2" -REVISION="2" -SOURCE_URI="http://www.coker.com.au/bonnie++/bonnie++-1.03e.tgz" -CHECKSUM_SHA256="cb3866116634bf65760b6806be4afa7e24a1cad6f145c876df8721f01ba2e2cb" +REVISION="1" +SOURCE_URI="https://www.coker.com.au/bonnie++/bonnie++-$portVersion.tgz" +CHECKSUM_SHA256="6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04" +PATCHES="bonnie++-$portVersion.patchset" -ARCHITECTURES="x86 x86_gcc2 x86_64" +ARCHITECTURES="x86_gcc2 x86 x86_64" PROVIDES=" bonnie++ = $portVersion cmd:bon_csv2html = $portVersion cmd:bon_csv2txt = $portVersion cmd:bonnie++ = $portVersion + cmd:generate_randfile = $portVersion + cmd:getc_putc = $portVersion + cmd:getc_putc_helper = $portVersion cmd:zcav = $portVersion " REQUIRES=" @@ -39,14 +43,18 @@ BUILD_REQUIRES=" haiku_devel " BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoreconf cmd:g++ + cmd:gawk cmd:make " BUILD() { + autoreconf runConfigure ./configure \ - --sbindir=$binDir + --sbindir=$binDir make } diff --git a/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset b/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset new file mode 100644 index 000000000..661657dbd --- /dev/null +++ b/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset @@ -0,0 +1,60 @@ +From 64c9e52d2704334f4f68a5e7393cd15bf96a9c8b Mon Sep 17 00:00:00 2001 +From: Kyle Ambroff-Kao +Date: Sun, 15 Sep 2019 14:45:20 -0700 +Subject: [PATCH] Fix support for large files on Haiku + +--- + bon_io.cpp | 2 +- + configure.in | 2 ++ + port.h.in | 2 +- + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/bon_io.cpp b/bon_io.cpp +index bb482f0..4a1c3a6 100644 +--- a/bon_io.cpp ++++ b/bon_io.cpp +@@ -292,7 +292,7 @@ int CFileOp::m_open(CPCCHAR base_name, bool create) + else + { + flags = O_RDWR; +-#ifdef _LARGEFILE64_SOURCE ++#if defined(_LARGEFILE64_SOURCE) && !defined(__HAIKU__) + flags |= O_LARGEFILE; + #endif + } +diff --git a/configure.in b/configure.in +index 4e75dd2..715819c 100644 +--- a/configure.in ++++ b/configure.in +@@ -94,6 +94,7 @@ AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE + #include + + int main () { ++#ifndef __HAIKU__ + int fd; + off64_t i = off64_t(1) << 32 + 1; + const char * const name = "test.2g"; +@@ -117,6 +118,7 @@ int main () { + exit(1); + } + close(fd); ++#endif + return 0; + }], large_file="yes") + if [[ -n "$large_file" ]]; then +diff --git a/port.h.in b/port.h.in +index 70d748e..5cacfbc 100644 +--- a/port.h.in ++++ b/port.h.in +@@ -23,7 +23,7 @@ + // UNIX here + typedef struct timeval TIMEVAL_TYPE; + +-#ifdef _LARGEFILE64_SOURCE ++#if defined(_LARGEFILE64_SOURCE) && !defined(__HAIKU__) + #define OFF_TYPE off64_t + #define file_lseek lseek64 + #define file_creat creat64 +-- +2.23.0 +