aboutsummaryrefslogtreecommitdiff
blob: 047d3b9cd871c1333ee5f6b6e1b0cbbdc8d8292d (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
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools linux-info

DESCRIPTION="user extensible heap manager built on top of jemalloc"
HOMEPAGE="https://memkind.github.io/memkind/"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/memkind/memkind"
else
	SRC_URI="https://github.com/memkind/memkind/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
fi

LICENSE="BSD"
SLOT="0"
IUSE="+heap-manager openmp secure +tls"
RESTRICT="test"

DEPEND="
	sys-apps/ndctl
	sys-process/numactl
"
RDEPEND="${DEPEND}"

src_prepare() {
	default
	eautoreconf
	cd jemalloc && eautoreconf
}

src_configure() {
	local myconf=(
		--disable-silent-rules
		--enable-shared
		--enable-static
		--enable-daxctl
		$(use_enable heap-manager)
		$(use_enable openmp)
		$(use_enable secure)
		$(use_enable tls)
	)
	econf "${myconf[@]}"
}

src_test() {
	addwrite /proc/sys/vm/nr_hugepages
	echo 3000 > /proc/sys/vm/nr_hugepages
	emake check
}