mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gsl: Use gexps.
* gnu/packages/maths.scm (gsl)[arguments]: Use gexps. Change-Id: Ic81576c61a237ff41d6ed767dcf58e38ca96e9ca
This commit is contained in:
parent
4d8382ab84
commit
461df5574f
1 changed files with 58 additions and 55 deletions
|
@ -728,42 +728,42 @@ precision floating point numbers.")
|
||||||
(outputs '("out" "static"))
|
(outputs '("out" "static"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(let ((system (%current-system)))
|
(list ;; FIXME: Setting CFLAGS=-fPIC is not only unnecessary, it's also
|
||||||
`(;; FIXME: Setting CFLAGS=-fPIC is not only unnecessary, it's also
|
|
||||||
;; harmful because it removes the default '-O2 -g', meaning that the
|
;; harmful because it removes the default '-O2 -g', meaning that the
|
||||||
;; library ends up being compiled as -O0. Consequently, some
|
;; library ends up being compiled as -O0. Consequently, some
|
||||||
;; numerical tests fail, notably on i686-linux. TODO: Remove
|
;; numerical tests fail, notably on i686-linux. TODO: Remove
|
||||||
;; 'CFLAGS=-fPIC' for all systems and revisit or remove
|
;; 'CFLAGS=-fPIC' for all systems and revisit or remove
|
||||||
;; 'disable-failing-tests' phases accordingly.
|
;; 'disable-failing-tests' phases accordingly.
|
||||||
#:make-flags ,(if (and (not (%current-target-system))
|
#:make-flags (if (and (not (%current-target-system))
|
||||||
(string=? system "i686-linux"))
|
(string=? (%current-system) "i686-linux"))
|
||||||
''()
|
#~'()
|
||||||
'(list "CFLAGS=-fPIC"))
|
#~(list "CFLAGS=-fPIC"))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
,@(cond
|
#$@(cond
|
||||||
((and (target-riscv64?)
|
((and (target-riscv64?)
|
||||||
(%current-target-system))
|
(%current-target-system))
|
||||||
'((add-after 'unpack 'force-bootstrap
|
#~((add-after 'unpack 'force-bootstrap
|
||||||
(lambda _
|
(lambda _
|
||||||
;; gsl ships with an old configure script that does not
|
;; gsl ships with an old configure script that does not
|
||||||
;; support riscv64. Regenerate it.
|
;; support riscv64. Regenerate it.
|
||||||
(delete-file "configure")))))
|
(delete-file "configure")))))
|
||||||
|
|
||||||
((or (string-prefix? "aarch64" system)
|
((or (string-prefix? "aarch64" (%current-system))
|
||||||
(string-prefix? "powerpc" system))
|
(string-prefix? "powerpc" (%current-system)))
|
||||||
;; Some sparse matrix tests are failing on AArch64 and PowerPC:
|
;; Some sparse matrix tests are failing on AArch64 and PowerPC:
|
||||||
;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
|
;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
|
||||||
'((add-before 'check 'disable-failing-tests
|
#~((add-before 'check 'disable-failing-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "spmatrix/test.c"
|
(substitute* "spmatrix/test.c"
|
||||||
((".*test_complex.*") "\n"))))))
|
((".*test_complex.*")
|
||||||
|
"\n"))))))
|
||||||
|
|
||||||
((string-prefix? "i686" system)
|
((string-prefix? "i686" (%current-system))
|
||||||
;; There are rounding issues with these tests on i686:
|
;; There are rounding issues with these tests on i686:
|
||||||
;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
|
;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
|
||||||
;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
|
;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
|
||||||
'((add-before 'check 'disable-failing-tests
|
#~((add-before 'check 'disable-failing-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "spmatrix/test.c"
|
(substitute* "spmatrix/test.c"
|
||||||
((".*test_all.*") "\n")
|
((".*test_all.*") "\n")
|
||||||
|
@ -777,16 +777,19 @@ precision floating point numbers.")
|
||||||
(("gsl_ieee_env_setup.*" all)
|
(("gsl_ieee_env_setup.*" all)
|
||||||
(string-append "exit (77);\n" all)))))))
|
(string-append "exit (77);\n" all)))))))
|
||||||
|
|
||||||
(else '()))
|
(else #~()))
|
||||||
(add-after 'install 'move-static-library
|
(add-after 'install 'move-static-library
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((static (string-append (assoc-ref outputs "static") "/lib/"))
|
(let ((static (string-append (assoc-ref outputs
|
||||||
(out (string-append (assoc-ref outputs "out") "/lib/")))
|
"static")
|
||||||
|
"/lib/"))
|
||||||
|
(out (string-append (assoc-ref outputs "out")
|
||||||
|
"/lib/")))
|
||||||
(mkdir-p static)
|
(mkdir-p static)
|
||||||
(rename-file (string-append out "libgsl.a")
|
(rename-file (string-append out "libgsl.a")
|
||||||
(string-append static "libgsl.a"))
|
(string-append static "libgsl.a"))
|
||||||
(rename-file (string-append out "libgslcblas.a")
|
(rename-file (string-append out "libgslcblas.a")
|
||||||
(string-append static "libgslcblas.a")))))))))
|
(string-append static "libgslcblas.a"))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(if (and (target-riscv64?)
|
(if (and (target-riscv64?)
|
||||||
(%current-target-system))
|
(%current-target-system))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue