]> jturnerusa.dev Git - ebuilds/commitdiff
add renderdoc with wayland USE flag
authorJohn Turner <jturner.usa+gentoo@gmail.com>
Sat, 14 Dec 2024 05:18:23 +0000 (00:18 -0500)
committerJohn Turner <jturner.usa+gentoo@gmail.com>
Sat, 14 Dec 2024 05:18:23 +0000 (00:18 -0500)
media-gfx/renderdoc/Manifest [new file with mode: 0644]
media-gfx/renderdoc/files/renderdoc-1.18-analytics-off.patch [new file with mode: 0644]
media-gfx/renderdoc/files/renderdoc-1.18-conditional-pyside.patch [new file with mode: 0644]
media-gfx/renderdoc/files/renderdoc-1.18-system-flags.patch [new file with mode: 0644]
media-gfx/renderdoc/files/renderdoc-1.27-env-home.patch [new file with mode: 0644]
media-gfx/renderdoc/files/renderdoc-1.30-r1-system-compress.patch [new file with mode: 0644]
media-gfx/renderdoc/files/renderdoc-1.31-lld.patch [new file with mode: 0644]
media-gfx/renderdoc/metadata.xml [new file with mode: 0644]
media-gfx/renderdoc/renderdoc-1.30-r2.ebuild [new file with mode: 0644]
media-gfx/renderdoc/renderdoc-1.31.ebuild [new file with mode: 0644]
media-gfx/renderdoc/renderdoc-1.32.ebuild [new file with mode: 0644]

