Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sharkautarch/2d6147f559e178417eff4650462147ff to your computer and use it in GitHub Desktop.
Save sharkautarch/2d6147f559e178417eff4650462147ff to your computer and use it in GitHub Desktop.
Modified version of archlinux repo vvl pkgbuild, to build vulkan-validation-layers-git
# Modified version of archlinux repo vvl pkgbuild, to build vulkan-validation-layers-git - sharkautarch
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
pkgname=vulkan-validation-layers
pkgver=1.3.275
pkgrel=1
pkgdesc="Vulkan Validation Layers - latest git"
arch=(x86_64)
url="https://www.khronos.org/vulkan/"
license=('custom')
groups=('vulkan-devel')
depends=('gcc-libs' 'vulkan-icd-loader' 'vulkan-headers' 'libx11')
makedepends=('cmake' 'python-lxml' 'libxrandr' 'wayland' 'git')
options=('!lto' '!strip') # disable LTO (https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5994)
#source=("https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/vulkan-sdk-${pkgver}.tar.gz")
source=("git+https://github.com/KhronosGroup/Vulkan-ValidationLayers.git")
#sha256sums=('09e74ce39198d20e322d2f8401719d0724b84055754105def1926dabcdb82480')
sha256sums=('SKIP')
#pkgver() {
# cd "${srcdir}/Vulkan-ValidationLayers"
#
# echo 1.1.97.0+$(git rev-list --count HEAD)+$(git rev-parse --short HEAD)
#}
prepare() {
cd "${srcdir}"/Vulkan-ValidationLayers*
rm -rf build && mkdir build
}
build() {
cd "${srcdir}"/Vulkan-ValidationLayers*/build
../scripts/update_deps.py
cmake -C helper.cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_DATADIR=/share \
-DCMAKE_INSTALL_INCLUDEDIR="/usr/include/" \
-DCMAKE_SKIP_RPATH=True \
-DBUILD_TESTS=Off \
-DBUILD_WSI_XCB_SUPPORT=On \
-DBUILD_WSI_XLIB_SUPPORT=On \
-DBUILD_WSI_WAYLAND_SUPPORT=On \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
..
make
}
package() {
cd "${srcdir}"/Vulkan-ValidationLayers*/build
make DESTDIR="${pkgdir}" install
install -dm755 "${pkgdir}"/usr/share/{licenses/,doc/}${pkgname}/
cp -r ../docs/* "${pkgdir}"/usr/share/doc/${pkgname}/
install -m644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment