# Template file for 'xarcan'
pkgname=xarcan
version=0.5.4
revision=7
build_style=gnu-configure
short_desc="Patched Xserver that bridges connections to Arcan"
maintainer="Piraty <piraty1@inbox.ru>"
license="MIT"
homepage="https://github.com/letoram/xarcan"
distfiles="https://github.com/letoram/xarcan/archive/${version}.tar.gz"
checksum=ea37709c56b4c649ea2263531a02d511ff44dcd842833be5f8db41641045d5a1

configure_args="--enable-kdrive --enable-xarcan --disable-xorg
 --disable-xwayland --disable-xnest --disable-xvfb --disable-glamor --enable-glx
 --disable-int10-module --with-xkb-path=/usr/share/X11/xkb
 --with-xkb-output=/var/lib/xkb  --enable-ipv6 --enable-record
 --with-fontrootdir=/usr/share/fonts/X11 --with-shared-memory-dir=/dev/shm
 --without-systemd-daemon --without-systemd-daemon --enable-xcsecurity --disable-static"

hostmakedepends="automake libtool pkg-config xorg-util-macros font-util xtrans"
makedepends="pixman-devel libdrm-devel libX11-devel
 MesaLib-devel libressl-devel libXfont2-devel libxkbfile-devel
 libepoxy-devel arcan-devel xorgproto"

pre_configure() {
	vsed -i configure.ac \
		-e "s;gl >= 7.1.0;gl >= 1.2;" \
		-e "s;gl >= 9.2.0;gl >= 1.2;"
	NOCONFIGURE=1 ./autogen.sh
}

post_install() {
	vlicense COPYING
	rm -rf ${DESTDIR}/var
	rm -rf ${DESTDIR}/usr/{lib,share}
}
