app-benchmarks/contest: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics
authorDavid Seifert <soap@gentoo.org>
Sat, 16 Jan 2016 18:10:56 +0000 (19:10 +0100)
committerDavid Seifert <soap@gentoo.org>
Sat, 16 Jan 2016 18:12:43 +0000 (19:12 +0100)
Gentoo-Bug: 570250
In addition, modernize to EAPI=6 and amend patches accordingly.

Package-Manager: portage-2.2.26

app-benchmarks/contest/contest-0.61-r1.ebuild [new file with mode: 0644]
app-benchmarks/contest/files/contest-0.61-fix-buildsystem.patch [new file with mode: 0644]
app-benchmarks/contest/files/contest-fortify_sources.patch

diff --git a/app-benchmarks/contest/contest-0.61-r1.ebuild b/app-benchmarks/contest/contest-0.61-r1.ebuild
new file mode 100644 (file)
index 0000000..27bf44b
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Test system responsiveness to compare different kernels"
+HOMEPAGE="http://members.optusnet.com.au/ckolivas/contest/"
+SRC_URI="http://members.optusnet.com.au/ckolivas/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND=">=app-benchmarks/dbench-2.0"
+PATCHES=(
+       "${FILESDIR}/${PN}-fortify_sources.patch"
+       "${FILESDIR}/${P}-fix-buildsystem.patch"
+)
+
+src_prepare () {
+       # fix #570250 by restoring pre-GCC5 inline semantics
+       append-cflags -std=gnu89
+
+       default
+       tc-export CC
+}
+src_compile() {
+       emake
+}
+
+src_install() {
+       dobin contest
+       doman contest.1
+       dodoc README
+}
diff --git a/app-benchmarks/contest/files/contest-0.61-fix-buildsystem.patch b/app-benchmarks/contest/files/contest-0.61-fix-buildsystem.patch
new file mode 100644 (file)
index 0000000..7e8c6b7
--- /dev/null
@@ -0,0 +1,22 @@
+--- contest-0.61/Makefile
++++ contest-0.61/Makefile
+@@ -1,8 +1,8 @@
+ INSTPATH=/usr
+ BIN=$(INSTPATH)/bin
+ MAN=$(INSTPATH)/man
+-CC=gcc
+-CFLAGS= -W -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations \
++CC?=gcc
++CFLAGS?= -W -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations \
+       -g -O2
+ 
+ ifeq ($(shell uname),FreeBSD)
+@@ -14,7 +14,7 @@
+      list_load.o
+ 
+ contest: $(objs)
+-      $(CC) $(CFLAGS) -o $@ $(objs) $(KVM)
++      $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(objs) $(KVM)
+ contest.1.gz: contest.1
+       gzip -c contest.1 > contest.1.gz
+ install: contest contest.1.gz
index cb2e6d6dd639ae7bfe05d9e3f59b7ea1587a277d..042065822612e9d4186d1d89c4f09ef58f18cd3d 100644 (file)
@@ -1,5 +1,5 @@
---- bmark.c    2009-02-27 23:13:44.000000000 +0000
-+++ bmark.c    2009-02-27 23:12:44.000000000 +0000
+--- contest-0.61/bmark.c       2009-02-27 23:13:44.000000000 +0000
++++ contest-0.61/bmark.c       2009-02-27 23:12:44.000000000 +0000
 @@ -47,7 +47,7 @@
        }
        /* child */