diff options
| author | Andreas Enge <andreas@enge.fr> | 2025-02-20 15:49:19 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 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 a8ad770c924..77e3c162059 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm | |||
| @@ -1362,6 +1362,7 @@ xtensor provides: | |||
| 1362 | (list gmp readline zlib | 1362 | (list gmp readline zlib |
| 1363 | cddlib ; for the cddinterface package | 1363 | cddlib ; for the cddinterface package |
| 1364 | curl ; for the curlinterface package | 1364 | curl ; for the curlinterface package |
| 1365 | libx11 libxaw libxt ; for the xgap package | ||
| 1365 | zeromq ; for the zeromqinterface package | 1366 | zeromq ; for the zeromqinterface package |
| 1366 | )) | 1367 | )) |
| 1367 | (arguments | 1368 | (arguments |
| @@ -1374,8 +1375,23 @@ xtensor provides: | |||
| 1374 | (with-directory-excursion "pkg" | 1375 | (with-directory-excursion "pkg" |
| 1375 | ;; Unpack package tarball, so that shebangs can be modified. | 1376 | ;; Unpack package tarball, so that shebangs can be modified. |
| 1376 | (with-directory-excursion "caratinterface" | 1377 | (with-directory-excursion "caratinterface" |
| 1377 | (invoke "tar" "xvf" "carat.tgz"))))) | 1378 | (invoke "tar" "xvf" "carat.tgz")) |
| 1378 | ;; The following phases are added after 'build, apparently in | 1379 | ;; Replace paths and adapt configuration. |
| 1380 | (with-directory-excursion "xgap" | ||
| 1381 | (substitute* '("Makefile.in" "cnf/Makegap.in") | ||
| 1382 | (("/bin/sh") | ||
| 1383 | (string-append | ||
| 1384 | (assoc-ref %build-inputs "bash") "/bin/bash"))) | ||
| 1385 | (substitute* "xgap.sh.in" | ||
| 1386 | (("\"@gapdir@\"") | ||
| 1387 | (string-append %output "/share/gap")) | ||
| 1388 | (("^XGAP=.*$") | ||
| 1389 | (string-append "XGAP=" %output | ||
| 1390 | "/share/gap/pkg/xgap/bin/$XGAP_PRG\n")) | ||
| 1391 | (("^GAP=.*$") | ||
| 1392 | (string-append "GAP=" %output "/bin/gap\n")) | ||
| 1393 | (("VERBOSE=\"NO\"") "VERBOSE=\"YES\"")))))) | ||
| 1394 | ;; The following phases are executed after 'build, apparently in | ||
| 1379 | ;; reverse order. So we carry out 'build, then 'build-doc, then | 1395 | ;; reverse order. So we carry out 'build, then 'build-doc, then |
| 1380 | ;; 'remove-packages, then 'build-packages. | 1396 | ;; 'remove-packages, then 'build-packages. |
| 1381 | (add-after 'build 'build-packages | 1397 | (add-after 'build 'build-packages |
| @@ -1391,8 +1407,7 @@ xtensor provides: | |||
| 1391 | (with-directory-excursion "pkg" | 1407 | (with-directory-excursion "pkg" |
| 1392 | (for-each delete-file-recursively | 1408 | (for-each delete-file-recursively |
| 1393 | '("normalizinterface" ; tries to download normaliz even when it is available | 1409 | '("normalizinterface" ; tries to download normaliz even when it is available |
| 1394 | "semigroups" ; bundled dependencies | 1410 | "semigroups" ; bundled dependency libsemigroups |
| 1395 | "xgap" ; make: /bin/sh: No such file or directory | ||
| 1396 | ))))) | 1411 | ))))) |
| 1397 | (add-after 'build 'build-doc | 1412 | (add-after 'build 'build-doc |
| 1398 | ;; The documentation is bundled, but we create it from source. | 1413 | ;; The documentation is bundled, but we create it from source. |
| @@ -1407,8 +1422,13 @@ xtensor provides: | |||
| 1407 | (add-after 'install 'install-packages | 1422 | (add-after 'install 'install-packages |
| 1408 | (lambda* (#:key outputs #:allow-other-keys) | 1423 | (lambda* (#:key outputs #:allow-other-keys) |
| 1409 | (let* ((out (assoc-ref outputs "out")) | 1424 | (let* ((out (assoc-ref outputs "out")) |
| 1410 | (share (string-append out "/share/gap"))) | 1425 | (bin (string-append out "/bin")) |
| 1411 | (copy-recursively "pkg" (string-append share "/pkg")))))))) | 1426 | (share (string-append out "/share/gap")) |
| 1427 | (xgap-sh (string-append share "/pkg/xgap/xgap.sh")) | ||
| 1428 | (xgap (string-append bin "/xgap"))) | ||
| 1429 | (copy-recursively "pkg" (string-append share "/pkg")) | ||
| 1430 | (chmod xgap-sh #o744) | ||
| 1431 | (symlink xgap-sh xgap))))))) | ||
| 1412 | (home-page "https://www.gap-system.org/") | 1432 | (home-page "https://www.gap-system.org/") |
| 1413 | (synopsis | 1433 | (synopsis |
| 1414 | "System for computational group theory") | 1434 | "System for computational group theory") |
