Files
haikuports/dev-libs/mimalloc/mimalloc-2.1.2.recipe
2023-07-23 06:49:48 +00:00

70 lines
1.6 KiB
Bash

SUMMARY="A compact general purpose allocator with excellent performance"
DESCRIPTION="mimalloc (pronounced 'me-malloc') is a general purpose allocator with excellent \
performance characteristics.
Initially developed by Daan Leijen for the runtime systems of the Koka and Lean languages."
HOMEPAGE="https://github.com/microsoft/mimalloc"
COPYRIGHT="2018-2021 Microsoft Corporation, Daan Leijen"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="2b1bff6f717f9725c70bf8d79e4786da13de8a270059e4ba0bdd262ae7be46eb"
SOURCE_FILENAME="mimalloc-v$portVersion.tar.gz"
PATCHES="mimalloc-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="2.1"
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
PROVIDES="
mimalloc$secondaryArchSuffix = $portVersion
lib:libmimalloc$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libatomic$secondaryArchSuffix
"
PROVIDES_devel="
mimalloc${secondaryArchSuffix}_devel = $portVersion
devel:libmimalloc$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
mimalloc$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libmimalloc
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make -C build test
}