diff --git a/gnu/local.mk b/gnu/local.mk index 395839cec2..c97bbfaac6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2306,10 +2306,6 @@ dist_patch_DATA = \ %D%/packages/patches/swig-support-gcc-12.patch \ %D%/packages/patches/swish-e-search.patch \ %D%/packages/patches/swish-e-format-security.patch \ - %D%/packages/patches/symmetrica-bruch.patch \ - %D%/packages/patches/symmetrica-int32.patch \ - %D%/packages/patches/symmetrica-return_values.patch \ - %D%/packages/patches/symmetrica-sort_sum_rename.patch \ %D%/packages/patches/t1lib-CVE-2010-2642.patch \ %D%/packages/patches/t1lib-CVE-2011-0764.patch \ %D%/packages/patches/t1lib-CVE-2011-1552+.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index f8f05ff222..cf5287d57b 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1646,62 +1646,25 @@ multiplication algorithm.") (define-public symmetrica (package (name "symmetrica") - (version "2.0") + (version "3.1.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"))) + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/sagemath/symmetrica/") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz")) - ;; Taken from - (patches (search-patches "symmetrica-bruch.patch" - "symmetrica-int32.patch" - "symmetrica-return_values.patch" - "symmetrica-sort_sum_rename.patch")))) + "0yirh2rhvih515442pr7nfx1wdwjhjvnnr0a51a02wc3z50qsxms")))) (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 -fPIC")) - #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/") + (native-inputs (list autoconf automake libtool pkg-config)) + (home-page "https://gitlab.com/sagemath/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))) + (license license:isc))) (define-public m4rie (package diff --git a/gnu/packages/patches/symmetrica-bruch.patch b/gnu/packages/patches/symmetrica-bruch.patch deleted file mode 100644 index ae88b79206..0000000000 --- a/gnu/packages/patches/symmetrica-bruch.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- src/bruch.c 2007-12-06 11:30:00.000000000 -0500 -+++ b/bruch.c 2013-10-22 08:37:43.000000000 -0400 -@@ -975,14 +975,16 @@ - ggterg = ggt_i(S_B_UI(bruch),S_B_OI(bruch)); - - if (ggterg == S_B_UI(bruch)) { -+ INT tmp = S_B_OI(bruch); - freeself_bruch(bruch); -- M_I_I(S_B_OI(bruch) / ggterg,bruch); -+ M_I_I(tmp / ggterg,bruch); - goto ende; - } - - if (-ggterg == S_B_UI(bruch)) { -+ INT tmp = S_B_OI(bruch); - freeself_bruch(bruch); -- M_I_I(- S_B_OI(bruch) / ggterg,bruch); -+ M_I_I(- tmp / ggterg,bruch); - goto ende; - } - -@@ -1032,12 +1034,14 @@ - - if (S_O_K(S_B_U(bruch)) == INTEGER) - if (S_B_UI(bruch) == 1) { -+ INT tmp = S_B_OI(bruch); - freeself_bruch(bruch); -- M_I_I(S_B_OI(bruch),bruch); -+ M_I_I(tmp,bruch); - goto ende; } - else if (S_B_UI(bruch) == -1) { -+ INT tmp = S_B_OI(bruch); - freeself_bruch(bruch); -- M_I_I( - S_B_OI(bruch),bruch); -+ M_I_I( - tmp,bruch); - goto ende; } - if (NEGP(S_B_O(bruch)) && NEGP(S_B_U(bruch))) - { diff --git a/gnu/packages/patches/symmetrica-int32.patch b/gnu/packages/patches/symmetrica-int32.patch deleted file mode 100644 index b64f27d51e..0000000000 --- a/gnu/packages/patches/symmetrica-int32.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -ru src/def.h c/def.h ---- src/def.h 2007-12-06 17:30:56.000000000 +0100 -+++ c/def.h 2013-10-19 18:42:55.118745730 +0200 -@@ -2,14 +2,9 @@ - /* INT should always be 4 byte */ - #ifndef DEF_H - -- --#ifdef __alpha --typedef int INT; --typedef unsigned int UINT; --#else /* __alpha */ --typedef long INT; --typedef unsigned long UINT; --#endif /* __alpha */ -+#include -+typedef int32_t INT; -+typedef uint32_t UINT; - - #include - #include -@@ -65,10 +60,13 @@ - - - /* definitionen fuer object.c */ --typedef INT OBJECTKIND; /* 4 byte */ -+/* NOTE: partition code assumes that there is no unused space in the -+ * object struct when an INT is stored. This requires both OBJECTKIND -+ * and OBJECTSELF to have a size equal to a machine word. */ -+typedef intptr_t OBJECTKIND; - - typedef union { -- INT ob_INT; -+ intptr_t ob_INT; - INT * ob_INTpointer; - char *ob_charpointer; - struct bruch *ob_bruch; diff --git a/gnu/packages/patches/symmetrica-return_values.patch b/gnu/packages/patches/symmetrica-return_values.patch deleted file mode 100644 index e09c389337..0000000000 --- a/gnu/packages/patches/symmetrica-return_values.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ru src/part.c b/part.c ---- src/part.c Thu May 14 06:01:00 2009 -0400 -+++ b/part.c Thu May 14 06:01:00 2009 -0400 -@@ -1767,8 +1767,8 @@ - /* to compute number of partitions */ - { - INT erg = OK; -- if (ni<0) return; -- if (not EMPTYP(S_V_I(vec,ni))) return; -+ if (ni<0) return 0; -+ if (not EMPTYP(S_V_I(vec,ni))) return 0; - else if (ni<=1) M_I_I(1,S_V_I(vec,ni)); - else { - diff --git a/gnu/packages/patches/symmetrica-sort_sum_rename.patch b/gnu/packages/patches/symmetrica-sort_sum_rename.patch deleted file mode 100644 index 2d9a2dae06..0000000000 --- a/gnu/packages/patches/symmetrica-sort_sum_rename.patch +++ /dev/null @@ -1,340 +0,0 @@ -diff -r 5cd656a07aa5 src/bar.c ---- a/bar.c Thu May 14 06:01:00 2009 -0400 -+++ b/bar.c Thu May 14 07:38:17 2009 -0400 -@@ -237,7 +237,7 @@ - g = callocobject(); - e = S_V_I(a,0L); - f = S_V_I(a,1L); -- erg += sum(f,g); -+ erg += sym_sum(f,g); - j=0L; - for (i=0L;iob_kind = (OBJECTKIND)(b)) ---- a/nc.c Thu May 14 06:01:00 2009 -0400 -+++ b/nc.c Thu May 14 07:38:17 2009 -0400 -@@ -204,7 +204,7 @@ - erg += mult(S_NC_C(a),S_NC_C(b),d); - erg += m_gl_co(S_NC_GL(a),e); - erg += mult_apply(e,d); -- erg += sum(d,e); -+ erg += sym_sum(d,e); - erg += m_gl_go(S_NC_GL(a),d); - erg += div(e,d,c); - erg += freeall(e); -@@ -617,7 +617,7 @@ - erg += mult_nc_kranz(c,a,e); - erg += mult(S_V_I(e,1L),f,c); - erg += div(c,g,c); -- erg += sum(c,S_V_I(S_NC_C(b),S_I_I(d))); -+ erg += sym_sum(c,S_V_I(S_NC_C(b),S_I_I(d))); - } - erg += freeall(c); - erg += freeall(d); -@@ -712,7 +712,7 @@ - for(j = 0L; j=0;j--) -diff -r 5cd656a07aa5 src/perm.c ---- a/perm.c Thu May 14 06:01:00 2009 -0400 -+++ b/perm.c Thu May 14 07:38:17 2009 -0400 -@@ -833,9 +833,9 @@ - /* s = Anzahl der spalten */ - - s = S_V_LI(S_V_I(a,0L)); -- sum(S_V_I(a,0L),summe);/* composition ist vector */ -+ sym_sum(S_V_I(a,0L),summe);/* composition ist vector */ - z = S_I_I(summe); -- FREEALL(summe); -+ FREEALL(summe); - m_ilih_nm(s,z,b); - C_O_K(b,KRANZTYPUS); - for (i=0L;i