summaryrefslogtreecommitdiff
path: root/gnu/packages/plotutils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/plotutils.scm')
-rw-r--r--gnu/packages/plotutils.scm54
1 files changed, 42 insertions, 12 deletions
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index 7a26c632f7..ed01430400 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -22,6 +22,8 @@
(define-module (gnu packages plotutils)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module ((guix utils) #:select (target-x86-32?))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -83,7 +85,27 @@
(search-patches "plotutils-spline-test.patch"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags (list "--enable-libplotter")))
+ (list #:configure-flags
+ #~(list "--enable-libplotter"
+
+ ;; On i686 some tests fail due to excess floating point
+ ;; precision; work around it. However, libplotter is C++
+ ;; and thus unaffected by CFLAGS, but '-fexcess-precision'
+ ;; is not implemented for C++ as of GCC 10.
+ #$@(if (target-x86-32?)
+ #~("CFLAGS=-g -O2 -fexcess-precision=standard")
+ #~()))
+
+ #:phases
+ (if (target-x86-32?)
+ #~(modify-phases %standard-phases
+ (add-before 'check 'skip-sloppy-test
+ (lambda _
+ ;; This test reveals a slight difference in the SVG
+ ;; output due to floating point inequalities. Skip it.
+ (substitute* "test/plot2svg.test"
+ (("^exit .*") "exit 77")))))
+ #~%standard-phases)))
(inputs `(("libpng" ,libpng)
("libx11" ,libx11)
("libxt" ,libxt)
@@ -221,15 +243,23 @@ colors, styles, options and details.")
("perl" ,perl)
("texinfo" ,texinfo) ;For generating documentation
;; For the manual and the tests.
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched
- texlive-epsf
- texlive-etoolbox
- texlive-latex-base
- texlive-latex-geometry
- texlive-latex-graphics
- texlive-latex-oberdiek ; for ifluatex
- texlive-latex-parskip
- texlive-tex-texinfo)))))
+ ("texlive" ,(texlive-updmap.cfg
+ (list texlive-amsfonts
+ texlive-dvips-l3backend
+ texlive-epsf
+ texlive-etoolbox
+ texlive-fonts-ec
+ texlive-generic-infwarerr
+ texlive-generic-kvdefinekeys
+ texlive-grfext
+ texlive-latex-base
+ texlive-latex-geometry
+ texlive-latex-graphics
+ texlive-latex-kvoptions
+ texlive-latex-pdftexcmds
+ texlive-oberdiek ;for ifluatex
+ texlive-latex-parskip
+ texlive-tex-texinfo)))))
(inputs
`(("fftw" ,fftw)
("freeglut" ,freeglut)
@@ -303,9 +333,9 @@ colors, styles, options and details.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'xasy' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/share/asymptote/GUI/xasy.py")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t)))))
(home-page "http://asymptote.sourceforge.net")
(synopsis "Script-based vector graphics language")