# Depends on: xorg-xproto, xorg-libx11, xorg-xextproto, xorg-libxau
# Description: Common X extensions client library
# URL: http://xorg.freedesktop.org
# Maintainer: Tilman Sauerbeck tilman at crux dot nu
# Arch Maintainer System Team crux-arm at mikeux dot dyndns dot org
# Depends on: xorg-libx11

name=xorg-libxext
version=1.1
release=1
source=(http://xorg.freedesktop.org/releases/individual/lib/libXext-$version.tar.bz2)

build() {
  cd libXext-$version

  export X11_LIBS="-L$CLFS/usr/lib -lpthread-stubs"
  export X11_CFLAGS="-I$CLFS/usr/include -I$CLFS/usr/include/X11 -I$CLFS/usr/include/X11/extensions" 
  export XEXT_LIBS="$X11_LIBS"
  export XEXT_CFLAGS="$X11_CFLAGS"

  ./configure --build=$CHOST \
              --host=$CTARGET \
              --prefix=/usr \
              --mandir=/usr/man \
              --enable-malloc0returnsnull


  make
  make DESTDIR=$PKG install
}