Files
ports/main/mimalloc/spkgbuild
2023-04-28 21:27:35 +00:00

25 lines
717 B
Plaintext

# description : General-purpose allocator with excellent performance characteristics
# homepage : https://github.com/microsoft/mimalloc
# depends : cmake ninja
name=mimalloc
version=2.1.2
release=1
source="https://github.com/microsoft/mimalloc/archive/v$version/$name-$version.tar.gz"
build() {
cmake -S $name-$version -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-DMI_BUILD_STATIC=OFF \
-DMI_BUILD_OBJECT=OFF \
-DMI_INSTALL_TOPLEVEL=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
}