# Template file for 'hotspot'
pkgname=hotspot
version=1.6.0
revision=1
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="8d80e78d1c59b4a06df3bb55427fb9fcdec14109f3793cf39ab7ea6aa10c286b
 1b896e2053d775e9c9e072fa0fcc41180b8322591d5aecb99afc75aeca4ce2ec
 17f50c051df19926b09872abe99d51a211e54c87b840c674433084da2464cd7b"
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
}
