gnu: gap: Build most packages.

* gnu/packages/algebra.scm (gap)[source]<snippet>: Use a blacklist instead
of a whitelist.
[inputs]: Add inputs required for packages.
[license]: Use gpl3+ for the combined work.
[arguments]<#:phases>: Set CC environment variable.

This change is possible since now all licenses for GAP packages are
properly documented as free. Packages are only excluded if they currently
fail to build, as a reminder for further work.

Change-Id: If68dfc7ce4b73cdeab0d5a31340840dc1aeb48b6
This commit is contained in:
Andreas Enge 2024-09-06 11:48:47 +02:00
parent 31249d88cc
commit 013bda5e2c
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -41,6 +41,7 @@ (define-module (gnu packages algebra)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages cpp) #:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
#:use-module (gnu packages documentation) #:use-module (gnu packages documentation)
#:use-module (gnu packages flex) #:use-module (gnu packages flex)
#:use-module (gnu packages fltk) #:use-module (gnu packages fltk)
@ -52,6 +53,7 @@ (define-module (gnu packages algebra)
#:use-module (gnu packages maths) #:use-module (gnu packages maths)
#:use-module (gnu packages mpi) #:use-module (gnu packages mpi)
#:use-module (gnu packages multiprecision) #:use-module (gnu packages multiprecision)
#:use-module (gnu packages networking)
#:use-module (gnu packages ocaml) #:use-module (gnu packages ocaml)
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
@ -1233,91 +1235,31 @@ (define-public gap
;; Delete bundled external libraries. ;; Delete bundled external libraries.
(for-each delete-file-recursively (for-each delete-file-recursively
'("extern" "hpcgap/extern")) '("extern" "hpcgap/extern"))
;; Delete all packages except for a fixed list, ;; Delete packages that are known not to build.
;; given by their names up to version numbers. ;; TODO: Investigate.
(with-directory-excursion "pkg" (with-directory-excursion "pkg"
(for-each delete-file-recursively (for-each delete-file-recursively
(lset-difference '("caratinterface" ; ./configure: /bin/sh: bad interpreter: No such file or directory
(lambda (all keep) (string-prefix? keep all)) "cddinterface" ; configure: error: could not use setoper.h
(scandir ".") "normalizinterface" ; tries to download normaliz
'("." ".." "semigroups" ; bundled dependencies
;; Necessary packages. "xgap" ; make: /bin/sh: No such file or directory
"gapdoc" )))))))
"primgrp"
"smallgrp" ; artistic2.0
"transgrp" ; artistic2.0 for data,
; gpl2 or gpl3 for code
;; Optional packages.
"4ti2interface"
"alnuth"
"autodoc"
"automata"
"autpgrp"
"cap"
"crime"
"crisp" ; bsd-2
"ctbllib" ; gpl3+
"datastructures"
"examplesforhomalg"
"factint"
"fga"
"format"
"gauss"
"gaussforhomalg"
"generalizedmorphismsforcap"
"gradedmodules"
"gradedringforhomalg"
"groupoids"
"guarana"
"homalg"
"homalgtocas"
"idrel"
"images" ; mpl2.0
"intpic"
"io" ; gpl3+
"ioforhomalg"
"irredsol" ; bsd-2
"laguna"
"liering"
"linearalgebraforcap"
"localizeringforhomalg"
"mapclass"
"matricesforhomalg"
"modulepresentationsforcap"
"modules"
"monoidalcategories"
"nconvex"
"nilmat"
"numericalsgps"
"openmath"
"orb" ; gpl3+
"polenta"
"polycyclic"
"radiroot"
"recog" ; gpl3+
"repsn"
"resclasses"
"ringsforhomalg"
"sco"
"simpcomp"
"sophus"
"tomlib"
"toolsforhomalg"
"unipot"
"utils"))))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
(list gmp readline zlib)) (list gmp readline zlib
curl ; for the curlinterface package
zeromq ; for the zeromqinterface package
))
(arguments (arguments
`(#:configure-flags `(#:configure-flags
(list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'build 'build-packages (add-after 'build 'build-packages
;; Compile all packages that have not been deleted by the
;; code snippet above.
(lambda _ (lambda _
(setenv "CONFIG_SHELL" (which "bash")) (setenv "CONFIG_SHELL" (which "bash"))
(setenv "CC" "gcc")
(with-directory-excursion "pkg" (with-directory-excursion "pkg"
(invoke "../bin/BuildPackages.sh")))) (invoke "../bin/BuildPackages.sh"))))
(add-after 'build-packages 'build-doc (add-after 'build-packages 'build-doc
@ -1339,13 +1281,9 @@ (define-public gap
a library of thousands of functions implementing algebraic algorithms a library of thousands of functions implementing algebraic algorithms
written in the GAP language as well as large data libraries of algebraic written in the GAP language as well as large data libraries of algebraic
objects.") objects.")
;; Some packages have different licenses (effectively forcing the ;; gap itself is gpl2+, but some packages have different licenses.
;; combined work to be licensed as gpl3+); if this is the case, this ;; effectively forcing the combined work to be licensed as gpl3+.
;; is mentioned above next to their name. (license license:gpl3+)))
;; Some packages have no license mentioned explicitly; supposedly this
;; means that the gpl2+ licence of GAP itself applies, but to be on the
;; safe side, we drop them for now.
(license license:gpl2+)))
(define-public spectra (define-public spectra
(package (package