Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/numactl/
Date: Fri, 09 Feb 2018 15:05:46
Message-Id: 1518188738.78e925e65dc860c6c7f315b68e983c0a9af4283c.polynomial-c@gentoo
1 commit: 78e925e65dc860c6c7f315b68e983c0a9af4283c
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 9 15:05:10 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 9 15:05:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78e925e6
7
8 sys-process/numactl: Added live ebuild.
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 sys-process/numactl/numactl-9999.ebuild | 67 +++++++++++++++++++++++++++++++++
13 1 file changed, 67 insertions(+)
14
15 diff --git a/sys-process/numactl/numactl-9999.ebuild b/sys-process/numactl/numactl-9999.ebuild
16 new file mode 100644
17 index 00000000000..567cee9892f
18 --- /dev/null
19 +++ b/sys-process/numactl/numactl-9999.ebuild
20 @@ -0,0 +1,67 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +
26 +inherit autotools toolchain-funcs multilib-minimal
27 +
28 +DESCRIPTION="Utilities and libraries for NUMA systems"
29 +HOMEPAGE="https://github.com/numactl/numactl"
30 +if [[ "${PV}" = 9999* ]] ; then
31 + inherit git-r3
32 + EGIT_REPO_URI="https://github.com/numactl/numactl.git"
33 +else
34 + SRC_URI="ftp://oss.sgi.com/www/projects/libnuma/download/${P}.tar.gz"
35 + # ARM lacks the __NR_migrate_pages syscall.
36 + KEYWORDS="~amd64 -arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux"
37 +fi
38 +
39 +LICENSE="GPL-2"
40 +SLOT="0"
41 +IUSE="static-libs"
42 +
43 +PATCHES=(
44 + "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238
45 + "${FILESDIR}"/${PN}-2.0.10-numademo-cflags.patch #540856
46 + "${FILESDIR}"/${PN}-2.0.11-sysmacros.patch #580098
47 +)
48 +
49 +src_prepare() {
50 + default
51 + eautoreconf
52 + # We need to copy the sources or else tests will fail
53 + multilib_copy_sources
54 +}
55 +
56 +multilib_src_configure() {
57 + ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
58 +}
59 +
60 +multilib_src_compile() {
61 + multilib_is_native_abi && default || emake libnuma.la
62 +}
63 +
64 +multilib_src_test() {
65 + if multilib_is_native_abi ; then
66 + if [ -d /sys/devices/system/node ]; then
67 + einfo "The only generically safe test is regress2."
68 + einfo "The other test cases require 2 NUMA nodes."
69 + emake regress2
70 + else
71 + ewarn "You do not have baseline NUMA support in your kernel, skipping tests."
72 + fi
73 + fi
74 +}
75 +
76 +multilib_src_install() {
77 + emake DESTDIR="${D}" \
78 + install$(multilib_is_native_abi || echo "-libLTLIBRARIES install-includeHEADERS")
79 + find "${ED%/}"/usr/ -name libnuma.la -delete || die
80 +}
81 +
82 +multilib_src_install_all() {
83 + local DOCS=( README TODO CHANGES DESIGN )
84 + einstalldocs
85 + # delete man pages provided by the man-pages package #238805
86 + rm -r "${ED%/}"/usr/share/man/man[25] || die
87 +}