From fb172820e3a47569ddb27fa6ae3bcec26afab058 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 26 Sep 2019 19:19:57 +0200 Subject: [PATCH] bonnie++: fix gcc2 build. --- app-benchmarks/bonnie++/bonnie++-1.98.recipe | 2 +- .../bonnie++/patches/bonnie++-1.98.patchset | 53 ++++++++++++++++--- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/app-benchmarks/bonnie++/bonnie++-1.98.recipe b/app-benchmarks/bonnie++/bonnie++-1.98.recipe index b92e83778..73b9468e7 100644 --- a/app-benchmarks/bonnie++/bonnie++-1.98.recipe +++ b/app-benchmarks/bonnie++/bonnie++-1.98.recipe @@ -18,7 +18,7 @@ HOMEPAGE="http://www.coker.com.au/bonnie++/" COPYRIGHT="1990 Tim Bray 1999 Russell Coker" LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://www.coker.com.au/bonnie++/bonnie++-$portVersion.tgz" CHECKSUM_SHA256="6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04" PATCHES="bonnie++-$portVersion.patchset" diff --git a/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset b/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset index 661657dbd..06a93fbc6 100644 --- a/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset +++ b/app-benchmarks/bonnie++/patches/bonnie++-1.98.patchset @@ -1,13 +1,8 @@ -From 64c9e52d2704334f4f68a5e7393cd15bf96a9c8b Mon Sep 17 00:00:00 2001 +From cd752220872d074818e0ee76e3945b200136398b 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 +Subject: 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 @@ -58,3 +53,47 @@ index 70d748e..5cacfbc 100644 -- 2.23.0 + +From 1eb02eff5cf2312be970d008eb4f3af507d93f74 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 26 Sep 2019 19:18:42 +0200 +Subject: gcc2 patch + + +diff --git a/Makefile.in b/Makefile.in +index 4f14819..121f30c 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -8,7 +8,7 @@ SCRIPTS=bon_csv2txt + prefix=@prefix@ + eprefix=@exec_prefix@ + #MORE_WARNINGS=-Weffc++ +-WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS) ++WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security $(MORE_WARNINGS) + CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS) + CXX=@CXX@ $(CFLAGS) + LINK=@CXX@ +diff --git a/bon_time.cpp b/bon_time.cpp +index 2da4f3d..f0da4af 100644 +--- a/bon_time.cpp ++++ b/bon_time.cpp +@@ -6,6 +6,16 @@ + #include + #include + ++/* min and max comparisons */ ++#if defined(__GNUC__) && __GNUC__ < 3 ++# ifndef min ++# define min(a,b) ((a)>(b)?(b):(a)) ++# endif ++# ifndef max ++# define max(a,b) ((a)>(b)?(a):(b)) ++# endif ++#endif ++ + void BonTimer::start() + { + m_dur.start(); +-- +2.23.0 +