Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1 | # Copyright (C) 2021 Mingli Yu <mingli.yu@windriver.com> |
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
| 3 | |
| 4 | SUMMARY = "General-purpose scalable concurrent malloc implementation" |
| 5 | |
| 6 | DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \ |
| 7 | fragmentation avoidance and scalable concurrency support." |
| 8 | |
| 9 | HOMEPAGE = "https://github.com/jemalloc/jemalloc" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 10 | LICENSE = "BSD-2-Clause" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | |
| 12 | SECTION = "libs" |
| 13 | |
| 14 | LIC_FILES_CHKSUM = "file://README;md5=6900e4a158982e4c4715bf16aa54fa10" |
| 15 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 16 | SRC_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | |
| 21 | SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756" |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 25 | inherit autotools ptest |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | |
| 27 | EXTRA_AUTORECONF += "--exclude=autoheader" |
| 28 | |
| 29 | EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 30 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 31 | do_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 Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 37 | do_compile_ptest() { |
| 38 | oe_runmake tests |
| 39 | } |
| 40 | |
| 41 | do_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 | } |