contrib/jemalloc/Pkgfile

25 lines
615 B
Plaintext

# Description: General-purpose scalable concurrent allocator
# URL: http://jemalloc.net/
# Maintainer: unmaintained
# Optional: clang lld
name=jemalloc
version=5.3.0
release=1
source=(https://github.com/jemalloc/jemalloc/releases/download/$version/$name-$version.tar.bz2)
build() {
cd $name-$version
export CFLAGS+=' -O3'
prt-get isinst clang lld && LDFLAGS+=' -fuse-ld=lld -flto=thin'
prt-get isinst clang && export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib || \
export CC=gcc CXX=g++
./configure --prefix=/usr
make
make DESTDIR=$PKG install
rm -r $PKG/usr/share/doc
}