upgpkg: maxima 5.46.0-9 (sbcl rebuild)
[arch-packages.git] / amdvlk / trunk / PKGBUILD
blobfcb57e3fdc4c11a6ff7b8eb5cbf7065ac346d947
1 # Maintainer: Laurent Carlier <lordheavym@gmail.com>
2 # Contributor: lod <aur@cyber-anlage.de>
4 pkgname=amdvlk
5 pkgver=2022.Q4.4
6 pkgrel=3
7 pkgdesc="AMD's standalone Vulkan driver"
8 arch=(x86_64)
9 url="https://github.com/GPUOpen-Drivers"
10 license=('MIT')
11 provides=('vulkan-driver')
12 makedepends=('perl-xml-xpath' 'python' 'wayland' 'libxrandr' 'xorg-server-devel' 'directx-shader-compiler' 'glslang'
13              'cmake' 'ninja' 'git')
14 options=('!lto')
15 source=("https://github.com/GPUOpen-Drivers/AMDVLK/archive/v-${pkgver}.tar.gz")
16 sha256sums=('19e1b4344b76aa52429f06bf083ba90070c2415bda90f0991dddebf846e84752')
17             
18 prepare() {
19   local nrepos path name revision
20   
21   nrepos=$(xpath -q -e //project AMDVLK-v-${pkgver}/default.xml | wc -l)
22   
23   while (($nrepos>0))
24   do
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
29       pushd $path
30         git checkout $revision
31       popd
32     (( nrepos-- ))
33   done
36 build() {
37   cd ${srcdir}/xgl
38   cmake -H. -Bbuilds/Release64 \
39     -DCMAKE_BUILD_TYPE=Release \
40     -DBUILD_WAYLAND_SUPPORT=On \
41     -G Ninja
42     
43   ninja -C builds/Release64
46 package() {
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}/
56   
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