summaryrefslogtreecommitdiff
path: root/gnu/packages/gl.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-11-03 11:24:39 +0100
committerLudovic Courtès <ludo@gnu.org>2016-11-03 11:24:39 +0100
commit4c93fe83e89473b2d16b93900c87e0da0ceecd6e (patch)
tree39e625fce492b7dd7feb766b2695f977196c5bb9 /gnu/packages/gl.scm
parentb3cc0dce089917b1935218296f868ab6eedff5ed (diff)
gnu: mesa: Apply MIPS patch conditionally.
Fixes <http://bugs.gnu.org/24833>. Reported by Mark H Weaver <mhw@netris.org>. * gnu/packages/gl.scm (mesa)[source](patches): Remove. [native-inputs]: Add conditional "mips-patch" input. [arguments]: Add conditional 'apply-mips-patch' phase.
Diffstat (limited to 'gnu/packages/gl.scm')
-rw-r--r--gnu/packages/gl.scm31
1 files changed, 21 insertions, 10 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 07e490d58b..50b474c623 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -204,15 +204,7 @@ also known as DXTn or DXTC) for Mesa.")
version "/mesa-" version ".tar.xz"))
(sha256
(base32
- "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms"))
- (patches
- ;; XXX To prevent a large number of rebuilds on other systems,
- ;; apply the following patch on MIPS systems only. In the next
- ;; core-updates cycle, this patch could be applied on all platforms.
- (if (string-prefix? "mips" (or (%current-target-system)
- (%current-system)))
- (search-patches "mesa-wayland-egl-symbols-check-mips.patch")
- '()))))
+ "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms"))))
(build-system gnu-build-system)
(propagated-inputs
`(("glproto" ,glproto)
@@ -239,7 +231,16 @@ also known as DXTn or DXTC) for Mesa.")
("wayland" ,wayland)))
(native-inputs
`(("pkg-config" ,pkg-config)
- ("python" ,python-2)))
+ ("python" ,python-2)
+
+ ;; XXX To prevent a large number of rebuilds on other systems,
+ ;; apply the following patch on MIPS systems only. In the next
+ ;; core-updates cycle, this patch could be applied on all platforms.
+ ,@(if (string-prefix? "mips" (or (%current-target-system)
+ (%current-system)))
+ `(("mips-patch"
+ ,(search-patch "mesa-wayland-egl-symbols-check-mips.patch")))
+ '())))
(arguments
`(#:configure-flags
'(;; drop r300 from default gallium drivers, as it requires llvm
@@ -266,6 +267,16 @@ also known as DXTn or DXTC) for Mesa.")
'("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
#:phases
(modify-phases %standard-phases
+ ;; Add an 'apply-mips-patch' phase conditionally (see above.)
+ ,@(if (string-prefix? "mips" (or (%current-target-system)
+ (%current-system)))
+ `((add-after 'unpack 'apply-mips-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs "mips-patch")))
+ (zero? (system* "patch" "-p1" "--force"
+ "--input" patch))))))
+ '())
+
(add-after
'unpack 'patch-create_test_cases
(lambda _