76 lines
3 KiB
Bash
76 lines
3 KiB
Bash
# Template file for 'amdvlk'
|
|
pkgname=amdvlk
|
|
version=2019.Q2.4
|
|
revision=1
|
|
_llpc_commit=b153a902b0a574fb0ab2356c87c3446d9a9d80b2
|
|
_xgl_commit=4d91a4045078cf6884ee05007eac9eec2b881dbb
|
|
_pal_commit=9a1f99f049f3b417242dc7c09b86c52fd7d9ceaf
|
|
_llvm_commit=4305f776f1207189667a383e22661ccd1e99cd25
|
|
_wsa_commit=f558403d3292039de4d17334e562bda58abfc72c
|
|
_spvgen_commit=64013f150c2d41965a3d36fa159b55fba52b727a
|
|
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
|
|
https://github.com/GPUOpen-Drivers/spvgen/archive/${_spvgen_commit}.tar.gz"
|
|
checksum="24e78dfc6b4f16da6ab158e27d35671b6873fa515d36f918a36b77cb664c5238
|
|
ffe19cb54421720cede69b23bcbfd6fa076f007101b2ec2a7a04fc4fc1ad9e1c
|
|
b4980757d848dff0b7060a25f38fa11a948c76fc6c4e6c201900552958a5ec22
|
|
1982ebf4260fa36a354b2eb0dff485f685f669fc211f98a0902b559b7bac9fb0
|
|
139d391fe0f31a6e3ae1862260506f5ffa9bb6320186bc5a9b380f9c3ac0162e
|
|
b23e9453fa7b14bb13157fb645936ec74b18b12cdef301758452a92b23f27705
|
|
01b156285b25c4f84fc098f334b3959d8fd1d7f77589618449288506eadb92d4"
|
|
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
|
|
mv ${wrksrc}/spvgen-${_spvgen_commit} ${wrksrc}/spvgen
|
|
}
|
|
|
|
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
|
|
}
|