summaryrefslogtreecommitdiff
blob: 72f5010882562d3a82a0e93ac93b7e265a23e680 (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"
PYTHON_COMPAT=( python3_{9,10,11} )
inherit xdg-utils cmake python-single-r1

SWIG_VERSION="7"
SWIG_ZIP_FILENAME="${PN}_swig_modified-${SWIG_VERSION}.tar.gz"
DESCRIPTION="A tool for tracing, analyzing, and debugging graphics APIs"
HOMEPAGE="https://github.com/baldurk/renderdoc"
SRC_URI="https://github.com/baldurk/renderdoc/archive/v${PV}.tar.gz -> ${P}.tar.gz
		qt5? ( https://github.com/baldurk/swig/archive/renderdoc-modified-${SWIG_VERSION}.tar.gz -> ${SWIG_ZIP_FILENAME} )"
CMAKE_BUILD_TYPE="Release"
CMAKE_BUILD_GENERATOR="Ninja"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="+qt5 +python +egl +opengl +gles2 +vulkan +doc wayland +xcb"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
	dev-libs/libpcre
	x11-libs/libX11
	xcb? (
		x11-libs/libxcb
		x11-libs/xcb-util-keysyms
	)
	python? (
		${PYTHON_DEPS}
	)
	qt5? (
		>=dev-qt/qtcore-5.6:5
		>=dev-qt/qtgui-5.6:5
		>=dev-qt/qtwidgets-5.6:5
		>=dev-qt/qtsvg-5.6:5
		>=dev-qt/qtx11extras-5.6:5
	)"
DEPEND="${RDEPEND}
	>=sys-devel/gcc-6.0:*
	dev-util/cmake
	dev-util/ninja
	sys-devel/bison
	app-arch/unzip"

src_configure() {
	local mycmakeargs=(
		-DENABLE_EGL="$(usex egl)"
		-DENABLE_GL="$(usex opengl)"
		-DENABLE_GLES="$(usex gles2)"
		-DENABLE_RENDERDOCCMD="$(usex doc)"
		-DENABLE_VULKAN="$(usex vulkan)"
		-DENABLE_WAYLAND="$(usex wayland)"
		-DENABLE_XCB="$(usex xcb)"
		-DBUILD_VERSION_STABLE=ON
		-DQMAKE_QT5_COMMAND="qmake5"
		-DRENDERDOC_SWIG_PACKAGE="${DISTDIR}/${SWIG_ZIP_FILENAME}"
	)
	cmake_src_configure
}

pkg_postinst() {
	xdg_desktop_database_update
	xdg_icon_cache_update
	xdg_mimeinfo_database_update
}

pkg_postrm() {
	xdg_desktop_database_update
	xdg_icon_cache_update
	xdg_mimeinfo_database_update
}