73 lines
2.7 KiB
Bash
73 lines
2.7 KiB
Bash
# Template file for 'amdvlk'
|
|
pkgname=amdvlk
|
|
version=2019.Q2.2
|
|
revision=1
|
|
_llpc_commit=d1c1a55cfa58147c4814929e21038d30e6d48429
|
|
_xgl_commit=54194f5ebb7d1d6b44b9eb87217041f44e08f789
|
|
_pal_commit=14045067091d226072437527359a54c8b8e898eb
|
|
_llvm_commit=1ca248e6fc6d4d15491756f92f4da139222ef3ca
|
|
_wsa_commit=f558403d3292039de4d17334e562bda58abfc72c
|
|
archs="i686* x86_64*"
|
|
create_wrksrc=yes
|
|
build_wrksrc="xgl"
|
|
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="71f2ab42133574551b1a808a291a151e2339dfd69783d038a073da4172423a35
|
|
eabfa149ffb20e41a08f343511949173db3dab4e5fb5d638173ef3c3986ee0c6
|
|
cfa5992007f4cc619b59953a4f4ca5fbcc30d3e1ed48782c29948c80125dc22d
|
|
c4c8b38d7432a0f1d4697eb68abd7c9aedff1e2ea78ee948a9ff9cf26f8ac1c6
|
|
afc2c8b5ae9cef34f032ec250955a3c5db7eea732879d19550b01d97a762510e
|
|
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
|
|
}
|