From 6aa1bc31678ff9f8013084fda34b9f941cc63fc3 Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Wed, 30 Aug 2023 13:54:41 -0600 Subject: [PATCH] package/vulkan-loader: new package Use $(VULKAN_HEADERS_VERSION) for VULKAN_LOADER_VERSION as the vulkan packages need to all be the same version. Signed-off-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/vulkan-loader/Config.in | 14 ++++++++ package/vulkan-loader/vulkan-loader.hash | 3 ++ package/vulkan-loader/vulkan-loader.mk | 45 ++++++++++++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 package/vulkan-loader/Config.in create mode 100644 package/vulkan-loader/vulkan-loader.hash create mode 100644 package/vulkan-loader/vulkan-loader.mk diff --git a/DEVELOPERS b/DEVELOPERS index db0ea49f90..413054ab84 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -28,6 +28,7 @@ N: Adam Duskett F: package/firewalld/ +F: package/vulkan-loader/ N: Adam Heinrich F: package/jack1/ diff --git a/package/Config.in b/package/Config.in index 5449884809..41ff89726c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -369,6 +369,7 @@ comment "Graphic libraries" source "package/sdl2_ttf/Config.in" source "package/tk/Config.in" source "package/vulkan-headers/Config.in" + source "package/vulkan-loader/Config.in" comment "Other GUIs" source "package/qt5/Config.in" diff --git a/package/vulkan-loader/Config.in b/package/vulkan-loader/Config.in new file mode 100644 index 0000000000..9c215dc9ce --- /dev/null +++ b/package/vulkan-loader/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_VULKAN_LOADER + bool "vulkan-loader" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_VULKAN_HEADERS + help + The Khronos official Vulkan ICD desktop loader. + + https://github.com/KhronosGroup/Vulkan-Loader + +comment "vulkan-loader needs a toolchain w/ C++, dynamic library, threads" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/vulkan-loader/vulkan-loader.hash b/package/vulkan-loader/vulkan-loader.hash new file mode 100644 index 0000000000..e09ecda8a9 --- /dev/null +++ b/package/vulkan-loader/vulkan-loader.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 3bbaa5ee64058a89949eb777de66ce94bfe3141892514172cfc9451c756802d5 vulkan-loader-1.3.262.tar.gz +sha256 43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece LICENSE.txt diff --git a/package/vulkan-loader/vulkan-loader.mk b/package/vulkan-loader/vulkan-loader.mk new file mode 100644 index 0000000000..f6dd9d0ac3 --- /dev/null +++ b/package/vulkan-loader/vulkan-loader.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# vulkan-loader +# +################################################################################ + +VULKAN_LOADER_VERSION = $(VULKAN_HEADERS_VERSION) +VULKAN_LOADER_SITE = $(call github,KhronosGroup,Vulkan-Loader,v$(VULKAN_LOADER_VERSION)) +VULKAN_LOADER_LICENSE = Apache-2.0 +VULKAN_LOADER_LICENSE_FILES = LICENSE.txt +VULKAN_LOADER_INSTALL_STAGING = YES + +VULKAN_LOADER_DEPENDENCIES = host-pkgconf vulkan-headers + +VULKAN_LOADER_CONF_OPTS += \ + -DASSEMBLER_WORKS=FALSE \ + -DBUILD_WSI_SCREEN_QNX_SUPPORT=OFF \ + -DLOADER_CODEGEN=OFF + +ifeq ($(BR2_PACKAGE_DIRECTFB),y) +VULKAN_LOADER_DEPENDENCIES += directfb +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_DIRECTFB_SUPPORT=ON +else +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_DIRECTFB_SUPPORT=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBXCB),y) +VULKAN_LOADER_DEPENDENCIES += libxcb +VULKAN_LOADER_CONF_OPTS += \ + -DBUILD_WSI_XCB_SUPPORT=ON \ + -DBUILD_WSI_XLIB_SUPPORT=ON +else +VULKAN_LOADER_CONF_OPTS += \ + -DBUILD_WSI_XCB_SUPPORT=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=OFF +endif + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +VULKAN_LOADER_DEPENDENCIES += wayland +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_WAYLAND_SUPPORT=ON +else +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_WAYLAND_SUPPORT=OFF +endif + +$(eval $(cmake-package))