92 lines
2.8 KiB
Bash
92 lines
2.8 KiB
Bash
SUMMARY="Installable Client Driver (ICD) Loader for Vulkan"
|
|
DESCRIPTION="Vulkan is an explicit API, enabling direct control over how GPUs \
|
|
actually work. As such, Vulkan supports systems that have multiple GPUs, each \
|
|
running with a different driver, or ICD (Installable Client Driver). Vulkan \
|
|
also supports multiple global contexts (instances, in Vulkan terminology). The \
|
|
ICD loader is a library that is placed between a Vulkan application and any \
|
|
number of Vulkan drivers, in order to support multiple drivers and the \
|
|
instance-level functionality that works across these drivers. Additionally, \
|
|
the loader manages inserting Vulkan layer libraries, such as validation \
|
|
layers, between an application and the drivers."
|
|
HOMEPAGE="https://www.vulkan.org/"
|
|
COPYRIGHT="2014-2021 The Khronos Group Inc."
|
|
LICENSE="Apache v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$portVersion.tar.gz"
|
|
SOURCE_FILENAME="Vulkan-Loader-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="b4a0ec6ce8921f50ab291f1c3a16802cfbe2c3dbd86820eb699bfb98890ad126"
|
|
SOURCE_DIR="Vulkan-Loader-$portVersion"
|
|
SOURCE_URI_2="https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$portVersion.tar.gz"
|
|
SOURCE_FILENAME_2="Vulkan-Headers-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256_2="0b2c69bc392a0022652f65efe5c51ec39ae90ec427065a914ba74ac6c728db30"
|
|
SOURCE_DIR_2="Vulkan-Headers-$portVersion"
|
|
PATCHES="vulkan-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
vulkan$secondaryArchSuffix = $portVersion compat >= 1
|
|
lib:libvulkan$secondaryArchSuffix = $portVersion compat >= 1
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
vulkan${secondaryArchSuffix}_devel = $portVersion compat >= 1
|
|
devel:libvulkan$secondaryArchSuffix = $portVersion compat >= 1
|
|
"
|
|
REQUIRES_devel="
|
|
vulkan$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage vulkan$secondaryArchSuffix \
|
|
"$libDir"/libvulkan.so.$portVersion
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build
|
|
cd build
|
|
|
|
cmake .. \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
|
|
-DVULKAN_HEADERS_INSTALL_DIR=$sourceDir2 \
|
|
-DVulkanRegistry_DIR=$sourceDir2/registry \
|
|
-DFALLBACK_CONFIG_DIRS="/boot/home/config/non-packaged/add-ons:/boot/home/config/add-ons:/boot/system/non-packaged/add-ons:/boot/system/add-ons" \
|
|
-G Ninja
|
|
|
|
ninja
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd build
|
|
ninja install
|
|
|
|
mkdir -p $dataDir/vulkan/registry
|
|
cp $sourceDir2/registry/vk.xml $dataDir/vulkan/registry/vk.xml
|
|
|
|
mkdir -p $includeDir
|
|
cp -r $sourceDir2/include/* $includeDir
|
|
|
|
prepareInstalledDevelLib libvulkan
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|