From: dan <i@dan.games>
To: 66035@debbugs.gnu.org
Subject: [bug#66035] [PATCH] gnu: Add renderdoc.
Date: Sun, 17 Sep 2023 00:01:08 +0800 [thread overview]
Message-ID: <20230916160108.31783-1-i@dan.games> (raw)
* gnu/packages/graphics.scm (renderdoc): New variable.
---
gnu/packages/graphics.scm | 90 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 89 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 9362666274..002d93f75b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -32,7 +32,7 @@
;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
-;;; Copyright © 2022 dan <i@dan.games>
+;;; Copyright © 2022, 2023 dan <i@dan.games>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2023 Eric Bavier <bavier@posteo.net>
@@ -101,6 +101,7 @@ (define-module (gnu packages graphics)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ninja)
#:use-module (gnu packages pciutils)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
@@ -2851,3 +2852,90 @@ (define-public gpaint
It features cut-and-paste for irregular regions or polygons.")
(home-page "https://www.gnu.org/software/gpaint/")
(license license:gpl3+)))
+
+(define %swig-for-renderdoc-version
+ "renderdoc-modified-7")
+
+(define swig-for-renderdoc
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/baldurk/swig/archive/refs/tags/"
+ %swig-for-renderdoc-version ".tar.gz"))
+ (sha256 (base32
+ "19sb4vik8kgy9pxjfam8qc8i52iraj2971p1hrzh850fvl0nibg7"))))
+
+(define-public renderdoc
+ (package
+ (name "renderdoc")
+ (version "1.28")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/baldurk/renderdoc.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1rny39s1b48bgv8x2871ylkzk1f9llvrskb809c6gcawnfazzivb"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:tests? #f
+ #:configure-flags #~(list (string-append "-DVULKAN_LAYER_FOLDER="
+ #$output
+ "/share/vulkan/implicit_layer.d"))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'unpack-additional-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((sh (search-input-file inputs "/bin/sh")))
+ (invoke "tar" "xvf"
+ #$swig-for-renderdoc)
+ (rename-file (string-append "swig-"
+ #$%swig-for-renderdoc-version)
+ "swig")
+ (substitute* "qrenderdoc/CMakeLists.txt"
+ (("URL \\$\\{RENDERDOC_SWIG_PACKAGE\\}")
+ "SOURCE_DIR ${CMAKE_SOURCE_DIR}/swig")
+ (("CONFIGURE_COMMAND\\s.*")
+ "CONFIGURE_COMMAND \"\"\n")
+ (("^\\s+COMMAND CC.*")
+ ""))
+ (substitute* "swig/Makefile.in"
+ (("/bin/sh")
+ sh))
+ (chdir "swig")
+ (invoke sh "autogen.sh")
+ (chdir ".."))))
+ (add-after 'configure 'configure-swig
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((build-dir (getcwd))
+ (sh (search-input-file inputs "/bin/sh")))
+ (chdir "../source/swig")
+ (apply invoke sh "./configure"
+ (list "CC=gcc"
+ "CXX=g++"
+ "CFLAGS=-fPIC"
+ "CXXFLAGS=-fPIC"
+ (string-append "SHELL=" sh)
+ "--with-pcre=yes"
+ (string-append "--prefix="
+ build-dir)))
+ (chdir "../../build")))))))
+ (inputs (list libx11
+ libxcb
+ xcb-util-keysyms
+ mesa
+ qtbase-5
+ qtsvg-5
+ qtx11extras))
+ (native-inputs (list autoconf
+ automake
+ bison
+ (list pcre "bin")
+ pkg-config
+ python))
+ (home-page "https://renderdoc.org")
+ (synopsis "Graphics debugging tool")
+ (description
+ "RenderDoc is a frame-capture based graphics debugger, currently
+available for Vulkan, D3D11, D3D12, OpenGL, and OpenGL ES development on
+Windows, Linux, Android, and Nintendo Switch™.")
+ (license license:expat)))
base-commit: 04fad62acdcffa50c18528ce71f015907b9eb558
--
2.41.0
reply other threads:[~2023-09-16 16:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230916160108.31783-1-i@dan.games \
--to=i@dan.games \
--cc=66035@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).