void-packages/srcpkgs/amdvlk/template
2019-07-02 14:32:13 +02:00

73 lines
2.8 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2019.Q3.1
revision=1
_llpc_commit=aa8a9d7f2b7ad7b81b70e7959e99e3f31f85c211
_xgl_commit=eee58c8e482ac4a6fdc40452cb4ad744395d0f74
_pal_commit=6c8eaa257e6216437fdfe3f17d418eccfe42e0bd
_llvm_commit=8118692e8aefbd95f791ff49beddb8ce90e8927c
_spvgen_commit=53245b96b7a647743f50b9d841751f9755002661
archs="i686* x86_64*"
create_wrksrc=yes
build_wrksrc="xgl"
build_style=cmake
configure_args="-DBUILD_WAYLAND_SUPPORT=ON"
hostmakedepends="pkg-config python3 perl"
makedepends="libxml2-devel xorg-server-devel libXrandr-devel"
depends="vulkan-loader"
short_desc="AMD Open Source Driver For Vulkan"
maintainer="John <johnz@posteo.net>"
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/archive/${_llvm_commit}.tar.gz
https://github.com/GPUOpen-Drivers/spvgen/archive/${_spvgen_commit}.tar.gz"
checksum="e41418633653279c55cc8d70a9f576e0de3018a3953bcb3372bfb809db48ae23
f7efe91134588233e2d3f25ff53068fb0b7c6d144fabf907c7b8c807efe635e8
828bf0936e0efc86c40e3abb6f92cc214a493ab8e2ff2054d455bab399ae2d0a
83a4940d3bd64f38a83e14d7225cce6b2234610dbe6e3d55c50e1adc6126b2d2
b0cbcd4d83530ad5bd515642f903837e6cc308eb68da51900208acf9f2dbe351
253bfaf1fc33c8ef01ca1681a5ea7400fd4ab7373c48e4f79beb10d89455d307"
nocross=yes
lib32files="/usr/share/vulkan/icd.d/amd_icd32.json"
case $XBPS_TARGET_MACHINE in
*-musl) makedepends+=" rand48_r-devel"
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-${_llvm_commit} ${wrksrc}/llvm
mv ${wrksrc}/spvgen-${_spvgen_commit} ${wrksrc}/spvgen
}
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() {
case $XBPS_TARGET_MACHINE in
i686*|mips*|arm*|ppc|ppc-musl)
vinstall build/icd/amdvlk32.so 644 usr/lib/
vinstall ${wrksrc}/AMDVLK/json/Redhat/amd_icd32.json 644 usr/share/vulkan/icd.d/
vsed -i ${DESTDIR}/usr/share/vulkan/icd.d/amd_icd32.json -e 's#/usr/lib/#/usr/lib32/#g'
;;
*)
vinstall build/icd/amdvlk64.so 644 usr/lib/
vinstall ${wrksrc}/AMDVLK/json/Redhat/amd_icd64.json 644 usr/share/vulkan/icd.d/
vsed -i ${DESTDIR}/usr/share/vulkan/icd.d/amd_icd64.json -e 's#/usr/lib64/#/usr/lib/#g'
;;
esac
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
}