void-packages/srcpkgs/amdvlk/template
2021-04-26 15:20:38 +02:00

77 lines
3.3 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2021.Q2.1
revision=1
_llpc_commit=a8ec3c6e6372dcfd812a2ea592141a821e9584b1
_xgl_commit=e1be7ee14c39d3a36d9d1aacd00caf3acc437cde
_pal_commit=83635fbee82fb21662a4737e34437c41172c6fe0
_llvm_project_commit=b0392f639492720b268697f4261aaccfa3459537
_spvgen_commit=59823e6c3557cb7f3fae4a9f2760ad3f6b694997
_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="c491929f959404527816ec9a88755916282aceeb191cd7bfb0440682e202e186
f585fd7d43985cb396f8470781f80229018bedc96aae7939b979015ce1caf064
a999ff6400b0e16b4f47dd9fb063b071ec5b8226f5bca84d58e6a9f52a36966c
ad36dab535943239357fc6101e9d4be532e950366d97f761f8cb63a6f4ee755d
18665c4ba9bc80179315f18c877c3a9e9790e53e2ceb3090c03bc2510f30652e
124e37608f2ef49a980c3fff9cc73bcb154c9724ee00397e0dee6cc8cf1b4244
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 ${wrksrc}/AMDVLK/json/Redhat/amd_icd${XBPS_TARGET_WORDSIZE}.json \
644 usr/share/vulkan/icd.d/
vsed -i ${DESTDIR}/usr/share/vulkan/icd.d/amd_icd${XBPS_TARGET_WORDSIZE}.json \
-e "s#/usr/lib/#/usr/lib${XBPS_TARGET_WORDSIZE}/#g"
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
}