APP=xorg-server
VERSION=1.20.8
BUILD=2sml
HOMEPAGE="https://www.x.org/wiki/"
DOWNLOAD="https://www.x.org/releases/individual/xserver/xorg-server-1.20.8.tar.gz"
REQUIRES="eudev libgcrypt xtrans pixman libpciaccess libxv libxkbfile libxfont2 libxtst libxrender libxaw mesa "
DESC="Display server implementing the Xorg protocol"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-static \
    --with-xkb-output="/var/lib/xkb" \
    --with-sha1=libgcrypt \
    --disable-docs \
    --disable-devel-docs \
    --enable-xwayland 

  make
  make install DESTDIR=$PKG

  # Sample xorg.conf file for the raspberry pi, may be removed later on
  [ "$ARCH" = "aarch64" ] && install -Dm 644 $SRCDIR/xorg.conf $PKG/etc/X11/xorg.conf

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
f53472556ace5defec083c5227936bb9f428e22cf088e91210bdc9a57761af2513fbf96e9afe7e3a21a819af32e626bb30c03bbbc306f73c5002735d8ce1ab48  xorg-server-1.20.8.tar.lz
"
