# Template file for 'hotspot'
pkgname=hotspot
version=1.5.1
revision=2
build_style=cmake
configure_args="-DQT6_BUILD=ON"
hostmakedepends="extra-cmake-modules gettext qt6-base"
makedepends="qt6-base-devel qt6-svg-devel
 elfutils-devel libzstd-devel kddockwidgets-devel qcustomplot kgraphviewer-devel
 kf6-threadweaver-devel kf6-kconfigwidgets-devel kf6-kcoreaddons-devel
 kf6-kitemmodels-devel kf6-kitemviews-devel kf6-kio-devel kf6-solid-devel
 kf6-kwindowsystem-devel kf6-knotifications-devel kf6-kiconthemes-devel
 kf6-kparts-devel kf6-ki18n-devel kf6-syntax-highlighting-devel"
depends="perf"
short_desc="Linux perf GUI for performance analysis"
maintainer="Piraty <mail@piraty.dev>"
# hotspot is GPL-2.0-or-later, included submodule perfparser is GPL-3.0-only
license="GPL-2.0-or-later, GPL-3.0-only"
homepage="https://github.com/KDAB/hotspot"
distfiles="https://github.com/KDAB/hotspot/releases/download/v${version}/hotspot-v${version}.tar.gz
 https://github.com/KDAB/hotspot/releases/download/v${version}/hotspot-perfparser-v${version}.tar.gz
 https://github.com/KDAB/hotspot/releases/download/v${version}/hotspot-PrefixTickLabels-v${version}.tar.gz"
checksum="f0a611d8ed6e7c5038fb11176f047eb4fd4a670355750f154cddf015818a4087
 84f7014655a1cbbf751f2a6d965d33f0f99235b763dd1a768c5e2326304b069d
 9e25e61104bdbe73ccde056db920303ef8cf1ac632f3365e0bd099cc7fee71a1"
skip_extraction="hotspot-perfparser-v${version}.tar.gz
 hotspot-PrefixTickLabels-v${version}.tar.gz"
nocross="perf is nocross"


# https://github.com/KDAB/hotspot/issues/141#issuecomment-668542022
make_check=no

if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
	broken="fails to link because of something with qt endian stuff"
fi

post_extract() {
	vsrcextract -C 3rdparty/perfparser hotspot-perfparser-v${version}.tar.gz
	vsrcextract -C 3rdparty/PrefixTickLabels hotspot-PrefixTickLabels-v${version}.tar.gz
}
