projects/guix·blob version-0.9.0 · refs

158 lines · 6.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages plotutils)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages xorg)
25 #:use-module (gnu packages image)
26 #:use-module (gnu packages guile)
27 #:use-module (gnu packages gtk)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages))
31
32(define-public plotutils
33 (package
34 (name "plotutils")
35 (version "2.6")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "mirror://gnu/plotutils/plotutils-"
39 version ".tar.gz"))
40 (sha256
41 (base32
42 "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg"))
43 (patches (list (search-patch "plotutils-libpng-jmpbuf.patch")))
44 (modules '((guix build utils)))
45 (snippet
46 ;; Force the use of libXaw7 instead of libXaw. When not doing
47 ;; that, libplot.la ends up containing just "-lXaw" (without
48 ;; "-L/path/to/Xaw"), due to the fact that there is no
49 ;; libXaw.la, which forces us to propagate libXaw.
50 '(substitute* "configure"
51 (("-lXaw")
52 "-lXaw7")))))
53 (build-system gnu-build-system)
54 (inputs `(("libpng" ,libpng)
55 ("libx11" ,libx11)
56 ("libxt" ,libxt)
57 ("libxaw" ,libxaw)))
58
59 (home-page
60 "http://www.gnu.org/software/plotutils/")
61 (synopsis "Plotting utilities and library")
62 (description
63 "GNU Plotutils is a package for plotting and working with 2D graphics.
64It includes a library, \"libplot\", for C and C++ for exporting 2D vector
65graphics in many file formats. It also has support for 2D vector graphics
66animations. The package also contains command-line programs for plotting
67scientific data.")
68 (license license:gpl2+)))
69
70(define-public guile-charting
71 (package
72 (name "guile-charting")
73 (version "0.2.0")
74 (source (origin
75 (method url-fetch)
76 (uri (string-append "http://wingolog.org/pub/guile-charting/"
77 "guile-charting-" version ".tar.gz"))
78 (sha256
79 (base32
80 "0w5qiyv9v0ip5li22x762bm48g8xnw281w66iyw094zdw611pb2m"))
81 (modules '((guix build utils)))
82 (snippet
83 '(begin
84 ;; Use the standard location for modules.
85 (substitute* "Makefile.in"
86 (("godir = .*$")
87 "godir = $(moddir)\n"))))))
88 (build-system gnu-build-system)
89 (native-inputs `(("pkg-config" ,pkg-config)))
90 (inputs `(("guile" ,guile-2.0)))
91 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
92 (home-page "http://wingolog.org/software/guile-charting/")
93 (synopsis "Create charts and graphs in Guile")
94 (description
95 "Guile-Charting is a Guile Scheme library to create bar charts and graphs
96using the Cairo drawing library.")
97 (license license:lgpl2.1+)))
98
99(define-public ploticus
100 (package
101 (name "ploticus")
102 (version "2.42")
103 (source (origin
104 (method url-fetch)
105 (uri (string-append "mirror://sourceforge/ploticus/ploticus/"
106 version "/ploticus242_src.tar.gz"))
107 (sha256
108 (base32
109 "1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z"))
110 (modules '((guix build utils)))
111 (snippet
112 ;; Install binaries in the right place.
113 '(substitute* "src/Makefile"
114 (("INSTALLBIN =.*$")
115 (string-append "INSTALLBIN = $(out)/bin"))))))
116 (build-system gnu-build-system)
117 (arguments
118 '(#:tests? #f
119 #:phases
120 (modify-phases %standard-phases
121 (replace 'configure (lambda _ (chdir "src")))
122 (add-before 'install 'make-target-directories
123 (lambda* (#:key outputs #:allow-other-keys)
124 (let ((out (assoc-ref outputs "out")))
125 (mkdir-p (string-append out "/bin"))
126 #t)))
127 (add-after 'install 'install-prefabs
128 (lambda* (#:key outputs #:allow-other-keys)
129 (let* ((out (assoc-ref outputs "out"))
130 (dir (string-append out
131 "/share/ploticus/prefabs"))
132 (bin (string-append out "/bin")))
133 (mkdir-p dir)
134
135 ;; Install "prefabs".
136 (for-each (lambda (file)
137 (let ((target
138 (string-append dir "/"
139 (basename file))))
140 (copy-file file target)))
141 (find-files "../prefabs" "."))
142
143 ;; Allow them to be found.
144 (wrap-program (string-append bin "/pl")
145 `("PLOTICUS_PREFABS" ":" = (,dir)))))))))
146 (inputs
147 `(("libpng" ,libpng)
148 ("libx11" ,libx11)
149 ("zlib" ,zlib)))
150 (home-page "http://ploticus.sourceforge.net/")
151 (synopsis "Command-line tool for producing plots and charts")
152 (description
153 "Ploticus is a non-interactive software package for producing plots,
154charts, and graphics from data. Ploticus is good for automated or
155just-in-time graph generation, handles date and time data nicely, and has
156basic statistical capabilities. It allows significant user control over
157colors, styles, options and details.")
158 (license license:gpl2+)))