Skip to content

Commit

Permalink
app-benchmarks/contest: add -std=gnu89 to CFLAGS to restore pre-GCC5 …
Browse files Browse the repository at this point in the history
…semantics

Gentoo-Bug: 570250
In addition, modernize to EAPI=6 and amend patches accordingly.

Package-Manager: portage-2.2.26
  • Loading branch information
SoapGentoo committed Jan 16, 2016
1 parent 9ec73cf commit 7ad37ba
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
38 changes: 38 additions & 0 deletions app-benchmarks/contest/contest-0.61-r1.ebuild
Original file line number Diff line number Diff line change
@@ -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
}
22 changes: 22 additions & 0 deletions app-benchmarks/contest/files/contest-0.61-fix-buildsystem.patch
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions app-benchmarks/contest/files/contest-fortify_sources.patch
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down

0 comments on commit 7ad37ba

Please sign in to comment.