diff options
author | Hunter Sezen <orbea@riseup.net> | 2020-09-04 17:18:23 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-09-05 08:26:47 +0700 |
commit | d66b56ce989b0558a00fee7c5259cca9ac1b71f4 (patch) | |
tree | 17123c17c14b86b87a747bf2f55732b219865390 /graphics | |
parent | f3bb5bf2cc4a48428a8cac4ddbe77166e891c597 (diff) |
graphics/renderdoc: Added (Stand-alone graphics debugging tool)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/renderdoc/README | 6 | ||||
-rw-r--r-- | graphics/renderdoc/doinst.sh | 13 | ||||
-rw-r--r-- | graphics/renderdoc/renderdoc.SlackBuild | 108 | ||||
-rw-r--r-- | graphics/renderdoc/renderdoc.info | 12 | ||||
-rw-r--r-- | graphics/renderdoc/slack-desc | 19 |
5 files changed, 158 insertions, 0 deletions
diff --git a/graphics/renderdoc/README b/graphics/renderdoc/README new file mode 100644 index 000000000000..1319c62737d9 --- /dev/null +++ b/graphics/renderdoc/README @@ -0,0 +1,6 @@ +RenderDoc is a free MIT licensed stand-alone graphics debugger that +allows quick and easy single-frame capture and detailed introspection of +any application using Vulkan, D3D11, OpenGL & OpenGL ES or D3D12. + +qt5 and python3 are optional dependencies required to build the +qrenderdoc GUI. diff --git a/graphics/renderdoc/doinst.sh b/graphics/renderdoc/doinst.sh new file mode 100644 index 000000000000..aea0f894eb32 --- /dev/null +++ b/graphics/renderdoc/doinst.sh @@ -0,0 +1,13 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/graphics/renderdoc/renderdoc.SlackBuild b/graphics/renderdoc/renderdoc.SlackBuild new file mode 100644 index 000000000000..ddbb95dce1a0 --- /dev/null +++ b/graphics/renderdoc/renderdoc.SlackBuild @@ -0,0 +1,108 @@ +#!/bin/sh + +# Slackware build script for renderdoc + +# Copyright 2020 Hunter Sezen California, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=renderdoc +VERSION=${VERSION:-1.9} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + # https://github.com/baldurk/renderdoc/issues/1991#issuecomment-670518428 + printf %s\\n 'Only x86_64 is supported for linux.' >&2 + exit 1 +fi + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +if pkg-config --exists python3 && pkg-config --exists Qt5Core; then + GUI=ON +else + GUI=OFF +fi + +grep -rl "share/doc/$PRGNAM" | + xargs sed -i "s|share/doc/$PRGNAM|doc/$PRGNAM-$VERSION|" + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DQMAKE_QT5_COMMAND=qmake-qt5 \ + -DLIB_SUBFOLDER=$PRGNAM \ + -DVULKAN_LAYER_FOLDER=/usr/share/vulkan/implicit_layer.d \ + -DRENDERDOC_SWIG_PACKAGE="$CWD/swig-$PRGNAM-modified-7.tar.gz" \ + -DENABLE_PYRENDERDOC=$GUI \ + -DENABLE_QRENDERDOC=$GUI \ + -DBUILD_VERSION_STABLE=ON \ + -DBUILD_VERSION_DIST_NAME=slackware \ + -DBUILD_VERSION_DIST_CONTACT='https://lists.slackbuilds.org/' \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | + grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/graphics/renderdoc/renderdoc.info b/graphics/renderdoc/renderdoc.info new file mode 100644 index 000000000000..96ccc424b303 --- /dev/null +++ b/graphics/renderdoc/renderdoc.info @@ -0,0 +1,12 @@ +PRGNAM="renderdoc" +VERSION="1.9" +HOMEPAGE="https://renderdoc.org/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/baldurk/renderdoc/archive/v1.9/renderdoc-1.9.tar.gz \ + https://github.com/baldurk/swig/archive/renderdoc-modified-7/swig-renderdoc-modified-7.tar.gz" +MD5SUM_x86_64="a62fbc8de023d83d96d87bc5f698dee0 \ + 5558ee4e2fcf33b8dceb191ed4795a23" +REQUIRES="" +MAINTAINER="Hunter Sezen" +EMAIL="orbea@riseup.net" diff --git a/graphics/renderdoc/slack-desc b/graphics/renderdoc/slack-desc new file mode 100644 index 000000000000..4cd1395fbf70 --- /dev/null +++ b/graphics/renderdoc/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +renderdoc: renderdoc (Stand-alone graphics debugging tool) +renderdoc: +renderdoc: RenderDoc is a frame-capture based graphics debugger, currently +renderdoc: available for Vulkan, D3D11, D3D12, OpenGL, and OpenGL ES +renderdoc: development. +renderdoc: +renderdoc: Homepage: https://renderdoc.org/ +renderdoc: +renderdoc: +renderdoc: +renderdoc: |