void-packages/srcpkgs/amdvlk/template

73 lines
2.7 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2019.Q1.9
revision=1
_llpc_commit=32c0c28b1b7fd36b2f9cb17411af2963f6cfc48a
_xgl_commit=a082b41ad4a8aed476cb39e6b63cddd25ab9e0b4
_pal_commit=e17272e1581ae6e222293880db08e0df7b1f1f75
_llvm_commit=97cc33415120ae3ed472b6dd5cb234b74a80bd80
_wsa_commit=f558403d3292039de4d17334e562bda58abfc72c
create_wrksrc=yes
build_wrksrc="xgl"
archs="i686* x86_64*"
build_style=cmake
configure_args="-DBUILD_WAYLAND_SUPPORT=ON -DBUILD_WSA=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/wsa/archive/${_wsa_commit}.tar.gz"
checksum="b03b737ac633adf9b0e9dcb37dee337cc1110ac018740f712e4df05baf01f4d3
c3128fd89339dcf26dfdfe609ec35965d663c94c4e4af25e18f6213ea00667d2
f1bf0d3c091f81892ef6443a426536a4aa8fa22555a6cc519a794df381ba42fa
437736675b469d4343e70268ca8c5daa939d048b0f462bd8a44d5ca6c33c55ab
37727c7ffac673729cf098e4b640179cc1515bc4e63c0f728b88720c9cda2150
b23e9453fa7b14bb13157fb645936ec74b18b12cdef301758452a92b23f27705"
nocross=yes
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}/wsa-${_wsa_commit} ${wrksrc}/wsa
}
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/
;;
*)
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
vinstall build/wsa/wayland/libamdgpu_wsa_wayland.so 644 usr/lib/
vlicense ${wrksrc}/AMDVLK/LICENSE.txt
}