From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 2/2] gnu: Add Asymptote. Date: Fri, 25 Dec 2015 20:40:32 -0600 Message-ID: <1451097632-3235-3-git-send-email-bavier@member.fsf.org> References: <1451097632-3235-1-git-send-email-bavier@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCjOH-0001wv-Pj for guix-devel@gnu.org; Sat, 26 Dec 2015 02:35:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCjOG-0002nq-21 for guix-devel@gnu.org; Sat, 26 Dec 2015 02:35:49 -0500 Received: from mail.centurylink.net ([205.219.233.9]:34621 helo=smtp.centurylink.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCjOF-0002nM-Sw for guix-devel@gnu.org; Sat, 26 Dec 2015 02:35:47 -0500 In-Reply-To: <1451097632-3235-1-git-send-email-bavier@member.fsf.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: Eric Bavier * 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/patches/asymptote-gsl2.patch | 33 ++++++++++++++++ gnu/packages/plotutils.scm | 66 +++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 gnu/packages/patches/asymptote-gsl2.patch diff --git a/gnu-system.am b/gnu-system.am index 3c8f402..17196c3 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -406,6 +406,7 @@ dist_patch_DATA =3D \ 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/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 +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 + #include + #include ++#include + + #include "opsymbols.h" + +@@ -1088,7 +1089,11 @@ void gen_rungsl_venv(venv &ve) + addGSLDOUBLE2Func(SYM(F)); + addGSLDOUBLE2Func(SYM(E)); + addGSLDOUBLE3Func(SYM(P),SYM(phi),SYM(k),SYM(n)); ++#if GSL_MAJOR_VERSION >=3D 2 ++ addGSLDOUBLE2Func(SYM(D),SYM(phi),SYM(k)); ++#else + addGSLDOUBLE3Func(SYM(D),SYM(phi),SYM(k),SYM(n)); ++#endif + addGSLDOUBLE2Func(SYM(RC),SYM(x),SYM(y)); + addGSLDOUBLE3Func(SYM(RD),SYM(x),SYM(y),SYM(z)); + addGSLDOUBLE3Func(SYM(RF),SYM(x),SYM(y),SYM(z)); diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 6166226..5642a0b 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013, 2014, 2015 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2015 Eric Bavier ;;; ;;; 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,58 @@ 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) + (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) + ("python" ,python-2) + ("readline" ,readline) + ("zlib" ,zlib))) + (arguments + `(#:configure-flags + (list (string-append "--enable-gc=3D" (assoc-ref %build-inputs "libgc")) + (string-append "--with-latex=3D" + (assoc-ref %outputs "out") + "/share/texmf/tex/latex") + (string-append "--with-context=3D" + (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=3D\"acroread\"") + "defaultPDFViewer=3D\"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+))) -- 2.6.3