Jakub Jirutka 7cc54bee54 testing/mimalloc1: disable on aarch64 due to test failure
>>> mimalloc1: Testing debug build
    Test project /home/buildozer/aports/testing/mimalloc1/src/mimalloc-1.7.2/out/debug
        Start 1: test_api,
    1/2 Test #1: test_api, ........................   Passed    0.00 sec
        Start 2: test_stress,
    2/2 Test #2: test_stress, .....................Subprocess aborted***Exception:   0.00 sec
    Using 32 threads with a 10% load-per-thread and 50 iterations
    mimalloc: assertion failed: at "/home/buildozer/aports/testing/mimalloc1/src/mimalloc-1.7.2/src/alloc.c":71, mi_heap_malloc_small
      assertion: "heap->thread_id == 0 || heap->thread_id == _mi_thread_id()"

    50% tests passed, 1 tests failed out of 2
2021-08-20 00:24:21 +02:00

95 lines
2.8 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=mimalloc1
_projname=mimalloc
pkgver=1.7.2
pkgrel=0
_pkgdesc="A compact general purpose allocator with excellent performance"
pkgdesc="$_pkgdesc (in secure mode)"
url="https://github.com/microsoft/mimalloc"
# aarch64,arm*: tests fail
# ppc64le: tests segfault in secure mode
arch="all !aarch64 !armhf !armv7 !ppc64le"
license="MIT"
makedepends="cmake"
provides="mimalloc=$pkgver-r$pkgrel"
provider_priority=100 # highest
subpackages="$pkgname-dev $pkgname-insecure $pkgname-debug"
source="https://github.com/microsoft/mimalloc/archive/v$pkgver/$_projname-$pkgver.tar.gz
cmake-install-paths.patch
cmake-add-insecure-suffix.patch
"
builddir="$srcdir/$_projname-$pkgver"
_buildtypes='debug insecure secure'
build() {
_build out/debug -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
# This is called "release" build by upstream.
_build out/insecure -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=OFF
_build out/secure -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
}
_build() {
local outdir="$1"; shift
local crossopts=
[ "$CBUILD" = "$CHOST" ] \
|| crossopts='-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux'
CFLAGS=${CFLAGS/-Os/} cmake -B "$outdir" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
$crossopts \
"$@" .
cmake --build "$outdir"
}
check() {
local btype; for btype in $_buildtypes; do
msg "Testing $btype build"
cd "$builddir"/out/$btype
CTEST_OUTPUT_ON_FAILURE=TRUE ctest --timeout 300
done
}
package() {
local btype; for btype in $_buildtypes; do
DESTDIR="$pkgdir" cmake --install out/$btype
done
cd "$pkgdir"
ln -s libmimalloc-secure.so usr/lib/libmimalloc.so
ln -s libmimalloc-secure.so.${pkgver%.*} usr/lib/libmimalloc.so.${pkgver%.*}
ln -s libmimalloc-secure.a usr/lib/libmimalloc.a
sed 's/-secure/-insecure/g' usr/lib/cmake/mimalloc/mimalloc-release.cmake \
> usr/lib/cmake/mimalloc/mimalloc-insecure.cmake
mv usr/lib/cmake/mimalloc/mimalloc-release.cmake usr/lib/cmake/mimalloc/mimalloc-secure.cmake
ln -s mimalloc-secure.cmake usr/lib/cmake/mimalloc/mimalloc-release.cmake
rm -f usr/lib/*.o
}
insecure() {
pkgdesc="$_pkgdesc (in insecure mode)"
amove usr/lib/libmimalloc-insecure.*
}
debug() {
pkgdesc="$_pkgdesc (debug build)"
options="!strip"
amove usr/lib/libmimalloc-debug.*
}
sha512sums="
5d78c5cc00dfff3dd7eb4bb59e8eff32397f5110d1183b4656cb56c40b88e2e648e3b18338119412b95ba9526937b16fce3aa4732f241a61a546e2bcea1efc9d mimalloc-1.7.2.tar.gz
587b7e3cdd7284f54642a32c8eb777ae6351da0a53919fc8821144991bc6e1fb1c954debb41ada914b3ef02bd1f29655fabee0c3ffdbe013fe573a3864323f56 cmake-install-paths.patch
a2011dd2d229b048a39751219a4e0e44c5bac11bd0aa615c51e34ca9044e491822d5020d038a78c2c75c3b44657e4c2b6b62721569960834c722bc5eb2297dc2 cmake-add-insecure-suffix.patch
"