void-packages/srcpkgs/amdvlk/template

82 lines
3.2 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2022.Q4.1
revision=1
_xgl_commit=8a67c76eedb8400fb5d3b1e7b6a3894efdc7a3b9
_pal_commit=c2af6fc4c14ea61273bcf5576f8a83a12b945dd7
_llpc_commit=9db0ba4c968bbfe2f3e7e546d17cbfd07dcfdc9e
_gpurt_commit=2874e509b677d78ddb3faae90989dd45e60669b3
_llvm_project_commit=d2b67605e4dd5dc50d0afbeb4f20f29cce97b207
_MetroHash_commit=18893fb28601bb9af1154cd1a671a121fff6d8d3
_CWPack_commit=4f8cf0584442a91d829d269158567d7ed926f026
archs="i686* x86_64*"
create_wrksrc=yes
build_wrksrc="xgl"
build_style=cmake
configure_args="-DBUILD_WAYLAND_SUPPORT=ON
-DCMAKE_BUILD_TYPE=Release
-DLLVM_PARALLEL_LINK_JOBS=2"
hostmakedepends="pkg-config python3 perl"
makedepends="libxml2-devel xorg-server-devel libXrandr-devel libffi-devel wayland-devel
DirectXShaderCompiler-devel glslang-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/gpurt/archive/${_gpurt_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/MetroHash/archive/${_MetroHash_commit}.tar.gz
https://github.com/GPUOpen-Drivers/CWPack/archive/${_CWPack_commit}.tar.gz"
checksum="b72a1a977a0fadb57248af98278eac2916a63705881a8e6f86210a9f39652188
75e8aecf09b03dfe8a2c48dff3fd56d027e0ca1a45bf889be8ba597d52da104f
ef813719b5cdf1ae1b20c29ff0c1ccddb8153262ebfe6f45977b6faa98966528
5a97b3a714c0b508b9bc2ee4f8902bf32fdc8bef6cdb36f997bcb48e8b940888
b0b18d2ae80b49b5d6992bd80cec87199fb4dd2f242bff20b088355b0a422836
d777d461bbe0b84734702ed13d7f13e5ef5d7ed093a1be4ee9deba1f32fac65b
141e6c156a834b8e0f90ba108664d7f35193df11acddefa117f394dbf2b7371a
87ed9209c129f47d0b64c914fb99d6c69e59a257445ec3a394c3e00d5e2b4484"
nocross=yes
lib32files="/usr/share/vulkan/icd.d/amd_icd32.json"
case "$XBPS_TARGET_MACHINE" in
i686*) nodebug=yes;;
esac
pre_build() {
pwd
ninja -C build GpuRtGenerateShaders
}
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}/gpurt-${_gpurt_commit} ${wrksrc}/gpurt
mv ${wrksrc}/llvm-project-${_llvm_project_commit} ${wrksrc}/llvm-project
mkdir ${wrksrc}/third_party
mv ${wrksrc}/MetroHash-${_MetroHash_commit} ${wrksrc}/third_party/metrohash
mv ${wrksrc}/CWPack-${_CWPack_commit} ${wrksrc}/third_party/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/
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
}