summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-06-20 15:18:35 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-06-20 16:02:04 +0200
commitb7a46ed22764db9097aba96e68143d46b2a75be0 (patch)
treeebd39d6181a8adb0685fbff29b7ef2cb06077ab9 /gnu/packages/maths.scm
parent0106d6b40dc0b8f1c81326e633bfa5134a446a9c (diff)
gnu: openblas: Fix build on i686.
* gnu/packages/patches/openblas-fix-tests-i686.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/maths.scm (openblas)[native-inputs]: Add it. [arguments]: Add phase to apply it on i686 systems only.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a644468627..7d70ac1fa6 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2836,6 +2836,16 @@ parts of it.")
#:phases
(modify-phases %standard-phases
(delete 'configure)
+ ;; Conditionally apply a patch on i686 to avoid rebuilding
+ ;; all architectures. FIXME: This should be moved to the
+ ;; (source (patches ...)) field in the next rebuild cycle.
+ ,@(if (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))
+ `((add-after 'unpack 'fix-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "patch" "-p1"
+ "--input" (assoc-ref inputs "i686-fix-tests.patch")))))
+ '())
(add-before 'build 'set-extralib
(lambda* (#:key inputs #:allow-other-keys)
;; Get libgfortran found when building in utest.
@@ -2847,6 +2857,11 @@ parts of it.")
`(("fortran-lib" ,gfortran "lib")))
(native-inputs
`(("cunit" ,cunit)
+ ,@(if (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))
+ `(("i686-fix-tests.patch"
+ ,(search-patch "openblas-fix-tests-i686.patch")))
+ '())
("fortran" ,gfortran)
("perl" ,perl)))
(home-page "http://www.openblas.net/")