diff --git a/media-gfx/renderdoc/Manifest b/media-gfx/renderdoc/Manifest
new file mode 100644 (file)
index 0000000..acc837a
--- /dev/null
@@ -0,0 +1,17 @@
+AUX renderdoc-1.18-analytics-off.patch 2552 BLAKE2B fbea7a5635acee3ae1f79850d0395ead2ef7e062c098b69458d56da0d41fdd1acbfbcc008317320767360450ac2d4b9eb0b026dad68599fe15cd7f1b0dd6e442 SHA512 1c3d73b0a5972f8fc7d6f9595ac032e3fc1709f2eced84f9f90ef35f543b908c9237f08e2933f10427e7facb609cf74d794aea8ecff72c72094ca53e3d1c1c7c
+AUX renderdoc-1.18-conditional-pyside.patch 2178 BLAKE2B b79e3fc960b83248a6991c0a5071e08e86e58bc9fd96a64f3d5bcdc392ac9104260c2159848d7def25ce3e6ef77d5003d537a469846ad0b859f5c415b012ae4f SHA512 9962aeb29c70711a922e9da5081ea8e73eb4d2acc055fa95298b4f6ac3bf8ce45ac61fa756948bc6e430d73153e28cdeea25437f057f7c6fe744ab9f53311f8b
+AUX renderdoc-1.18-system-flags.patch 845 BLAKE2B 0d4aae31af353b2d199ae66ec999beefa04e2105e6368305bb89359806fa99f4b7048c3d6c30a2787a3125718d3cbd7c97d3381f61f4f98a2e08730b5a22db02 SHA512 bd2692f14729360983f5ca4fb8af87085ab5bd209d82f3cfd99e7753d0dd406905a6280051aa5d1476b863566b385cdc28fbe9120d0d6f5efd78411af15b68ef
+AUX renderdoc-1.27-env-home.patch 438 BLAKE2B a42c86648314382bba7b93ee544fe6d82b4f1ec122c57d7b989475bd442dd7003de8bfd7f467e88693deac6212846103038f48501ffef9eae7d0c38100669eac SHA512 c0b340582de7c23637afa7a95dcd2f3f4c6f28ad9c244c92235e29e428ba40a991cbcac83197a3b52c1c689f4d07ede2fc0c96d4b1b3c67dc94866137a7ce4b7
+AUX renderdoc-1.30-r1-system-compress.patch 4565 BLAKE2B 62ac93b27e7b2fd1962075241cab49acc3971f76b9046a53b0ccdb7707f849aca1c6b4306e07455bdb5e4c9df7f72bba5665a2b3927dfc782722486e2fc152c7 SHA512 7815ea6170583899ee6f48c1aec8a175082208c6b4d1f6c651f3274317c9b9575548f8bb900abc5137309df5448c4643b4fc4e74b367aa18c3dc7dacabba842a
+AUX renderdoc-1.31-lld.patch 604 BLAKE2B 175a2a54e18ae6a8051f54e058aa5b516cc8834a71f09d8a352e253a0b4a38cb3a43275c4cfbd8a7799698dca46553bb6319ce1963175757dbd0b3de0d6b5abb SHA512 f4db95aad6602197afc9fa6de7934638a0fd47903aa4488fc994a53bc67e557cd22450e9253aa047ca70c9af30cdc372c69528b64943878498cf781a1a703e96
+DIST renderdoc-1.30.tar.gz 50938458 BLAKE2B 2e9364a8eabca64384e066709c98be8df0ed3c970c173074f9d38eea21d4dc31a50b862818879ccb9f32be8b839643c2d01ddda70d9da8c338c2fc305549eaa9 SHA512 33437f7420d6a79f2b02536ae63bc31537cfab83cdac2d44efdef377e93db7c0c15f2e46ecc67a6ea780f36b162f04d7a00ac3fe5d382fe761fa986664aceb60
+DIST renderdoc-1.30.tar.gz.asc 833 BLAKE2B c829329806de5cfc672c2cc976596a5c126cd5f24bef189f6832de8f8f3721461e56688823d562e82eae89792c5fc4a500037cc97c2cce2b762b211a951c1d19 SHA512 f68a04aec4e304df0eba3dcba2876f99182fecff82b6b600d621e48c15bce42c07f20aebc811fd36aff5c04f550a51483af2b499051700a2c5bc936311a534de
+DIST renderdoc-1.31.tar.gz 51193992 BLAKE2B a51e2d380b61f462e29b97679b0c2014e26cf108e3d9bc70874fedfbee5a9f391e8693f54c76fae51b9459b70d2197c362b95054a54c5e2e889c8ce85ba74305 SHA512 c119fdd7f27ef4f617b5b5aad94267326f403802648d6ed0970651e48b2467729ce5768ea64c77cab337ff0bdde4c17eaa01028dfebb15568bb4500693cf6d6e
+DIST renderdoc-1.31.tar.gz.asc 833 BLAKE2B 82d360070eea9cf037b3ec7de899c58372e64540d2346cc209edb8cc3c321fd628954fbb1275b27366a2d91dd8604e9ebdd961cfd4dcab0abea1fb3bc793817b SHA512 878dd0a042aa8af97b7ba158fd88776cb2ea3ca662cfc95752d477727686342153db217302d9325f0f6bbd76628eb608820350981bf0d819812e57cea773f499
+DIST renderdoc-1.32.tar.gz 51324019 BLAKE2B 5f138bd1fa5dbf3689def983b996385b8670ad83c9da82b7978fc25c94687aac9f6f2f35b93e6af9c994064698b6931eb7b544f43d8f00ef0fc6836695ef1447 SHA512 2b8efde5d4684b4b66fb4c12bbc0cd15c04dc8df98fb9a93b78e1a36ef17b652b3b50043cb8400bbe6859a4e34c3ab8ba01b1a44ea379569ad7f265399d8afe4
+DIST renderdoc-1.32.tar.gz.asc 833 BLAKE2B f9769e654b03f73073e7a7c99a2148194879fab4a687ae44ed9096af881574b8ea945a8af02a4df019cb44808a1c65714146623aae8f879b396a8e4836bf09a8 SHA512 8c60ec37077fa6ef777585f4b55c15fe51c30ed6f6a852605e53abf982d6111210dccf031a4afba737bd7ce76004a44b7f52c6ed607e7525fe13ab7c03baae30
+DIST swig-renderdoc-7.tar.gz 4006241 BLAKE2B 619f41239f4aef496264d61f44ae042cf80d3ff28491d452cf11ad07e898554c4a32df6119ee0e8e3de36e6bee61855358cd968ad01c9281976e24e9a6cac839 SHA512 5285a65924c069cfb9f73104ad8a95251badac4001293a1757b97ebead5953730c03289159741f82da4c5afe4f61f7c826b105eaf82df044ed2fa21810242c86
+EBUILD renderdoc-1.30-r2.ebuild 5017 BLAKE2B 4c22e5bd875ecbf7627467b86dbaca3a753c0539d432c7a14182c999a5d820e05a0d42321c626d2362a4c550392c5779974b1f39e41acfe34542512cc97d092f SHA512 a77878ca913bcb5c2864060364d2f0d2db2080ffa5e355dfb60a6c0d176ae109ed07103d0212fc9c4c5e364ff74563ee78a663006f0d053b2f90393f9d01eeab
+EBUILD renderdoc-1.31.ebuild 5070 BLAKE2B 9dff8e948cb7b876c782d62631526579a5168fcc5ba94a77c9bb172948385ccd2a2ee10a3b418fda071619a3d7a16b10162105f32a8b6aba9b080b2e253cf2bf SHA512 07a20446e20bc3cfe1425fc2342ffcc1f9835118fce3c08746ee1ffc4a384de6ee1bac989a3e64d54fef7d5e079561e81fc06ad04fc00822fb2ec42dc1eb35a1
+EBUILD renderdoc-1.32.ebuild 5069 BLAKE2B 521920beb5dd50ee7a8443bd3e955adaf8c8483dbe8a7c9e6318d5989cba5123e694fa4f4b5b6b686b0588cb2ffa9e8e9bb635870ee2be52e094112db4381b4c SHA512 778e590fda5e564a4ab03640fe78bcc0644a539f652ab4463f80d1f4676164b185d8ba1eee9cc7f831eb39d7c4eafc7176568e25174bbeb67474d2df29cb6ef6
+MISC metadata.xml 350 BLAKE2B 3f4889e1015daa270d9429d31a152ff03ec814a1c76e7ecf4c11f15aed9e29f50c02b0a4beef722bcb0f1b349e4f5723245f6bd2d26b86095da916de90a4eee0 SHA512 1af993015e1f5e7d030fc03bbe10ec2ee777c7064daa7f1e562834c3024b6700d7207f8202fc8382e785ef3a5c992b559a0804b365d46e967583cac698850e7d
diff --git a/media-gfx/renderdoc/files/renderdoc-1.18-analytics-off.patch b/media-gfx/renderdoc/files/renderdoc-1.18-analytics-off.patch
new file mode 100644 (file)
index 0000000..4fd98c8
--- /dev/null
@@ -0,0 +1,52 @@
+From 03d5a1f515bee326933e163eb3bd300deb4a5753 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matt@offtopica.uk>
+Date: Sun, 6 Feb 2022 09:54:17 +0000
+Subject: [PATCH 3/5] analytics: Default selection to off
+
+---
+ qrenderdoc/Code/Interface/PersistantConfig.h        | 4 ++--
+ qrenderdoc/Windows/Dialogs/AnalyticsPromptDialog.ui | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/qrenderdoc/Code/Interface/PersistantConfig.h b/qrenderdoc/Code/Interface/PersistantConfig.h
+index 5c074d27d..e37ecb3ce 100644
+--- a/qrenderdoc/Code/Interface/PersistantConfig.h
++++ b/qrenderdoc/Code/Interface/PersistantConfig.h
+@@ -588,8 +588,8 @@ DECLARE_REFLECTION_STRUCT(BugReport);
+       "``True`` if the user has selected to completely opt-out from and disable all analytics "    \
+       "collection and reporting.\n"                                                                \
+       "\n"                                                                                         \
+-      "Defaults to ``False``.");                                                                   \
+-  CONFIG_SETTING_VAL(public, bool, bool, Analytics_TotalOptOut, false)                             \
++      "Defaults to ``True``.");                                                                    \
++  CONFIG_SETTING_VAL(public, bool, bool, Analytics_TotalOptOut, true)                              \
+                                                                                                    \
+   DOCUMENT(                                                                                        \
+       "``True`` if the user has remained with analytics turned on, but has chosen to manually "    \
+diff --git a/qrenderdoc/Windows/Dialogs/AnalyticsPromptDialog.ui b/qrenderdoc/Windows/Dialogs/AnalyticsPromptDialog.ui
+index 5ec558161..e43574165 100644
+--- a/qrenderdoc/Windows/Dialogs/AnalyticsPromptDialog.ui
++++ b/qrenderdoc/Windows/Dialogs/AnalyticsPromptDialog.ui
+@@ -38,9 +38,6 @@
+         <property name="text">
+          <string>Gather anonymous low-detail statistics and submit automatically.</string>
+         </property>
+-        <property name="checked">
+-         <bool>true</bool>
+-        </property>
+        </widget>
+       </item>
+       <item>
+@@ -55,6 +52,9 @@
+         <property name="text">
+          <string>Do not gather or submit any statistics.</string>
+         </property>
++        <property name="checked">
++         <bool>true</bool>
++        </property>
+        </widget>
+       </item>
+      </layout>
+-- 
+2.35.1
+
diff --git a/media-gfx/renderdoc/files/renderdoc-1.18-conditional-pyside.patch b/media-gfx/renderdoc/files/renderdoc-1.18-conditional-pyside.patch
new file mode 100644 (file)
index 0000000..f09ff05
--- /dev/null
@@ -0,0 +1,54 @@
+From e6c0ee16967d3aa79f645a5a0aad0d50c20987f4 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matt@offtopica.uk>
+Date: Sun, 20 Feb 2022 09:19:03 +0000
+Subject: [PATCH] build: Only search for PySide2 if required
+
+---
+ qrenderdoc/CMakeLists.txt | 17 +++++++----------
+ 1 file changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt
+index 05ad8ba89..e4470715e 100644
+--- a/qrenderdoc/CMakeLists.txt
++++ b/qrenderdoc/CMakeLists.txt
+@@ -154,9 +154,6 @@ ExternalProject_Add(custom_swig
+     BUILD_COMMAND ${GENERATOR_MAKE} ${GENERATOR_MAKE_PARAMS} > /dev/null 2>&1
+     INSTALL_COMMAND ${GENERATOR_MAKE} install > /dev/null 2>&1)
+-find_package(Shiboken2 QUIET)
+-find_package(PySide2 QUIET)
+-
+ set(PYTHON_LINK "${PYTHON_LIBRARY}")
+ # ensure we link the whole python library so that modules have all the exports they need
+@@ -251,7 +248,13 @@ option(QRENDERDOC_ENABLE_PYSIDE2 "Enable PySide2 if found" ON)
+ if(NOT QRENDERDOC_ENABLE_PYSIDE2)
+     message(STATUS "PySide2 integration disabled")
+-elseif(PySide2_FOUND AND Shiboken2_FOUND AND TARGET Shiboken2::libshiboken AND TARGET PySide2::pyside2)
++    file(APPEND
++         ${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri
++         "DEFINES+=PYSIDE2_ENABLED=0\n")
++else()
++    find_package(Shiboken2 QUIET REQUIRED)
++    find_package(PySide2 QUIET REQUIRED)
++
+     message(STATUS "Building with PySide2 ${PySide2_VERSION} from ${PySide2_DIR}")
+     if(NOT PYTHONLIBS_VERSION_STRING MATCHES "${SHIBOKEN_PYTHON_VERSION_MAJOR}.${SHIBOKEN_PYTHON_VERSION_MINOR}")
+@@ -280,12 +283,6 @@ elseif(PySide2_FOUND AND Shiboken2_FOUND AND TARGET Shiboken2::libshiboken AND T
+          "DEFINES+=PYSIDE2_ENABLED=1\n"
+          "DEFINES+=PYSIDE2_SYS_PATH=${PYSIDE_PYTHONPATH}\n"
+          "LIBS+=-lshiboken2${SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX}\n")
+-else()
+-    message(STATUS "PySide2 not found - Qt will not be accessible in python scripting. See https://github.com/baldurk/renderdoc/wiki/PySide2")
+-
+-    file(APPEND
+-         ${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri
+-         "DEFINES+=PYSIDE2_ENABLED=0\n")
+ endif()
+ # generate the SWIG interface files
+-- 
+2.35.1
+
diff --git a/media-gfx/renderdoc/files/renderdoc-1.18-system-flags.patch b/media-gfx/renderdoc/files/renderdoc-1.18-system-flags.patch
new file mode 100644 (file)
index 0000000..6478187
--- /dev/null
@@ -0,0 +1,26 @@
+From f83fea90e09d368cd3d8e119a2b3a6d7352d6de6 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matt@offtopica.uk>
+Date: Tue, 8 Feb 2022 18:42:02 +0000
+Subject: [PATCH] build: qrenderdoc: Respect CXX and LDFLAGS
+
+---
+ qrenderdoc/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt
+index 486832594..05ad8ba89 100644
+--- a/qrenderdoc/CMakeLists.txt
++++ b/qrenderdoc/CMakeLists.txt
+@@ -177,7 +177,9 @@ file(WRITE
+      "QMAKE_LINK=${CMAKE_CXX_COMPILER}\n"
+      "QMAKE_CXXFLAGS+=${warning_flags}\n"
+      "QMAKE_CXXFLAGS+=${QMAKE_CXXFLAGS}\n"
++     "QMAKE_CXXFLAGS+=${CMAKE_CXX_FLAGS}\n"
+      "QMAKE_LFLAGS+=${QMAKE_LDFLAGS}\n"
++     "QMAKE_LFLAGS+=${CMAKE_EXE_LINKER_FLAGS}\n"
+      "QMAKE_RPATHDIR+=${QMAKE_RPATHDIR}\n"
+      "\n"
+      "LIB_SUFFIX=${LIB_SUFFIX}\n"
+-- 
+2.35.1
+
diff --git a/media-gfx/renderdoc/files/renderdoc-1.27-env-home.patch b/media-gfx/renderdoc/files/renderdoc-1.27-env-home.patch
new file mode 100644 (file)
index 0000000..0951031
--- /dev/null
@@ -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 GetTempRootPath()
+ rdcstr GetAppFolderFilename(const rdcstr &filename)
+ {
+-  passwd *pw = getpwuid(getuid());
+-  rdcstr homedir = pw ? pw->pw_dir : "";
+-
+-  if(homedir.empty())
+-    homedir = Process::GetEnvVariable("HOME");
++  rdcstr homedir = Process::GetEnvVariable("HOME");
+   if(homedir.empty())
+   {
diff --git a/media-gfx/renderdoc/files/renderdoc-1.30-r1-system-compress.patch b/media-gfx/renderdoc/files/renderdoc-1.30-r1-system-compress.patch
new file mode 100644 (file)
index 0000000..5b75439
--- /dev/null
@@ -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
+@@ -473,6 +473,12 @@
+     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)
++
+ add_subdirectory(renderdoc)
+
+ # these variables are handled within the CMakeLists.txt in qrenderdoc,
+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})
++target_link_libraries(renderdoc ${RDOC_LIBRARIES} miniz::miniz PkgConfig::lz4 PkgConfig::zstd)
+ 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.31-lld.patch b/media-gfx/renderdoc/files/renderdoc-1.31-lld.patch
new file mode 100644 (file)
index 0000000..4c19c97
--- /dev/null
@@ -0,0 +1,23 @@
+Remove undefined symbols from version script.
+
+Bug: https://bugs.gentoo.org/925578
+--- a/renderdoc/renderdoc.version
++++ b/renderdoc/renderdoc.version
+@@ -6,17 +6,14 @@
+                 egl[A-Z]*;
+                 vk_icd*;
+                 dlopen;
+-                dlsym;
+                 fork;
+                 execl;
+                 execlp;
+                 execle;
+-                execlpe;
+                 execv;
+                 execvp;
+                 execve;
+                 execvpe;
+-                _exit;
+                 RENDERDOC_*;
+                 VK_LAYER_RENDERDOC_*;
+         local:
diff --git a/media-gfx/renderdoc/metadata.xml b/media-gfx/renderdoc/metadata.xml
new file mode 100644 (file)
index 0000000..4dab889
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <!-- maintainer-needed -->
+  <use>
+    <flag name="qt5">
+       Build and install the qrenderdoc GUI
+    </flag>
+  </use>
+  <upstream>
+    <remote-id type="github">baldurk/renderdoc</remote-id>
+  </upstream>
+</pkgmetadata>
diff --git a/media-gfx/renderdoc/renderdoc-1.30-r2.ebuild b/media-gfx/renderdoc/renderdoc-1.30-r2.ebuild
new file mode 100644 (file)
index 0000000..474d3ab
--- /dev/null
@@ -0,0 +1,188 @@
+# Copyright 1999-2024 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..12} )
+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
+#   + glslang: BSD
+#   + 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="qt5"
+REQUIRED_USE="doc? ( qt5 ) qt5? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+       app-arch/lz4:=
+       app-arch/zstd:=
+       dev-libs/miniz:=
+       x11-libs/libX11
+       x11-libs/libxcb:=
+       x11-libs/xcb-util-keysyms
+       virtual/opengl
+       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
+               app-alternatives/yacc
+       )
+       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.30-r1-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
+
+       # 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_UNSUPPORTED_EXPERIMENTAL_POSSIBLY_BROKEN_WAYLAND=OFF
+
+               -DENABLE_XCB=ON
+               -DENABLE_XLIB=ON
+
+               # 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
+
+               # Bug #926549
+               -DQRENDERDOC_ENABLE_PYSIDE2=OFF
+       )
+
+       # 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
+}
diff --git a/media-gfx/renderdoc/renderdoc-1.31.ebuild b/media-gfx/renderdoc/renderdoc-1.31.ebuild
new file mode 100644 (file)
index 0000000..c8d27b4
--- /dev/null
@@ -0,0 +1,191 @@
+# Copyright 1999-2024 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..12} )
+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
+#   + glslang: BSD
+#   + 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="qt5"
+REQUIRED_USE="doc? ( qt5 ) qt5? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+       app-arch/lz4:=
+       app-arch/zstd:=
+       dev-libs/miniz:=
+       x11-libs/libX11
+       x11-libs/libxcb:=
+       x11-libs/xcb-util-keysyms
+       virtual/opengl
+       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
+               app-alternatives/yacc
+       )
+       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.30-r1-system-compress.patch
+
+       # Bug #925578
+       "${FILESDIR}"/${PN}-1.31-lld.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
+
+       # 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_UNSUPPORTED_EXPERIMENTAL_POSSIBLY_BROKEN_WAYLAND=OFF
+
+               -DENABLE_XCB=ON
+               -DENABLE_XLIB=ON
+
+               # 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
+
+               # Bug #926549
+               -DQRENDERDOC_ENABLE_PYSIDE2=OFF
+       )
+
+       # 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
+}
diff --git a/media-gfx/renderdoc/renderdoc-1.32.ebuild b/media-gfx/renderdoc/renderdoc-1.32.ebuild
new file mode 100644 (file)
index 0000000..c9be0ea
--- /dev/null
@@ -0,0 +1,191 @@
+# Copyright 1999-2024 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..12} )
+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
+#   + glslang: BSD
+#   + 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="qt5 wayland"
+REQUIRED_USE="doc? ( qt5 ) qt5? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+       app-arch/lz4:=
+       app-arch/zstd:=
+       dev-libs/miniz:=
+       x11-libs/libX11
+       x11-libs/libxcb:=
+       x11-libs/xcb-util-keysyms
+       virtual/opengl
+       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
+               app-alternatives/yacc
+       )
+       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.30-r1-system-compress.patch
+
+       # Bug #925578
+       "${FILESDIR}"/${PN}-1.31-lld.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
+
+       # 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_UNSUPPORTED_EXPERIMENTAL_POSSIBLY_BROKEN_WAYLAND=$(usex wayland)
+
+               -DENABLE_XCB=ON
+               -DENABLE_XLIB=ON
+
+               # 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
+
+               # Bug #926549
+               -DQRENDERDOC_ENABLE_PYSIDE2=OFF
+       )
+
+       # 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
+}