void-packages/srcpkgs/pahole/template

40 lines
1.1 KiB
Bash

# Template file for 'pahole'
pkgname=pahole
version=1.17
revision=2
_bpfver=0.0.7
build_style=cmake
configure_args="-D__LIB=lib"
makedepends="elfutils-devel zlib-devel"
short_desc="Various DWARF utils"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-2.0-only"
homepage="http://git.kernel.org/?p=devel/pahole/pahole.git;a=summary"
distfiles="https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${version}.tar.gz
https://github.com/libbpf/libbpf/archive/v${_bpfver}.tar.gz"
checksum="51e35041ce43ed08922037a1ee9e415aff1590e0d8d7cbe3e2b003f388db0a8a
a616ba2ea72d00b4022689b17f4a78365379e3040d0f1a66d28eba52c528e480"
case $XBPS_TARGET_MACHINE in
*-musl) makedepends+=" musl-obstack-devel argp-standalone"
esac
pre_patch() {
rm -rf lib/bpf
mv "../libbpf-${_bpfver}/" "lib/bpf"
}
pre_configure() {
case $XBPS_TARGET_MACHINE in
*-musl) sed -i CMakeLists.txt -e "/^target_link_libraries/s/)/ obstack argp)/"
esac
}
pahole-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove /usr/include
vmove "/usr/lib/*.so"
}
}