diff options
author | Andreas Enge <[email protected]> | 2025-02-20 15:49:19 +0100 |
---|---|---|
committer | Andreas Enge <[email protected]> | 2025-02-21 17:23:58 +0100 |
commit | 82be68a42b1e95903f24bd0880be561b10d16499 (patch) | |
tree | bf7222329ac21777884aa717aef9fdd0bafac113 /gnu | |
parent | 90aa90eb05429553402e0b5225d23f84742a9286 (diff) |
gnu: gap: Enable xgap package.
* gnu/packages/algebra.scm (gap)[inputs]: Add libx11, libxaw, and libxt.
[arguments]<phases>{prepare-package-source}: Substitute paths and modify
configuration.
{remove-packages}: Do not remove xgap.
{install-packages}: Add a symlink from bin/ to xgap.sh.
Change-Id: I9466fdb3f469325f7229de210b88d371c2839504
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/algebra.scm | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index a8ad770c92..77e3c16205 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1362,6 +1362,7 @@ xtensor provides: (list gmp readline zlib cddlib ; for the cddinterface package curl ; for the curlinterface package + libx11 libxaw libxt ; for the xgap package zeromq ; for the zeromqinterface package )) (arguments @@ -1374,8 +1375,23 @@ xtensor provides: (with-directory-excursion "pkg" ;; Unpack package tarball, so that shebangs can be modified. (with-directory-excursion "caratinterface" - (invoke "tar" "xvf" "carat.tgz"))))) - ;; The following phases are added after 'build, apparently in + (invoke "tar" "xvf" "carat.tgz")) + ;; Replace paths and adapt configuration. + (with-directory-excursion "xgap" + (substitute* '("Makefile.in" "cnf/Makegap.in") + (("/bin/sh") + (string-append + (assoc-ref %build-inputs "bash") "/bin/bash"))) + (substitute* "xgap.sh.in" + (("\"@gapdir@\"") + (string-append %output "/share/gap")) + (("^XGAP=.*$") + (string-append "XGAP=" %output + "/share/gap/pkg/xgap/bin/$XGAP_PRG\n")) + (("^GAP=.*$") + (string-append "GAP=" %output "/bin/gap\n")) + (("VERBOSE=\"NO\"") "VERBOSE=\"YES\"")))))) + ;; The following phases are executed after 'build, apparently in ;; reverse order. So we carry out 'build, then 'build-doc, then ;; 'remove-packages, then 'build-packages. (add-after 'build 'build-packages @@ -1391,8 +1407,7 @@ xtensor provides: (with-directory-excursion "pkg" (for-each delete-file-recursively '("normalizinterface" ; tries to download normaliz even when it is available - "semigroups" ; bundled dependencies - "xgap" ; make: /bin/sh: No such file or directory + "semigroups" ; bundled dependency libsemigroups ))))) (add-after 'build 'build-doc ;; The documentation is bundled, but we create it from source. @@ -1407,8 +1422,13 @@ xtensor provides: (add-after 'install 'install-packages (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (share (string-append out "/share/gap"))) - (copy-recursively "pkg" (string-append share "/pkg")))))))) + (bin (string-append out "/bin")) + (share (string-append out "/share/gap")) + (xgap-sh (string-append share "/pkg/xgap/xgap.sh")) + (xgap (string-append bin "/xgap"))) + (copy-recursively "pkg" (string-append share "/pkg")) + (chmod xgap-sh #o744) + (symlink xgap-sh xgap))))))) (home-page "https://www.gap-system.org/") (synopsis "System for computational group theory") |