void-packages/srcpkgs/amdvlk/template
2019-09-16 10:28:57 +02:00

74 lines
3 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2019.Q3.5
revision=1
_llpc_commit=4fa48ef1cf0f81eafdb56df91c2f2180d4865101
_xgl_commit=331558e93794068a786bf699d3fe23bb11bac021
_pal_commit=68b57dba33a4d922e8f1ef1b3781c2f659ffbd1c
_llvm_commit=9bc5dd4450a6361faf5c5661056a7ee494fad830
_spvgen_commit=2f31d1170e8a12a66168b23235638c4bbc43ecdc
_metrohash_commit=2b6fee002db6cc92345b02aeee963ebaaf4c0e2f
archs="i686* x86_64*"
create_wrksrc=yes
build_wrksrc="xgl"
build_style=cmake
configure_args="-DBUILD_WAYLAND_SUPPORT=ON
-DXGL_METROHASH_PATH=../../metrohash"
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/spvgen/archive/${_spvgen_commit}.tar.gz
https://github.com/GPUOpen-Drivers/MetroHash/archive/${_metrohash_commit}.tar.gz"
checksum="383d43ddcff3295bb8dc85bce2a376fbde9f2aa3535be9e4dbf67f745c40ff41
abe541ef6cd4fa3ca1eaab52412caa29e2adedec0fab40894aef88d33deee584
939a2cf69d840e01da8b3e69f5ffe1f852f9d2919cdbc8aa4ade7cff7ac56906
7648ca7761b588b6025f8fe16fcf4216bf7e1fe53c6568377f5cca98feca9627
efbde2752044ec74d522c160899491105dbc77bb8a08ff64c274d2b94a6916d1
cc946ad2835e502aca904c5f87802a2004eaed4729cb5c1dc29a5258d1c1e401
e8ecf026584dd953e39c3abba2eb04d28b28ed4577482ee70265f0d421fef398"
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-${_llvm_commit} ${wrksrc}/llvm
mv ${wrksrc}/spvgen-${_spvgen_commit} ${wrksrc}/spvgen
mv ${wrksrc}/MetroHash-${_metrohash_commit} ${wrksrc}/metrohash
}
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/
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
}