blob: 7cd06f1025af4953d6597aeca8d89dc81f903ded [file] [log] [blame]
Patrick Williams213cb262021-08-07 19:21:33 -05001# Copyright (C) 2021 Mingli Yu <mingli.yu@windriver.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "General-purpose scalable concurrent malloc implementation"
5
6DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \
7fragmentation avoidance and scalable concurrency support."
8
9HOMEPAGE = "https://github.com/jemalloc/jemalloc"
Andrew Geissler5199d832021-09-24 16:47:35 -050010LICENSE = "BSD-2-Clause"
Patrick Williams213cb262021-08-07 19:21:33 -050011
12SECTION = "libs"
13
14LIC_FILES_CHKSUM = "file://README;md5=6900e4a158982e4c4715bf16aa54fa10"
15
Patrick Williams0ca19cc2021-08-16 14:03:13 -050016SRC_URI = "git://github.com/jemalloc/jemalloc.git \
17 file://0001-Makefile.in-make-sure-doc-generated-before-install.patch \
18 file://run-ptest \
19"
Patrick Williams213cb262021-08-07 19:21:33 -050020
21SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"
22
23S = "${WORKDIR}/git"
24
Patrick Williams0ca19cc2021-08-16 14:03:13 -050025inherit autotools ptest
Patrick Williams213cb262021-08-07 19:21:33 -050026
27EXTRA_AUTORECONF += "--exclude=autoheader"
28
29EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"
Patrick Williams0ca19cc2021-08-16 14:03:13 -050030
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050031do_install:append() {
32 sed -i -e 's@${STAGING_DIR_HOST}@@g' \
33 -e 's@${STAGING_DIR_NATIVE}@@g' \
34 -e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config
35}
36
Patrick Williams0ca19cc2021-08-16 14:03:13 -050037do_compile_ptest() {
38 oe_runmake tests
39}
40
41do_install_ptest() {
42 install -d ${D}${PTEST_PATH}/tests
43 subdirs="test/unit test/integration test/stress "
44 for tooltest in ${subdirs}
45 do
46 cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests
47 done
48 find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
49}