diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-06-19 07:57:57 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-06-20 10:19:12 +0200 |
commit | 75a73bb024c840dc7a917a527915ff8d8d918af8 (patch) | |
tree | 3f0ccfad8e6c452499b1fff852b8d816b002e70f /gnu/packages/algebra.scm | |
parent | a42cb6f1f18e33d0e8d54260ebe5ad23c5d3f2fe (diff) | |
download | guix-75a73bb024c840dc7a917a527915ff8d8d918af8.tar.gz |
gnu: Add symmetrica.
* gnu/packages/algebra.scm (symmetrica): New variable. * gnu/packages/patches/symmetrica-bruch.patch: * gnu/packages/patches/symmetrica-int32.patch: * gnu/packages/patches/symmetrica-return_values.patch: * gnu/packages/patches/symmetrica-sort_sum_rename.patch: New files. * gnu/local.mk (dist_patch_DATA): Add patches.
Diffstat (limited to 'gnu/packages/algebra.scm')
-rw-r--r-- | gnu/packages/algebra.scm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 4dbf537af3..eeaee61755 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1315,3 +1315,63 @@ multiplication algorithm.") a given height bound on a hyperelliptic curve in a very efficient way, by using an optimized quadratic sieve algorithm.") (license license:gpl2+))) + +(define-public symmetrica + (package + (name "symmetrica") + (version "2.0") + (source (origin + (method url-fetch/tarbomb) + (uri (let ((v (string-join (string-split version #\.) "_"))) + (string-append "http://www.algorithm.uni-bayreuth.de/" + "en/research/SYMMETRICA/" + "SYM" v "_tar.gz"))) + (sha256 + (base32 + "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz")) + ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/> + (patches (search-patches "symmetrica-bruch.patch" + "symmetrica-int32.patch" + "symmetrica-return_values.patch" + "symmetrica-sort_sum_rename.patch")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no test + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-makefile + (lambda _ + (substitute* "makefile" + (("cc -c") "gcc -c")) + #t)) + (add-after 'fix-makefile 'turn-off-banner + (lambda _ + (substitute* "de.c" + (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE"))) + #t)) + (delete 'configure) ;no configure script + (replace 'install ;no install target + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (inc (string-append out "/include/symmetrica")) + (doc (string-append out "/share/doc/symmetrica-" ,version)) + (static "libsymmetrica.a")) + ;; Build static library. + (apply invoke "ar" "crs" static (find-files "." "\\.o$")) + (invoke "ranlib" static) + ;; Install static library and headers. + (for-each (lambda (f) (install-file f inc)) + (find-files "." "\\.h$")) + (install-file "libsymmetrica.a" lib) + ;; Install documentation. + (for-each (lambda (f) (install-file f doc)) + (find-files "." "\\.doc$")) + #t)))))) + (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/") + (synopsis "Combinatoric C Library") + (description "Symmetrica is a library for combinatorics. It has support +for the representation theory of the symmetric group and related groups, +combinatorics of tableaux, symmetric functions and polynomials, Schubert +polynomials, and the representation theory of Hecke algebras of type A_n.") + (license license:public-domain))) |