void-packages/srcpkgs/amdvlk/template

73 lines
2.7 KiB
Bash
Raw Normal View History

# Template file for 'amdvlk'
pkgname=amdvlk
2019-02-27 00:38:19 +01:00
version=2019.Q1.7
revision=1
2019-02-27 00:38:19 +01:00
_llpc_commit=8eecb4baef898f0a5b9902406626887c3646dbb6
_xgl_commit=f2af4b0c33963842f544107d005f0a6c82ea513f
_pal_commit=e8a5acd90310871053a40015ebcea5b32391a824
_llvm_commit=c7a5a5c3bac75699d45824523b4fcf045913413f
_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"
2019-02-27 00:38:19 +01:00
checksum="960675c121ec3d791cdd8c76455216f5fef2232aa23d3154a9298fa60b6f3d63
fc9ea2c4ce1f1ff2840966a4ee83eef1cf6baad0ce213454705d9130a4292015
cf6c521e0f66b96386e592d58aae2a61748d182cededbd5163fdbaa65ebcd915
9bf478a2a0594b4ccabd614941efd94cadd403b28ff232b6f33dce023c5e61f0
8eb29c137998ed12627ce765e91646481338173b9c9169aff7c1e378d0bbbb36
b23e9453fa7b14bb13157fb645936ec74b18b12cdef301758452a92b23f27705"
2019-01-28 02:32:17 +01:00
nocross=yes
2019-02-27 00:38:19 +01:00
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
}
2019-01-28 02:32:17 +01:00
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
}