summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2025-02-19 17:39:30 +0100
committerAndreas Enge <andreas@enge.fr>2025-02-19 17:43:10 +0100
commitf7cd085f4a36e118aa05af5524e74830a30b3dca (patch)
tree0f2db581e5253de6e7f16dd06c0f5b9144b10a62 /gnu/packages
parent53e96dffa7e317b65fe7d11af148669515ceb487 (diff)
gnu: gap: Fix building of documentation.
* gnu/packages/algebra.scm (gap)[origin]: Move deletion of packages from a snippet to... [arguments]<phases>{remove-packages}: ...this new phase. {build-doc}: Move phase. Remove substitution in build script. Change-Id: I62295c3be7439ce5cf50f54f331e63dad80ab113
Diffstat (limited to 'gnu/packages')
-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)