void-packages/srcpkgs/amdvlk/template
Felix Kleinschmidt da23c20fe5 amdvlk: update to 2020.Q3.4
Closes: #24516 [via git-merge-pr]
2020-08-29 18:35:40 +02:00

89 lines
3.6 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2020.Q3.4
revision=1
_llpc_commit=9b5cb15acc8ff789420ed9ed593e35c81303d10c
_xgl_commit=598c6832a4983f5b75b38a589fca5be80a2f3bb0
_pal_commit=bebb2b0d0d70625d825cd386a1360154709487f2
_llvm_project_commit=30cb97a1d0efebb4317f9abeec8d90a5a83d4837
_spvgen_commit=1813b88297ef56f56d5f851886257cac79179705
_MetroHash_commit=712f76fee75d69b23a1ea8f6465752c3ccaaf9a2
_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"
hostmakedepends="pkg-config python3 perl"
makedepends="libxml2-devel xorg-server-devel libXrandr-devel libffi-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="19548a78ba0240a5e2c23f778fc009a9a44ec8b61d19a46db3265512671c6d8d
8a2d2f66e7c0a5725e6e7e0d06f854d37f474b046eb57bd394203072f06ad079
9e059d0d54823df953049b6b639a266e72ccf1a91f3b21a8c5e32ca1be057183
f13c47c9b1f3f6c492710b62db38c79690db51018f582d32c8221962cd1d26e4
7e18e49775f53679eb4f6142ebadf494e6674d6f485f06d63afdef866cb9a7ae
7aa79a3647b0df198e13a64ce9455a9c05544b41adfc4ef91783c01d46c01da0
07c7389894a4acd9aff7ddb6d70fc3ea6a4cc10589b69ce92c737487cbe2d37d
186060fbcf87165224ba7df0e1858b66ebc42cf190c481aef1df8d89ebab7abd"
nocross=yes
lib32files="/usr/share/vulkan/icd.d/amd_icd32.json"
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}"
}
pre_build() {
# lower burden on build servers, llvm eats too much memory
if [ "$XBPS_MAKEJOBS" -gt 2 ]; then
echo $XBPS_MAKEJOBS
export makejobs="-j$(( $XBPS_MAKEJOBS / 2 ))"
echo $XBPS_MAKEJOBS
fi
}
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
}