2019-07-23 07:15:56 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2019-09-04 08:10:02 -06:00
|
|
|
# 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
|
|
|
|
|
2019-07-23 07:15:56 -06:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--with-pic
|
|
|
|
|
|
|
|
make
|
|
|
|
make DESTDIR="$1" install
|
|
|
|
|
|
|
|
# Fix location for headers.
|
|
|
|
mkdir -p "$1/usr/include"
|
2019-09-04 08:10:02 -06:00
|
|
|
mv "$1/usr/lib/libffi-3.2.1/include/"*.h "$1/usr/include"
|
2019-07-23 07:15:56 -06:00
|
|
|
rmdir "$1/usr/lib/libffi-3.2.1/include"
|
|
|
|
|
|
|
|
sed -i -e '/^includedir=/{s,=.*,=/usr/include,g}' \
|
|
|
|
"$1/usr/lib/pkgconfig/libffi.pc"
|
2019-08-10 19:46:17 -06:00
|
|
|
|
|
|
|
# Remove all info files.
|
|
|
|
rm -rf "$1/usr/share/info"
|