distribution/packages/graphics/vulkan/vulkan-tools/package.mk

61 lines
2.3 KiB
Makefile
Raw Normal View History

2022-07-01 20:17:33 +00:00
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="vulkan-tools"
PKG_VERSION="1.3.217"
PKG_SHA256="09e1ae38c4546ca709dae788562f25f2bdd9ed7f401bd9e03abc29233a552a0f"
PKG_LICENSE="Apache-2.0"
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Tools"
PKG_URL="https://github.com/KhronosGroup/Vulkan-tools/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain vulkan-loader glslang:host"
PKG_LONGDESC="This project provides Khronos official Vulkan Tools and Utilities."
configure_package() {
# Displayserver Support
if [ "${DISPLAYSERVER}" = "x11" ]; then
PKG_DEPENDS_TARGET+=" libxcb libX11"
elif [ "${DISPLAYSERVER}" = "wl" ]; then
PKG_DEPENDS_TARGET+=" wayland"
fi
}
pre_configure_target() {
PKG_CMAKE_OPTS_TARGET="-DBUILD_VULKANINFO=ON \
-DBUILD_ICD=OFF \
-DINSTALL_ICD=OFF \
-DBUILD_WSI_DIRECTFB_SUPPORT=OFF \
-Wno-dev"
if [ "${DISPLAYSERVER}" = "x11" ]; then
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_CUBE=ON \
-DBUILD_WSI_XCB_SUPPORT=ON \
-DBUILD_WSI_XLIB_SUPPORT=ON \
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
-DCUBE_WSI_SELECTION=XCB"
elif [ "${DISPLAYSERVER}" = "wl" ]; then
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_CUBE=ON \
-DBUILD_WSI_XCB_SUPPORT=OFF \
-DBUILD_WSI_XLIB_SUPPORT=OFF \
-DBUILD_WSI_WAYLAND_SUPPORT=ON
-DCUBE_WSI_SELECTION=WAYLAND"
else
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_CUBE=ON \
-DBUILD_WSI_XCB_SUPPORT=OFF \
-DBUILD_WSI_XLIB_SUPPORT=OFF \
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
-DCUBE_WSI_SELECTION=DISPLAY"
fi
}
pre_make_target() {
# Fix cross compiling
find ${PKG_BUILD} -name flags.make -exec sed -i "s:isystem :I:g" \{} \;
find ${PKG_BUILD} -name build.ninja -exec sed -i "s:isystem :I:g" \{} \;
}
post_makeinstall_target() {
# Clean up - two graphic test tools are superflous
safe_remove ${INSTALL}/usr/bin/vkcubepp
}