# Exit on error:
set -e

wget http://www.x.org/releases/individual/proto/randrproto-1.4.0.tar.bz2
tar xf randrproto-1.4.0.tar.bz2
cd randrproto-1.4.0

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

make install
cd ..
rm -rf randrproto-1.4.0
rm randrproto-1.4.0.tar.bz2

exit 0
