guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add Asymptote.


From: Eric Bavier
Subject: 01/01: gnu: Add Asymptote.
Date: Sat, 02 Jan 2016 22:07:20 +0000

bavier pushed a commit to branch master
in repository guix.

commit 209778717a214cb4d506fe9aa673a4d2c2716b6c
Author: Eric Bavier <address@hidden>
Date:   Sun Dec 20 16:24:24 2015 -0600

    gnu: Add Asymptote.
    
    * gnu/packages/bdw-gc.scm (libgc-for-c++): New variable.
    * gnu/packages/plotutils.scm (asymptote): New variable.
    * gnu/packages/patches/asymptote-gsl2.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                             |    1 +
 gnu/packages/bdw-gc.scm                   |    7 +++
 gnu/packages/patches/asymptote-gsl2.patch |   33 ++++++++++++++
 gnu/packages/plotutils.scm                |   69 +++++++++++++++++++++++++++++
 4 files changed, 110 insertions(+), 0 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 24f7516..c0f8fac 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -405,6 +405,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/agg-am_c_prototype.patch                        \
   gnu/packages/patches/alsa-lib-mips-atomic-fix.patch          \
   gnu/packages/patches/apr-skip-getservbyname-test.patch       \
+  gnu/packages/patches/asymptote-gsl2.patch                    \
   gnu/packages/patches/ath9k-htc-firmware-binutils.patch       \
   gnu/packages/patches/ath9k-htc-firmware-gcc.patch            \
   gnu/packages/patches/ath9k-htc-firmware-objcopy.patch                \
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 6615891..f4bbc64 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -104,3 +104,10 @@ lock-free code, experiment with thread programming 
paradigms, etc.")
 
     ;; 'USE_LIBC_PRIVATES' is now the default.
     (arguments '())))
+
+;;; TODO: Remove this package once libgc is updated from core-updates.
+(define-public libgc-for-c++
+  (package (inherit libgc)
+    (name "libgc-cxx")
+    (arguments
+     '(#:configure-flags '("--enable-cplusplus"))))) ;install gc_cpp.h et al.
diff --git a/gnu/packages/patches/asymptote-gsl2.patch 
b/gnu/packages/patches/asymptote-gsl2.patch
new file mode 100644
index 0000000..4f73d16
--- /dev/null
+++ b/gnu/packages/patches/asymptote-gsl2.patch
@@ -0,0 +1,33 @@
+From 71ff9e769ba5d9995b367201f0d41b7a8dedab9d Mon Sep 17 00:00:00 2001
+From: John Bowman <address@hidden>
+Date: Sat, 14 Nov 2015 01:25:56 -0700
+Subject: [PATCH] Support GSL 2.0.
+
+---
+ gsl.cc | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gsl.cc b/gsl.cc
+index b500557..0f81dc6 100644
+--- a/gsl.cc
++++ b/gsl.cc
+@@ -27,6 +27,7 @@
+ #include <gsl/gsl_rng.h>
+ #include <gsl/gsl_randist.h>
+ #include <gsl/gsl_cdf.h>
++#include <gsl/gsl_version.h>
+ 
+ #include "opsymbols.h"
+ 
+@@ -1088,7 +1089,11 @@ void gen_rungsl_venv(venv &ve)
+   addGSLDOUBLE2Func<gsl_sf_ellint_F>(SYM(F));
+   addGSLDOUBLE2Func<gsl_sf_ellint_E>(SYM(E));
+   addGSLDOUBLE3Func<gsl_sf_ellint_P>(SYM(P),SYM(phi),SYM(k),SYM(n));
++#if GSL_MAJOR_VERSION >= 2
++  addGSLDOUBLE2Func<gsl_sf_ellint_D>(SYM(D),SYM(phi),SYM(k));
++#else  
+   addGSLDOUBLE3Func<gsl_sf_ellint_D>(SYM(D),SYM(phi),SYM(k),SYM(n));
++#endif  
+   addGSLDOUBLE2Func<gsl_sf_ellint_RC>(SYM(RC),SYM(x),SYM(y));
+   addGSLDOUBLE3Func<gsl_sf_ellint_RD>(SYM(RD),SYM(x),SYM(y),SYM(z));
+   addGSLDOUBLE3Func<gsl_sf_ellint_RF>(SYM(RF),SYM(x),SYM(y),SYM(z));
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index 6166226..09a2d4f 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015 Eric Bavier <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,11 +22,21 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages gl)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages maths)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages texlive)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages))
 
@@ -156,3 +167,61 @@ just-in-time graph generation, handles date and time data 
nicely, and has
 basic statistical capabilities.  It allows significant user control over
 colors, styles, options and details.")
     (license license:gpl2+)))
+
+(define-public asymptote
+  (package
+    (name "asymptote")
+    (version "2.35")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/asymptote/"
+                                  version "/asymptote-" version ".src.tgz"))
+              (sha256
+               (base32
+                "11f28vxw0ybhvl7vxmqcdwvw7y6gz55ykw9ybgzb2px6lsvgag7z"))
+              (patches (list (search-patch "asymptote-gsl2.patch")))))
+    (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
+    ;; currently useful.
+    (native-inputs
+     `(("gs" ,ghostscript)              ;For tests
+       ("texinfo" ,texinfo)             ;For generating documentation
+       ("texlive" ,texlive)             ;For tests and documentation
+       ("perl" ,perl)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("freeglut" ,freeglut)
+       ("gsl" ,gsl)
+       ("libgc" ,libgc-for-c++)
+       ("python" ,python-2)
+       ("readline" ,readline)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--enable-gc=" (assoc-ref %build-inputs "libgc"))
+             (string-append "--with-latex="
+                            (assoc-ref %outputs "out")
+                            "/share/texmf/tex/latex")
+             (string-append "--with-context="
+                            (assoc-ref %outputs "out")
+                            "/share/texmf/tex/context/third"))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'patch-pdf-viewer
+                    (lambda _
+                      ;; Default to a free pdf viewer
+                      (substitute* "settings.cc"
+                        (("defaultPDFViewer=\"acroread\"")
+                         "defaultPDFViewer=\"gv\"")))))))
+    (home-page "http://asymptote.sourceforge.net";)
+    (synopsis "Script-based vector graphics language")
+    (description
+     "Asymptote is a powerful descriptive vector graphics language for
+technical drawing, inspired by MetaPost but with an improved C++-like syntax.
+Asymptote provides for figures the same high-quality level of typesetting that
+LaTeX does for scientific text.")
+    ;; Most source files do not contain license statements, but the README
+    ;; contains: "All source files in the Asymptote project, unless explicitly
+    ;; noted otherwise, are released under version 3 (or later) of the GNU
+    ;; Lesser General Public License"
+    (license license:lgpl3+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]