1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages plotutils)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages algebra)
26 #:use-module (gnu packages bdw-gc)
27 #:use-module (gnu packages xorg)
28 #:use-module (gnu packages image)
29 #:use-module (gnu packages ghostscript)
30 #:use-module (gnu packages guile)
31 #:use-module (gnu packages gl)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages maths)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages readline)
38 #:use-module (gnu packages texinfo)
39 #:use-module (gnu packages texlive)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages))
43 (define-public plotutils
49 (uri (string-append "mirror://gnu/plotutils/plotutils-"
53 "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg"))
54 (patches (list (search-patch "plotutils-libpng-jmpbuf.patch")))
55 (modules '((guix build utils)))
57 ;; Force the use of libXaw7 instead of libXaw. When not doing
58 ;; that, libplot.la ends up containing just "-lXaw" (without
59 ;; "-L/path/to/Xaw"), due to the fact that there is no
60 ;; libXaw.la, which forces us to propagate libXaw.
61 '(substitute* "configure"
64 (build-system gnu-build-system)
65 (inputs `(("libpng" ,libpng)
71 "http://www.gnu.org/software/plotutils/")
72 (synopsis "Plotting utilities and library")
74 "GNU Plotutils is a package for plotting and working with 2D graphics.
75 It includes a library, \"libplot\", for C and C++ for exporting 2D vector
76 graphics in many file formats. It also has support for 2D vector graphics
77 animations. The package also contains command-line programs for plotting
79 (license license:gpl2+)))
81 (define-public guile-charting
83 (name "guile-charting")
87 (uri (string-append "http://wingolog.org/pub/guile-charting/"
88 "guile-charting-" version ".tar.gz"))
91 "0w5qiyv9v0ip5li22x762bm48g8xnw281w66iyw094zdw611pb2m"))
92 (modules '((guix build utils)))
95 ;; Use the standard location for modules.
96 (substitute* "Makefile.in"
98 "godir = $(moddir)\n"))))))
99 (build-system gnu-build-system)
100 (native-inputs `(("pkg-config" ,pkg-config)))
101 (inputs `(("guile" ,guile-2.0)))
102 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
103 (home-page "http://wingolog.org/software/guile-charting/")
104 (synopsis "Create charts and graphs in Guile")
106 "Guile-Charting is a Guile Scheme library to create bar charts and graphs
107 using the Cairo drawing library.")
108 (license license:lgpl2.1+)))
110 (define-public ploticus
116 (uri (string-append "mirror://sourceforge/ploticus/ploticus/"
117 version "/ploticus242_src.tar.gz"))
120 "1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z"))
121 (modules '((guix build utils)))
123 ;; Install binaries in the right place.
124 '(substitute* "src/Makefile"
126 (string-append "INSTALLBIN = $(out)/bin"))))))
127 (build-system gnu-build-system)
131 (modify-phases %standard-phases
132 (replace 'configure (lambda _ (chdir "src")))
133 (add-before 'install 'make-target-directories
134 (lambda* (#:key outputs #:allow-other-keys)
135 (let ((out (assoc-ref outputs "out")))
136 (mkdir-p (string-append out "/bin"))
138 (add-after 'install 'install-prefabs
139 (lambda* (#:key outputs #:allow-other-keys)
140 (let* ((out (assoc-ref outputs "out"))
141 (dir (string-append out
142 "/share/ploticus/prefabs"))
143 (bin (string-append out "/bin")))
146 ;; Install "prefabs".
147 (for-each (lambda (file)
149 (string-append dir "/"
151 (copy-file file target)))
152 (find-files "../prefabs" "."))
154 ;; Allow them to be found.
155 (wrap-program (string-append bin "/pl")
156 `("PLOTICUS_PREFABS" ":" = (,dir)))))))))
161 (home-page "http://ploticus.sourceforge.net/")
162 (synopsis "Command-line tool for producing plots and charts")
164 "Ploticus is a non-interactive software package for producing plots,
165 charts, and graphics from data. Ploticus is good for automated or
166 just-in-time graph generation, handles date and time data nicely, and has
167 basic statistical capabilities. It allows significant user control over
168 colors, styles, options and details.")
169 (license license:gpl2+)))
171 (define-public asymptote
177 (uri (string-append "mirror://sourceforge/asymptote/"
178 version "/asymptote-" version ".src.tgz"))
181 "11f28vxw0ybhvl7vxmqcdwvw7y6gz55ykw9ybgzb2px6lsvgag7z"))
182 (patches (list (search-patch "asymptote-gsl2.patch")))))
183 (build-system gnu-build-system)
184 ;; Note: The 'asy' binary retains a reference to docdir for use with its
185 ;; "help" command in interactive mode, so adding a "doc" output is not
188 `(("gs" ,ghostscript) ;For tests
189 ("texinfo" ,texinfo) ;For generating documentation
190 ("texlive" ,texlive) ;For tests and documentation
194 ("freeglut" ,freeglut)
198 ("readline" ,readline)
202 (list (string-append "--enable-gc=" (assoc-ref %build-inputs "libgc"))
203 (string-append "--with-latex="
204 (assoc-ref %outputs "out")
205 "/share/texmf/tex/latex")
206 (string-append "--with-context="
207 (assoc-ref %outputs "out")
208 "/share/texmf/tex/context/third"))
209 #:phases (modify-phases %standard-phases
210 (add-before 'build 'patch-pdf-viewer
212 ;; Default to a free pdf viewer
213 (substitute* "settings.cc"
214 (("defaultPDFViewer=\"acroread\"")
215 "defaultPDFViewer=\"gv\"")))))))
216 (home-page "http://asymptote.sourceforge.net")
217 (synopsis "Script-based vector graphics language")
219 "Asymptote is a powerful descriptive vector graphics language for
220 technical drawing, inspired by MetaPost but with an improved C++-like syntax.
221 Asymptote provides for figures the same high-quality level of typesetting that
222 LaTeX does for scientific text.")
223 ;; Most source files do not contain license statements, but the README
224 ;; contains: "All source files in the Asymptote project, unless explicitly
225 ;; noted otherwise, are released under version 3 (or later) of the GNU
226 ;; Lesser General Public License"
227 (license license:lgpl3+)))