void-packages/srcpkgs/gperftools/template
q66 4ff40bb829 gperftools: musl fixes, ppc fixes
This allows some parts of the code that previously didn't build
on musl to build. Additionally, it fixes build on musl ppc setups.
2019-10-08 21:30:36 +02:00

58 lines
1.5 KiB
Bash

# Template file for 'gperftools'
pkgname=gperftools
version=2.7
revision=3
build_style=gnu-configure
hostmakedepends="automake libtool"
makedepends="libunwind-devel"
checkdepends="perl"
short_desc="Multi-threaded malloc() and performance analysis tools"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/gperftools/gperftools"
distfiles="https://github.com/${pkgname}/${pkgname}/releases/download/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=1ee8c8699a0eff6b6a203e59b43330536b22bbcbe6448f54c7091e5efb0763c9
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
# needed by some newly enabled code
CXXFLAGS+=" -D__WORDSIZE=$XBPS_TARGET_WORDSIZE"
# needed on musl other than x86_64
if [ "$XBPS_TARGET_MACHINE" != "x86_64-musl" ]; then
makedepends+=" libucontext-devel"
LDFLAGS+=" -lucontext"
fi
fi
case "$XBPS_TARGET_MACHINE" in
arm*-musl|aarch64-musl)
# having libunwind in makedepends still causes failures...
makedepends="libucontext-devel"
configure_args+=" --disable-libunwind"
;;
esac
post_extract() {
sed -i -e 's/__off64_t/off64_t/' \
src/base/linux_syscall_support.h src/malloc_hook_mmap_linux.h
}
pre_configure() {
autoreconf -fi
}
post_install() {
vlicense COPYING
rm -rf ${DESTDIR}/usr/share/doc
}
gperftools-devel_package() {
depends="gperftools-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}