summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMatt Coffin2019-06-08 12:23:51 -0600
committerMatt Coffin2019-06-14 13:26:50 -0600
commitefb7496ca4d50c509235f7901dc5ce013e98fd3e (patch)
treef2471aec991cf77120d723a33e109f00d814707d /PKGBUILD
parentc9e31c5b49a9a852d1f5696e23f3031805a4a6ae (diff)
downloadaur-efb7496ca4d50c509235f7901dc5ce013e98fd3e.tar.gz
Use repo for downloading correct versions of dependencies
Previously, sources were downloaded by manually specifying branches for projects in the sources array in the PKGBUILD. This patch follows the instructions in the AMDVLK README to use the "repo" tool for managing dependencies. This is needed to avoid continually breaking the build by pulling the wrong versions of dependencies. The AMDVLK project maintains a "default.xml" file describing the required versions of each of the other repositories (but oddly hasn't yet specified `wsa`, so there's a temporary fix with the master branch of that still being in the sources array). v2: Fix pkgver sourcing, and use release tag from AMDVLK if available
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 38 insertions, 27 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e180ab4faab9..8244fd56101b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Maintainer: AdriƠ Cereto i MassaguƩ <ssorgatem at gmail.com>
pkgname=amdvlk-git
-pkgver=r43.6d9d93a
+pkgver=v.2019.Q2.5.r0.193a788
pkgrel=1
pkgdesc="AMD's standalone Vulkan driver"
arch=(x86_64)
@@ -12,30 +12,42 @@ license=('MIT')
depends=('vulkan-icd-loader')
provides=('vulkan-amdvlk' 'vulkan-driver')
conflicts=('vulkan-amdvlk')
-makedepends=('dri2proto' 'xorg-server-devel' 'libxrandr' 'cmake' 'python' 'libxml2' 'wayland' 'libdrm' 'git')
-source=('llvm::git+https://github.com/GPUOpen-Drivers/llvm.git#branch=amd-vulkan-dev'
- 'git+https://github.com/GPUOpen-Drivers/xgl.git#branch=dev'
- 'git+https://github.com/GPUOpen-Drivers/pal.git#branch=dev'
- 'git+https://github.com/GPUOpen-Drivers/wsa.git#branch=master'
- 'git+https://github.com/GPUOpen-Drivers/AMDVLK.git#branch=dev'
- 'git+https://github.com/GPUOpen-Drivers/llpc.git#branch=dev'
- )
-sha256sums=('SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP')
+makedepends=('dri2proto' 'xorg-server-devel' 'libxrandr' 'cmake' 'python' 'libxml2' 'wayland' 'libdrm' 'git' 'ninja' 'repo')
+source=('git+https://github.com/GPUOpen-Drivers/wsa.git#branch=master')
+sha512sums=('SKIP')
pkgver() {
- XGL_VER=$(cd xgl; printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
+ pushd drivers/AMDVLK > /dev/null
+ AMDVLK_VER=$(printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')")
+ popd > /dev/null
+ if [ -z "$AMDVLK_VER" ]; then
+ pushd drivers/xgl > /dev/null
+ XGL_VER=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
+ popd > /dev/null
+ else
+ XGL_VER=$AMDVLK_VER
+ fi
#PAL_VER=$(cd pal; printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
echo "$XGL_VER"
}
prepare() {
+ cd "$srcdir"
+ repo init -u 'https://github.com/GPUOpen-Drivers/AMDVLK.git' -b master
+ repo sync
+ if [ ! -e ./drivers/wsa ]; then
+ ln -rs ./wsa ./drivers/wsa
+ fi
# fix building with commit f609020
- sed -i "s/<drm/<libdrm/g" pal/src/core/os/lnx/display/displayWindowSystem.h
+ # sed -i "s/<drm/<libdrm/g" pal/src/core/os/lnx/display/displayWindowSystem.h
+ # pushd "$srcdir/pal"
+ # patch -p1 < ../0001-pal-clang.patch
+ # popd
+ # pushd "$srcdir/xgl"
+ # patch -p1 < ../0002-xgl-clang.patch
+ # popd
+
+ msg 'No patches to apply...'
}
build() {
@@ -45,26 +57,25 @@ build() {
export LDFLAGS=${LDFLAGS/,-z,now}
msg "building xgl..."
- cd xgl
- cmake -H. -Bbuilds/Release64 \
- -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_WAYLAND_SUPPORT=On \
- -DBUILD_WSA=On
+ cd drivers/xgl
+ cmake -G Ninja -H. -Bbuilds/Release64 \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_WAYLAND_SUPPORT=On \
+ -DBUILD_WSA=On
cd builds/Release64
- make
+ ninja
msg "building xgl finished!"
}
package() {
install -m755 -d "${pkgdir}"/usr/lib
- install -m755 -d "${pkgdir}"/usr/share/vulkan/icd.d
install -m755 -d "${pkgdir}"/usr/share/licenses/amdvlk-git
install -m755 -d "${pkgdir}"/etc/amd
- install xgl/builds/Release64/icd/amdvlk64.so "${pkgdir}"/usr/lib/
- install AMDVLK/json/Redhat/amd_icd64.json "${pkgdir}"/usr/share/vulkan/icd.d/
- install AMDVLK/LICENSE.txt "${pkgdir}"/usr/share/licenses/amdvlk-git/
+ install drivers/xgl/builds/Release64/icd/amdvlk64.so "${pkgdir}"/usr/lib/
+ install -D -m644 -t "${pkgdir}/usr/share/vulkan/icd.d" drivers/AMDVLK/json/Redhat/amd_icd64.json
+ install -D -m644 -t "${pkgdir}/usr/share/licenses/amdvlk-git" drivers/AMDVLK/LICENSE.txt
sed -i "s/\/lib64/\/lib/g" "${pkgdir}"/usr/share/vulkan/icd.d/amd_icd64.json
}