void-packages/srcpkgs/elfutils/template
2020-06-17 22:18:11 +02:00

53 lines
1.3 KiB
Bash

# Template file for 'elfutils'
pkgname=elfutils
version=0.180
revision=1
build_style=gnu-configure
configure_args="--program-prefix=eu- --disable-debuginfod"
hostmakedepends="automake libtool pkg-config"
makedepends="bzip2-devel liblzma-devel zlib-devel"
short_desc="Utilities to handle ELF object files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://sourceware.org/elfutils/"
distfiles="https://sourceware.org/${pkgname}/ftp/${version}/${pkgname}-${version}.tar.bz2"
checksum=b827b6e35c59d188ba97d7cf148fa8dc6f5c68eb6c5981888dfdbb758c0b569d
CFLAGS="-Wno-error -Wno-error=null-dereference"
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" argp-standalone musl-fts-devel musl-obstack" ;;
esac
if [ "$CROSS_BUILD" ]; then
# kernel headers in our cross-* packages are too old (need >= 4.1)
CFLAGS+=" -DBPF_PSEUDO_MAP_FD=1"
fi
post_extract() {
case "$XBPS_TARGET_MACHINE" in
*-musl) cp ${FILESDIR}/error.h lib
cp ${FILESDIR}/error.h src
esac
}
pre_configure() {
autoreconf -if
}
libelf_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so*"
}
}
elfutils-devel_package() {
depends="libelf>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
}
}