1 # Maintainer: Laurent Carlier <lordheavym@gmail.com>
2 # Contributor: lod <aur@cyber-anlage.de>
7 pkgdesc="AMD's standalone Vulkan driver"
9 url="https://github.com/GPUOpen-Drivers"
11 provides=('vulkan-driver')
12 makedepends=('perl-xml-xpath' 'python' 'wayland' 'libxrandr' 'xorg-server-devel' 'directx-shader-compiler' 'glslang'
13 'cmake' 'ninja' 'git')
15 source=("https://github.com/GPUOpen-Drivers/AMDVLK/archive/v-${pkgver}.tar.gz")
16 sha256sums=('19e1b4344b76aa52429f06bf083ba90070c2415bda90f0991dddebf846e84752')
19 local nrepos path name revision
21 nrepos=$(xpath -q -e //project AMDVLK-v-${pkgver}/default.xml | wc -l)
25 path=$(xpath -q -e //project[$nrepos]/@path AMDVLK-v-${pkgver}/default.xml | sed 's/ path="drivers\/\(.*\)"/\1/g')
26 name=$(xpath -q -e //project[$nrepos]/@name AMDVLK-v-${pkgver}/default.xml | sed 's/ name="\(.*\)"/\1/g')
27 revision=$(xpath -q -e //project[$nrepos]/@revision AMDVLK-v-${pkgver}/default.xml | sed 's/ revision="\(.*\)"/\1/g')
28 git clone https://github.com/GPUOpen-Drivers/$name $path
30 git checkout $revision
38 cmake -H. -Bbuilds/Release64 \
39 -DCMAKE_BUILD_TYPE=Release \
40 -DBUILD_WAYLAND_SUPPORT=On \
43 ninja -C builds/Release64
47 install -m755 -d "${pkgdir}"/usr/lib
48 install -m755 -d "${pkgdir}"/usr/share/vulkan/icd.d
49 install -m755 -d "${pkgdir}"/usr/share/vulkan/implicit_layer.d
50 install -m755 -d "${pkgdir}"/usr/share/licenses/${pkgname}
52 install xgl/builds/Release64/icd/amdvlk64.so "${pkgdir}"/usr/lib/
53 install xgl/builds/Release64/icd/amd_icd64.json "${pkgdir}"/usr/share/vulkan/icd.d/
54 install xgl/builds/Release64/icd/amd_icd64.json "${pkgdir}"/usr/share/vulkan/implicit_layer.d/
55 install AMDVLK-v-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
57 sed -i "s#/lib64#/lib#g" "${pkgdir}"/usr/share/vulkan/icd.d/amd_icd64.json
58 sed -i "s#/lib64#/lib#g" "${pkgdir}"/usr/share/vulkan/implicit_layer.d/amd_icd64.json