gnu: mesa: Unify custom phases.
* gnu/packages/gl.scm (mesa)[arguments]: Rewrite custom 'disable-failing-test phases to be one joint phase. Adjust 'split-outputs phase to simplify.master
parent
c2eb36790f
commit
42162c84dc
|
@ -360,41 +360,33 @@ also known as DXTn or DXTC) for Mesa.")
|
||||||
(guix build meson-build-system))
|
(guix build meson-build-system))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
|
(add-after 'unpack 'disable-failing-test
|
||||||
(%current-system)))
|
(lambda _
|
||||||
;; Disable some of the llvmpipe tests.
|
,@(match (%current-system)
|
||||||
`((add-after 'unpack 'disable-failing-test
|
("powerpc64le"
|
||||||
(lambda _
|
;; Disable some of the llvmpipe tests.
|
||||||
(substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c"
|
`((substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c"
|
||||||
(("0\\.5, ") "")))))
|
(("0\\.5, ") ""))))
|
||||||
'())
|
("powerpc"
|
||||||
,@(if (string-prefix? "powerpc-" (or (%current-target-system)
|
;; There are some tests which fail specifically on powerpc.
|
||||||
(%current-system)))
|
`((substitute* '(;; LLVM ERROR: Relocation type not implemented yet!
|
||||||
;; There are some tests which fail specifically on powerpc.
|
"src/gallium/drivers/llvmpipe/meson.build"
|
||||||
`((add-after 'unpack 'disable-failing-test
|
;; This is probably a big-endian test failure.
|
||||||
(lambda _
|
"src/gallium/targets/osmesa/meson.build")
|
||||||
(substitute* '(;; LLVM ERROR: Relocation type not implemented yet!
|
(("if with_tests") "if not with_tests"))
|
||||||
"src/gallium/drivers/llvmpipe/meson.build"
|
(substitute* "src/util/tests/format/meson.build"
|
||||||
;; This is probably a big-endian test failure.
|
;; This is definately an endian-ness test failure.
|
||||||
"src/gallium/targets/osmesa/meson.build")
|
(("'u_format_test', ") ""))
|
||||||
(("if with_tests") "if not with_tests"))
|
;; It is only this portion of the test which fails.
|
||||||
(substitute* "src/util/tests/format/meson.build"
|
(substitute* "src/mesa/main/tests/meson.build"
|
||||||
;; This is definately an endian-ness test failure.
|
((".*mesa_formats.*") ""))))
|
||||||
(("'u_format_test', ") ""))
|
("i686-linux"
|
||||||
;; It is only this portion of the test which fails.
|
;; Disable new test from Mesa 19 that fails on i686. Upstream
|
||||||
(substitute* "src/mesa/main/tests/meson.build"
|
;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
|
||||||
((".*mesa_formats.*") "")))))
|
`((substitute* "src/util/tests/format/meson.build"
|
||||||
'())
|
(("'u_format_test',") ""))))
|
||||||
,@(if (string-prefix? "i686" (or (%current-target-system)
|
(_
|
||||||
(%current-system)))
|
'((display "No tests to disable on this architecture.\n"))))))
|
||||||
;; Disable new test from Mesa 19 that fails on i686. Upstream
|
|
||||||
;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
|
|
||||||
`((add-after 'unpack 'disable-failing-test
|
|
||||||
(lambda _
|
|
||||||
(substitute* "src/util/tests/format/meson.build"
|
|
||||||
(("'u_format_test',") ""))
|
|
||||||
#t)))
|
|
||||||
'())
|
|
||||||
(add-after 'unpack 'fix-tests
|
(add-after 'unpack 'fix-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; See <https://gitlab.freedesktop.org/mesa/mesa/-/issues/3181>.
|
;; See <https://gitlab.freedesktop.org/mesa/mesa/-/issues/3181>.
|
||||||
|
@ -424,22 +416,13 @@ also known as DXTn or DXTC) for Mesa.")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(bin (assoc-ref outputs "bin")))
|
(bin (assoc-ref outputs "bin")))
|
||||||
,@(match (%current-system)
|
;; Not all architectures have the Vulkan overlay control script.
|
||||||
((or "i686-linux" "x86_64-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux")
|
(mkdir-p (string-append bin "/bin"))
|
||||||
;; Install the Vulkan overlay control script to a separate
|
(call-with-output-file (string-append bin "/bin/.empty")
|
||||||
;; output to prevent a reference on Python, saving ~70 MiB
|
(const #t))
|
||||||
;; on the closure size.
|
(copy-recursively (string-append out "/bin")
|
||||||
'((copy-recursively (string-append out "/bin")
|
(string-append bin "/bin"))
|
||||||
(string-append bin "/bin"))
|
(delete-file-recursively (string-append out "/bin")))))
|
||||||
(delete-file-recursively (string-append out "/bin"))))
|
|
||||||
(_
|
|
||||||
;; XXX: On architectures without the Vulkan overlay layer
|
|
||||||
;; just create an empty file because outputs can not be
|
|
||||||
;; added conditionally.
|
|
||||||
'((mkdir-p (string-append bin "/bin"))
|
|
||||||
(call-with-output-file (string-append bin "/bin/.empty")
|
|
||||||
(const #t)))))
|
|
||||||
#t)))
|
|
||||||
(add-after 'install 'symlinks-instead-of-hard-links
|
(add-after 'install 'symlinks-instead-of-hard-links
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; All the drivers and gallium targets create hard links upon
|
;; All the drivers and gallium targets create hard links upon
|
||||||
|
|
Reference in New Issue