Commit: 98f7ed1cb7905428f5498e2280cd0d9780c1e197 Parent: 373a2922e59afaee0c51e5d918cd520f52429f7a Author: Randy Palamar Date: Tue, 31 Dec 2024 23:43:40 -0700 add media-gfx/renderdoc for arm64 keyword and 1.36 Diffstat:
A | media-gfx/renderdoc/Manifest | | | 3 | +++ |
A | media-gfx/renderdoc/files/renderdoc-1.18-analytics-off.patch | | | 52 | ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | media-gfx/renderdoc/files/renderdoc-1.18-conditional-pyside.patch | | | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | media-gfx/renderdoc/files/renderdoc-1.18-system-flags.patch | | | 26 | ++++++++++++++++++++++++++ |
A | media-gfx/renderdoc/files/renderdoc-1.27-env-home.patch | | | 15 | +++++++++++++++ |
A | media-gfx/renderdoc/files/renderdoc-1.30-r1-system-compress.patch | | | 142 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | media-gfx/renderdoc/files/renderdoc-1.31-lld.patch | | | 23 | +++++++++++++++++++++++ |
A | media-gfx/renderdoc/metadata.xml | | | 13 | +++++++++++++ |
A | media-gfx/renderdoc/renderdoc-1.36.ebuild | | | 191 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
9 files changed, 519 insertions(+), 0 deletions(-)
diff --git a/media-gfx/renderdoc/Manifest b/media-gfx/renderdoc/Manifest @@ -0,0 +1,3 @@ +DIST renderdoc-1.36.tar.gz 51867409 BLAKE2B b1e8f0b1991f9ec131e88967725354fa63fbb2b13a06908af9c16c332570290433e43b146b352088fedc40326f2886399ea288bcb8eb0c709dc05b6717d72c49 SHA512 b908b97f9b2c59f762f8a909ac3c0e76d8acffb569dc43ce0899407984ce94999b43351f11101e49ef1f1e2365da2e86641b95b0b9774bdf6c6ea7e502551324 +DIST renderdoc-1.36.tar.gz.asc 833 BLAKE2B af97dd33aab87325172ab88a1161456a070a72d1a8e286d9dece7292248a74eb5b8b8da6052ebc4b5a98bad62f697e0fac2c69d9a3173bc942ebde2dc22649a5 SHA512 d325cdef3c85ed839b68f896cd327811e5eb58958daaee674b78614530a8f896eb471386beb2ea4e143d39bf511e7df07a548978dbd32b9ca85e4d2d36a9548d +DIST swig-renderdoc-7.tar.gz 4006241 BLAKE2B 619f41239f4aef496264d61f44ae042cf80d3ff28491d452cf11ad07e898554c4a32df6119ee0e8e3de36e6bee61855358cd968ad01c9281976e24e9a6cac839 SHA512 5285a65924c069cfb9f73104ad8a95251badac4001293a1757b97ebead5953730c03289159741f82da4c5afe4f61f7c826b105eaf82df044ed2fa21810242c86 diff --git a/media-gfx/renderdoc/files/renderdoc-1.18-analytics-off.patch b/media-gfx/renderdoc/files/renderdoc-1.18-analytics-off.patch @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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.36.ebuild b/media-gfx/renderdoc/renderdoc-1.36.ebuild @@ -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 arm64" +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 +}