void-packages/srcpkgs/elfutils/template
Michael Gehring 4a8eddbcbf elfutils: update to 0.169. (#6328)
* elfutils: update to 0.169.

* elfutils: fix musl build
2017-05-07 09:06:29 +02:00

56 lines
1.4 KiB
Bash

# Template file for 'elfutils'
pkgname=elfutils
version=0.169
revision=1
build_style=gnu-configure
configure_args="--program-prefix=eu-"
hostmakedepends="automake libtool"
makedepends="zlib-devel bzip2-devel liblzma-devel"
short_desc="Utilities to handle ELF object files"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-3"
homepage="https://sourceware.org/elfutils/"
distfiles="https://sourceware.org/${pkgname}/ftp/${version}/${pkgname}-${version}.tar.bz2"
checksum=9412fac7b30872b738bc1ed1ebcaed54493c26ef9a67887913498c17b10f3bc2
# Suppress certain warnings to not fail for -Werror
CFLAGS="-Wno-unused-result -Wno-format-nonliteral"
if [ ${XBPS_GCC_VERSION_MAJOR} -gt 5 ]; then
CFLAGS+=" -Wno-null-dereference"
fi
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*"
vmove usr/lib/elfutils
}
}
elfutils-devel_package() {
depends="libelf>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
}
}