From 7ad37bafddeffa38becb83a2609eef5c64791bca Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sat, 16 Jan 2016 19:10:56 +0100 Subject: [PATCH] app-benchmarks/contest: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics 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 | 38 +++++++++++++++++++ .../files/contest-0.61-fix-buildsystem.patch | 22 +++++++++++ .../files/contest-fortify_sources.patch | 4 +- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 app-benchmarks/contest/contest-0.61-r1.ebuild create mode 100644 app-benchmarks/contest/files/contest-0.61-fix-buildsystem.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 index 0000000000000..27bf44b5d294f --- /dev/null +++ b/app-benchmarks/contest/contest-0.61-r1.ebuild @@ -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 index 0000000000000..7e8c6b7eb6a2e --- /dev/null +++ b/app-benchmarks/contest/files/contest-0.61-fix-buildsystem.patch @@ -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 diff --git a/app-benchmarks/contest/files/contest-fortify_sources.patch b/app-benchmarks/contest/files/contest-fortify_sources.patch index cb2e6d6dd639a..042065822612e 100644 --- a/app-benchmarks/contest/files/contest-fortify_sources.patch +++ b/app-benchmarks/contest/files/contest-fortify_sources.patch @@ -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 */