hfsprogs: enable cross-compilation

This commit is contained in:
q66 2019-05-22 13:22:45 +02:00 committed by Helmut Pozimski
parent f92d314fea
commit c4345ef824

View file

@ -13,11 +13,14 @@ license="APSL-2.0"
homepage="http://www.opensource.apple.com/"
distfiles="http://cavan.codon.org.uk/~mjg59/diskdev_cmds/diskdev_cmds-${version}.tar.gz"
checksum=b01b203a97f9a3bf36a027c13ddfc59292730552e62722d690d33bd5c24f5497
nocross="clang can't link cross-compiled fsck_hfs"
pre_build() {
sed -i 's/[F|f]sck_hfs/fsck.hfsplus/g' fsck_hfs.tproj/fsck_hfs.8
sed -i 's/[N|n]ewfs_hfs/mkfs.hfsplus/g' newfs_hfs.tproj/newfs_hfs.8
if [ "$CROSS_BUILD" ]; then
sed -i "s|CFLAGS :=|CFLAGS := --target=${XBPS_CROSS_TRIPLET} --sysroot=${XBPS_CROSS_BASE}|" Makefile
sed -i "s|LDFLAGS :=|LDFLAGS := -L${XBPS_CROSS_BASE}/usr/lib|" Makefile
fi
# Remove errant execute bits.
find . -type f -name '*.[ch]' -exec chmod -c -x {} +