Skip to content

Instantly share code, notes, and snippets.

@niobium93
Created February 1, 2022 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niobium93/91662c6071db984327838fd7d7a136ec to your computer and use it in GitHub Desktop.
Save niobium93/91662c6071db984327838fd7d7a136ec to your computer and use it in GitHub Desktop.
Improved gfxreconstruct-git PKGBUILD
_pkgname=gfxreconstruct
pkgname=$_pkgname-git
pkgver=v0.9.10.r35.g0608868
pkgrel=1
pkgdesc="Graphics API Capture and Replay Tools for Reconstructing Graphics Application Behavior"
arch=('x86_64')
url="https://github.com/LunarG/gfxreconstruct"
license=('Apache')
depends=("python" "libx11" "libxcb" "xcb-util-keysyms" "wayland" "libxrandr" "zlib" "lz4" "lib32-lz4" "zstd")
makedepends=("git" "cmake>=3.4")
provides=($_pkgname)
source=($_pkgname::git+https://github.com/LunarG/gfxreconstruct.git)
md5sums=('SKIP')
pkgver() {
cd $_pkgname
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd $_pkgname
git submodule update --init
}
build() {
cd $_pkgname
cmake . -B build64 \
-D CMAKE_INSTALL_PREFIX=/usr
make -C build64
cmake . -B build32 \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/linux_x86_32.cmake
make -C build32
}
package() {
cd $_pkgname
DESTDIR="$pkgdir" make -C build64 install
install -Dm755 "${srcdir}/${_pkgname}/build32/layer/libVkLayer_gfxreconstruct.so" "${pkgdir}/usr/lib32/libVkLayer_gfxreconstruct.so"
# Remove .py file extension from files that are going to /usr/bin/
for f in $pkgdir/usr/bin/*.py; do
mv -v $f `echo $f | sed 's/\.py//'`
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment