dev-libs/memkind: more useflags

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-09-05 08:33:28 +02:00
parent 1d13a0a388
commit 9d64d349f1
2 changed files with 38 additions and 4 deletions

View File

@@ -14,10 +14,11 @@ KEYWORDS="~amd64"
LICENSE="BSD"
SLOT="0"
IUSE="+heap-manager openmp secure test +tls" #daxctl
IUSE="+daxctl debug decorators +heap-manager hwloc initial-exec-tls openmp secure test +tls"
RDEPEND="
sys-block/ndctl
daxctl? ( sys-block/ndctl )
hwloc? ( sys-apps/hwloc )
sys-process/numactl
"
DEPEND="
@@ -29,6 +30,19 @@ PATCHES=( "${FILESDIR}/${PN}-respect-ar.patch" )
RESTRICT="test" # ERROR: ./test/test.sh requires a NUMA enabled system with more than one node.
#RESTRICT="!test? ( test )"
pkg_pretend() {
linux-info_pkg_setup
CONFIG_CHECK_MODULES=""
if use daxctl; then
CONFIG_CHECK_MODULES+="DEV_DAX_KMEM "
fi
if linux_config_exists; then
for module in ${CONFIG_CHECK_MODULES}; do
linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled"
done
fi
}
src_prepare() {
default
eautoreconf
@@ -38,11 +52,16 @@ src_prepare() {
src_configure() {
tc-export AR
local myconf=(
--disable-silent-rules
--disable-debug
--disable-gcov
--enable-shared
--enable-static
--enable-daxctl
$(use_enable daxctl)
$(use_enable decorators)
$(use_enable debug debug-jemalloc)
$(use_enable heap-manager)
$(use_enable hwloc)
$(use_enable initial-exec-tls memkind-initial-exec-tls)
$(use_enable openmp)
$(use_enable secure)
$(use_enable tls)
@@ -50,6 +69,12 @@ src_configure() {
econf "${myconf[@]}"
}
src_install() {
default
find "${ED}" -name '*.la' -delete || die
find "${ED}" -name '*.a' -delete || die
}
src_test() {
addwrite /proc/sys/vm/nr_hugepages
echo 3000 > /proc/sys/vm/nr_hugepages

View File

@@ -1,16 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<longdescription lang="en">
The memkind library is a user extensible heap manager built on top of jemalloc which enables control of memory characteristics and a partitioning of the heap between kinds of memory. The kinds of memory are defined by operating system memory policies that have been applied to virtual address ranges. Memory characteristics supported by memkind without user extension include control of NUMA and page size features. The jemalloc non-standard interface has been extended to enable specialized arenas to make requests for virtual memory from the operating system through the memkind partition interface. Through the other memkind interfaces the user can control and extend memory partition features and allocate memory while selecting enabled features. Memkind interface allows to create and control file-backed memory (PMEM kind) on specified device.
</longdescription>
<maintainer type="person">
<description>co-maintainers welcome</description>
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/memkind/memkind/issues</bugs-to>
<remote-id type="github">memkind/memkind</remote-id>
</upstream>
<use>
<flag name="daxctl">Build library with daxctl support</flag>
<flag name="debug">Build debugging jemalloc code</flag>
<flag name="decorators">Enable decorators</flag>
<flag name="heap-manager">Allow switching allocator at runtime</flag>
<flag name="hwloc">Build library with hwloc support</flag>
<flag name="initial-exec-tls">Build library with initial-exec-tls support</flag>
<flag name="secure">Build libraries with security enhancements</flag>
<flag name="tls">Enable thread local storage</flag>
</use>