Commit 96012549 authored by Simon Zeni's avatar Simon Zeni
Browse files

testing/renderdoc: new aport

https://renderdoc.org/
Stand-alone graphics debugging tool for Vulkan and OpenGL
parent eeef6c97
Pipeline #96535 passed with stages
in 44 minutes and 19 seconds
# Contributor:
# Maintainer:
pkgname=renderdoc
pkgver=1.16
pkgrel=0
pkgdesc="Stand-alone graphics debugging tool for Vulkan and OpenGL"
url="https://renderdoc.org/"
arch="all !s390x !ppc64le"
license="MIT"
depends="libx11 libxcb xcb-util-keysyms python3 qt5-qtbase qt5-qtsvg libexecinfo
wayland-libs-client qt5-qtx11extras"
makedepends="cmake libx11-dev libxcb-dev xcb-util-keysyms-dev python3-dev
qt5-qtbase-dev qt5-qtsvg-dev qtchooser libexecinfo-dev wayland-dev
bison flex automake autoconf qt5-qtx11extras-dev"
options="!check" # no tests
source="$pkgname-$pkgver.tar.gz::https://github.com/baldurk/renderdoc/archive/refs/tags/v$pkgver.tar.gz
musl-fix.patch
"
prepare() {
default_prepare
}
build() {
cmake -B build -H. \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DENABLE_WAYLAND=ON
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
05338b9a7ebc159d94f6164449fc8fe3f659119552fb665b71a32a9aec2b6b0b31705fd39178bb44a0e721a7dbc5425b6abf4822471ae5802f734031003443ad renderdoc-1.16.tar.gz
99828b704eff63d5a71143e867bbceca11606bf7f0677a30115b1432fcde0c121f1090824ac2f727e143e474b8c5ca472ba05e377e658651d723f90fd9e99e0a musl-fix.patch
"
diff --git a/renderdoc/3rdparty/plthook/plthook_elf.c b/renderdoc/3rdparty/plthook/plthook_elf.c
index 612f689d6..907e7f63e 100644
--- a/renderdoc/3rdparty/plthook/plthook_elf.c
+++ b/renderdoc/3rdparty/plthook/plthook_elf.c
@@ -233,7 +233,11 @@ int plthook_open_by_address(plthook_t **plthook_out, void *address)
struct link_map *lmap = NULL;
*plthook_out = NULL;
+#ifdef __GLIBC__
if (dladdr1(address, &info, (void**)&lmap, RTLD_DL_LINKMAP) == 0) {
+#else
+ if (dladdr(address, &info) == 0) {
+#endif
set_errmsg("dladdr error");
return PLTHOOK_FILE_NOT_FOUND;
}
@@ -243,7 +247,7 @@ int plthook_open_by_address(plthook_t **plthook_out, void *address)
static int plthook_open_executable(plthook_t **plthook_out)
{
-#if defined __linux__
+#if defined __linux__ && defined __GLIBC__
return plthook_open_real(plthook_out, _r_debug.r_map);
#elif defined __sun
const char *auxv_file = "/proc/self/auxv";
diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
index 9174afb2a..9bb6e1d1d 100644
--- a/renderdoc/CMakeLists.txt
+++ b/renderdoc/CMakeLists.txt
@@ -48,12 +48,16 @@ elseif(ENABLE_GGP)
elseif(UNIX)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
+ find_package(Backtrace REQUIRED)
list(APPEND RDOC_LIBRARIES
PRIVATE -lm
PRIVATE -ldl
PRIVATE -lrt)
+ list(APPEND RDOC_LIBRARIES
+ PRIVATE ${Backtrace_LIBRARIES})
+
if(ENABLE_XLIB)
find_package(X11 REQUIRED)
diff --git a/renderdoc/os/os_specific.h b/renderdoc/os/os_specific.h
index cc9a6b09e..844597450 100644
--- a/renderdoc/os/os_specific.h
+++ b/renderdoc/os/os_specific.h
@@ -31,6 +31,7 @@
#pragma once
+#include <time.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
diff --git a/renderdoc/os/posix/linux/linux_hook.cpp b/renderdoc/os/posix/linux/linux_hook.cpp
index 4989e2865..0acb3ac0b 100644
--- a/renderdoc/os/posix/linux/linux_hook.cpp
+++ b/renderdoc/os/posix/linux/linux_hook.cpp
@@ -36,6 +36,10 @@
#include "plthook/plthook.h"
#include "strings/string_utils.h"
+#ifndef __GLIBC__
+#define RTLD_DEEPBIND 0
+#endif
+
Threading::CriticalSection libLock;
RDOC_EXTERN_CONFIG(bool, Linux_Debug_PtraceLogging);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment