49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
|
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
# Contributor: Kovivchak Evgen <oneonfire@gmail.com>
|
|
|
|
pkgname=jemalloc
|
|
epoch=1
|
|
pkgver=5.3.0
|
|
pkgrel=6
|
|
pkgdesc='General-purpose scalable concurrent malloc implementation'
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
license=('BSD')
|
|
url='https://jemalloc.net/'
|
|
depends=('gcc-libs' 'glibc')
|
|
makedepends=('clang')
|
|
options=('!lto')
|
|
provides=('libjemalloc.so')
|
|
optdepends=('perl: for jeprof')
|
|
source=("https://github.com/jemalloc/jemalloc/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
|
|
sha256sums=('2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa')
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
|
|
# FS#71745: GCC-built jemalloc causes telegram-desktop to crash a lot. The reason is still not clear.
|
|
export CC=clang
|
|
export CXX=clang++
|
|
case ${CARCH} in
|
|
"powerpc64le")
|
|
USE_64K_PAGES=--with-lg-page=16
|
|
;;
|
|
esac
|
|
./configure \
|
|
--enable-prof \
|
|
$USE_64K_PAGES \
|
|
--enable-autogen \
|
|
--prefix=/usr
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
|
|
chmod 644 "$pkgdir/usr/lib/libjemalloc_pic.a"
|
|
}
|