diff mbox series

[bug#56729,RFC,v2] gnu: gap: Update to 4.11.1.

Message ID f3547b7c9e719d788dde289a470b72a4ebb44527.1659518175.git.guix@ikherbers.com
State New
Headers show
Series [bug#56729,RFC,v2] gnu: gap: Update to 4.11.1. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

vicvbcun Aug. 3, 2022, 9:25 a.m. UTC
Remove logs that are not reproducible.

* gnu/packages/algebra.scm (gap): Update to 4.11.1.
[source]<snippet>: Remove trailing #t.
[arguments]<#:phases>: Remove trailing #t, use gexps.
[install]: Install missing config.h header.
---
 gnu/packages/algebra.scm | 181 +++++++++++++++++++--------------------
 1 file changed, 90 insertions(+), 91 deletions(-)


base-commit: f6904c0b19c2fcca41bbf1400c738bd833fec9a8
prerequisite-patch-id: 73510fd06d7520fe1f53a6d654ad79bfb197731a
diff mbox series

Patch

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 95fbdb5e36..c3b1c7fc3b 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1209,17 +1209,17 @@  (define-public xtensor-benchmark
 (define-public gap
   (package
     (name "gap")
-    (version "4.11.0")
+    (version "4.11.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://files.gap-system.org/gap-"
                            (version-major+minor version)
-                           "/tar.bz2/gap-"
+                           "/tar.gz/gap-"
                            version
-                           ".tar.bz2"))
+                           ".tar.gz"))
        (sha256
-        (base32 "00l6hvy4iggnlrib4vp805sxdm3j7n3hzpv5zs9hbiiavh80l1xz"))
+        (base32 "01535s81h254zcs84zi95xqmhvvn6fn9qss8761myxc2gpdcadb6"))
        (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
        (snippet
         '(begin
@@ -1235,97 +1235,96 @@  (define-public gap
            ;; given by their names up to version numbers.
            (with-directory-excursion "pkg"
              (for-each delete-file-recursively
-               (lset-difference
-                 (lambda (all keep) (string-prefix? keep all))
-                 (scandir ".")
-                 '("." ".."
-                   ;; Necessary packages.
-                   "GAPDoc-"
-                   "primgrp-"
-                   "SmallGrp-"   ; artistic2.0
-                   "transgrp"    ; artistic2.0 for data,
-                                 ; gpl2 or gpl3 for code
-                   ;; Recommended package.
-                   "io-"         ; gpl3+
-                   ;; Optional packages, searched for at start,
-                   ;; and their depedencies.
-                   "alnuth-"
-                   "autpgrp-"
-                   "crisp-"      ; bsd-2
-                   "ctbllib"     ; gpl3+, clarified in the next release;
-                                 ; see
-                                 ; http://www.math.rwth-aachen.de/~Thomas.Breuer/ctbllib/README.md
-                   "FactInt-"
-                   "fga"
-                   "irredsol-"   ; bsd-2
-                   "laguna-"
-                   "polenta-"
-                   "polycyclic-"
-                   "radiroot-"
-                   "resclasses-"
-                   "sophus-"
-                   "tomlib-"
-                   "utils-"))))
-           #t))))
+                       (lset-difference
+                        (lambda (all keep) (string-prefix? keep all))
+                        (scandir ".")
+                        '("." ".."
+                          ;; Necessary packages.
+                          "GAPDoc-"
+                          "primgrp-"
+                          "SmallGrp-"   ; artistic2.0
+                          "transgrp"    ; artistic2.0 for data,
+                                        ; gpl2 or gpl3 for code
+                          ;; Recommended package.
+                          "io-"   ; gpl3+
+                          ;; Optional packages, searched for at start,
+                          ;; and their depedencies.
+                          "alnuth-"
+                          "autpgrp-"
+                          "crisp-"     ; bsd-2
+                          "ctbllib"    ; gpl3+, clarified in the next release;
+                                        ; see
+                                        ; http://www.math.rwth-aachen.de/~Thomas.Breuer/ctbllib/README.md
+                          "FactInt-"
+                          "fga"
+                          "irredsol-"   ; bsd-2
+                          "laguna-"
+                          "polenta-"
+                          "polycyclic-"
+                          "radiroot-"
+                          "resclasses-"
+                          "sophus-"
+                          "tomlib-"
+                          "utils-"))))))))
     (build-system gnu-build-system)
     (inputs
      (list gmp readline zlib))
     (arguments
-     `(#:modules ((ice-9 ftw)
-                  (srfi srfi-26)
-                  (guix build gnu-build-system)
-                  (guix build utils))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'build 'build-packages
-           ;; Compile all packages that have not been deleted by the
-           ;; code snippet above.
-           (lambda _
-             (setenv "CONFIG_SHELL" (which "bash"))
-             (with-directory-excursion "pkg"
-               (invoke "../bin/BuildPackages.sh")
-             #t)))
-         (add-after 'build-packages 'build-doc
-           ;; The documentation is bundled, but we create it from source.
-           (lambda _
-             (with-directory-excursion "doc"
-               (invoke "./make_doc"))
-             #t))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin"))
-                    (prog (string-append bin "/gap"))
-                    (prog-real (string-append bin "/.gap-real"))
-                    (share (string-append out "/share/gap")))
-               ;; Install only the gap binary; the gac compiler is left
-               ;; for maybe later. "Wrap" it in a shell script that calls
-               ;; the binary with the correct parameter.
-               ;; The make target install-bin is supposed to do that, but
-               ;; is not currently working.
-               (mkdir-p bin)
-               (copy-file "gap" prog-real)
-               (call-with-output-file prog
-                 (lambda (port)
-                   (format port
-                           "#!~a~%exec ~a -l ~a \"$@\"~%"
-                           (which "bash")
-                           prog-real
-                           share)))
-               (chmod prog #o755)
-               ;; Install the headers and library, which are needed by Sage.
-               (invoke "make" "install-headers")
-               (invoke "make" "install-libgap")
-               ;; Remove information on the build directory from sysinfo.gap.
-               (substitute* "sysinfo.gap"
-                 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
-                 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
-                 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
-               (invoke "make" "install-gaproot")
-               ;; Copy the directory of compiled packages; the make target
-               ;; install-pkg is currently empty.
-               (copy-recursively "pkg" (string-append share "/pkg")))
-             #t)))))
+     (list #:modules '((ice-9 ftw)
+                       (srfi srfi-26)
+                       (guix build gnu-build-system)
+                       (guix build utils))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'build 'build-packages
+                 ;; Compile all packages that have not been deleted by the
+                 ;; code snippet above.
+                 (lambda _
+                   (setenv "CONFIG_SHELL" (which "bash"))
+                   (with-directory-excursion "pkg"
+                     (invoke "../bin/BuildPackages.sh"))))
+               (add-after 'build-packages 'build-doc
+                 ;; The documentation is bundled, but we create it from source.
+                 (lambda _
+                   (with-directory-excursion "doc"
+                     (invoke "./make_doc"))))
+               (replace 'install
+                 (lambda _
+                   (let* ((bin (string-append #$output "/bin"))
+                          (prog (string-append bin "/gap"))
+                          (prog-real (string-append bin "/.gap-real"))
+                          (share (string-append #$output "/share/gap")))
+                     ;; Install only the gap binary; the gac compiler is left
+                     ;; for maybe later. "Wrap" it in a shell script that calls
+                     ;; the binary with the correct parameter.
+                     ;; The make target install-bin is supposed to do that, but
+                     ;; is not currently working.
+                     (mkdir-p bin)
+                     (copy-file "gap" prog-real)
+                     (call-with-output-file prog
+                       (lambda (port)
+                         (format port
+                                 "#!~a~%exec ~a -l ~a \"$@\"~%"
+                                 (which "bash")
+                                 prog-real
+                                 share)))
+                     (chmod prog #o755)
+                     ;; Install the headers and library, which are needed by Sage.
+                     (invoke "make" "install-headers")
+                     (invoke "make" "install-libgap")
+                     (install-file "gen/config.h" (string-append #$output "/include/gap"))
+                     ;; Remove information on the build directory from sysinfo.gap.
+                     (substitute* "sysinfo.gap"
+                       (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
+                       (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
+                       (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
+                     (invoke "make" "install-gaproot")
+                     ;; Copy the directory of compiled packages; the make target
+                     ;; install-pkg is currently empty.
+                     (copy-recursively "pkg" (string-append share "/pkg"))
+                     ;; these log files are not reproducible
+                     (delete-file (string-append share "/pkg/io-4.7.0/config.log"))
+                     (delete-file-recursively (string-append share "/pkg/log"))))))))
     (home-page "https://www.gap-system.org/")
     (synopsis
      "System for computational group theory")