summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-04-15 21:12:39 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-04-15 21:12:54 +0300
commitebd021f73292bf47b26a799665d6204574bae239 (patch)
treed55327c7fcce792bb72dce8820a78242bcd3b49b /gnu
parente7548afbadbff2ab571cc189eb630e64c4e212da (diff)
downloadguix-patches-ebd021f73292bf47b26a799665d6204574bae239.tar
guix-patches-ebd021f73292bf47b26a799665d6204574bae239.tar.gz
gnu: mesa: Add powerpc64le-linux support.
* gnu/packages/gl.scm (mesa)[inputs]: Add llvm on powerpc64le. [native-inputs]: Add glslang on powerpc64le. [arguments]: Adjust configure-flags for powerpc64le to fix building on powerpc64le and enable features. Add powerpc64le specific phase to skip known failing test.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gl.scm32
1 files changed, 24 insertions, 8 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 0d2e71cc72..7b5a0b43f3 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
-;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -270,7 +270,7 @@ also known as DXTn or DXTC) for Mesa.")
("libxrandr" ,libxrandr)
("libxvmc" ,libxvmc)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc64le-linux")
;; Note: update the 'clang' input of mesa-opencl when bumping this.
`(("llvm" ,llvm-11)))
(_
@@ -282,7 +282,7 @@ also known as DXTn or DXTC) for Mesa.")
("flex" ,flex)
("gettext" ,gettext-minimal)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc64le-linux")
`(("glslang" ,glslang)))
(_
`()))
@@ -295,8 +295,10 @@ also known as DXTn or DXTC) for Mesa.")
`(#:configure-flags
'(,@(match (%current-system)
((or "armhf-linux" "aarch64-linux")
- ;; TODO: Fix svga driver for aarch64 and armhf.
+ ;; TODO: Fix svga driver for non-Intel architectures.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
+ ("powerpc64le-linux"
+ '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
'("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
;; Enable various optional features. TODO: opencl requires libclc,
@@ -313,16 +315,18 @@ also known as DXTn or DXTC) for Mesa.")
"-Dgbm=true"
"-Dshared-glapi=true"
- ;; Enable Vulkan on i686-linux and x86-64-linux.
+ ;; Explicitly enable Vulkan on some architectures.
,@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
+ ("powerpc64le-linux"
+ '("-Dvulkan-drivers=amd"))
(_
'("-Dvulkan-drivers=auto")))
- ;; Enable the Vulkan overlay layer on i686-linux and x86-64-linux.
+ ;; Enable the Vulkan overlay layer on architectures using llvm.
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc64le-linux")
'("-Dvulkan-overlay-layer=true"))
(_
'()))
@@ -336,6 +340,9 @@ also known as DXTn or DXTC) for Mesa.")
((or "x86_64-linux" "i686-linux")
'("-Ddri-drivers=i915,i965,nouveau,r200,r100"
"-Dllvm=true")) ; default is x86/x86_64 only
+ ("powerpc64le-linux"
+ '("-Ddri-drivers=nouveau,r200,r100"
+ "-Dllvm=true"))
(_
'("-Ddri-drivers=nouveau,r200,r100"))))
@@ -349,6 +356,15 @@ also known as DXTn or DXTC) for Mesa.")
(guix build meson-build-system))
#:phases
(modify-phases %standard-phases
+ ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
+ (%current-system)))
+ ;; Disable some of the llvmpipe tests.
+ `((add-after 'unpack 'disable-failing-test
+ (lambda _
+ (substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c"
+ (("0\\.5, ") ""))
+ #t)))
+ '())
,@(if (string-prefix? "i686" (or (%current-target-system)
(%current-system)))
;; Disable new test from Mesa 19 that fails on i686. Upstream
@@ -383,7 +399,7 @@ also known as DXTn or DXTC) for Mesa.")
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
,@(match (%current-system)
- ((or "i686-linux" "x86_64-linux")
+ ((or "i686-linux" "x86_64-linux" "powerpc64le-linux")
;; Install the Vulkan overlay control script to a separate
;; output to prevent a reference on Python, saving ~70 MiB
;; on the closure size.