summaryrefslogtreecommitdiff
path: root/dev-util/gammaray/gammaray-3.4.0-r1.ebuild
blob: 63379ac3b713ed551f52820eb882155dd8edf07f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# skip warning for unused files in 3rdparty/backward-cpp
CMAKE_QA_COMPAT_SKIP=1

inherit cmake flag-o-matic qt-utils xdg

MY_PN="GammaRay"
DESCRIPTION="High-level runtime introspection tool for Qt applications"
HOMEPAGE="
	https://www.kdab.com/software-technologies/developer-tools/gammaray/
	https://github.com/KDAB/GammaRay
"

if [[ ${PV} == 9999 ]] ; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/KDAB/GammaRay.git"
else
	SRC_URI="https://github.com/KDAB/GammaRay/releases/download/v${PV}/${P}.tar.gz"
	KEYWORDS="~amd64"
	S="${WORKDIR}/${MY_PN}-${PV}"
fi

LICENSE="BSD-2 GPL-2+ MIT"
SLOT=0

IUSE="3d bluetooth designer doc geolocation highlight kjob opengl scxml svg test wayland webengine"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( opengl )"

RDEPEND="
	dev-libs/elfutils
	dev-qt/qtbase:6[concurrent,gui,network,opengl?,widgets,xml]
	dev-qt/qtdeclarative:6[opengl?,widgets]
	3d? ( dev-qt/qt3d:6[qml] )
	bluetooth? ( dev-qt/qtconnectivity:6[bluetooth] )
	designer? ( dev-qt/qttools:6[designer] )
	geolocation? (
		dev-qt/qtlocation:6
		dev-qt/qtpositioning:6
	)
	highlight? ( kde-frameworks/syntax-highlighting:6 )
	kjob? ( kde-frameworks/kcoreaddons:6 )
	scxml? (
		dev-qt/qtscxml:6
		>=dev-util/kdstatemachineeditor-2.2.0
	)
	svg? ( dev-qt/qtsvg:6 )
	wayland? (
		dev-libs/wayland
		dev-qt/qtwayland:6[compositor(+)]
	)
	webengine? ( dev-qt/qtwebengine:6[widgets] )
"
DEPEND="${RDEPEND}"
BDEPEND="
	dev-lang/perl
	dev-qt/qttools:6[linguist]
	doc? (
		app-text/doxygen
		dev-qt/qttools:6[assistant,qdoc,qtattributionsscanner]
		media-gfx/graphviz
	)
	wayland? ( dev-util/wayland-scanner )
"

PATCHES=(
	"${FILESDIR}"/${PN}-3.3.0-unbundle_libs.patch
)

src_prepare() {
	cmake_src_prepare

	if ! use doc; then
		cmake_comment_add_subdirectory -f docs manual api collection
	fi
	if ! use opengl; then
		# openglsupport requires opengl
		# quickinspector requires opengl= that we don't want
		cmake_comment_add_subdirectory -f plugins openglsupport quickinspector
	fi
}

src_configure() {
	# QT_NO_OPENGL for guisupport
	use opengl || append-cppflags -DQT_NO_OPENGL

	local mycmakeargs=(
		$(cmake_use_find_package 3d Qt63DAnimation)
		$(cmake_use_find_package 3d Qt63DExtras)
		$(cmake_use_find_package 3d Qt63DInput)
		$(cmake_use_find_package 3d Qt63DLogic)
		$(cmake_use_find_package 3d Qt63DRender)
		$(cmake_use_find_package 3d Qt63DQuick)
		$(cmake_use_find_package bluetooth Qt6Bluetooth)
		$(cmake_use_find_package designer Qt6Designer)
		$(cmake_use_find_package geolocation Qt6Location)
		$(cmake_use_find_package geolocation Qt6Positioning)
		$(cmake_use_find_package highlight KF6SyntaxHighlighting)
		$(cmake_use_find_package kjob KF6CoreAddons)
		$(cmake_use_find_package svg Qt6Svg)
		$(cmake_use_find_package scxml Qt6Scxml)
		$(cmake_use_find_package scxml Qt6StateMachine)
		$(cmake_use_find_package wayland Qt6WaylandCompositor)
		$(cmake_use_find_package wayland Wayland)
		$(cmake_use_find_package webengine Qt6WebEngineWidgets)
		-DBUILD_TESTING=$(usex test)
		-DECM_MKSPECS_INSTALL_DIR="$(qt_get_mkspecsdir 6)"
		# enable doc for manpages
		-DGAMMARAY_BUILD_DOCS=ON
		-DGAMMARAY_BUILD_UI=ON
		-DGAMMARAY_DISABLE_FEEDBACK=ON
		-DGAMMARAY_WITH_KDSME=$(usex scxml)
		-DQT_VERSION_MAJOR=6
	)

	cmake_src_configure
}

src_test() {
	local CMAKE_SKIP_TESTS=(
		# avoid gdb/lldb tests
		connectiontest-*
		connectiontest-*-filter
		# GammaRay::ProblemReporterTest::testConnectionIssues() We can't find duplicates with PMF connects, yet.
		problemreportertest
		# QFATAL : QuickInspectorTest::testModelsReparent() Failed to initialize graphics backend for OpenGL.
		quickinspectortest
		quickinspectortest2
		# need gdb/lldb
		# Yama security extension is blocking runtime attaching
		clientconnectiontest
		launchertest
		# need launcher
		quickmaterialtest
		quicktexturetest
	)
	local -x QT_QPA_PLATFORM=offscreen
	cmake_src_test
}

src_install() {
	if use doc; then
		local HTML_DOCS=( "${BUILD_DIR}"/docs/api/html/. )
		find "${HTML_DOCS}" \( -iname '*.map' -o -iname '*.md5' \) -delete || die
	fi

	cmake_src_install

	docompress -x /usr/share/doc/${PF}/${PN}{.qhc,-manual.qch,-api.qch}
	rm -r "${ED}"/usr/share/doc/${PN} || die
}