void-packages/srcpkgs/amdvlk/template
2020-02-23 04:35:17 +01:00

79 lines
3.4 KiB
Bash

# Template file for 'amdvlk'
pkgname=amdvlk
version=2020.Q1.2
revision=1
_llpc_commit=f5268c3f6f906a3ae430a1aada7f54f70df091e8
_xgl_commit=8024f27f9457e3235bf4fcde0d2879bbaae7b0f2
_pal_commit=45f531beaf2c2b0bc2272e63a2da0022f1b07ccf
_llvm_project_commit=a163b38723cbc05f3014d4eaa1936c82bbfbf3ea
_spvgen_commit=e9b2bc3a889ed6ac4f5a47b6c4c58460988e352e
_MetroHash_commit=2b6fee002db6cc92345b02aeee963ebaaf4c0e2f
_CWPack_commit=b601c88aeca7a7b08becb3d32709de383c8ee428
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"
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 <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-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="4efa42755db31b4c0663757a42d9e624f6d79038bafe621735c1020cf98862fa
c0cc57bfd962f061deea21684086fee93ff05f98a411082f8017097534cff53a
bd4f8ee2e9d8f034849050a1696aa1a0999552688147ebe58ef529cbb51c9b51
b42d1285b52aed10e6bb2d58aa71e79ed1cd02a3cb53df20dc6e440e14053cb4
616f31c857fa925f9074404204bfd0541582efd6e499da59d107ea5ac84fbf32
3dc82f3f60b449f7a6a461e893a388d6561377ab24dc4f7939a73927beb70ce4
e8ecf026584dd953e39c3abba2eb04d28b28ed4577482ee70265f0d421fef398
58ca397f33d62bcfecaecd89eb4ad466a6c33e1c619e5cf742822074f1f7d664"
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() {
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
}