summaryrefslogtreecommitdiff
path: root/gnu/packages/algebra.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/algebra.scm')
-rw-r--r--gnu/packages/algebra.scm36
1 files changed, 23 insertions, 13 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 1ded3cd746..8454956122 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1351,16 +1351,7 @@ xtensor provides:
'(begin
;; Delete bundled external libraries.
(for-each delete-file-recursively
- '("extern" "hpcgap/extern"))
- ;; Delete packages that are known not to build.
- ;; TODO: Investigate.
- (with-directory-excursion "pkg"
- (for-each delete-file-recursively
- '("caratinterface" ; ./configure: /bin/sh: bad interpreter: No such file or directory
- "normalizinterface" ; tries to download normaliz even when it is available
- "semigroups" ; bundled dependencies
- "xgap" ; make: /bin/sh: No such file or directory
- )))))))
+ '("extern" "hpcgap/extern"))))))
(build-system gnu-build-system)
(native-inputs (list (texlive-updmap.cfg
(list texlive-enumitem
@@ -1380,21 +1371,40 @@ xtensor provides:
(list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
#:phases
(modify-phases %standard-phases
+ ;; The following phases are added 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
(lambda _
(setenv "CONFIG_SHELL" (which "bash"))
(setenv "CC" "gcc")
(with-directory-excursion "pkg"
(invoke "../bin/BuildPackages.sh"))))
- (add-after 'build-packages 'build-doc
+ (add-after 'build 'remove-packages
+ ;; Delete packages that are known not to build.
+ ;; TODO: Investigate.
+ (lambda _
+ (with-directory-excursion "pkg"
+ (for-each delete-file-recursively
+ '("caratinterface" ; ./configure: /bin/sh: bad interpreter: No such file or directory
+ "normalizinterface" ; tries to download normaliz even when it is available
+ "semigroups" ; bundled dependencies
+ "xgap" ; make: /bin/sh: No such file or directory
+ )))))
+ (add-after 'build 'build-doc
;; The documentation is bundled, but we create it from source.
+ ;; This needs to be done before 'remove-packages, since
+ ;; otherwise this phase fails due to missing cross references.
+ ;; Otherwise said, the documentation will include that of
+ ;; removed packages. It needs to be done after 'build since
+ ;; it requires the gap binary.
(lambda _
(with-directory-excursion "doc"
;; We do not build all packages, which breaks
;; cross-references in the documentation. Since
;; gap-4.14.0, this causes an error.
- (substitute* "make_doc"
- (("QuitGap\\(false\\);") "QuitGap(true);"))
+; (substitute* "make_doc"
+; (("QuitGap\\(false\\);") "QuitGap(true);"))
(invoke "./make_doc"))))
(add-after 'install 'install-packages
(lambda* (#:key outputs #:allow-other-keys)