# Template file for 'falkon'
pkgname=falkon
version=24.12.3
revision=1
build_style=cmake
configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake"
hostmakedepends="extra-cmake-modules gettext pkg-config
 qt6-base qt6-tools python3 kf6-kcoreaddons kf6-kconfig"
makedepends="qt6-base-devel qt6-plugin-mysql kf6-kconfig-devel
 qt6-plugin-sqlite qt6-declarative-devel qt6-webchannel-devel
 qt6-webengine-devel qt6-location-devel
 kf6-kwallet-devel kf6-kio-devel kf6-purpose-devel kf6-ki18n-devel
 xcb-util-devel kf6-kcoreaddons-devel"
depends="qt6-plugin-sqlite"
checkdepends="dbus"
short_desc="Cross-platform Qt Web Browser"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-3.0-or-later"
homepage="https://www.falkon.org"
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
checksum=8d9d967a0af71901188ab4fc501137a4eb7602ffe5222a3240a38ffa9243b951

LDFLAGS="-Wl,--no-fatal-warnings"

if [ "$XBPS_WORDSIZE$XBPS_WORDSIZE" != "64$XBPS_TARGET_WORDSIZE" ]; then
	broken="Qt6 WebEngine"
fi

do_check() {
	cd build
	# Exclude tests which fail with SIGTRAP
	dbus-run-session ctest -E "falkon-(webview|webtab|tabmodel|qml-qml(historyapi|cookiesapi|tabsapi|windowsapi))test" --output-on-failure --force-new-ctest-process
}
