summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD6
-rwxr-xr-xget-runtime-deps.sh91
4 files changed, 97 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 883f45b41bde..26e91798921e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,14 @@
pkgbase = renderdoc
pkgdesc = OpenGL and Vulkan debugging tool
pkgver = 1.27
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/baldurk/renderdoc
arch = x86_64
license = MIT
makedepends = cmake
- makedepends = python
- depends = libx11
- depends = libxcb
- depends = mesa
- depends = libgl
- depends = qt5-base
+ depends = python-shiboken2
depends = qt5-svg
depends = qt5-x11extras
- depends = xcb-util-keysyms
- depends = pcre
source = https://github.com/baldurk/renderdoc/archive/v1.27.tar.gz
source = https://github.com/baldurk/renderdoc/releases/download/v1.27/v1.27.tar.gz.asc
validpgpkeys = 1B039DB9A4718A2D699DE031AC612C3120C34695
diff --git a/.gitignore b/.gitignore
index 6ef4fec311bb..b064e0b31369 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/*\.tar\.gz
/*\.asc
/renderdoc*\.log
+.vscode/
diff --git a/PKGBUILD b/PKGBUILD
index b2644f9c8c79..6507e562be8b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
pkgname=renderdoc
pkgver=1.27
-pkgrel=1
+pkgrel=2
pkgdesc="OpenGL and Vulkan debugging tool"
arch=(x86_64)
url="https://github.com/baldurk/renderdoc"
license=("MIT")
-makedepends=("cmake" "python")
-depends=("libx11" "libxcb" "mesa" "libgl" "qt5-base" "qt5-svg" "qt5-x11extras" "xcb-util-keysyms" "pcre")
+makedepends=("cmake")
+depends=("python-shiboken2" "qt5-svg" "qt5-x11extras")
source=("https://github.com/baldurk/renderdoc/archive/v${pkgver}.tar.gz"
"https://github.com/baldurk/renderdoc/releases/download/v${pkgver}/v${pkgver}.tar.gz.asc")
validpgpkeys=('1B039DB9A4718A2D699DE031AC612C3120C34695')
diff --git a/get-runtime-deps.sh b/get-runtime-deps.sh
new file mode 100755
index 000000000000..4210de59b6da
--- /dev/null
+++ b/get-runtime-deps.sh
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Define ldd input and blacklist as constants
+ldd_input="/usr/lib/librenderdoc.so /usr/bin/qrenderdoc /usr/bin/renderdoccmd"
+ldd_blacklist="renderdoc"
+
+# Function for verbose output
+verbose_output() {
+ if $verbose; then
+ if $single_line; then
+ echo -n "$1: "
+ echo "$2" | awk '{ printf "%s ", $0 }'
+ else
+ echo "$1:"
+ echo "$2" | awk '{printf "\t%s\n", $0}'
+ fi
+ fi
+}
+
+# Defaults
+single_line=false
+verbose=false
+
+usage() {
+ echo "Usage: $0 [-s|--single-line] [-v|--verbose] [-h|--help]"
+ echo ""
+ echo "Options:"
+ echo " -s, --single-line Print output on a single line"
+ echo " -v, --verbose Print intermediate values for debugging"
+ echo " -h, --help Show help message"
+ exit $1
+}
+
+# Parse command line arguments
+while (( "$#" )); do
+ case "$1" in
+ -s|--single-line)
+ single_line=true
+ shift 1
+ ;;
+ -v|--verbose)
+ verbose=true
+ shift 1
+ ;;
+ -h|--help)
+ usage 0
+ ;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo "Error: Unsupported flag $1" >&2
+ usage 1
+ ;;
+ esac
+done
+
+# Fetch library paths used by the given programs, excluding those in the blacklist
+lib_paths=$(ldd $ldd_input | awk '{ print $3 }' | grep '/' | grep -v $ldd_blacklist | sort -u)
+verbose_output "lib_paths" "$lib_paths"
+
+# Fetch the packages owning these libraries
+packages=$(pacman -Qo $lib_paths | awk '{print $5}' | sort -u)
+#packages=$(pacman -Qo /usr/bin/ls /usr/lib/python3.11/site-packages/shiboken2/ /usr/bin/python | awk '{print $5}' | sort -u)
+verbose_output "packages" "$packages"
+
+# loop over each package
+redundant_packages=()
+for package in $packages; do
+ dependent_packages=$(pactree -rl $package | tail -n +2)
+ for p in $packages; do
+ if echo "$dependent_packages" | grep -q "^$p\$"; then
+ redundant_packages+=("$package")
+ fi
+ done
+done
+redundant_packages=$(printf "%s\n" "${redundant_packages[@]}" | sort -u)
+verbose_output "redundant_packages" "$redundant_packages"
+
+# Compute the set difference
+top_level_packages=$(printf "$packages\n$redundant_packages\n$redundant_packages\n" | sort | uniq -u)
+verbose_output "top_level_packages" "$top_level_packages"
+
+# Print the top-level packages based on selected format
+if $single_line; then
+ echo "${top_level_packages[*]}" | awk '{ printf "%s ", $0 }'
+ echo
+else
+ printf "%s\n" "${top_level_packages[@]}"
+fi