# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=step
pkgver=25.04.2
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x blocked by
arch="all !armhf !s390x"
url="https://edu.kde.org/step/"
pkgdesc="Interactive Physics Simulator"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	eigen-dev
	extra-cmake-modules
	kconfig-dev
	kcrash-dev
	kdoctools-dev
	kiconthemes-dev
	knewstuff-dev
	kplotting-dev
	qt6-qtbase-dev
	qt6-qtsvg-dev
	qt6-qttools-dev
	samurai
	shared-mime-info
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/education/step.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/step-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4a069e76d52cccd26d1b9a7712585382258f88daff8d6f415a92ee65b169c17f23c421b41a2dd45cbf96b349558304a66efdc0ef4e610442f60c75c2c5156ffc  step-25.04.2.tar.xz
"
