39 lines
761 B
Bash
Executable file
39 lines
761 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
. /etc/pkg/pkg.conf
|
|
. /var/lib/pkg/functions
|
|
|
|
name=$(basename $0)
|
|
version=3.2.1
|
|
url=ftp://sourceware.org/pub/libffi/libffi-$version.tar.gz
|
|
|
|
fetch $url
|
|
|
|
rm -fr $WORK_DIR/$name-$version
|
|
tar -xvf $SOURCE_DIR/$(basename $url) -C $WORK_DIR
|
|
|
|
cd $WORK_DIR/$name-$version
|
|
{ time \
|
|
{
|
|
sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \
|
|
-i include/Makefile.in
|
|
|
|
sed -e '/^includedir/ s/=.*$/=@includedir@/' \
|
|
-e 's/^Cflags: -I${includedir}/Cflags:/' \
|
|
-i libffi.pc.in
|
|
|
|
./configure --prefix=/usr --disable-static --with-gcc-arch=native
|
|
make
|
|
make install
|
|
}
|
|
} 2>&1 | tee -a $LOG_DIR/$(basename $0).log
|
|
|
|
if [ $PIPESTATUS -ne 0 ]; then exit 1; fi;
|
|
|
|
rm -fr $WORK_DIR/$name-$version
|
|
|
|
registerpkg $(basename $0) $version
|
|
|
|
exit 0
|