void-packages/srcpkgs/amdvlk/template

76 lines
3.1 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2022.Q1.2
revision=1
_llpc_commit=a9be3c24b81816b092282f25948b966f6b35a877
_xgl_commit=7f50fdca1959454bd6e27f984fa2b29e7d5a8789
_pal_commit=b638e90ca4e6e5a6fc4f00029d62f8e064aa18eb
_llvm_project_commit=7a66188b14010f5fdb65a3edf1e2cb5ffef0da80
_spvgen_commit=6c2f36bcf0f8ff7ba8d20c8b789ca6346d1e16b1
_MetroHash_commit=3c566dd9cda44ca7fd97659e0b53ac953f9037d2
_CWPack_commit=39f8940199e60c44d4211cf8165dfd12876316fa
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="9d639e5ba246894ad4ed33c0197c06c7231e799cccd24e1ae3e5baacec9f47e1
46f3242f6af8930ea85a8a2ce60902ac3f5070f2ba65b4b49ad2edd964ea1770
59197f412a87289c1a0c2c7c9b6de7acd03f03abc48ca205a3ff3d48fbb2e0de
637448884d01eab5701a2e1195528d865f38840f6f8a457dc92fddb803ed9466
e31275608ffbeec1edb2c90dc2bcecd197b492f261918f617fec38feff123bd7
010bbd5ec538663dc2921ecbfd541e6ab727c73777f888b25ceb13ef5d9a7c3f
cc8ff538fede25fe023984b3fde27f09b000bdc49793534794cd1d2bf881750a
0f5f9e050bdd944b335b3dd5baafce8327b75d65ec5a2812cf0441d1172b03ea"
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/
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
}