summaryrefslogtreecommitdiff
blob: 51cb305f3f543e52006a536c7a25b947fced9410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit toolchain-funcs

MY_P="${PN}-byte-${PV}"

DESCRIPTION="Linux/Unix of release 2 of BYTE Magazine's BYTEmark benchmark"
HOMEPAGE="http://www.tux.org/~mayer/linux/bmark.html"
SRC_URI="http://www.tux.org/~mayer/linux/${MY_P}.tar.gz"

LICENSE="freedist"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~hppa ~mips ppc ppc64 sparc x86"
IUSE=""

S=${WORKDIR}/${MY_P}
PATCHES=( "${FILESDIR}/${P}-Makefile.patch" )

src_prepare() {
	default

	sed \
		-e 's:$compiler -v\( 2>&1 | sed -e "/version/!d"\|\):$compiler -dumpversion:' \
		-i sysinfo.sh || die "patching sysinfo.sh failed"
	sed -e 's:inpath="NNET.DAT":inpath="/usr/share/nbench/NNET.DAT":' \
		-i nbench1.h || die "patching nbench1.h failed"
}

src_configure() {
	tc-export CC
}

src_install() {
	dobin nbench
	dodoc Changes README* bdoc.txt

	insinto /usr/share/nbench
	doins NNET.DAT
}