| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages plotutils)
|
| 23 | #:use-module ((guix licenses) #:prefix license:)
|
| 24 | #:use-module (guix packages)
|
| 25 | #:use-module (guix download)
|
| 26 | #:use-module (guix build-system gnu)
|
| 27 | #:use-module (gnu packages algebra)
|
| 28 | #:use-module (gnu packages bdw-gc)
|
| 29 | #:use-module (gnu packages emacs)
|
| 30 | #:use-module (gnu packages xorg)
|
| 31 | #:use-module (gnu packages image)
|
| 32 | #:use-module (gnu packages ghostscript)
|
| 33 | #:use-module (gnu packages guile)
|
| 34 | #:use-module (gnu packages gl)
|
| 35 | #:use-module (gnu packages gtk)
|
| 36 | #:use-module (gnu packages maths)
|
| 37 | #:use-module (gnu packages perl)
|
| 38 | #:use-module (gnu packages pkg-config)
|
| 39 | #:use-module (gnu packages python)
|
| 40 | #:use-module (gnu packages python-xyz)
|
| 41 | #:use-module (gnu packages readline)
|
| 42 | #:use-module (gnu packages qt)
|
| 43 | #:use-module (gnu packages texinfo)
|
| 44 | #:use-module (gnu packages tex)
|
| 45 | #:use-module (gnu packages compression)
|
| 46 | #:use-module (gnu packages))
|
| 47 |
|
| 48 | (define-public plotutils
|
| 49 | (package
|
| 50 | (name "plotutils")
|
| 51 | (version "2.6")
|
| 52 | (source (origin
|
| 53 | (method url-fetch)
|
| 54 | (uri (string-append "mirror://gnu/plotutils/plotutils-"
|
| 55 | version ".tar.gz"))
|
| 56 | (sha256
|
| 57 | (base32
|
| 58 | "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg"))
|
| 59 | (patches (search-patches "plotutils-libpng-jmpbuf.patch"))
|
| 60 | (modules '((guix build utils)))
|
| 61 | (snippet
|
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | '(begin
|
| 67 | (substitute* "configure"
|
| 68 | (("-lXaw")
|
| 69 | "-lXaw7"))
|
| 70 | #t))))
|
| 71 | (build-system gnu-build-system)
|
| 72 | (inputs `(("libpng" ,libpng)
|
| 73 | ("libx11" ,libx11)
|
| 74 | ("libxt" ,libxt)
|
| 75 | ("libxaw" ,libxaw)))
|
| 76 |
|
| 77 | (home-page
|
| 78 | "https://www.gnu.org/software/plotutils/")
|
| 79 | (synopsis "Plotting utilities and library")
|
| 80 | (description
|
| 81 | "GNU Plotutils is a package for plotting and working with 2D graphics.
|
| 82 | It includes a library, \"libplot\", for C and C++ for exporting 2D vector
|
| 83 | graphics in many file formats. It also has support for 2D vector graphics
|
| 84 | animations. The package also contains command-line programs for plotting
|
| 85 | scientific data.")
|
| 86 | (license license:gpl2+)))
|
| 87 |
|
| 88 | (define-public guile-charting
|
| 89 | (package
|
| 90 | (name "guile-charting")
|
| 91 | (version "0.2.0")
|
| 92 | (source (origin
|
| 93 | (method url-fetch)
|
| 94 | (uri (string-append "http://wingolog.org/pub/guile-charting/"
|
| 95 | "guile-charting-" version ".tar.gz"))
|
| 96 | (sha256
|
| 97 | (base32
|
| 98 | "0w5qiyv9v0ip5li22x762bm48g8xnw281w66iyw094zdw611pb2m"))
|
| 99 | (modules '((guix build utils)))
|
| 100 | (snippet
|
| 101 | '(begin
|
| 102 | |
| 103 | (substitute* "configure"
|
| 104 | (("2\\.2 2\\.0")
|
| 105 | "3.0 2.2 2.0"))
|
| 106 |
|
| 107 | |
| 108 | |
| 109 | |
| 110 | (substitute* (find-files "." "^Makefile\\.in$")
|
| 111 | (("/ccache") "/site-ccache"))
|
| 112 | #t))))
|
| 113 | (build-system gnu-build-system)
|
| 114 | (native-inputs `(("pkg-config" ,pkg-config)))
|
| 115 | (inputs `(("guile" ,guile-2.2)))
|
| 116 | (propagated-inputs `(("guile-cairo" ,guile-cairo)))
|
| 117 | (home-page "http://wingolog.org/software/guile-charting/")
|
| 118 | (synopsis "Create charts and graphs in Guile")
|
| 119 | (description
|
| 120 | "Guile-Charting is a Guile Scheme library to create bar charts and graphs
|
| 121 | using the Cairo drawing library.")
|
| 122 | (license license:lgpl2.1+)))
|
| 123 |
|
| 124 | (define-public guile3.0-charting
|
| 125 | (package
|
| 126 | (inherit guile-charting)
|
| 127 | (name "guile3.0-charting")
|
| 128 | (inputs `(("guile" ,guile-3.0)))
|
| 129 | (propagated-inputs `(("guile-cairo" ,guile3.0-cairo)))))
|
| 130 |
|
| 131 | (define-public ploticus
|
| 132 | (package
|
| 133 | (name "ploticus")
|
| 134 | (version "2.42")
|
| 135 | (source (origin
|
| 136 | (method url-fetch)
|
| 137 | (uri (string-append "mirror://sourceforge/ploticus/ploticus/"
|
| 138 | version "/ploticus242_src.tar.gz"))
|
| 139 | (sha256
|
| 140 | (base32
|
| 141 | "1c70cvfvgjh83hj1x21130wb9qfr2rc0x47cxy9kl805yjwy8a9z"))
|
| 142 | (modules '((guix build utils)))
|
| 143 | (snippet
|
| 144 | |
| 145 | '(begin
|
| 146 | (substitute* "src/Makefile"
|
| 147 | (("INSTALLBIN =.*$")
|
| 148 | (string-append "INSTALLBIN = $(out)/bin")))
|
| 149 | #t))))
|
| 150 | (build-system gnu-build-system)
|
| 151 | (arguments
|
| 152 | '(#:tests? #f
|
| 153 | #:phases
|
| 154 | (modify-phases %standard-phases
|
| 155 | (replace 'configure (lambda _ (chdir "src")))
|
| 156 | (add-before 'install 'make-target-directories
|
| 157 | (lambda* (#:key outputs #:allow-other-keys)
|
| 158 | (let ((out (assoc-ref outputs "out")))
|
| 159 | (mkdir-p (string-append out "/bin"))
|
| 160 | #t)))
|
| 161 | (add-after 'install 'install-prefabs
|
| 162 | (lambda* (#:key outputs #:allow-other-keys)
|
| 163 | (let* ((out (assoc-ref outputs "out"))
|
| 164 | (dir (string-append out
|
| 165 | "/share/ploticus/prefabs"))
|
| 166 | (bin (string-append out "/bin")))
|
| 167 | (mkdir-p dir)
|
| 168 |
|
| 169 | |
| 170 | (for-each (lambda (file)
|
| 171 | (let ((target
|
| 172 | (string-append dir "/"
|
| 173 | (basename file))))
|
| 174 | (copy-file file target)))
|
| 175 | (find-files "../prefabs" "."))
|
| 176 |
|
| 177 | |
| 178 | (wrap-program (string-append bin "/pl")
|
| 179 | `("PLOTICUS_PREFABS" ":" = (,dir)))))))))
|
| 180 | (inputs
|
| 181 | `(("libpng" ,libpng)
|
| 182 | ("libx11" ,libx11)
|
| 183 | ("zlib" ,zlib)))
|
| 184 | (home-page "http://ploticus.sourceforge.net/")
|
| 185 | (synopsis "Command-line tool for producing plots and charts")
|
| 186 | (description
|
| 187 | "Ploticus is a non-interactive software package for producing plots,
|
| 188 | charts, and graphics from data. Ploticus is good for automated or
|
| 189 | just-in-time graph generation, handles date and time data nicely, and has
|
| 190 | basic statistical capabilities. It allows significant user control over
|
| 191 | colors, styles, options and details.")
|
| 192 | (license license:gpl2+)))
|
| 193 |
|
| 194 | (define-public asymptote
|
| 195 | (package
|
| 196 | (name "asymptote")
|
| 197 | (version "2.65")
|
| 198 | (source
|
| 199 | (origin
|
| 200 | (method url-fetch)
|
| 201 | (uri (string-append "mirror://sourceforge/asymptote/"
|
| 202 | version "/asymptote-" version ".src.tgz"))
|
| 203 | (sha256
|
| 204 | (base32 "0i4qqlvzz69mhdq6kf689sa9rxfb1cwsg1nx88hryb291hddgqqm"))))
|
| 205 | (build-system gnu-build-system)
|
| 206 | |
| 207 | |
| 208 | |
| 209 | (native-inputs
|
| 210 | `(("emacs" ,emacs-minimal)
|
| 211 | ("gs" ,ghostscript) |
| 212 | ("perl" ,perl)
|
| 213 | ("texinfo" ,texinfo) |
| 214 | |
| 215 | ("texlive" ,(texlive-union (list texlive-amsfonts
|
| 216 | texlive-epsf
|
| 217 | texlive-latex-base
|
| 218 | texlive-latex-geometry
|
| 219 | texlive-latex-graphics
|
| 220 | texlive-latex-oberdiek |
| 221 | texlive-latex-parskip
|
| 222 | texlive-tex-texinfo)))))
|
| 223 | (inputs
|
| 224 | `(("fftw" ,fftw)
|
| 225 | ("freeglut" ,freeglut)
|
| 226 | ("glew" ,glew)
|
| 227 | ("glm" ,glm)
|
| 228 | ("gsl" ,gsl)
|
| 229 | ("libgc" ,libgc)
|
| 230 | ("python" ,python)
|
| 231 | ("python-cson" ,python-cson)
|
| 232 | ("python-numpy" ,python-numpy)
|
| 233 | ("python-pyqt" ,python-pyqt)
|
| 234 | ("readline" ,readline)
|
| 235 | ("zlib" ,zlib)))
|
| 236 | (arguments
|
| 237 | `(#:modules ((guix build emacs-utils)
|
| 238 | (guix build gnu-build-system)
|
| 239 | (guix build utils)
|
| 240 | (srfi srfi-26))
|
| 241 | #:imported-modules (,@%gnu-build-system-modules
|
| 242 | (guix build emacs-utils))
|
| 243 | #:configure-flags
|
| 244 | (list (string-append "--enable-gc=" (assoc-ref %build-inputs "libgc"))
|
| 245 | (string-append "--with-latex="
|
| 246 | (assoc-ref %outputs "out")
|
| 247 | "/share/texmf/tex/latex")
|
| 248 | (string-append "--with-context="
|
| 249 | (assoc-ref %outputs "out")
|
| 250 | "/share/texmf/tex/context/third"))
|
| 251 | #:phases
|
| 252 | (modify-phases %standard-phases
|
| 253 | (add-after 'unpack 'fix-build
|
| 254 | |
| 255 | |
| 256 | (lambda _
|
| 257 | (substitute* (find-files "." "\\.in$")
|
| 258 | (("#include <primitives.h>") "#include \"primitives.h\""))
|
| 259 | (invoke "touch" "prc/config.h")))
|
| 260 | (add-after 'unpack 'move-info-location
|
| 261 | |
| 262 | |
| 263 | |
| 264 | (lambda _
|
| 265 | (substitute* "doc/png/Makefile.in"
|
| 266 | (("(\\$\\(infodir\\))/asymptote" _ infodir) infodir))
|
| 267 | (substitute* "doc/asymptote.texi"
|
| 268 | (("asymptote/asymptote") "asymptote"))
|
| 269 | #t))
|
| 270 | (add-before 'build 'patch-pdf-viewer
|
| 271 | (lambda _
|
| 272 | |
| 273 | (substitute* "settings.cc"
|
| 274 | (("defaultPDFViewer=\"acroread\"")
|
| 275 | "defaultPDFViewer=\"gv\""))
|
| 276 | #t))
|
| 277 | (add-before 'check 'set-HOME
|
| 278 | |
| 279 | |
| 280 | (lambda _
|
| 281 | (setenv "HOME" "/tmp")
|
| 282 | #t))
|
| 283 | (add-after 'install 'install-Emacs-data
|
| 284 | (lambda* (#:key outputs #:allow-other-keys)
|
| 285 | |
| 286 | (let* ((out (assoc-ref outputs "out"))
|
| 287 | (lisp-dir (string-append out "/share/emacs/site-lisp")))
|
| 288 | (for-each (cut install-file <> lisp-dir)
|
| 289 | (find-files "." "\\.el$"))
|
| 290 | (emacs-generate-autoloads ,name lisp-dir))
|
| 291 | #t))
|
| 292 | (add-after 'install-Emacs-data 'wrap-python-script
|
| 293 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 294 | |
| 295 | (let* ((out (assoc-ref outputs "out"))
|
| 296 | (path (getenv "PYTHONPATH")))
|
| 297 | (wrap-program (string-append out "/share/asymptote/GUI/xasy.py")
|
| 298 | `("PYTHONPATH" ":" prefix (,path))))
|
| 299 | #t)))))
|
| 300 | (home-page "http://asymptote.sourceforge.net")
|
| 301 | (synopsis "Script-based vector graphics language")
|
| 302 | (description
|
| 303 | "Asymptote is a powerful descriptive vector graphics language for
|
| 304 | technical drawing, inspired by MetaPost but with an improved C++-like syntax.
|
| 305 | Asymptote provides for figures the same high-quality level of typesetting that
|
| 306 | LaTeX does for scientific text.")
|
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | (license license:lgpl3+)))
|