summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Grande2021-01-09 14:13:08 -0500
committerVincent Grande2021-01-09 14:13:08 -0500
commit2de00a3c7f298cd4a6435c8d43a707b298f359b9 (patch)
tree68a37f08395f54b7e22b5b9b9bb769a27c3f55ab
parent56b00b01be3ce3809ee1c274cac367ffe18fa034 (diff)
downloadaur-2de00a3c7f298cd4a6435c8d43a707b298f359b9.tar.gz
add support for multple llvm packages
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD47
2 files changed, 49 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d47c48a9bd71..0b48b3840ad9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -19,7 +19,8 @@ pkgbase = mesa-minimal+-git
makedepends = meson
makedepends = ninja
makedepends = glslang
- makedepends = llvm-minimal-git
+ makedepends = llvm
+ makedepends = lib32-llvm=11.0.0
depends = libdrm
depends = libxxf86vm
depends = libxdamage
@@ -30,7 +31,8 @@ pkgbase = mesa-minimal+-git
depends = libclc
depends = vulkan-icd-loader
depends = zstd
- depends = llvm-libs-minimal-git
+ depends = llvm-libs
+ depends = lib32-llvm-libs=11.0.0
optdepends = opengl-man-pages: for the OpenGL API man pages
optdepends = llvm-minimal-git: opencl
provides = mesa
diff --git a/PKGBUILD b/PKGBUILD
index 30233f09e181..193f1e2b1860 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,9 +17,9 @@ pkgrel=1
arch=('x86_64')
makedepends=('git' 'python-mako' 'xorgproto'
'libxml2' 'libx11' 'libvdpau' 'libva' 'elfutils' 'libxrandr'
- 'ocl-icd' 'wayland-protocols' 'meson' 'ninja' 'glslang' 'llvm-minimal-git')
+ 'ocl-icd' 'wayland-protocols' 'meson' 'ninja' 'glslang' 'llvm')
depends=('libdrm' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf'
- 'libglvnd' 'wayland' 'libclc' 'vulkan-icd-loader' 'zstd' 'llvm-libs-minimal-git')
+ 'libglvnd' 'wayland' 'libclc' 'vulkan-icd-loader' 'zstd' 'llvm-libs')
# In order to keep the package simple and ease troubleshooting only use one llvm implementation
optdepends=('opengl-man-pages: for the OpenGL API man pages'
'llvm-minimal-git: opencl')
@@ -38,6 +38,49 @@ sha512sums=('SKIP'
# The responsibility to validate the value of NINJAFLAGS lies with the user.
# If unsure, use NINJAFLAGS=""
+# NINJAFLAGS is an env var used to pass commandline options to ninja
+# NOTE: It's your responbility to validate the value of $NINJAFLAGS. If unsure, don't set it.
+
+# MESA_WHICH_LLVM is an environment variable used to determine which llvm package tree is used to built mesa-git against.
+# Adding a line to ~/.bash_rc that sets this value is the simplest way to ensure a specific choice.
+#
+# 1: llvm-minimal-git (aur) preferred value
+# 2: llvm-git (aur)
+# 3 llvm-git (lordheavy unoffical repo)
+# 4 llvm (stable from extra) default value
+#
+# N.B. make sure lib32-mesa-git uses same value for this as mesa-git to avoid problems !
+#
+
+if [[ ! $MESA_WHICH_LLVM ]] ; then
+ MESA_WHICH_LLVM=4
+fi
+
+case $MESA_WHICH_LLVM in
+ 1)
+ # aur lone_wolf-llvm-git
+ makedepends+=('lib32-llvm-minimal-git')
+ depends+=('lib32-llvm-libs-minimal-git')
+ ;;
+ 2)
+ # aur llvm-git
+ # depending on aur-lib32-llvm-* to avoid mixup with LH llvm-git
+ makedepends+=('aur-lib32-llvm-git')
+ depends+=('aur-lib32-llvm-libs-git')
+ ;;
+ 3)
+ # mesa-git/llvm-git (lordheavy unofficial repo)
+ makedepends+=('lib32-llvm-git')
+ depends+=('lib32-llvm-libs-git')
+ ;;
+ 4)
+ # extra/llvm
+ makedepends+=(lib32-llvm=11.0.0)
+ depends+=(lib32-llvm-libs=11.0.0)
+ ;;
+ *)
+esac
+
pkgver() {
cd mesa
read -r _ver <VERSION