summaryrefslogtreecommitdiff
path: root/media-gfx/renderdoc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-09 03:25:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-09 03:25:11 +0000
commit7db983f17e59dfa621d994bcbdbddc71a6e70a57 (patch)
treed3b613e9a32bbf84e338c3303136477226d57d04 /media-gfx/renderdoc
parent4cf2f7cc6bbea59e8aec44b9508c759cf8bb4adf (diff)
gentoo auto-resync : 09:11:2022 - 03:25:11
Diffstat (limited to 'media-gfx/renderdoc')
-rw-r--r--media-gfx/renderdoc/Manifest2
-rw-r--r--media-gfx/renderdoc/files/renderdoc-1.22-r1-system-glslang.patch215
-rw-r--r--media-gfx/renderdoc/renderdoc-1.22-r1.ebuild203
3 files changed, 420 insertions, 0 deletions
diff --git a/media-gfx/renderdoc/Manifest b/media-gfx/renderdoc/Manifest
index 2d2618c378d3..d64237dd0a86 100644
--- a/media-gfx/renderdoc/Manifest
+++ b/media-gfx/renderdoc/Manifest
@@ -4,11 +4,13 @@ AUX renderdoc-1.18-env-home.patch 832 BLAKE2B f994893dceded797646b51f7e1a54cbd91
AUX renderdoc-1.18-system-compress.patch 4699 BLAKE2B 4f37058deef1773a4a35b64415a8c8133b232374e419e490d81864ab0d1600b84a6f15a4760530078c489c97f7e12baff331cb845cdaced2fad4b2525987876d SHA512 08c38cbadb4cce24036dd22b185a78d4bca074c0d8caa44c1567aca414bc00a60a8adf73a2430930a620b624689be31f690fee92919d9245211f1189493ea091
AUX renderdoc-1.18-system-flags.patch 845 BLAKE2B 0d4aae31af353b2d199ae66ec999beefa04e2105e6368305bb89359806fa99f4b7048c3d6c30a2787a3125718d3cbd7c97d3381f61f4f98a2e08730b5a22db02 SHA512 bd2692f14729360983f5ca4fb8af87085ab5bd209d82f3cfd99e7753d0dd406905a6280051aa5d1476b863566b385cdc28fbe9120d0d6f5efd78411af15b68ef
AUX renderdoc-1.20-system-glslang.patch 8281 BLAKE2B 3bd15c373de0f37831c2d8a03d9c5c4f14684aea2e1d2e350e6300cce7c2182427014f2607199bbe913d460f113faa352dc882ec40a56403f91d87ce0afe4df4 SHA512 7503a5241aa79c241d300f4a758338d0ae511ee2ce9582b5f3720939f9ee71c149614244a0facc620ba2f2da46ceb7dcf7298440c5cd4b528be96245cafc01fa
+AUX renderdoc-1.22-r1-system-glslang.patch 9341 BLAKE2B df5750dc7a6bf026d3cdbe9791bc270393ef7229b0a314b97350bdeaa5bc26011fdfa671ee8594549c46ae268cbe4563ebbcb1b964da21400cd8852382d3233f SHA512 2dcbc06612533f8266c2b2214a552adc4bca37f4ee9b9c53b2d5245bc7fa75f7e8252d7a35cea04fc418bf55cfa9a239588a062c98f1bc79c4eb6d1a7cf78034
DIST renderdoc-1.21.tar.gz 46911586 BLAKE2B 4d4a38de38837c29e005f6c576a3de9edd221eb1dceda7e65fad65ccc6d672f2de0ebb008a9c0440f61647996f30189ffb71f2379aa04a20e68386416b6f4b35 SHA512 9386a42a1ceeb4712d43c18c699a0234ef7f55f6ca03c7a0537cd97dc76fa1429220b95d8f66c5007dfc92535ff552fdb8b3b755aa8e6ce159aa1e98c6fbce5b
DIST renderdoc-1.21.tar.gz.asc 833 BLAKE2B baa858de1915a2e4e69bf1fdf21271fe39d0e768100330db3b0a9f312235a0253c8289265dedb6d458a2c829c3058dca74166269b08c8639ecec2d049a7193e5 SHA512 a2197421d004aa7b86672824fd61261ed91d802e1eb2319e1d5ba5d0c32c58dd61a7916ec41dc9a3b8661e24bd9d3f6da70d44e6ebe4a8e6a7dafe4f83ae5338
DIST renderdoc-1.22.tar.gz 46942430 BLAKE2B 8dfdea0883fd050af2359bb26c7ed2f99109e9ded10251d60ee00c6d14146432d04ebe939559e845a8ebb48a4d35552e0478ce5efe9afbe5b6468abfd53db573 SHA512 b2e6d977293ff904e6919f041e6f6148612980ae22bcf19262aa54f8ea32c24510ab8c72be4178ddead91d400423d7a89a2129d04e6c339d4f33151bb1c4249b
DIST renderdoc-1.22.tar.gz.asc 833 BLAKE2B e8281369e602302a56189f81c6a4fc8084d0167de7ca76cb5066653a3697aa0c74ade8565ff98fad64e72ba1e0d3eec6447c7b96974ef7814d512e07ebfa0a9c SHA512 070255fa5ddbcb52c938b9354c6505b9b1c4ba3cade9f066cd938424076f4c475efee061575da111038e9fb7b49487216542a7742048596d9e729160f8d68e9e
DIST swig-renderdoc-7.tar.gz 4006241 BLAKE2B 619f41239f4aef496264d61f44ae042cf80d3ff28491d452cf11ad07e898554c4a32df6119ee0e8e3de36e6bee61855358cd968ad01c9281976e24e9a6cac839 SHA512 5285a65924c069cfb9f73104ad8a95251badac4001293a1757b97ebead5953730c03289159741f82da4c5afe4f61f7c826b105eaf82df044ed2fa21810242c86
EBUILD renderdoc-1.21.ebuild 5441 BLAKE2B e92947959aed6e9557b53f88b63d0e3515f146c2e2acb61f84f90714d6bb8176fc9b582d8347d28a16174480392c0d5b1c06db01b049c305642e2b9b8de73c51 SHA512 4b62fc9e1424284e285ed031b3d1120964412abda30295238506136dfcb9201ac0a9fa771b69274a4f8386446459b263c0adfbe320d40b47efeb8186208f3ca0
+EBUILD renderdoc-1.22-r1.ebuild 5529 BLAKE2B c13863bc6e8bfce79ac4333cd807272f6968217dfdc118bb86b9e774e0b4bf26c2d656e8c6d108ae703a379058671e5e3a7e41a385e43f57a94e1015ffdedfdd SHA512 441e64455159dbb72f087255ce5305cfe4aea5e3387d648e77e0ffd9ac0643e17f7442f76df5de5c043f5ee5045f444461121e9f46bfe97440c94134f1f743ab
EBUILD renderdoc-1.22.ebuild 5513 BLAKE2B d143413c1cada6a312d557ca2da6bb0b2adbee2b7a58864f22c3d9bb487b7689e3ec63816d5c1ab94d50c561207fbf97b10b69ffe733fd2263e308411719c177 SHA512 a94a0fcefaf0059f62aa599e22ef7761aa2719352e079546cb1360b86306b09dd834192ee8c4e4fbd2191a51fbd5e57d376f972e6e13c70c7b86268c9dcd2dcb
MISC metadata.xml 551 BLAKE2B 6b04ab731ce0f9c836b958914e25fcd4a4b76032fd97ba41f6bda742e99a4b7404de51acac99fe4736ba87e488300e94dc1ef7621a780d0a8e453d0fde0430f2 SHA512 a1c2b5260d0265efe2e1294cb88aa1c43618654c7d989cd8f4bd6e919082ea1d37fed4df8a601a702b5b120d5fb5f6658d3e155c5346dacb17249fed629c04d0
diff --git a/media-gfx/renderdoc/files/renderdoc-1.22-r1-system-glslang.patch b/media-gfx/renderdoc/files/renderdoc-1.22-r1-system-glslang.patch
new file mode 100644
index 000000000000..7b5b88a53625
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.22-r1-system-glslang.patch
@@ -0,0 +1,215 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 857c848b9..0423b3e3c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -448,6 +448,17 @@ elseif(UNIX)
+ endif()
+ endif()
+
++# glslang package does not export a -config.cmake file.
++option(GLSLANG_TARGET_DIR "Absolute path to glslangTargets.cmake directory")
++include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake")
++include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake")
++include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
++include("${GLSLANG_TARGET_DIR}/glslangTargets.cmake")
++include("${GLSLANG_TARGET_DIR}/SPIRVTargets.cmake")
++if(NOT TARGET glslang OR NOT TARGET SPIRV)
++ message(FATAL_ERROR "glslang or SPIRV target not found")
++endif()
++
+ add_subdirectory(renderdoc)
+
+ # these variables are handled within the CMakeLists.txt in qrenderdoc,
+diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
+index a26438d76..9ee043959 100644
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -601,7 +601,7 @@ endif()
+ add_library(renderdoc SHARED ${renderdoc_objects})
+ target_compile_definitions(renderdoc ${RDOC_DEFINITIONS})
+ target_include_directories(renderdoc ${RDOC_INCLUDES})
+-target_link_libraries(renderdoc ${RDOC_LIBRARIES})
++target_link_libraries(renderdoc ${RDOC_LIBRARIES} glslang SPIRV)
+
+ add_dependencies(renderdoc renderdoc_libentry)
+
+diff --git a/renderdoc/data/glsl_shaders.cpp b/renderdoc/data/glsl_shaders.cpp
+index dd79c1f89..5295fb05e 100644
+--- a/renderdoc/data/glsl_shaders.cpp
++++ b/renderdoc/data/glsl_shaders.cpp
+@@ -26,7 +26,7 @@
+ #include "common/common.h"
+ #include "common/formatting.h"
+ #include "driver/shaders/spirv/glslang_compile.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ShaderLang.h>
+ #include "os/os_specific.h"
+
+ #define GLSL_HEADERS(HEADER) \
+diff --git a/renderdoc/driver/gl/gl_shader_refl.cpp b/renderdoc/driver/gl/gl_shader_refl.cpp
+index dfd871f32..57b5aeca6 100644
+--- a/renderdoc/driver/gl/gl_shader_refl.cpp
++++ b/renderdoc/driver/gl/gl_shader_refl.cpp
+@@ -26,7 +26,7 @@
+ #include <algorithm>
+ #include <functional>
+ #include "driver/shaders/spirv/glslang_compile.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ShaderLang.h>
+ #include "gl_driver.h"
+
+ template <>
+diff --git a/renderdoc/driver/shaders/spirv/CMakeLists.txt b/renderdoc/driver/shaders/spirv/CMakeLists.txt
+index e5f2f4113..79525b5f6 100644
+--- a/renderdoc/driver/shaders/spirv/CMakeLists.txt
++++ b/renderdoc/driver/shaders/spirv/CMakeLists.txt
+@@ -1,91 +1,3 @@
+-set(glslang_dir ${RDOC_SOURCE_DIR}/3rdparty/glslang)
+-set(glslang_sources
+- ${glslang_dir}/OGLCompilersDLL/InitializeDll.cpp
+- ${glslang_dir}/OGLCompilersDLL/InitializeDll.h
+- ${glslang_dir}/SPIRV/GlslangToSpv.cpp
+- ${glslang_dir}/SPIRV/GlslangToSpv.h
+- ${glslang_dir}/SPIRV/GLSL.std.450.h
+- ${glslang_dir}/SPIRV/GLSL.ext.AMD.h
+- ${glslang_dir}/SPIRV/GLSL.ext.EXT.h
+- ${glslang_dir}/SPIRV/GLSL.ext.KHR.h
+- ${glslang_dir}/SPIRV/GLSL.ext.NV.h
+- ${glslang_dir}/SPIRV/hex_float.h
+- ${glslang_dir}/SPIRV/InReadableOrder.cpp
+- ${glslang_dir}/SPIRV/Logger.cpp
+- ${glslang_dir}/SPIRV/Logger.h
+- ${glslang_dir}/SPIRV/SpvBuilder.cpp
+- ${glslang_dir}/SPIRV/SpvBuilder.h
+- ${glslang_dir}/SPIRV/SpvTools.cpp
+- ${glslang_dir}/SPIRV/SpvTools.h
+- ${glslang_dir}/SPIRV/SpvPostProcess.cpp
+- ${glslang_dir}/SPIRV/spvIR.h
+- ${glslang_dir}/glslang/GenericCodeGen/CodeGen.cpp
+- ${glslang_dir}/glslang/GenericCodeGen/Link.cpp
+- ${glslang_dir}/glslang/Include/arrays.h
+- ${glslang_dir}/glslang/Include/BaseTypes.h
+- ${glslang_dir}/glslang/Include/Common.h
+- ${glslang_dir}/glslang/Include/ConstantUnion.h
+- ${glslang_dir}/glslang/Include/InfoSink.h
+- ${glslang_dir}/glslang/Include/InitializeGlobals.h
+- ${glslang_dir}/glslang/Include/intermediate.h
+- ${glslang_dir}/glslang/Include/PoolAlloc.h
+- ${glslang_dir}/glslang/Include/ResourceLimits.h
+- ${glslang_dir}/glslang/Include/revision.h
+- ${glslang_dir}/glslang/Include/ShHandle.h
+- ${glslang_dir}/glslang/Include/Types.h
+- ${glslang_dir}/glslang/MachineIndependent/Constant.cpp
+- ${glslang_dir}/glslang/MachineIndependent/glslang_tab.cpp
+- ${glslang_dir}/glslang/MachineIndependent/glslang_tab.cpp.h
+- ${glslang_dir}/glslang/MachineIndependent/gl_types.h
+- ${glslang_dir}/glslang/MachineIndependent/iomapper.cpp
+- ${glslang_dir}/glslang/MachineIndependent/iomapper.h
+- ${glslang_dir}/glslang/MachineIndependent/gl_types.h
+- ${glslang_dir}/glslang/MachineIndependent/InfoSink.cpp
+- ${glslang_dir}/glslang/MachineIndependent/Initialize.cpp
+- ${glslang_dir}/glslang/MachineIndependent/Initialize.h
+- ${glslang_dir}/glslang/MachineIndependent/Intermediate.cpp
+- ${glslang_dir}/glslang/MachineIndependent/intermOut.cpp
+- ${glslang_dir}/glslang/MachineIndependent/IntermTraverse.cpp
+- ${glslang_dir}/glslang/MachineIndependent/limits.cpp
+- ${glslang_dir}/glslang/MachineIndependent/linkValidate.cpp
+- ${glslang_dir}/glslang/MachineIndependent/LiveTraverser.h
+- ${glslang_dir}/glslang/MachineIndependent/localintermediate.h
+- ${glslang_dir}/glslang/MachineIndependent/parseConst.cpp
+- ${glslang_dir}/glslang/MachineIndependent/ParseContextBase.cpp
+- ${glslang_dir}/glslang/MachineIndependent/ParseHelper.cpp
+- ${glslang_dir}/glslang/MachineIndependent/ParseHelper.h
+- ${glslang_dir}/glslang/MachineIndependent/PoolAlloc.cpp
+- ${glslang_dir}/glslang/MachineIndependent/propagateNoContraction.cpp
+- ${glslang_dir}/glslang/MachineIndependent/propagateNoContraction.h
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/PpAtom.cpp
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/PpContext.cpp
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/PpContext.h
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/Pp.cpp
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/PpScanner.cpp
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/PpTokens.cpp
+- ${glslang_dir}/glslang/MachineIndependent/preprocessor/PpTokens.h
+- ${glslang_dir}/glslang/MachineIndependent/reflection.cpp
+- ${glslang_dir}/glslang/MachineIndependent/reflection.h
+- ${glslang_dir}/glslang/MachineIndependent/RemoveTree.cpp
+- ${glslang_dir}/glslang/MachineIndependent/RemoveTree.h
+- ${glslang_dir}/glslang/MachineIndependent/ScanContext.h
+- ${glslang_dir}/glslang/MachineIndependent/Scan.cpp
+- ${glslang_dir}/glslang/MachineIndependent/Scan.h
+- ${glslang_dir}/glslang/MachineIndependent/ShaderLang.cpp
+- ${glslang_dir}/glslang/MachineIndependent/SymbolTable.cpp
+- ${glslang_dir}/glslang/MachineIndependent/SymbolTable.h
+- ${glslang_dir}/glslang/MachineIndependent/Versions.cpp
+- ${glslang_dir}/glslang/MachineIndependent/Versions.h
+- ${glslang_dir}/glslang/MachineIndependent/attribute.cpp
+- ${glslang_dir}/glslang/MachineIndependent/attribute.h
+- ${glslang_dir}/glslang/OSDependent/osinclude.h
+- ${glslang_dir}/glslang/Public/ShaderLang.h)
+-
+-if(UNIX)
+- list(APPEND glslang_sources
+- ${glslang_dir}/glslang/OSDependent/Unix/ossource.cpp)
+-endif()
+-
+ set(sources
+ glslang_compile.cpp
+ glslang_compile.h
+@@ -108,8 +20,7 @@ set(sources
+ spirv_processor.h
+ spirv_disassemble.cpp
+ spirv_stringise.cpp
+- var_dispatch_helpers.h
+- ${glslang_sources})
++ var_dispatch_helpers.h)
+
+ add_definitions(-DAMD_EXTENSIONS)
+ add_definitions(-DNV_EXTENSIONS)
+diff --git a/renderdoc/driver/shaders/spirv/glslang_compile.cpp b/renderdoc/driver/shaders/spirv/glslang_compile.cpp
+index e2f1f2df8..fc0adab99 100644
+--- a/renderdoc/driver/shaders/spirv/glslang_compile.cpp
++++ b/renderdoc/driver/shaders/spirv/glslang_compile.cpp
+@@ -29,8 +29,8 @@
+ #undef min
+ #undef max
+
+-#include "glslang/glslang/Include/Types.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Include/Types.h>
++#include <glslang/Public/ShaderLang.h>
+
+ static bool glslang_inited = false;
+ rdcarray<glslang::TShader *> *allocatedShaders = NULL;
+@@ -129,7 +129,16 @@ static TBuiltInResource DefaultResources = {
+ /*.maxTaskWorkGroupSizeY_NV =*/1,
+ /*.maxTaskWorkGroupSizeZ_NV =*/1,
+ /*.maxMeshViewCountNV =*/4,
+-
++ /*.maxMeshOutputVerticesEXT = */ 256,
++ /*.maxMeshOutputPrimitivesEXT = */ 256,
++ /*.maxMeshWorkGroupSizeX_EXT = */ 128,
++ /*.maxMeshWorkGroupSizeY_EXT = */ 128,
++ /*.maxMeshWorkGroupSizeZ_EXT = */ 128,
++ /*.maxTaskWorkGroupSizeX_EXT = */ 128,
++ /*.maxTaskWorkGroupSizeY_EXT = */ 128,
++ /*.maxTaskWorkGroupSizeZ_EXT = */ 128,
++ /*.maxMeshViewCountEXT = */ 4,
++ /*.maxDualSourceDrawBuffersEXT =*/1,
+ /*.limits*/
+ {
+ /*.limits.nonInductiveForLoops =*/1,
+diff --git a/renderdoc/driver/shaders/spirv/spirv_compile.cpp b/renderdoc/driver/shaders/spirv/spirv_compile.cpp
+index 8fbf2f16a..49bd322f4 100644
+--- a/renderdoc/driver/shaders/spirv/spirv_compile.cpp
++++ b/renderdoc/driver/shaders/spirv/spirv_compile.cpp
+@@ -31,8 +31,8 @@
+ #undef min
+ #undef max
+
+-#include "glslang/SPIRV/GlslangToSpv.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/SPIRV/GlslangToSpv.h>
++#include <glslang/Public/ShaderLang.h>
+
+ rdcstr rdcspv::Compile(const rdcspv::CompilationSettings &settings, const rdcarray<rdcstr> &sources,
+ rdcarray<uint32_t> &spirv)
diff --git a/media-gfx/renderdoc/renderdoc-1.22-r1.ebuild b/media-gfx/renderdoc/renderdoc-1.22-r1.ebuild
new file mode 100644
index 000000000000..a7491c866ecf
--- /dev/null
+++ b/media-gfx/renderdoc/renderdoc-1.22-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# The swig fork is required for compatibility with both provided and
+# 3rd-party Python scripts. Required patch was sent to upstream in
+# 2014: https://github.com/swig/swig/pull/251
+MY_SWIG_VER=7
+MY_SWIG=swig-${PN}-${MY_SWIG_VER}
+
+AUTOTOOLS_AUTO_DEPEND="no"
+DOCS_BUILDER="sphinx"
+DOCS_DIR="docs"
+# For Python 3.11, see https://github.com/baldurk/renderdoc/issues/2730
+PYTHON_COMPAT=( python3_{9,10} )
+inherit autotools cmake flag-o-matic optfeature python-single-r1 docs qmake-utils verify-sig xdg
+
+DESCRIPTION="A stand-alone graphics debugging tool"
+HOMEPAGE="https://renderdoc.org https://github.com/baldurk/renderdoc"
+SRC_URI="
+ https://github.com/baldurk/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ qt5? ( https://github.com/baldurk/swig/archive/${PN}-modified-${MY_SWIG_VER}.tar.gz -> ${MY_SWIG}.tar.gz )
+ verify-sig? ( https://github.com/baldurk/renderdoc/releases/download/v${PV}/v${PV}.tar.gz.asc -> ${P}.tar.gz.asc )
+"
+
+# renderdoc: MIT
+# + cmdline: BSD (not compatible with upstream lib)
+# + farm fresh icons: CC-BY-3.0
+# + half: MIT (not compatible with system dev-libs/half)
+# + include-bin ZLIB (upstream doesn't exist anymore, maintained in tree)
+# + md5: public-domain
+# + plthook: BSD-2
+# + pugixml: MIT
+# + radeon gpu analyzer: MIT
+# + source code pro: OFL-1.1
+# + stb: public-domain
+# + tinyfiledialogs: ZLIB
+# + docs? ( sphinx.paramlinks: MIT )
+# swig: GPL-3+ BSD BSD-2
+LICENSE="BSD BSD-2 CC-BY-3.0 GPL-3+ MIT OFL-1.1 public-domain ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="pyside2 qt5"
+REQUIRED_USE="doc? ( qt5 ) pyside2? ( qt5 ) qt5? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ app-arch/lz4:=
+ app-arch/zstd:=
+ dev-libs/miniz:=
+ >=dev-util/glslang-1.3.231:=
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-keysyms
+ virtual/opengl
+ pyside2? (
+ $(python_gen_cond_dep '
+ dev-python/pyside2[${PYTHON_USEDEP}]
+ ')
+ )
+ qt5? (
+ ${PYTHON_DEPS}
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ )
+"
+DEPEND="${RDEPEND}"
+# qtcore provides qmake, which is required to build the qrenderdoc gui.
+BDEPEND="
+ x11-base/xorg-proto
+ virtual/pkgconfig
+ qt5? (
+ ${AUTOTOOLS_DEPEND}
+ ${PYTHON_DEPS}
+ dev-libs/libpcre
+ dev-qt/qtcore:5
+ sys-devel/bison
+ )
+ verify-sig? ( sec-keys/openpgp-keys-baldurkarlsson )
+"
+
+PATCHES=(
+ # The analytics seem very reasonable, and even without this patch
+ # they are NOT sent before the user accepts. But default the
+ # selection to off, just in case.
+ "${FILESDIR}"/${PN}-1.18-analytics-off.patch
+
+ # Only search for PySide2 if pyside2 USE flag is set.
+ # Bug #833627
+ "${FILESDIR}"/${PN}-1.18-conditional-pyside.patch
+
+ # Pass CXXFLAGS and LDFLAGS through to qmake when qrenderdoc is
+ # built.
+ "${FILESDIR}"/${PN}-1.18-system-flags.patch
+
+ # Needed to prevent sandbox violations during build.
+ "${FILESDIR}"/${PN}-1.18-env-home.patch
+
+ "${FILESDIR}"/${PN}-1.22-r1-system-glslang.patch
+ "${FILESDIR}"/${PN}-1.18-system-compress.patch
+)
+
+DOCS=( util/LINUX_DIST_README )
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/baldurkarlsson.gpg
+
+pkg_setup() {
+ use qt5 && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ fi
+
+ # Do not unpack the swig sources here. CMake will do that if
+ # required.
+ unpack ${P}.tar.gz
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Ensure that we use the system glslang headers instead of the
+ # vendored copy.
+ rm -r renderdoc/3rdparty/glslang || die 'rm vendored glslang failed'
+
+ # Remove the calls to install the documentation files. Instead,
+ # install them with einstalldocs.
+ sed -i '/share\/doc\/renderdoc/d' \
+ "${S}"/CMakeLists.txt "${S}"/qrenderdoc/CMakeLists.txt \
+ || die 'sed remove doc install failed'
+
+ # Assumes that the build directory is "${S}"/build, which it is not.
+ sed -i "s|../build/lib|${BUILD_DIR}/lib|" \
+ "${S}"/docs/conf.py \
+ || die 'sed patch doc sys.path failed'
+
+ # Bug #836235
+ sed -i '/#include <stdarg/i #include <time.h>' \
+ "${S}"/renderdoc/os/os_specific.h \
+ || die 'sed include time.h failed'
+}
+
+src_configure() {
+ local mycmakeargs=(
+ # Build system does not know that this is a tagged release, as
+ # we just have the tarball and not the git repository.
+ -DBUILD_VERSION_STABLE=ON
+
+ -DENABLE_EGL=ON
+ -DENABLE_GL=ON
+ -DENABLE_GLES=ON
+ -DENABLE_PYRENDERDOC=$(usex qt5)
+ -DENABLE_QRENDERDOC=$(usex qt5)
+ -DENABLE_VULKAN=ON
+
+ # Upstream says that this option is unsupported and should not
+ # be used yet.
+ -DENABLE_WAYLAND=OFF
+
+ -DENABLE_XCB=ON
+ -DENABLE_XLIB=ON
+
+ # Path to glslang*.cmake.
+ -DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake
+
+ # renderdoc_capture.json is installed here
+ -DVULKAN_LAYER_FOLDER="${EPREFIX}"/etc/vulkan/implicit_layer.d
+ )
+
+ use qt5 && mycmakeargs+=(
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DRENDERDOC_SWIG_PACKAGE="${DISTDIR}"/${MY_SWIG}.tar.gz
+
+ # Needed after qtchooser removal, bug #836474.
+ -DQMAKE_QT5_COMMAND="$(qt5_get_bindir)"/qmake
+
+ -DQRENDERDOC_ENABLE_PYSIDE2=$(usex pyside2)
+ )
+
+ use pyside2 && mycmakeargs+=( -DPYTHON_CONFIG_SUFFIX=-${EPYTHON} )
+
+ # Lots of type mismatch issues.
+ filter-lto
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ docs_compile
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ optfeature "android remote contexts" dev-util/android-tools
+ optfeature "vulkan contexts" media-libs/vulkan-loader
+}