#!/bin/sh

. config/options

$SCRIPTS/build toolchain
$SCRIPTS/build xextproto
$SCRIPTS/build xcmiscproto
$SCRIPTS/build bigreqsproto
$SCRIPTS/build kbproto
$SCRIPTS/build inputproto
$SCRIPTS/build xtrans
$SCRIPTS/build libXau
$SCRIPTS/build libxcb

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --disable-static \
            --enable-shared \
            --disable-secure-rpc \
            --disable-loadable-i18n \
            --enable-xthreads \
            --disable-xcms \
            --with-xcb \
            --enable-xlocale \
            --enable-xkb \
            --disable-xlocaledir \
            --disable-xf86bigfont \
            --enable-malloc0returnsnull \
            --disable-man-pages \
            --disable-specs \
            --disable-composecache \
            --disable-lint-library \
            --disable-ipv6 \
            --without-launchd \
            --without-lint

make

$MAKEINSTALL
