55 lines
2.1 KiB
Plaintext
55 lines
2.1 KiB
Plaintext
# Description: Vulkan validation layers
|
|
# URL: https://www.khronos.org/vulkan/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: cmake glslang spirv-tools vulkan-headers xorg-libxcb xorg-libx11 xorg-libxrandr
|
|
# Optional: wayland
|
|
|
|
name=vulkan-validation-layers
|
|
version=1.2.189.1
|
|
_spirv_headers=449bc986ba6f4c5e10e32828783f9daef2a77644
|
|
_robin_hood=3.11.3
|
|
release=2
|
|
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
|
|
https://github.com/martinus/robin-hood-hashing/archive/$_robin_hood/robin-hood-hashing-$_robin_hood.tar.gz
|
|
known_good.py.in
|
|
add-missing-export.patch
|
|
fix_shared.patch)
|
|
|
|
build() {
|
|
|
|
(
|
|
cd Vulkan-ValidationLayers-sdk-$version
|
|
mkdir -p \
|
|
headers/external/spirv-headers \
|
|
robin_hood/external/robin-hood-hashing
|
|
cp -r $SRC/SPIRV-Headers-$_spirv_headers/* headers/external/spirv-headers
|
|
cp -r $SRC/robin-hood-hashing-$_robin_hood/* robin_hood/external/robin-hood-hashing
|
|
|
|
patch -p1 -i $SRC/add-missing-export.patch
|
|
patch -p1 -i $SRC/fix_shared.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 GLSLANG_INSTALL_DIR:PATH='/usr/include/glslang' \
|
|
-D ROBIN_HOOD_HASHING_INSTALL_DIR:PATH="$SRC/Vulkan-ValidationLayers-sdk-$version/robin_hood/external/robin-hood-hashing" \
|
|
-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
|
|
}
|