summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild')
-rw-r--r--app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild48
1 files changed, 48 insertions, 0 deletions
diff --git a/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild b/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild
new file mode 100644
index 0000000..941bf4e
--- /dev/null
+++ b/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Benchmarking for memory and cache"
+HOMEPAGE="http://www.alasir.com/software/ramspeed/"
+SRC_URI="http://www.alasir.com/software/${PN}/${P}.tar.gz"
+
+LICENSE="Alasir"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="sse"
+
+src_prepare(){
+ tc-export CC AS
+}
+
+src_configure(){
+ local obj
+ local arch_prefix=./
+
+ use x86 && arch_prefix=i386/
+ use amd64 && arch_prefix=amd64/
+
+ append-ldflags -Wl,-z,noexecstack
+
+ obj=( ramspeed.o ${arch_prefix}{fltmark,fltmem,intmark,intmem}.o )
+
+ if use x86; then
+ obj=( "${obj[@]}" ${arch_prefix}{cpuinfo/cpuinfo_main,cpuinfo/cpuinfo_ext}.o )
+ fi
+
+ if use sse; then
+ use x86 && append-flags "-DLINUX -DI386_ASM"
+ use amd64 && append-flags "-DLINUX -DAMD64_ASM"
+ obj=( "${obj[@]}" ${arch_prefix}{mmxmark,mmxmem,ssemark,ssemem}.o )
+ fi
+
+ echo "ramspeed: ${obj[@]}" > Makefile || die
+}
+
+src_install(){
+ dobin ${PN} || die
+ dodoc HISTORY README || die
+}