void-packages/srcpkgs/amdvlk/template
2021-06-24 23:16:58 +02:00

77 lines
3.2 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2021.Q2.6
revision=1
_llpc_commit=1e493d3dced3f4963cc9d2b6b86b1c523c247860
_xgl_commit=393fca7a5645923a6dbd7f948bded5b14302211b
_pal_commit=66f4ef75eed4d098f7652739b9f7dd3cd8bda6e6
_llvm_project_commit=b9916620f254f7cf91e8c1fb86e7869c20d5c1e0
_spvgen_commit=8ac72283650fbeb3da2ab18c20ad98d45e3d12e1
_MetroHash_commit=3c566dd9cda44ca7fd97659e0b53ac953f9037d2
_CWPack_commit=7387247eb9889ddcabbc1053b9c2052e253b088e
archs="i686* x86_64*"
create_wrksrc=yes
build_wrksrc="xgl"
build_style=cmake
configure_args="-DBUILD_WAYLAND_SUPPORT=ON
-DXGL_METROHASH_PATH=../../metrohash
-DXGL_CWPACK_PATH=../../cwpack
-DLLVM_PARALLEL_LINK_JOBS=2"
hostmakedepends="pkg-config python3 perl"
makedepends="libxml2-devel xorg-server-devel libXrandr-devel libffi-devel wayland-devel"
depends="vulkan-loader"
short_desc="AMD Open Source Driver For Vulkan"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://github.com/GPUOpen-Drivers/AMDVLK"
distfiles="https://github.com/GPUOpen-Drivers/AMDVLK/archive/v-${version}.tar.gz
https://github.com/GPUOpen-Drivers/llpc/archive/${_llpc_commit}.tar.gz
https://github.com/GPUOpen-Drivers/xgl/archive/${_xgl_commit}.tar.gz
https://github.com/GPUOpen-Drivers/pal/archive/${_pal_commit}.tar.gz
https://github.com/GPUOpen-Drivers/llvm-project/archive/${_llvm_project_commit}.tar.gz
https://github.com/GPUOpen-Drivers/spvgen/archive/${_spvgen_commit}.tar.gz
https://github.com/GPUOpen-Drivers/MetroHash/archive/${_MetroHash_commit}.tar.gz
https://github.com/GPUOpen-Drivers/CWPack/archive/${_CWPack_commit}.tar.gz"
checksum="19ec4ee9c6461e4dabceeee66ca5403663d604887b75da5f32b8031b61821409
abe34706de6e8ab4b7cd8538e4ac838e8c95e55dd28dd9aeef55a6c88f0ed8a5
054c38b8c032b7631f685fd31d1e4937027a3ec039a32ee40b80bcbec540990b
f278c657508e8d435ceedf2c8b6052543f8d257f4fc89a52db4e8f60267afe21
5472ce7d943fd5846556d7e03e0e2cead768e2e5cc672820bb4fee0b4eecf02f
2bce76c52fe3ded5b8b15da4373585aa1422145a602db7e0f1170d53ed3ee7a6
cc8ff538fede25fe023984b3fde27f09b000bdc49793534794cd1d2bf881750a
186060fbcf87165224ba7df0e1858b66ebc42cf190c481aef1df8d89ebab7abd"
nocross=yes
lib32files="/usr/share/vulkan/icd.d/amd_icd32.json"
case "$XBPS_TARGET_MACHINE" in
i686*) nodebug=yes;;
esac
post_extract() {
mv ${wrksrc}/AMDVLK-v-${version} ${wrksrc}/AMDVLK
mv ${wrksrc}/xgl-${_xgl_commit} ${wrksrc}/xgl
mv ${wrksrc}/pal-${_pal_commit} ${wrksrc}/pal
mv ${wrksrc}/llpc-${_llpc_commit} ${wrksrc}/llpc
mv ${wrksrc}/llvm-project-${_llvm_project_commit} ${wrksrc}/llvm-project
mv ${wrksrc}/spvgen-${_spvgen_commit} ${wrksrc}/spvgen
mv ${wrksrc}/MetroHash-${_MetroHash_commit} ${wrksrc}/metrohash
mv ${wrksrc}/CWPack-${_CWPack_commit} ${wrksrc}/cwpack
}
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
i686*) _arch="X86";;
x86_64*) _arch="X86";;
esac
configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}"
}
do_install() {
vinstall build/icd/amdvlk${XBPS_TARGET_WORDSIZE}.so 644 usr/lib/
vinstall build/icd/amd_icd${XBPS_TARGET_WORDSIZE}.json \
644 usr/share/vulkan/icd.d/
vinstall build/icd/amd_icd${XBPS_TARGET_WORDSIZE}.json \
644 usr/share/vulkan/implicit_layer.d/
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
}