51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
# Description: Vulkan validation layers
|
|
# URL: https://www.khronos.org/vulkan/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: glslang robin-hood-hashing spirv-tools vulkan-headers xorg-libxrandr
|
|
# Optional: wayland
|
|
|
|
name=vulkan-validation-layers
|
|
version=1.3.204.0
|
|
_spirv_headers=b42ba6d92faf6b4938e6f22ddd186dbdacc98d78
|
|
release=1
|
|
source=(https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/sdk-$version/Vulkan-ValidationLayers-$version.tar.gz
|
|
https://github.com/KhronosGroup/SPIRV-Headers/archive/$_spirv_headers/SPIRV-Headers-$_spirv_headers.tar.gz
|
|
known_good.py.in
|
|
add-missing-export.patch
|
|
fix_shared.patch
|
|
vulkan-layers-1.3.204-Fix-dependency-detection.patch)
|
|
|
|
build() {
|
|
|
|
(
|
|
cd Vulkan-ValidationLayers-sdk-$version
|
|
mkdir -p headers/external/spirv-headers
|
|
cp -r $SRC/SPIRV-Headers-$_spirv_headers/* headers/external/spirv-headers
|
|
|
|
patch -p1 -i $SRC/add-missing-export.patch
|
|
patch -p1 -i $SRC/fix_shared.patch
|
|
patch -p1 -i $SRC/vulkan-layers-1.3.204-Fix-dependency-detection.patch
|
|
)
|
|
|
|
sed -e "s|@SRC@|$SRC/Vulkan-ValidationLayers-sdk-$version|" $SRC/known_good.py.in > $SRC/known_good.py
|
|
chmod u+x $SRC/known_good.py
|
|
$SRC/known_good.py
|
|
|
|
prt-get isinst ninja && PKGMK_VULKAN_VALIDATION_LAYERS+=' -G Ninja'
|
|
prt-get isinst wayland || PKGMK_VULKAN_VALIDATION_LAYERS+=' -D BUILD_WSI_WAYLAND_SUPPORT=OFF'
|
|
|
|
cmake -S Vulkan-ValidationLayers-sdk-$version -B build $PKGMK_VULKAN_VALIDATION_LAYERS \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
|
|
-D BUILD_TESTS=OFF \
|
|
-D BUILD_LAYER_SUPPORT_FILES=ON \
|
|
-D USE_ROBIN_HOOD_HASHING=ON \
|
|
-D SPIRV_HEADERS_INSTALL_DIR:PATH="$SRC/Vulkan-ValidationLayers-sdk-$version/headers/external/spirv-headers" \
|
|
-Wno-dev
|
|
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
}
|