From e8f347abaf7e7eb07b4fca3103cdbf238ead2d76 Mon Sep 17 00:00:00 2001
From: Chris Xiong <chirs241097@gmail.com>
Date: Sat, 13 Aug 2022 14:15:00 -0400
Subject: dev-util/gammaray: update

---
 dev-util/gammaray/Manifest             |   3 +-
 dev-util/gammaray/gammaray-9999.ebuild | 120 +++++++++++++++++++++++++++++----
 2 files changed, 108 insertions(+), 15 deletions(-)

(limited to 'dev-util')

diff --git a/dev-util/gammaray/Manifest b/dev-util/gammaray/Manifest
index 9831c72..1e835df 100644
--- a/dev-util/gammaray/Manifest
+++ b/dev-util/gammaray/Manifest
@@ -1 +1,2 @@
-EBUILD gammaray-9999.ebuild 450 BLAKE2B 155b0c42716f4e723aba7bb433fb036ccf14089fecc3b5916bf03a3503b1de77238c1096d4005b3e024db6f7390e232e48d0d83c6cbaf9271488174e16cbfdca SHA512 ea9d150dae5a15fbe9ab134e68f386debbf6e760cebe001a93da3623f0d69e2eb5c08e2bcbae99bf3a12fecf59422c26fa17f6be1f5ccc9325ae1f094f3e79c8
+DIST gammaray-2.11.3.tar.gz 10841865 BLAKE2B 07a8c6a1257417d8daed5d7bfdd7e9aaaa353a0edfc0f20a73ac61fcf64e45030346f2268c50ecc220aeaffad38c3ecac788192c491778eca31d07ef9166329e SHA512 1fb16678ae4695567ffe6cca7870b3fcf8b82c2e9f15f005932586696a3e24f64e657ce25b0ebb87ba25646a6bdfe1c9b35a3604f341839e7c5183df859c05a0
+EBUILD gammaray-9999.ebuild 3182 BLAKE2B 43e6439a30865dd6578ad7476b1cd74428bf98c39291b4d5fc74145c13c1ffd4eb8eddfc4a8fa1166f77c2c495f43a11b61681217dc6727fa12462ae72e1ce30 SHA512 c2a1f4aec00688d21fd8f1acc542d7b5760fbb708aca32b0775f54699a63abef47555bc8b96737224e982aeb97eef1dc5de462faec8261d7df43f5b905464086
diff --git a/dev-util/gammaray/gammaray-9999.ebuild b/dev-util/gammaray/gammaray-9999.ebuild
index 4cac866..79cf923 100644
--- a/dev-util/gammaray/gammaray-9999.ebuild
+++ b/dev-util/gammaray/gammaray-9999.ebuild
@@ -1,22 +1,114 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit cmake-utils git-r3
+CMAKE_REMOVE_MODULES_LIST=( BackwardConfig )
+inherit cmake optfeature virtualx xdg
 
-DESCRIPTION="Tool to poke around in a Qt-application and also to manipulate the application to some extent"
-HOMEPAGE="http://www.kdab.com/gammaray"
-EGIT_REPO_URI="git://github.com/KDAB/GammaRay.git"
+DESCRIPTION="High-level runtime introspection tool for Qt applications"
+HOMEPAGE="
+	https://www.kdab.com/development-resources/qt-tools/gammaray/
+	https://github.com/KDAB/GammaRay
+"
+
+if [[ ${PV} == 9999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/KDAB/GammaRay.git"
+	SRC_URI="https://github.com/KDAB/GammaRay/releases/download/v2.11.3/gammaray-2.11.3.tar.gz"
+else
+	SRC_URI="https://github.com/KDAB/GammaRay/releases/download/v${PV}/${P}.tar.gz"
+	KEYWORDS="~amd64"
+fi
+
+LICENSE="BSD-2 GPL-2+ MIT"
+SLOT=0
+
+IUSE="3d bluetooth designer doc geolocation printsupport script scxml svg test qml wayland webengine"
+RESTRICT="!test? ( test )"
 
-DEPEND="
-dev-qt/qtcore
-dev-qt/qtgui
+# TODO: fix automagic sci-libs/vtk (and many other) dependencies
+RDEPEND="
+	dev-qt/qtcore:5
+	dev-qt/qtconcurrent:5
+	dev-qt/qtgui:5
+	dev-qt/qtnetwork:5
+	dev-qt/qtwidgets:5
+	dev-qt/qtxml:5
+	kde-frameworks/kitemmodels:5
+	3d? ( dev-qt/qt3d:5 )
+	bluetooth? ( dev-qt/qtbluetooth:5 )
+	designer? ( dev-qt/designer:5 )
+	geolocation? ( dev-qt/qtpositioning:5 )
+	printsupport? ( dev-qt/qtprintsupport:5 )
+	qml? ( dev-qt/qtdeclarative:5[widgets] )
+	script? ( dev-qt/qtscript:5[scripttools] )
+	scxml? ( dev-qt/qtscxml:5 )
+	svg? ( dev-qt/qtsvg:5 )
+	webengine? ( dev-qt/qtwebengine:5[widgets] )
+	wayland? ( dev-qt/qtwayland:5 )
 "
 
-RDEPEND="${DEPEND}"
+DEPEND="${RDEPEND}
+	test? ( dev-qt/qttest:5 )
+"
+
+DOCS=( CHANGES CONTRIBUTORS.txt README.txt )
+
+PATCHES=( "${FILESDIR}"/${P}-deselect-tests.patch )
+
+src_prepare(){
+	sed -i "/add_backward(gammaray_core)/d" core/CMakeLists.txt || die
+	sed -i CMakeLists.txt  \
+		-e "/BackwardConfig.cmake/d" \
+		-e "/set(KDE_INSTALL_USE_QT_SYS_PATHS/d" || die
+
+	cmake_src_prepare
+}
+
+src_configure(){
+	local mycmakeargs=(
+		$(cmake_use_find_package 3d Qt53DAnimation)
+		$(cmake_use_find_package 3d Qt53DExtras)
+		$(cmake_use_find_package 3d Qt53DInput)
+		$(cmake_use_find_package 3d Qt53DLogic)
+		$(cmake_use_find_package 3d Qt53DRender)
+		$(cmake_use_find_package 3d Qt53DQuick)
+		$(cmake_use_find_package bluetooth Qt5Bluetooth)
+		$(cmake_use_find_package designer Qt5Designer)
+		$(cmake_use_find_package geolocation Qt5Positioning)
+		$(cmake_use_find_package printsupport Qt5PrintSupport)
+		$(cmake_use_find_package qml Qt5Qml)
+		$(cmake_use_find_package qml Qt5Quick)
+		$(cmake_use_find_package qml Qt5QuickWidgets)
+		$(cmake_use_find_package script Qt5Script)
+		$(cmake_use_find_package svg Qt5Svg)
+		$(cmake_use_find_package scxml Qt5Scxml)
+		$(cmake_use_find_package test Qt5Test)
+		$(cmake_use_find_package wayland Qt5WaylandCompositor)
+		$(cmake_use_find_package webengine Qt5WebEngineWidgets)
+		-DGAMMARAY_BUILD_DOCS=$(usex doc)
+		-DGAMMARAY_BUILD_UI=ON
+		-DGAMMARAY_DISABLE_FEEDBACK=ON
+		-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+# 	export QT_QPA_PLATFORM=offscreen
+	virtx cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+	rm -r "${ED}"/usr/share/doc/${PN} || die
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	optfeature "graphical state machine debugging support" dev-util/kdstatemachineeditor
+}
 
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS=""
-IUSE=""
-- 
cgit v1.2.3