guix-commits
[Top][All Lists]
Advanced

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

08/13: gnu: Add gfan.


From: guix-commits
Subject: 08/13: gnu: Add gfan.
Date: Wed, 1 Jan 2025 07:09:50 -0500 (EST)

dannym pushed a commit to branch master
in repository guix.

commit 9a7e36b4e11ec289a6115bd255cbe97886fceeb3
Author: Vinicius Monego <monego@posteo.net>
AuthorDate: Sun Dec 22 17:26:52 2024 +0000

    gnu: Add gfan.
    
    * gnu/packages/maths.scm (gfan): New variable.
    
    Change-Id: I3b4952ddfcaecac17ab29bb3cd2f56fc125ab763
    Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 60ab9ae5cb..e1ede00041 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -871,6 +871,43 @@ extremely fast @dfn{abstract data types} (ADT) such as 
hash tables b-trees,
 and much more.")
     (license license:lgpl3+)))
 
+(define-public gfan
+  (package
+    (name "gfan")
+    (version "0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://users-math.au.dk/jensen/software";
+                           "/gfan/gfan" version ".tar.gz"))
+       (sha256
+        (base32 "17lqripnsdb5hn7nnhgn4siajgh1jh9nkaplca3akm74w5bkg0xb"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:make-flags #~(list (string-append "PREFIX=" #$output)
+                           (string-append "CC=" #$(cc-for-target))
+                           (string-append "CXX=" #$(cxx-for-target)))
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure)
+                   ;; cddlib is distributed with the 'cddlib' header name,
+                   ;; but gfan expects it to be named 'cdd'.  Substitute
+                   ;; the include headers to make gfan find it.
+                   (add-after 'unpack 'fix-cdd-reference
+                     (lambda _
+                       (substitute* '("src/lp_cdd.cpp"
+                                      "src/gfanlib_zcone.cpp"
+                                      "src/app_librarytest.cpp")
+                         (("#include \"cdd") "#include \"cddlib")))))))
+    (inputs (list cddlib gmp))
+    (home-page "https://users-math.au.dk/jensen/software/gfan/gfan.html";)
+    (synopsis "Compute Gröbner fans and tropical varieties")
+    (description "Gfan is a software package for computing Gröbner fans and
+tropical varieties.")
+    ;; homepage/gfan.html: "Gfan is distributed under the terms of the GPL
+    ;; license version 2 or 3 as desired"
+    (license license:gpl2)))
+
 (define-public 4ti2
   (package
     (name "4ti2")



reply via email to

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