# Exit on error:
set -e

wget -c http://www.x.org/releases/individual/app/bdftopcf-1.0.4.tar.bz2
tar xf bdftopcf-1.0.4.tar.bz2
cd bdftopcf-1.0.4

PKG_CONFIG=/static/bin/pkg-config \
    CC=/static/bin/musl-gcc \
    LDFLAGS='-s -L/static/lib -static -static-libgcc' \
    ./configure --prefix=/static

make \
    LIBS="-lz" \
    install

cd ..
rm -rf bdftopcf-1.0.4
rm bdftopcf-1.0.4.tar.bz2

exit 0
