### this file is sourced not run
PKGVER=24.02.0 # last version that builds without errors on Qt5
PKGBUILD=1
PKGARCH=x86_64

# source: step
TARBALL=kcachegrind-$PKGVER.tar.gz
MD5SUM=02947d17c15704e9ae36ee5847fceb18
SRC_URL=https://github.com/KDE/kcachegrind/archive/refs/tags/v$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='qt5-common' # full qt5 build only for qmake
SLACKSUG='valgrind'
SLACKDESC="kcachegrind: kcachegrind $PKGVER (visualize valgrind profiling data)
kcachegrind: {K,Q}Cachegrind is a KDE/Qt GUI to visualize profiling data.
kcachegrind: It's mainly used as visualization frontend for data measured by
kcachegrind: Cachegrind/Callgrind tools from the Valgrind package, but there are
kcachegrind: converters for other measurement tools on the net.
kcachegrind:
kcachegrind: This package contains qcachegrind, a feature-reduced GUI for Qt5 only.
kcachegrind:
kcachegrind:
kcachegrind: https://github.com/KDE/kcachegrind
kcachegrind:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# qt5
	export PATH="$PATH:/opt/qt5/bin"
	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt5/$LIBDIR"
	export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/qt5/$LIBDIR/pkgconfig"
	export QT5_PATH="/opt/qt5/bin"
	export QT5_LD_LIBRARY_PATH="/opt/qt5/$LIBDIR"
	export QT5_PKG_CONFIG_PATH="/opt/qt5/$LIBDIR/pkgconfig"
	export QT5_CPLUS_INCLUDE_PATH="/opt/qt5/include"

	cd /tmp/kcachegrind-* &&
	qmake && make "$MAKEFLAGS" &&

	install -Dm755 qcachegrind/qcachegrind /usr/bin/ &&
	install -Dm644 qcachegrind/qcachegrind.desktop /usr/share/applications/ &&
	for w in 32 48 64 128; do
		install -Dm644 kcachegrind/$w-apps-kcachegrind.png \
		/usr/share/icons/hicolor/${w}x${w}/apps/kcachegrind.png || :
	done &&

	pkg_build_slackdesc
}

# vim: set ft=sh:
