# Template file for 'kvirc'
pkgname=kvirc
version=5.2.10
revision=1
build_style=cmake
configure_args="-DWANT_ENV_FLAGS=1 -DWANT_KDE=0"
hostmakedepends="qt6-base-devel perl"
makedepends="zlib-devel qt6-base-devel openssl-devel python3-devel perl
qt6-multimedia-devel qt6-plugin-mysql qt6-plugin-odbc qt6-plugin-pgsql
qt6-plugin-sqlite qt6-qt5compat-devel"
short_desc="Qt-based IRC client"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-2.0-or-later"
homepage="http://www.kvirc.net"
distfiles="https://github.com/kvirc/KVIrc/archive/refs/tags/${version}.tar.gz"
checksum=6b448b08aeaf5fd3f2b120525c8c87ddad3336f5b750a557b2022aaad0dda626
nocross=yes

if [ "$CROSS_BUILD" ];then
	configure_args+=" -DWANT_PERL=0"   # breaks at least on arm
fi

if [ "$XBPS_WORDSIZE" = 32 ]; then
	configure_args+=" -DWANT_QTWEBENGINE=0"
else
	makedepends+=" qt6-webengine-devel"
fi

pre_configure() {
	if [ "$CROSS_BUILD" ]; then
		configure_args+=" -C ${FILESDIR}/TryRunResults.cmake"
	fi
}
