# Description: x server access control program
# URL: http://xorg.freedesktop.org
# Maintainer: Tilman Sauerbeck, tilman at crux dot nu
# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
# Depends on: xorg-libxmu

name=xorg-xhost
version=1.0.2
release=1
source=(http://xorg.freedesktop.org/releases/individual/app/xhost-$version.tar.bz2 \
        xhost-$version.cross_compile.patch)

build() {
  cd xhost-$version
  patch -p1 -i $SRC/xhost-$version.cross_compile.patch

  export XHOST_LIBS="-L$CLFS/usr/lib -lXmuu -lX11 -lXau"
  export XHOST_CFLAGS="-I$CLFS/usr/include"

  ./configure --build=$CHOST \
              --host=$CTARGET \
              --prefix=/usr \
              --mandir=/usr/man
 
  make xhost_CFLAGS="$XHOST_CFLAGS" xhost_LDADD="$XHOST_LIBS"
  make DESTDIR=$PKG install
}