libbsd: fix for cross-builds.

This commit is contained in:
Christian Neukirchen 2015-05-21 21:34:39 +02:00
parent 686e472403
commit 2490a36761

View file

@ -11,9 +11,13 @@ distfiles="http://libbsd.freedesktop.org/releases/libbsd-${version}.tar.xz"
checksum=0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb
post_extract() {
sed -i '1i#include <fcntl.h>' src/flopen.c src/nlist.c
sed -i '/#error/d' src/funopen.c
sed -i 's,<a.out.h>,<linux/a.out.h>,g' src/nlist.c
case "$XBPS_TARGET_MACHINE" in
*-musl)
sed -i '1i#include <fcntl.h>' src/flopen.c src/nlist.c
sed -i '/#error/d' src/funopen.c
sed -i 's,<a.out.h>,<linux/a.out.h>,g' src/nlist.c
;;
esac
}
libbsd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"