void-packages/srcpkgs/amdvlk/template
2020-12-22 21:58:50 +01:00

73 lines
3.2 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2020.Q4.6
revision=1
_llpc_commit=e2d38b0c8042efbc435e51696aba5c1abd256c88
_xgl_commit=86f61a31988a626371131a1633547b0d0ebfcfcb
_pal_commit=f92844ecbba39be3d2663717ad69c3dffc282211
_llvm_project_commit=a0777f49050191c9e215a4880c855395ba805508
_spvgen_commit=fb798cb760a436e9496dbaab8827e4d183b74744
_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"
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="7408961e8b8d5725ba5887ef55cf79c7117da6e77f4f4d5d24bb531b775f5fb6
346307070fe5283a6fc261465cd8ecdff749381f7ab2e48fe45fa46ef112e907
2f4a186c8a8ce23d4cb57623eb8380ff1ed70c0172311a73c084f94706a09c01
92bb3e00dd10556f4f4f2bc702f6e51b7709ccbfef6c4d94b07a15140993ed4f
32bbc615d89abfbef188c3a613d3a4effcf0ea95eabe2d113dd9b80d3ce74fe9
371b137edf4d5ec4f4483ec10ac1419fffa73b6abb1931dd637a59c1b6247e65
cc8ff538fede25fe023984b3fde27f09b000bdc49793534794cd1d2bf881750a
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}"
}
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
}