commit: e3b821af4ef769b5bbe1f7526c42b34355540944 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org> AuthorDate: Mon Feb 16 23:58:59 2015 +0000 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> CommitDate: Mon Feb 16 23:58:59 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e3b821af
added as deps for multilib hwloc/mpi Package-Manager: portage-2.2.14 --- sys-process/numactl/ChangeLog | 10 +++++ .../numactl/files/numactl-2.0.8-cpuid-pic.patch | 17 ++++++++ sys-process/numactl/metadata.xml | 5 +++ sys-process/numactl/numactl-2.0.10-r1.ebuild | 49 ++++++++++++++++++++++ 4 files changed, 81 insertions(+) diff --git a/sys-process/numactl/ChangeLog b/sys-process/numactl/ChangeLog new file mode 100644 index 0000000..8d4eb17 --- /dev/null +++ b/sys-process/numactl/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sys-process/numactl +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*numactl-2.0.10-r1 (16 Feb 2015) + + 16 Feb 2015; Christoph Junghans <[email protected]> + +files/numactl-2.0.8-cpuid-pic.patch, +metadata.xml, + +numactl-2.0.10-r1.ebuild: + added as deps for multilib hwloc/mpi diff --git a/sys-process/numactl/files/numactl-2.0.8-cpuid-pic.patch b/sys-process/numactl/files/numactl-2.0.8-cpuid-pic.patch new file mode 100644 index 0000000..02e84b7 --- /dev/null +++ b/sys-process/numactl/files/numactl-2.0.8-cpuid-pic.patch @@ -0,0 +1,17 @@ +make the code work on x86/PIC. this code is only used in the demo, +and the overhead of always running this is system noise, so don't +bother bracketing with __i386__/__PIC__ defines. + +http://bugs.gentoo.org/456238 + +--- a/clearcache.c ++++ b/clearcache.c +@@ -57,7 +57,7 @@ void clearcache(unsigned char *mem, unsigned size) + #if defined(__i386__) || defined(__x86_64__) + unsigned i, cl, eax, feat; + /* get clflush unit and feature */ +- asm("cpuid" : "=a" (eax), "=b" (cl), "=d" (feat) : "0" (1) : "cx"); ++ asm("xchg %%ebx, %%esi; cpuid; xchg %%esi, %%ebx;" : "=a" (eax), "=S" (cl), "=d" (feat) : "0" (1) : "cx"); + if (!(feat & (1 << 19))) + fallback_clearcache(); + cl = ((cl >> 8) & 0xff) * 8; diff --git a/sys-process/numactl/metadata.xml b/sys-process/numactl/metadata.xml new file mode 100644 index 0000000..bee9f9a --- /dev/null +++ b/sys-process/numactl/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/numactl/numactl-2.0.10-r1.ebuild b/sys-process/numactl/numactl-2.0.10-r1.ebuild new file mode 100644 index 0000000..b73678f --- /dev/null +++ b/sys-process/numactl/numactl-2.0.10-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/numactl/numactl-2.0.10.ebuild,v 1.2 2014/11/12 14:56:05 jlec Exp $ + +EAPI=5 + +inherit autotools eutils toolchain-funcs multilib-minimal + +DESCRIPTION="Utilities and libraries for NUMA systems" +HOMEPAGE="http://oss.sgi.com/projects/libnuma/" +SRC_URI="ftp://oss.sgi.com/www/projects/libnuma/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# ARM lacks the __NR_migrate_pages syscall. +KEYWORDS="~amd64 -arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux" +IUSE="" + +ECONF_SOURCE=${S} + +src_prepare() { + eautoreconf + epatch "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238 +} + +src_test() { + if [ -d /sys/devices/system/node ]; then + einfo "The only generically safe test is regress2." + einfo "The other test cases require 2 NUMA nodes." + emake regress2 + else + ewarn "You do not have baseline NUMA support in your kernel, skipping tests." + fi +} + +multilib_src_compile() { + multilib_is_native_abi && default || emake libnuma.la +} + +multilib_src_install() { + emake DESTDIR="${D}" install$(multilib_is_native_abi || echo "-libLTLIBRARIES install-includeHEADERS") +} + +multilib_src_install_all() { + DOCS=( README TODO CHANGES DESIGN ) + einstalldocs + # delete man pages provided by the man-pages package #238805 + rm -r "${ED}"/usr/share/man/man[25] || die +}
