summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2024-12-22 17:26:52 +0000
committerDanny Milosavljevic <dannym@friendly-machines.com>2025-01-01 13:05:04 +0100
commit9a7e36b4e11ec289a6115bd255cbe97886fceeb3 (patch)
tree6485c26eeb271b648fb165c35a921e9fee1eee80
parent7bc6ec189e2268888ef823f4e94a177fa72b81f1 (diff)
gnu: Add gfan.
* gnu/packages/maths.scm (gfan): New variable. Change-Id: I3b4952ddfcaecac17ab29bb3cd2f56fc125ab763 Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
-rw-r--r--gnu/packages/maths.scm37
1 files changed, 37 insertions, 0 deletions
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")