Merge pull request #7430 from newbluemoon/libdwarf

libdwarf: fix cross-compilation
This commit is contained in:
Enno Boland 2017-08-20 15:16:12 +02:00 committed by GitHub
commit e19b4ef822

View File

@ -1,7 +1,7 @@
# Template build file for 'libdwarf'
pkgname=libdwarf
version=20170709
revision=1
revision=2
build_style=gnu-configure
configure_args="--prefix=/usr --enable-shared"
short_desc="DWARF Debugging Information Format Library"
@ -13,8 +13,15 @@ distfiles="http://prevanders.net/${pkgname}-${version}.tar.gz"
checksum=46ccfb24ecd24bd7cce466d67a7bfeb62b9ed405dafdc924918d58c529abccb8
wrksrc="dwarf-${version}"
build_wrksrc="libdwarf"
nocross="yes"
# XXX need to fix cross-compile
if [ -n "$CROSS_BUILD" ]; then
make_cmd="make HOSTCC=cc HOSTCFLAGS=-I./ HOSTLDFLAGS="
pre_build() {
# Makefile doesnt use $HOSTLDFLAGS when using $HOSTCC
sed -i -e 's|\$(HOSTCC) \$(HOSTCFLAGS) \$(LDFLAGS)|\$(HOSTCC) \$(HOSTCFLAGS) \$(HOSTLDFLAGS)|' Makefile
}
fi
do_install() {
install -dm755 $DESTDIR/usr/lib