* [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/
@ 2022-02-21 7:27 Matthew Smith
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Smith @ 2022-02-21 7:27 UTC (permalink / raw
To: gentoo-commits
commit: 7db7d4664334929e601561afe237980895811877
Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 07:26:52 2022 +0000
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 07:26:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7db7d466
media-gfx/renderdoc: backport feature test patch
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
.../files/renderdoc-1.18-check-api-ver.patch | 50 ++++++++++++++++++++++
...derdoc-1.18.ebuild => renderdoc-1.18-r1.ebuild} | 4 ++
2 files changed, 54 insertions(+)
diff --git a/media-gfx/renderdoc/files/renderdoc-1.18-check-api-ver.patch b/media-gfx/renderdoc/files/renderdoc-1.18-check-api-ver.patch
new file mode 100644
index 000000000000..a6af5645d14b
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.18-check-api-ver.patch
@@ -0,0 +1,50 @@
+From 3d49524da4a28ecc1ee1a9b3f9ec455fc0263c81 Mon Sep 17 00:00:00 2001
+From: baldurk <baldurk@baldurk.org>
+Date: Mon, 31 Jan 2022 19:28:08 +0000
+Subject: [PATCH] Don't enable functionality not supported by the current
+ physical device
+
+---
+ .../driver/vulkan/wrappers/vk_device_funcs.cpp | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
+index 4d342e0123..a40c52d6ef 100644
+--- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
++++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
+@@ -3171,7 +3171,7 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR,
+ };
+
+- if(physProps.apiVersion >= VK_MAKE_VERSION(1, 2, 0))
++ if(RDCMIN(m_EnabledExtensions.vulkanVersion, physProps.apiVersion) >= VK_MAKE_VERSION(1, 2, 0))
+ {
+ VkPhysicalDeviceVulkan12Features avail12Features = {
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES,
+@@ -3376,11 +3376,13 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
+
+ CheckDeviceExts();
+
++ uint32_t effectiveApiVersion = RDCMIN(m_EnabledExtensions.vulkanVersion, physProps.apiVersion);
++
+ #undef CheckExt
+-#define CheckExt(name, ver) \
+- if(!strcmp(createInfo.ppEnabledExtensionNames[i], "VK_" #name) || physProps.apiVersion >= ver) \
+- { \
+- m_EnabledExtensions.ext_##name = true; \
++#define CheckExt(name, ver) \
++ if(!strcmp(createInfo.ppEnabledExtensionNames[i], "VK_" #name) || effectiveApiVersion >= ver) \
++ { \
++ m_EnabledExtensions.ext_##name = true; \
+ }
+
+ for(uint32_t i = 0; i < createInfo.enabledExtensionCount; i++)
+@@ -3391,7 +3393,7 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
+ // for cases where a promoted extension isn't supported as the extension itself, manually
+ // disable them when the feature bit is false.
+
+- if(physProps.apiVersion >= VK_MAKE_VERSION(1, 2, 0))
++ if(effectiveApiVersion >= VK_MAKE_VERSION(1, 2, 0))
+ {
+ if(supportedExtensions.find(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) ==
+ supportedExtensions.end() &&
diff --git a/media-gfx/renderdoc/renderdoc-1.18.ebuild b/media-gfx/renderdoc/renderdoc-1.18-r1.ebuild
similarity index 96%
rename from media-gfx/renderdoc/renderdoc-1.18.ebuild
rename to media-gfx/renderdoc/renderdoc-1.18-r1.ebuild
index 38a71320c453..aca43a4ec9e9 100644
--- a/media-gfx/renderdoc/renderdoc-1.18.ebuild
+++ b/media-gfx/renderdoc/renderdoc-1.18-r1.ebuild
@@ -99,6 +99,10 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.18-system-glslang.patch
"${FILESDIR}"/${PN}-1.18-system-compress.patch
+
+ # Check physical device API version and supported extensions. Fixes
+ # segfault on some GPU/driver combinations. Will be in release 1.19
+ "${FILESDIR}"/${PN}-1.18-check-api-ver.patch
)
DOCS=( util/LINUX_DIST_README )
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/
@ 2022-07-22 9:31 Matthew Smith
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Smith @ 2022-07-22 9:31 UTC (permalink / raw
To: gentoo-commits
commit: 3285fc55eac9e699b5fc4b50d0171d9745ca85b6
Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 22 09:28:43 2022 +0000
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Fri Jul 22 09:28:43 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3285fc55
media-gfx/renderdoc: filter lto
Also:
* rebase the system-glslang patch as one header from the vendored copy
of glslang was used, causing issues due to the differing versions.
* delete the vendored glslang directory in src_prepare to remove the
possibility of the above happening again.
Closes: https://bugs.gentoo.org/859799
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
.../files/renderdoc-1.20-system-glslang.patch | 197 +++++++++++++++++++++
...derdoc-1.20.ebuild => renderdoc-1.20-r1.ebuild} | 11 +-
2 files changed, 206 insertions(+), 2 deletions(-)
diff --git a/media-gfx/renderdoc/files/renderdoc-1.20-system-glslang.patch b/media-gfx/renderdoc/files/renderdoc-1.20-system-glslang.patch
new file mode 100644
index 000000000000..be808131c362
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.20-system-glslang.patch
@@ -0,0 +1,197 @@
+From 70442b7a3952350429872e95d843374f0aaa6a2f Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Sun, 30 Jan 2022 17:19:47 +0000
+Subject: [PATCH] build: Use system glslang
+
+Requires -DGLSLANG_TARGET_DIR option.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -437,6 +437,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,
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -595,7 +595,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)
+
+--- 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) \
+--- 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 <>
+--- 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)
+--- 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,6 +129,7 @@ static TBuiltInResource DefaultResources = {
+ /*.maxTaskWorkGroupSizeY_NV =*/1,
+ /*.maxTaskWorkGroupSizeZ_NV =*/1,
+ /*.maxMeshViewCountNV =*/4,
++ /*.maxDualSourceDrawBuffersEXT =*/1,
+
+ /*.limits*/
+ {
+--- 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.20.ebuild b/media-gfx/renderdoc/renderdoc-1.20-r1.ebuild
similarity index 93%
rename from media-gfx/renderdoc/renderdoc-1.20.ebuild
rename to media-gfx/renderdoc/renderdoc-1.20-r1.ebuild
index 1503f8651e20..547e21513366 100644
--- a/media-gfx/renderdoc/renderdoc-1.20.ebuild
+++ b/media-gfx/renderdoc/renderdoc-1.20-r1.ebuild
@@ -13,7 +13,7 @@ AUTOTOOLS_AUTO_DEPEND="no"
DOCS_BUILDER="sphinx"
DOCS_DIR="docs"
PYTHON_COMPAT=( python3_{9,10} )
-inherit autotools cmake optfeature python-single-r1 docs qmake-utils verify-sig xdg
+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"
@@ -99,7 +99,7 @@ PATCHES=(
# Needed to prevent sandbox violations during build.
"${FILESDIR}"/${PN}-1.18-env-home.patch
- "${FILESDIR}"/${PN}-1.18-system-glslang.patch
+ "${FILESDIR}"/${PN}-1.20-system-glslang.patch
"${FILESDIR}"/${PN}-1.18-system-compress.patch
)
@@ -124,6 +124,10 @@ src_unpack() {
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' \
@@ -180,6 +184,9 @@ src_configure() {
use pyside2 && mycmakeargs+=( -DPYTHON_CONFIG_SUFFIX=-${EPYTHON} )
+ # Lots of type mismatch issues.
+ filter-lto
+
cmake_src_configure
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/
@ 2022-11-08 23:57 Nick Sarnie
0 siblings, 0 replies; 6+ messages in thread
From: Nick Sarnie @ 2022-11-08 23:57 UTC (permalink / raw
To: gentoo-commits
commit: d7b90ba00c47603dfc9c431ecfd421deb374b89f
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 6 01:18:58 2022 +0000
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Tue Nov 8 23:56:50 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7b90ba0
media-gfx/renderdoc: Update glslang dep
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
.../files/renderdoc-1.22-r1-system-glslang.patch | 215 +++++++++++++++++++++
media-gfx/renderdoc/renderdoc-1.22-r1.ebuild | 203 +++++++++++++++++++
2 files changed, 418 insertions(+)
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
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/
@ 2022-12-05 20:41 Matthew Smith
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Smith @ 2022-12-05 20:41 UTC (permalink / raw
To: gentoo-commits
commit: a002ef410f7d26d1c8463bebf05388534d6ba7eb
Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 5 20:40:50 2022 +0000
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Mon Dec 5 20:40:50 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a002ef41
media-gfx/renderdoc: add 1.24
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
media-gfx/renderdoc/Manifest | 2 +
.../renderdoc/files/renderdoc-1.24-env-home.patch | 15 ++
media-gfx/renderdoc/renderdoc-1.24.ebuild | 203 +++++++++++++++++++++
3 files changed, 220 insertions(+)
diff --git a/media-gfx/renderdoc/Manifest b/media-gfx/renderdoc/Manifest
index 8f8e8b329676..38604bf15bb7 100644
--- a/media-gfx/renderdoc/Manifest
+++ b/media-gfx/renderdoc/Manifest
@@ -2,4 +2,6 @@ DIST renderdoc-1.21.tar.gz 46911586 BLAKE2B 4d4a38de38837c29e005f6c576a3de9edd22
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 renderdoc-1.24.tar.gz 46998687 BLAKE2B 34316e81da94eeeb0aff2291563e9bf5c46089746f7dc53f8def2b047d0d377e5c26edd8fee23ff97d77037bcfc8468b7f27f2c82c7f6e80f20cd5278b026d75 SHA512 07cc35800c13893bf1b8f8635d5a819f546e458be6a8111d1b40d54e25977c0b88d7c7bc6a89a813dfa353e0fe0a84a334d3796e04c327bf2f42c65a172f9027
+DIST renderdoc-1.24.tar.gz.asc 833 BLAKE2B 0649f4437c57fee9cd69946cff3be0b2b156656fe648b56504ff241dbd43d37d4f3d6a89ea17bd006a7d4778f3d901e25756c069baeb3d55283d9046d19b3cb0 SHA512 fad7ffd3a9538d26b38a9a32a22021063cf9b457cedecb1e40cb7cf7a55e86c290ed1776877612af02205b0f8d35f5331f05e7b2fcdfc00469be21831b62939f
DIST swig-renderdoc-7.tar.gz 4006241 BLAKE2B 619f41239f4aef496264d61f44ae042cf80d3ff28491d452cf11ad07e898554c4a32df6119ee0e8e3de36e6bee61855358cd968ad01c9281976e24e9a6cac839 SHA512 5285a65924c069cfb9f73104ad8a95251badac4001293a1757b97ebead5953730c03289159741f82da4c5afe4f61f7c826b105eaf82df044ed2fa21810242c86
diff --git a/media-gfx/renderdoc/files/renderdoc-1.24-env-home.patch b/media-gfx/renderdoc/files/renderdoc-1.24-env-home.patch
new file mode 100644
index 000000000000..b4a2230cbfd4
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.24-env-home.patch
@@ -0,0 +1,15 @@
+--- a/renderdoc/os/posix/linux/linux_stringio.cpp
++++ b/renderdoc/os/posix/linux/linux_stringio.cpp
+@@ -595,11 +595,7 @@
+
+ rdcstr GetAppFolderFilename(const rdcstr &filename)
+ {
+- passwd *pw = getpwuid(getuid());
+- const char *homedir = pw ? pw->pw_dir : NULL;
+-
+- if(!homedir)
+- homedir = getenv("HOME");
++ const char *homedir = getenv("HOME");
+
+ if(!homedir)
+ {
diff --git a/media-gfx/renderdoc/renderdoc-1.24.ebuild b/media-gfx/renderdoc/renderdoc-1.24.ebuild
new file mode 100644
index 000000000000..d7e55bb1ce79
--- /dev/null
+++ b/media-gfx/renderdoc/renderdoc-1.24.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.24-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
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/
@ 2023-11-02 19:04 Matthew Smith
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Smith @ 2023-11-02 19:04 UTC (permalink / raw
To: gentoo-commits
commit: d2215062816f9766164e197f36f40dc26833bc6f
Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 2 19:04:14 2023 +0000
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Thu Nov 2 19:04:14 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2215062
media-gfx/renderdoc: add 1.29
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
media-gfx/renderdoc/Manifest | 2 +
.../files/renderdoc-1.29-system-compress.patch | 142 ++++++++++++
.../files/renderdoc-1.29-system-glslang.patch | 237 +++++++++++++++++++++
media-gfx/renderdoc/renderdoc-1.29.ebuild | 202 ++++++++++++++++++
4 files changed, 583 insertions(+)
diff --git a/media-gfx/renderdoc/Manifest b/media-gfx/renderdoc/Manifest
index c4f2fec278be..429c6056e92f 100644
--- a/media-gfx/renderdoc/Manifest
+++ b/media-gfx/renderdoc/Manifest
@@ -2,4 +2,6 @@ DIST renderdoc-1.27.tar.gz 47445907 BLAKE2B 58be926cb1282fe5bb2ba195cf71fabd9a5f
DIST renderdoc-1.27.tar.gz.asc 833 BLAKE2B fdfbd1ce367e9757e080e1263651444cd4001fe3d8580672a476923e2cf56b030b568c90566f258b1fd485c15c9d6c5a0b91cfb2c72c831677aa088acb9d4c15 SHA512 a74517747bf19a16d8db241a795e16d1213c745d3ff29236844433937202c91da1e580daac6ec7a54322b215163b0ebf492bef9b77eb603720503e4d3a4849df
DIST renderdoc-1.28.tar.gz 47456620 BLAKE2B 62572e3c2ca4423c3c220f946a419c74951858027a5369ae59e0a026ddaa35c96b44be7d06ce1ff4e8105f3e5edf0bb0227d11f1dd7d8a747cf75ad97e4f354e SHA512 46f0fbde1ba8df1257e426489a425af1e4fa8393f27a6bf17d18e2a8881c5afac5af95e729ce4cc3bb4ef89b58b1db738cce721c1283edfceac48cfcea776a18
DIST renderdoc-1.28.tar.gz.asc 833 BLAKE2B d7df63a111dd5747bf3ac0c34f6c6f77c91d6cfe91a09552fead8cda4197962bdf89da44e13344ebc0916ce2d20ba98d42e0670a825cd1bf7900eaa858658dcf SHA512 3fa45af60ae8500bc0d05a13bc0b3f6aaed812bc4015e664ff8cd430e4ff9dc497bcceb81769d5037e869ed1096e1c03c4183f00d6ddf9b4932b3f917e6c2697
+DIST renderdoc-1.29.tar.gz 50717466 BLAKE2B 492b32140c8ad1ab3e753158cfede64ea0b580a2df03094aeeff2d4eac659fbedc62971f65d3fe024e0282de39d5f122b512be2fc6a28ac7abf794b58f116322 SHA512 cbb6a2bd4a7d0c4347296f0e6f49d90b40ba11949e1bc5d777104f067c70999c5b124c44eb180a37363331832afb890f7a83fac521d306dd99cdab92b0d09106
+DIST renderdoc-1.29.tar.gz.asc 833 BLAKE2B b8fe64653153ed09b9e03eb255747d8476f6a6badea0bd834808d4e982750b627dc736b71ddacb96ac82e0136500cdb6c54dc4e7ab49529b2044b8e6512a1822 SHA512 ed7b12376e189df421ba69e6b1c14790045491195bdf1197c7c7a6fdc20d72046ae441d057a01e283a7e2ff85b4b341ec6bf45a28e8b04a9f48b441b42699cfd
DIST swig-renderdoc-7.tar.gz 4006241 BLAKE2B 619f41239f4aef496264d61f44ae042cf80d3ff28491d452cf11ad07e898554c4a32df6119ee0e8e3de36e6bee61855358cd968ad01c9281976e24e9a6cac839 SHA512 5285a65924c069cfb9f73104ad8a95251badac4001293a1757b97ebead5953730c03289159741f82da4c5afe4f61f7c826b105eaf82df044ed2fa21810242c86
diff --git a/media-gfx/renderdoc/files/renderdoc-1.29-system-compress.patch b/media-gfx/renderdoc/files/renderdoc-1.29-system-compress.patch
new file mode 100644
index 000000000000..967d300b29d5
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.29-system-compress.patch
@@ -0,0 +1,142 @@
+From 8f16c974fc8ec0b286d803490baa6e00a83615cf Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matt@offtopica.uk>
+Date: Sun, 30 Jan 2022 18:07:51 +0000
+Subject: [PATCH 2/3] build: Use system compression libs
+
+---
+ CMakeLists.txt | 6 +++
+ renderdoc/CMakeLists.txt | 48 +------------------
+ renderdoc/core/replay_proxy.cpp | 2 +-
+ .../driver/shaders/dxbc/dxbc_container.cpp | 2 +-
+ renderdoc/serialise/lz4io.h | 2 +-
+ 5 files changed, 10 insertions(+), 50 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb0a2c7f6..0ee4fc629 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -419,6 +419,12 @@ elseif(UNIX)
+ endif()
+ endif()
+
++find_package(PkgConfig REQUIRED)
++find_package(miniz REQUIRED CONFIG)
++
++pkg_check_modules(lz4 REQUIRED IMPORTED_TARGET liblz4)
++pkg_check_modules(zstd REQUIRED IMPORTED_TARGET libzstd)
++
+ # 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")
+diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
+index 927e95fb9..5908be6de 100644
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -218,56 +218,10 @@ set(sources
+ 3rdparty/pugixml/pugixml.cpp
+ 3rdparty/pugixml/pugixml.hpp
+ 3rdparty/pugixml/pugiconfig.hpp
+- 3rdparty/lz4/lz4.c
+- 3rdparty/lz4/lz4.h
+ 3rdparty/md5/md5.c
+ 3rdparty/md5/md5.h
+- 3rdparty/miniz/miniz.c
+- 3rdparty/miniz/miniz.h
+ 3rdparty/superluminal/superluminal.cpp
+ 3rdparty/superluminal/superluminal.h
+- 3rdparty/zstd/bitstream.h
+- 3rdparty/zstd/compiler.h
+- 3rdparty/zstd/cpu.h
+- 3rdparty/zstd/debug.c
+- 3rdparty/zstd/debug.h
+- 3rdparty/zstd/entropy_common.c
+- 3rdparty/zstd/error_private.c
+- 3rdparty/zstd/error_private.h
+- 3rdparty/zstd/fse.h
+- 3rdparty/zstd/fse_compress.c
+- 3rdparty/zstd/fse_decompress.c
+- 3rdparty/zstd/hist.c
+- 3rdparty/zstd/hist.h
+- 3rdparty/zstd/huf.h
+- 3rdparty/zstd/huf_compress.c
+- 3rdparty/zstd/huf_decompress.c
+- 3rdparty/zstd/mem.h
+- 3rdparty/zstd/pool.c
+- 3rdparty/zstd/pool.h
+- 3rdparty/zstd/threading.c
+- 3rdparty/zstd/threading.h
+- 3rdparty/zstd/xxhash.c
+- 3rdparty/zstd/xxhash.h
+- 3rdparty/zstd/zstd.h
+- 3rdparty/zstd/zstd_common.c
+- 3rdparty/zstd/zstd_compress.c
+- 3rdparty/zstd/zstd_compress_internal.h
+- 3rdparty/zstd/zstd_decompress.c
+- 3rdparty/zstd/zstd_double_fast.c
+- 3rdparty/zstd/zstd_double_fast.h
+- 3rdparty/zstd/zstd_errors.h
+- 3rdparty/zstd/zstd_fast.c
+- 3rdparty/zstd/zstd_fast.h
+- 3rdparty/zstd/zstd_internal.h
+- 3rdparty/zstd/zstd_lazy.c
+- 3rdparty/zstd/zstd_lazy.h
+- 3rdparty/zstd/zstd_ldm.c
+- 3rdparty/zstd/zstd_ldm.h
+- 3rdparty/zstd/zstd_opt.c
+- 3rdparty/zstd/zstd_opt.h
+- 3rdparty/zstd/zstdmt_compress.c
+- 3rdparty/zstd/zstdmt_compress.h
+ 3rdparty/stb/stb_image.h
+ 3rdparty/stb/stb_image_write.h
+ 3rdparty/stb/stb_image_resize.h
+@@ -580,7 +534,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} glslang glslang-default-resource-limits SPIRV)
++target_link_libraries(renderdoc ${RDOC_LIBRARIES} glslang glslang-default-resource-limits miniz::miniz PkgConfig::lz4 PkgConfig::zstd SPIRV)
+
+ add_dependencies(renderdoc renderdoc_libentry)
+
+diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp
+index dea1e86cf..c9362e797 100644
+--- a/renderdoc/core/replay_proxy.cpp
++++ b/renderdoc/core/replay_proxy.cpp
+@@ -25,7 +25,7 @@
+
+ #include "replay_proxy.h"
+ #include <list>
+-#include "lz4/lz4.h"
++#include <lz4.h>
+ #include "replay/dummy_driver.h"
+ #include "serialise/lz4io.h"
+
+diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
+index ede1fdeb7..0c8fd4dfe 100644
+--- a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
++++ b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
+@@ -29,7 +29,7 @@
+ #include "common/common.h"
+ #include "core/settings.h"
+ #include "driver/shaders/dxil/dxil_bytecode.h"
+-#include "lz4/lz4.h"
++#include <lz4.h>
+ #include "md5/md5.h"
+ #include "serialise/serialiser.h"
+ #include "strings/string_utils.h"
+diff --git a/renderdoc/serialise/lz4io.h b/renderdoc/serialise/lz4io.h
+index 199fbbbc1..80fdf94f2 100644
+--- a/renderdoc/serialise/lz4io.h
++++ b/renderdoc/serialise/lz4io.h
+@@ -24,7 +24,7 @@
+
+ #pragma once
+
+-#include "lz4/lz4.h"
++#include <lz4.h>
+ #include "streamio.h"
+
+ class LZ4Compressor : public Compressor
+--
+2.35.1
+
diff --git a/media-gfx/renderdoc/files/renderdoc-1.29-system-glslang.patch b/media-gfx/renderdoc/files/renderdoc-1.29-system-glslang.patch
new file mode 100644
index 000000000000..4e7934928ef7
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.29-system-glslang.patch
@@ -0,0 +1,237 @@
+From d889c250f9e500c84f34533398e82aa9e5d5a0ae Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Thu, 2 Nov 2023 18:43:42 +0000
+Subject: [PATCH] system glslang
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -469,6 +469,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,
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -604,7 +604,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 glslang-default-resource-limits SPIRV)
+
+ add_dependencies(renderdoc renderdoc_libentry)
+
+--- a/renderdoc/data/glsl_shaders.cpp
++++ b/renderdoc/data/glsl_shaders.cpp
+@@ -26,8 +26,8 @@
+ #include "common/common.h"
+ #include "common/formatting.h"
+ #include "driver/shaders/spirv/glslang_compile.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.h>
++#include <glslang/Public/ShaderLang.h>
+ #include "os/os_specific.h"
+
+ #define GLSL_HEADERS(HEADER) \
+--- a/renderdoc/driver/gl/gl_shader_refl.cpp
++++ b/renderdoc/driver/gl/gl_shader_refl.cpp
+@@ -26,8 +26,8 @@
+ #include <algorithm>
+ #include <functional>
+ #include "driver/shaders/spirv/glslang_compile.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.h>
++#include <glslang/Public/ShaderLang.h>
+ #include "gl_driver.h"
+
+ template <>
+--- a/renderdoc/driver/shaders/spirv/CMakeLists.txt
++++ b/renderdoc/driver/shaders/spirv/CMakeLists.txt
+@@ -1,98 +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.ARM.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/NonSemanticDebugPrintf.h
+- ${glslang_dir}/SPIRV/NonSemanticShaderDebugInfo100.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/SpirvIntrinsics.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/SpirvIntrinsics.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/ResourceLimits/ResourceLimits.cpp
+- ${glslang_dir}/glslang/Public/ShaderLang.h
+- ${glslang_dir}/glslang/Public/ResourceLimits.h)
+-
+-if(UNIX)
+- list(APPEND glslang_sources
+- ${glslang_dir}/glslang/OSDependent/Unix/ossource.cpp)
+-endif()
+-
+ set(sources
+ glslang_compile.cpp
+ glslang_compile.h
+@@ -115,38 +20,20 @@ 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)
+
+-set_property(SOURCE ${glslang_sources}
+- PROPERTY COMPILE_FLAGS "-Wno-ignored-qualifiers -Wno-strict-aliasing -Wno-unreachable-code-break")
+-
+-# GCC 7.0 and above needs -Wno-implicit-fallthrough
+-if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.9)
+- set_property(SOURCE ${glslang_sources}
+- APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-implicit-fallthrough")
+-endif()
+-
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set_property(SOURCE ${glslang_sources}
+- APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unknown-warning-option -Wno-shadow -Wno-shorten-64-to-32")
+-
+ set_property(SOURCE
+ spirv_debug.cpp
+ spirv_debug_glsl450.cpp
+ spirv_debug_setup.cpp
+ spirv_processor.cpp
+ APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-shadow -Wno-shorten-64-to-32")
+-
+- if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.9)
+- set_property(SOURCE ${glslang_dir}/glslang/MachineIndependent/iomapper.cpp
+- APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-deprecated-copy")
+- endif()
+ endif()
+
+ add_library(rdoc_spirv OBJECT ${sources})
+ target_compile_definitions(rdoc_spirv ${RDOC_DEFINITIONS})
+-target_include_directories(rdoc_spirv ${RDOC_INCLUDES} ${glslang_dir})
++target_include_directories(rdoc_spirv ${RDOC_INCLUDES})
+--- a/renderdoc/driver/shaders/spirv/glslang_compile.cpp
++++ b/renderdoc/driver/shaders/spirv/glslang_compile.cpp
+@@ -29,9 +29,9 @@
+ #undef min
+ #undef max
+
+-#include "glslang/glslang/Include/Types.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.h>
++#include <glslang/Include/Types.h>
++#include <glslang/Public/ShaderLang.h>
+
+ static bool glslang_inited = false;
+ rdcarray<glslang::TShader *> *allocatedShaders = NULL;
+--- a/renderdoc/driver/shaders/spirv/spirv_compile.cpp
++++ b/renderdoc/driver/shaders/spirv/spirv_compile.cpp
+@@ -31,9 +31,9 @@
+ #undef min
+ #undef max
+
+-#include "glslang/SPIRV/GlslangToSpv.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.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)
+--
+2.42.0
+
diff --git a/media-gfx/renderdoc/renderdoc-1.29.ebuild b/media-gfx/renderdoc/renderdoc-1.29.ebuild
new file mode 100644
index 000000000000..6b385183a299
--- /dev/null
+++ b/media-gfx/renderdoc/renderdoc-1.29.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2023 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"
+PYTHON_COMPAT=( python3_{9..11} )
+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.27-env-home.patch
+
+ "${FILESDIR}"/${PN}-1.29-system-glslang.patch
+ "${FILESDIR}"/${PN}-1.29-system-compress.patch
+)
+
+DOCS=( util/LINUX_DIST_README )
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/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
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/
@ 2023-12-03 13:24 Matthew Smith
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Smith @ 2023-12-03 13:24 UTC (permalink / raw
To: gentoo-commits
commit: 5dd18e883c89eaec43c3576c30ff1f7df0aebbbd
Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 3 13:15:27 2023 +0000
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Sun Dec 3 13:17:06 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dd18e88
media-gfx/renderdoc: fix compat w/ glslang-1.3.268-r2
Closes: https://bugs.gentoo.org/917163
Suggested-by: Anna <navi <AT> vlhl.dev>
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
.../files/renderdoc-1.29-r2-system-compress.patch | 144 +++++++++++
.../files/renderdoc-1.29-r2-system-glslang.patch | 268 +++++++++++++++++++++
media-gfx/renderdoc/renderdoc-1.29-r2.ebuild | 202 ++++++++++++++++
3 files changed, 614 insertions(+)
diff --git a/media-gfx/renderdoc/files/renderdoc-1.29-r2-system-compress.patch b/media-gfx/renderdoc/files/renderdoc-1.29-r2-system-compress.patch
new file mode 100644
index 000000000000..8f793562bcc7
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.29-r2-system-compress.patch
@@ -0,0 +1,144 @@
+From 8f16c974fc8ec0b286d803490baa6e00a83615cf Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matt@offtopica.uk>
+Date: Sun, 30 Jan 2022 18:07:51 +0000
+Subject: [PATCH 2/3] build: Use system compression libs
+
+---
+ CMakeLists.txt | 6 +++
+ renderdoc/CMakeLists.txt | 48 +------------------
+ renderdoc/core/replay_proxy.cpp | 2 +-
+ .../driver/shaders/dxbc/dxbc_container.cpp | 2 +-
+ renderdoc/serialise/lz4io.h | 2 +-
+ 5 files changed, 10 insertions(+), 50 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb0a2c7f6..0ee4fc629 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -419,6 +419,12 @@ elseif(UNIX)
+ endif()
+ endif()
+
++find_package(PkgConfig REQUIRED)
++find_package(miniz REQUIRED CONFIG)
++
++pkg_check_modules(lz4 REQUIRED IMPORTED_TARGET liblz4)
++pkg_check_modules(zstd REQUIRED IMPORTED_TARGET libzstd)
++
+ # 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")
+diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
+index 927e95fb9..5908be6de 100644
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -218,56 +218,10 @@ set(sources
+ 3rdparty/pugixml/pugixml.cpp
+ 3rdparty/pugixml/pugixml.hpp
+ 3rdparty/pugixml/pugiconfig.hpp
+- 3rdparty/lz4/lz4.c
+- 3rdparty/lz4/lz4.h
+ 3rdparty/md5/md5.c
+ 3rdparty/md5/md5.h
+- 3rdparty/miniz/miniz.c
+- 3rdparty/miniz/miniz.h
+ 3rdparty/superluminal/superluminal.cpp
+ 3rdparty/superluminal/superluminal.h
+- 3rdparty/zstd/bitstream.h
+- 3rdparty/zstd/compiler.h
+- 3rdparty/zstd/cpu.h
+- 3rdparty/zstd/debug.c
+- 3rdparty/zstd/debug.h
+- 3rdparty/zstd/entropy_common.c
+- 3rdparty/zstd/error_private.c
+- 3rdparty/zstd/error_private.h
+- 3rdparty/zstd/fse.h
+- 3rdparty/zstd/fse_compress.c
+- 3rdparty/zstd/fse_decompress.c
+- 3rdparty/zstd/hist.c
+- 3rdparty/zstd/hist.h
+- 3rdparty/zstd/huf.h
+- 3rdparty/zstd/huf_compress.c
+- 3rdparty/zstd/huf_decompress.c
+- 3rdparty/zstd/mem.h
+- 3rdparty/zstd/pool.c
+- 3rdparty/zstd/pool.h
+- 3rdparty/zstd/threading.c
+- 3rdparty/zstd/threading.h
+- 3rdparty/zstd/xxhash.c
+- 3rdparty/zstd/xxhash.h
+- 3rdparty/zstd/zstd.h
+- 3rdparty/zstd/zstd_common.c
+- 3rdparty/zstd/zstd_compress.c
+- 3rdparty/zstd/zstd_compress_internal.h
+- 3rdparty/zstd/zstd_decompress.c
+- 3rdparty/zstd/zstd_double_fast.c
+- 3rdparty/zstd/zstd_double_fast.h
+- 3rdparty/zstd/zstd_errors.h
+- 3rdparty/zstd/zstd_fast.c
+- 3rdparty/zstd/zstd_fast.h
+- 3rdparty/zstd/zstd_internal.h
+- 3rdparty/zstd/zstd_lazy.c
+- 3rdparty/zstd/zstd_lazy.h
+- 3rdparty/zstd/zstd_ldm.c
+- 3rdparty/zstd/zstd_ldm.h
+- 3rdparty/zstd/zstd_opt.c
+- 3rdparty/zstd/zstd_opt.h
+- 3rdparty/zstd/zstdmt_compress.c
+- 3rdparty/zstd/zstdmt_compress.h
+ 3rdparty/stb/stb_image.h
+ 3rdparty/stb/stb_image_write.h
+ 3rdparty/stb/stb_image_resize.h
+@@ -580,9 +534,9 @@ 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} glslang glslang-default-resource-limits SPIRV)
++target_link_libraries(renderdoc ${RDOC_LIBRARIES} glslang glslang-default-resource-limits miniz::miniz PkgConfig::lz4 PkgConfig::zstd SPIRV)
+ # Newer versions of glslang require C++17 for std::variant
+ set_target_properties(renderdoc PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
+
+ add_dependencies(renderdoc renderdoc_libentry)
+
+diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp
+index dea1e86cf..c9362e797 100644
+--- a/renderdoc/core/replay_proxy.cpp
++++ b/renderdoc/core/replay_proxy.cpp
+@@ -25,7 +25,7 @@
+
+ #include "replay_proxy.h"
+ #include <list>
+-#include "lz4/lz4.h"
++#include <lz4.h>
+ #include "replay/dummy_driver.h"
+ #include "serialise/lz4io.h"
+
+diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
+index ede1fdeb7..0c8fd4dfe 100644
+--- a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
++++ b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp
+@@ -29,7 +29,7 @@
+ #include "common/common.h"
+ #include "core/settings.h"
+ #include "driver/shaders/dxil/dxil_bytecode.h"
+-#include "lz4/lz4.h"
++#include <lz4.h>
+ #include "md5/md5.h"
+ #include "serialise/serialiser.h"
+ #include "strings/string_utils.h"
+diff --git a/renderdoc/serialise/lz4io.h b/renderdoc/serialise/lz4io.h
+index 199fbbbc1..80fdf94f2 100644
+--- a/renderdoc/serialise/lz4io.h
++++ b/renderdoc/serialise/lz4io.h
+@@ -24,7 +24,7 @@
+
+ #pragma once
+
+-#include "lz4/lz4.h"
++#include <lz4.h>
+ #include "streamio.h"
+
+ class LZ4Compressor : public Compressor
+--
+2.35.1
+
diff --git a/media-gfx/renderdoc/files/renderdoc-1.29-r2-system-glslang.patch b/media-gfx/renderdoc/files/renderdoc-1.29-r2-system-glslang.patch
new file mode 100644
index 000000000000..287917feb549
--- /dev/null
+++ b/media-gfx/renderdoc/files/renderdoc-1.29-r2-system-glslang.patch
@@ -0,0 +1,268 @@
+From d889c250f9e500c84f34533398e82aa9e5d5a0ae Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Thu, 2 Nov 2023 18:43:42 +0000
+Subject: [PATCH] system glslang
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -383,7 +383,7 @@
+ endif()
+
+ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+ if(ENABLE_GGP)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gline-tables-only -fno-omit-frame-pointer")
+@@ -469,6 +469,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,
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -604,7 +604,9 @@ 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 glslang-default-resource-limits SPIRV)
++# Newer versions of glslang require C++17 for std::variant
++set_target_properties(renderdoc PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
+
+ add_dependencies(renderdoc renderdoc_libentry)
+
+--- a/renderdoc/data/glsl_shaders.cpp
++++ b/renderdoc/data/glsl_shaders.cpp
+@@ -26,8 +26,8 @@
+ #include "common/common.h"
+ #include "common/formatting.h"
+ #include "driver/shaders/spirv/glslang_compile.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.h>
++#include <glslang/Public/ShaderLang.h>
+ #include "os/os_specific.h"
+
+ #define GLSL_HEADERS(HEADER) \
+--- a/renderdoc/driver/gl/gl_shader_refl.cpp
++++ b/renderdoc/driver/gl/gl_shader_refl.cpp
+@@ -26,8 +26,8 @@
+ #include <algorithm>
+ #include <functional>
+ #include "driver/shaders/spirv/glslang_compile.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.h>
++#include <glslang/Public/ShaderLang.h>
+ #include "gl_driver.h"
+
+ template <>
+--- a/renderdoc/driver/shaders/spirv/CMakeLists.txt
++++ b/renderdoc/driver/shaders/spirv/CMakeLists.txt
+@@ -1,98 +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.ARM.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/NonSemanticDebugPrintf.h
+- ${glslang_dir}/SPIRV/NonSemanticShaderDebugInfo100.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/SpirvIntrinsics.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/SpirvIntrinsics.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/ResourceLimits/ResourceLimits.cpp
+- ${glslang_dir}/glslang/Public/ShaderLang.h
+- ${glslang_dir}/glslang/Public/ResourceLimits.h)
+-
+-if(UNIX)
+- list(APPEND glslang_sources
+- ${glslang_dir}/glslang/OSDependent/Unix/ossource.cpp)
+-endif()
+-
+ set(sources
+ glslang_compile.cpp
+ glslang_compile.h
+@@ -115,38 +20,20 @@ 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)
+
+-set_property(SOURCE ${glslang_sources}
+- PROPERTY COMPILE_FLAGS "-Wno-ignored-qualifiers -Wno-strict-aliasing -Wno-unreachable-code-break")
+-
+-# GCC 7.0 and above needs -Wno-implicit-fallthrough
+-if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.9)
+- set_property(SOURCE ${glslang_sources}
+- APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-implicit-fallthrough")
+-endif()
+-
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set_property(SOURCE ${glslang_sources}
+- APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unknown-warning-option -Wno-shadow -Wno-shorten-64-to-32")
+-
+ set_property(SOURCE
+ spirv_debug.cpp
+ spirv_debug_glsl450.cpp
+ spirv_debug_setup.cpp
+ spirv_processor.cpp
+ APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-shadow -Wno-shorten-64-to-32")
+-
+- if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.9)
+- set_property(SOURCE ${glslang_dir}/glslang/MachineIndependent/iomapper.cpp
+- APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-deprecated-copy")
+- endif()
+ endif()
+
+ add_library(rdoc_spirv OBJECT ${sources})
+ target_compile_definitions(rdoc_spirv ${RDOC_DEFINITIONS})
+-target_include_directories(rdoc_spirv ${RDOC_INCLUDES} ${glslang_dir})
++target_include_directories(rdoc_spirv ${RDOC_INCLUDES})
+--- a/renderdoc/driver/shaders/spirv/glslang_compile.cpp
++++ b/renderdoc/driver/shaders/spirv/glslang_compile.cpp
+@@ -29,9 +29,9 @@
+ #undef min
+ #undef max
+
+-#include "glslang/glslang/Include/Types.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.h>
++#include <glslang/Include/Types.h>
++#include <glslang/Public/ShaderLang.h>
+
+ static bool glslang_inited = false;
+ rdcarray<glslang::TShader *> *allocatedShaders = NULL;
+--- a/renderdoc/driver/shaders/spirv/spirv_compile.cpp
++++ b/renderdoc/driver/shaders/spirv/spirv_compile.cpp
+@@ -31,9 +31,9 @@
+ #undef min
+ #undef max
+
+-#include "glslang/SPIRV/GlslangToSpv.h"
+-#include "glslang/glslang/Public/ResourceLimits.h"
+-#include "glslang/glslang/Public/ShaderLang.h"
++#include <glslang/Public/ResourceLimits.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)
+--- a/qrenderdoc/Code/pyrenderdoc/CMakeLists.txt
++++ b/qrenderdoc/Code/pyrenderdoc/CMakeLists.txt
+@@ -1,11 +1,3 @@
+-# Build as C++14 for the python bindings template-fu
+-if (CMAKE_VERSION VERSION_LESS "3.1")
+- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+-else ()
+- set (CMAKE_CXX_STANDARD 14)
+- set (CMAKE_CXX_STANDARD_REQUIRED ON)
+-endif ()
+-
+ # include paths for qrenderdoc, the internal renderdoc API, and Python
+ set(MODULE_INCLUDES
+ PRIVATE ${CMAKE_SOURCE_DIR}/qrenderdoc
+@@ -82,3 +74,5 @@
+ # Make sure we build after the wrappers are generated
+ add_dependencies(_renderdoc swig-bindings)
+ add_dependencies(_qrenderdoc swig-bindings)
++
++set_target_properties(_renderdoc _qrenderdoc PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)
+--
+2.42.0
+
diff --git a/media-gfx/renderdoc/renderdoc-1.29-r2.ebuild b/media-gfx/renderdoc/renderdoc-1.29-r2.ebuild
new file mode 100644
index 000000000000..1ec49d4c1e88
--- /dev/null
+++ b/media-gfx/renderdoc/renderdoc-1.29-r2.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2023 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"
+PYTHON_COMPAT=( python3_{9..11} )
+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.27-env-home.patch
+
+ "${FILESDIR}"/${PN}-1.29-r2-system-glslang.patch
+ "${FILESDIR}"/${PN}-1.29-r2-system-compress.patch
+)
+
+DOCS=( util/LINUX_DIST_README )
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/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
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-03 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 23:57 [gentoo-commits] repo/gentoo:master commit in: media-gfx/renderdoc/, media-gfx/renderdoc/files/ Nick Sarnie
-- strict thread matches above, loose matches on Subject: below --
2023-12-03 13:24 Matthew Smith
2023-11-02 19:04 Matthew Smith
2022-12-05 20:41 Matthew Smith
2022-07-22 9:31 Matthew Smith
2022-02-21 7:27 Matthew Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox