gnu: r-maldiquant: Move to (gnu packages cran).
[jackhill/guix/guix.git] / gnu / packages / plotutils.scm
index a1e32eb..0efc253 100644 (file)
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016, 2017, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -56,7 +57,6 @@
              (sha256
               (base32
                "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg"))
-             (patches (search-patches "plotutils-libpng-jmpbuf.patch"))
              (modules '((guix build utils)))
              (snippet
               ;; Force the use of libXaw7 instead of libXaw.  When not doing
                  (substitute* "configure"
                    (("-lXaw")
                     "-lXaw7"))
-                 #t))))
+                 ;; Use the `png_jmpbuf' accessor, as recommended since libpng
+                 ;; 1.4.0 (see:
+                 ;; http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt).
+                 (substitute* "libplot/z_write.c"
+                   (("png_ptr->jmpbuf")
+                    "png_jmpbuf (png_ptr)"))
+                 #t))
+             (patches
+              ;; The test suite fails on some architectures such as i686 (see:
+              ;; https://lists.gnu.org/archive/html/bug-plotutils/2016-04/msg00002.html).
+              ;; The following Debian patch works around it.
+              (search-patches "plotutils-spline-test.patch"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--enable-libplotter")))
     (inputs `(("libpng" ,libpng)
               ("libx11" ,libx11)
               ("libxt" ,libxt)
               ("libxaw" ,libxaw)))
-
-    (home-page
-     "https://www.gnu.org/software/plotutils/")
+    (home-page "https://www.gnu.org/software/plotutils/")
     (synopsis "Plotting utilities and library")
     (description
-     "GNU Plotutils is a package for plotting and working with 2D graphics. 
-It includes a library, \"libplot\", for C and C++ for exporting 2D vector
-graphics in many file formats.  It also has support for 2D vector graphics
-animations.  The package also contains command-line programs for plotting
-scientific data.")
+     "GNU Plotutils is a package for plotting and working with 2D graphics.
+It includes the C library @code{libplot} and the C++ @code{libplotter} library
+for exporting 2D vector graphics in many file formats.  It also has support
+for 2D vector graphics animations.  The package also contains command-line
+programs for plotting scientific data.")
     (license license:gpl2+)))
 
 (define-public guile-charting
@@ -197,14 +208,14 @@ colors, styles, options and details.")
 (define-public asymptote
   (package
     (name "asymptote")
-    (version "2.65")
+    (version "2.67")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/asymptote/"
                            version "/asymptote-" version ".src.tgz"))
        (sha256
-        (base32 "0i4qqlvzz69mhdq6kf689sa9rxfb1cwsg1nx88hryb291hddgqqm"))))
+        (base32 "16rdwxal27fikzfqsm2sb8ji78whpxl98rdyyp0ky2qlh55mf7la"))))
     (build-system gnu-build-system)
     ;; Note: The 'asy' binary retains a reference to docdir for use with its
     ;; "help" command in interactive mode, so adding a "doc" output is not
@@ -217,6 +228,7 @@ colors, styles, options and details.")
        ;; For the manual and the tests.
        ("texlive" ,(texlive-union (list texlive-amsfonts
                                         texlive-epsf
+                                        texlive-etoolbox
                                         texlive-latex-base
                                         texlive-latex-geometry
                                         texlive-latex-graphics