diff options
-rw-r--r-- | media-gfx/renderdoc/Manifest | 3 | ||||
-rw-r--r-- | media-gfx/renderdoc/metadata.xml | 40 | ||||
-rw-r--r-- | media-gfx/renderdoc/renderdoc-1.25.ebuild | 234 |
3 files changed, 200 insertions, 77 deletions
diff --git a/media-gfx/renderdoc/Manifest b/media-gfx/renderdoc/Manifest index 554a2a9..bff3d61 100644 --- a/media-gfx/renderdoc/Manifest +++ b/media-gfx/renderdoc/Manifest @@ -1,2 +1,3 @@ DIST renderdoc-1.25.tar.gz 47285123 BLAKE2B f279d2ebad384556a399a4f50ad2f11e9863b82978640ef1a69713fb00286ded21f561bcff2904d902c1044c25990d75166a17a11c2601256cace517b875ec09 SHA512 0f7a672c4b44276c157b3d09b3bc487be0ab214cb62452fecf284fc5d3a075df1bb13ce801f47d16ebcbbe23ca1fe4e47238e7bd64544356d8c7ac1e4398968a -DIST renderdoc_swig_modified-7.tar.gz 6015823 BLAKE2B 136b0b48d5bddb2dfe6fffd54220a5b62bb9a725b800f1f7846d03469f0c859d0585a61118f64b2def81ad94ff650bdf82d1db7aeb7608a190792ce8033597dc SHA512 78e66e7da0a6632a0f1e6ca0b38b7331fac8921b0d82d42ec21b281f19ff1c9b1ea182c80c52585dceef2e7444777340eedcbda80ac05563da8b892b446f9596 +DIST renderdoc-1.25.tar.gz.asc 833 BLAKE2B 8c6750b15bdb9871ce1fe6b126d5239aaef2aad34da5fed98483c9f0051547519e3a8f52a8630a1c2a5db6ecb993ab147ccb36cb7a38086ad02087ef16b087b8 SHA512 52f77ebf6d61eb5d7bf9568da5310323b2f18d3a87c6862b08e1b63c271a78e0ab8d555fca1ef1feb336f9a85f60c8cfb255619b3d16e257096859b52a7a070c +DIST swig-renderdoc-7.tar.gz 4006241 BLAKE2B 619f41239f4aef496264d61f44ae042cf80d3ff28491d452cf11ad07e898554c4a32df6119ee0e8e3de36e6bee61855358cd968ad01c9281976e24e9a6cac839 SHA512 5285a65924c069cfb9f73104ad8a95251badac4001293a1757b97ebead5953730c03289159741f82da4c5afe4f61f7c826b105eaf82df044ed2fa21810242c86 diff --git a/media-gfx/renderdoc/metadata.xml b/media-gfx/renderdoc/metadata.xml index 3ee148e..81616f8 100644 --- a/media-gfx/renderdoc/metadata.xml +++ b/media-gfx/renderdoc/metadata.xml @@ -1,27 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>peterasplund@gentoo.se</email> - <name>AzP</name> - <description>Maintainer. Assign bugs to him.</description> - </maintainer> - <maintainer type="project"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> - </maintainer> - <use> - <flag name="qt5">Build Qt5 based GUI</flag> - <flag name="python">Build with python support</flag> - <flag name="egl">Build with python support</flag> - <flag name="opengl">Build with python support</flag> - <flag name="gles2">Build with python support</flag> - <flag name="vulkan">Build with python support</flag> - <flag name="wayland">Build with python support</flag> - <flag name="xcb">Build with python support</flag> - <flag name="doc">Build with python support</flag> - </use> - <upstream> - <remote-id type="github">baldurk/renderdoc</remote-id> - </upstream> + <maintainer type="person"> + <email>matthew@gentoo.org</email> + <name>Matthew Smith</name> + </maintainer> + <use> + <flag name="pyside2"> + Expose the QRenderdoc UI to Python scripting to allow for customisation + </flag> + <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.25.ebuild b/media-gfx/renderdoc/renderdoc-1.25.ebuild index 72f5010..f524df4 100644 --- a/media-gfx/renderdoc/renderdoc-1.25.ebuild +++ b/media-gfx/renderdoc/renderdoc-1.25.ebuild @@ -1,73 +1,203 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" -PYTHON_COMPAT=( python3_{9,10,11} ) -inherit xdg-utils cmake python-single-r1 - -SWIG_VERSION="7" -SWIG_ZIP_FILENAME="${PN}_swig_modified-${SWIG_VERSION}.tar.gz" -DESCRIPTION="A tool for tracing, analyzing, and debugging graphics APIs" -HOMEPAGE="https://github.com/baldurk/renderdoc" -SRC_URI="https://github.com/baldurk/renderdoc/archive/v${PV}.tar.gz -> ${P}.tar.gz - qt5? ( https://github.com/baldurk/swig/archive/renderdoc-modified-${SWIG_VERSION}.tar.gz -> ${SWIG_ZIP_FILENAME} )" -CMAKE_BUILD_TYPE="Release" -CMAKE_BUILD_GENERATOR="Ninja" - -LICENSE="MIT" +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..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 ~arm ~x86" -IUSE="+qt5 +python +egl +opengl +gles2 +vulkan +doc wayland +xcb" +KEYWORDS="amd64" +IUSE="pyside2 qt5" +REQUIRED_USE="doc? ( qt5 ) pyside2? ( qt5 ) qt5? ( ${PYTHON_REQUIRED_USE} )" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RDEPEND="${PYTHON_DEPS} - dev-libs/libpcre +RDEPEND=" + app-arch/lz4:= + app-arch/zstd:= + dev-libs/miniz:= + >=dev-util/glslang-1.3.231:= x11-libs/libX11 - xcb? ( - x11-libs/libxcb - x11-libs/xcb-util-keysyms + x11-libs/libxcb:= + x11-libs/xcb-util-keysyms + virtual/opengl + pyside2? ( + $(python_gen_cond_dep ' + dev-python/pyside2[${PYTHON_USEDEP}] + ') ) - python? ( + 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? ( - >=dev-qt/qtcore-5.6:5 - >=dev-qt/qtgui-5.6:5 - >=dev-qt/qtwidgets-5.6:5 - >=dev-qt/qtsvg-5.6:5 - >=dev-qt/qtx11extras-5.6:5 - )" -DEPEND="${RDEPEND} - >=sys-devel/gcc-6.0:* - dev-util/cmake - dev-util/ninja - sys-devel/bison - app-arch/unzip" + ${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=( - -DENABLE_EGL="$(usex egl)" - -DENABLE_GL="$(usex opengl)" - -DENABLE_GLES="$(usex gles2)" - -DENABLE_RENDERDOCCMD="$(usex doc)" - -DENABLE_VULKAN="$(usex vulkan)" - -DENABLE_WAYLAND="$(usex wayland)" - -DENABLE_XCB="$(usex xcb)" + # 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 - -DQMAKE_QT5_COMMAND="qmake5" - -DRENDERDOC_SWIG_PACKAGE="${DISTDIR}/${SWIG_ZIP_FILENAME}" + + -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 } -pkg_postinst() { - xdg_desktop_database_update - xdg_icon_cache_update - xdg_mimeinfo_database_update +src_compile() { + cmake_src_compile + docs_compile } -pkg_postrm() { - xdg_desktop_database_update - xdg_icon_cache_update - xdg_mimeinfo_database_update +pkg_postinst() { + xdg_pkg_postinst + optfeature "android remote contexts" dev-util/android-tools + optfeature "vulkan contexts" media-libs/vulkan-loader } |