libffi: fix configure when file is missing

This commit is contained in:
Dylan Araps 2019-09-04 17:10:02 +03:00
parent 8c93995eca
commit 9339e74458
2 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,18 @@
#!/bin/sh -e
# If 'file' is not available, mimic the output
# required for KISS.
mkdir -p fakebin
cat > fakebin/file <<EOF
#!/bin/sh
echo 64-bit
EOF
chmod +x fakebin/file
export PATH=$PATH:$PWD/fakebin
# Use 'file' from '$PATH'.
sed -i'' "s|/usr/bin/file|file|g" configure
./configure \
--prefix=/usr \
--with-pic
@ -9,8 +22,7 @@ make DESTDIR="$1" install
# Fix location for headers.
mkdir -p "$1/usr/include"
mv "$1/usr/lib/libffi-3.2.1/include/"*.h \
"$1/usr/include"
mv "$1/usr/lib/libffi-3.2.1/include/"*.h "$1/usr/include"
rmdir "$1/usr/lib/libffi-3.2.1/include"
sed -i -e '/^includedir=/{s,=.*,=/usr/include,g}' \

View File

@ -1 +1 @@
3.2.1 2
3.2.1 3