60 lines
1.7 KiB
Bash
60 lines
1.7 KiB
Bash
# Template file for 'libunwind'
|
|
pkgname=libunwind
|
|
version=1.4.0
|
|
revision=1
|
|
build_style=gnu-configure
|
|
hostmakedepends="libtool automake"
|
|
makedepends="liblzma-devel"
|
|
short_desc="Library to determine the call-chain of a program"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="https://www.nongnu.org/libunwind/"
|
|
distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version/rc/-rc}.tar.gz"
|
|
checksum=df59c931bd4d7ebfd83ee481c943edf015138089b8e50abed8d9c57ba9338435
|
|
|
|
# LDFLAGS is necessary because libunwind.so itself uses getcontext/setcontext
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686-musl|ppc*-musl) makedepends+=" libucontext-devel"; LDFLAGS=" -lucontext" ;;
|
|
aarch64-musl) broken="https://build.voidlinux.org/builders/aarch64-musl_builder/builds/25858/steps/shell_3/logs/stdio" ;;
|
|
*) ;;
|
|
esac
|
|
|
|
pre_configure() {
|
|
sed -i /SUBDIRS/s/tests// Makefile.am
|
|
# libunwind explicitly sets lib64 for ppc64 by default
|
|
sed -i /libdir/s/lib64/lib/ configure.ac
|
|
|
|
# unw_getcontext is just getcontext on ppc*, separate lib for musl
|
|
# it needs to be here because it's used directly in a macro in a
|
|
# public header, so things using libunwind need linkage against it
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686-musl|ppc*-musl)
|
|
sed -i 's/\-lunwind/\-lunwind \-lucontext/' \
|
|
src/unwind/libunwind.pc.in
|
|
;;
|
|
esac
|
|
|
|
autoreconf -fi
|
|
}
|
|
post_install() {
|
|
vlicense COPYING LICENSE
|
|
}
|
|
|
|
libunwind-devel_package() {
|
|
depends="${sourcepkg}>=${version}"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686-musl|ppc*-musl) depends+=" libucontext-devel" ;;
|
|
*) ;;
|
|
esac
|
|
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share
|
|
}
|
|
}
|