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

63 lines
2.4 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.274"
2022-07-01 20:17:33 +00:00
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 Python3:host volk"
2022-07-01 20:17:33 +00:00
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() {
2022-12-30 21:35:48 +00:00
PKG_CMAKE_OPTS_TARGET="-DVULKAN_HEADERS_INSTALL_DIR=${SYSROOT_PREFIX}/usr \
-DBUILD_VULKANINFO=ON \
2022-07-01 20:17:33 +00:00
-DBUILD_ICD=OFF \
-DINSTALL_ICD=OFF \
-DBUILD_WSI_DIRECTFB_SUPPORT=OFF \
-DPython3_EXECUTABLE=${TOOLCHAIN}/bin/python3 \
2023-11-17 10:30:04 +00:00
-DCMAKE_BUILD_TYPE=Release \
2022-07-01 20:17:33 +00:00
-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 \
2023-02-08 23:08:18 +00:00
-DBUILD_WSI_XCB_SUPPORT=ON \
-DBUILD_WSI_XLIB_SUPPORT=ON \
2022-07-01 20:17:33 +00:00
-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
}