[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: mesa: Apply MIPS patch conditionally.
From: |
Ludovic Courtès |
Subject: |
01/02: gnu: mesa: Apply MIPS patch conditionally. |
Date: |
Thu, 3 Nov 2016 10:27:54 +0000 (UTC) |
civodul pushed a commit to branch core-updates
in repository guix.
commit 4c93fe83e89473b2d16b93900c87e0da0ceecd6e
Author: Ludovic Courtès <address@hidden>
Date: Thu Nov 3 11:24:39 2016 +0100
gnu: mesa: Apply MIPS patch conditionally.
Fixes <http://bugs.gnu.org/24833>.
Reported by Mark H Weaver <address@hidden>.
* gnu/packages/gl.scm (mesa)[source](patches): Remove.
[native-inputs]: Add conditional "mips-patch" input.
[arguments]: Add conditional 'apply-mips-patch' phase.
---
gnu/packages/gl.scm | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 07e490d..50b474c 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 _