summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2024-02-07 16:17:20 -0500
committerMichael Orlitzky <mjo@gentoo.org>2024-02-07 16:17:59 -0500
commit9a97b3a4c75084e81cb96286afe7825650cb141c (patch)
treeafb27b13c3c281b8d4ded1af7520b6fb89bb538f /sci-mathematics
parentdev-gap/atlasrep: add 2.1.8, drop 2.1.7 (diff)
downloadgentoo-9a97b3a4c75084e81cb96286afe7825650cb141c.tar.gz
gentoo-9a97b3a4c75084e81cb96286afe7825650cb141c.tar.bz2
gentoo-9a97b3a4c75084e81cb96286afe7825650cb141c.zip
sci-mathematics/gap: add 4.13.0_alpha1 masked for testing
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/gap/Manifest1
-rw-r--r--sci-mathematics/gap/gap-4.13.0_alpha1.ebuild137
2 files changed, 138 insertions, 0 deletions
diff --git a/sci-mathematics/gap/Manifest b/sci-mathematics/gap/Manifest
index 20d1f3a3316c..f4967f9cc8b4 100644
--- a/sci-mathematics/gap/Manifest
+++ b/sci-mathematics/gap/Manifest
@@ -1 +1,2 @@
DIST gap-4.12.2-core.tar.gz 37671069 BLAKE2B 7e2c35f0bb232fc5478ff09e98b9c4d021ee5df775f2ff4934b27f871c18a3781386c24b94f1255517c4193c1eb9ff6396ea70e8d6cf72ccbb5480ca837ef8eb SHA512 d16af2648b0a655df7ce28cf8e2c6b3d0e33eda806674844a9813b4cb5068b137005225c02b8651a25b608e9b76a184f54f2e291a957a4675c38a7883ef83a38
+DIST gap-4.13.0-alpha1-core.tar.gz 43594979 BLAKE2B 87e7a7457731a35e6049ce802c819e26c46ef743eadf496f23bec5347a8f56ef102fce7b4d7489b5c56525075335d5ee717981a4f7708699c339534bcc6d65a5 SHA512 6c284df20c34ea403fab71d9489aca1e2b9ecaccb0defaf44d64e5058d29c0d87931b7900f519f8d4aa3ed9d9b4c684a3ef8aef32809fe74b9307fd7b4405d8f
diff --git a/sci-mathematics/gap/gap-4.13.0_alpha1.ebuild b/sci-mathematics/gap/gap-4.13.0_alpha1.ebuild
new file mode 100644
index 000000000000..1d0dea2de4c2
--- /dev/null
+++ b/sci-mathematics/gap/gap-4.13.0_alpha1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit estack
+
+DESCRIPTION="System for computational discrete algebra. Core functionality."
+HOMEPAGE="https://www.gap-system.org/"
+SRC_URI="https://github.com/gap-system/gap/releases/download/v${PV/_/-}/${P/_/-}-core.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0/9" # soname
+KEYWORDS=""
+IUSE="cpu_flags_x86_popcnt debug memcheck minimal readline test valgrind"
+REQUIRED_USE="?? ( memcheck valgrind )"
+RESTRICT="!test? ( test )"
+
+# The minimum set of packages needed for basic GAP operation. You can
+# actually start gap without these by passing "--bare" to it on the CLI,
+# but don't expect anything to work.
+REQUIRED_PKGS="
+ dev-gap/gapdoc
+ dev-gap/primgrp
+ dev-gap/smallgrp
+ dev-gap/transgrp"
+
+# The packages aren't really required, but GAP tries to load them
+# automatically, and will complain to the user if they fail to load.
+# The list of automatically-loaded packages is a user preference, called
+# AutoloadPackages, and the upstream default can be found in
+# lib/package.gi within the GAP source tree. Passing "-A" to GAP on the
+# CLI (or setting that user preference) will suppress the autoload
+# behavior and allow GAP to start without these, which is why we allow
+# the user to skip them with USE=minimal if he knows what he is doing.
+AUTOLOADED_PKGS="
+ dev-gap/autpgrp
+ dev-gap/alnuth
+ dev-gap/crisp
+ dev-gap/ctbllib
+ dev-gap/factint
+ dev-gap/fga
+ dev-gap/irredsol
+ dev-gap/laguna
+ dev-gap/polenta
+ dev-gap/polycyclic
+ dev-gap/resclasses
+ dev-gap/sophus
+ dev-gap/tomlib"
+
+# The test suite will fail without the "required" subset.
+BDEPEND="test? ( ${REQUIRED_PKGS} )"
+
+DEPEND="dev-libs/gmp:=
+ sys-libs/zlib
+ valgrind? ( dev-debug/valgrind )
+ readline? ( sys-libs/readline:= )"
+
+RDEPEND="${DEPEND}"
+
+# If you _really_ want to install GAP without the set of required
+# packages, use package.provided.
+PDEPEND="${REQUIRED_PKGS} !minimal? ( ${AUTOLOADED_PKGS} )"
+
+S="${WORKDIR}/${P/_/-}"
+
+pkg_setup() {
+ if use valgrind; then
+ elog "If you enable the use of valgrind during building"
+ elog "be sure that you have enabled the proper flags"
+ elog "in gcc to support it:"
+ elog "https://wiki.gentoo.org/wiki/Debugging#Valgrind"
+ fi
+}
+
+src_prepare() {
+ # Remove these to be extra sure we don't use bundled libraries.
+ rm -r extern || die
+ rm -r hpcgap/extern || die
+
+ # The Makefile just tells you to run ./configure, which then
+ # produces a GNUmakefile.
+ rm Makefile || die
+
+ default
+}
+
+src_configure() {
+ # We unset $ABI because GAP uses it internally for something else.
+ # --without-gmp and --without-zlib both trigger an AC_MSG_ERROR
+ local myeconfargs=(
+ ABI=""
+ --with-gmp
+ --with-zlib
+ $(use_enable cpu_flags_x86_popcnt popcnt)
+ $(use_enable memcheck memory-checking)
+ $(use_enable valgrind)
+ $(use_with readline)
+ $(use_enable debug)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # Without this, the default is a quiet build.
+ emake V=1
+}
+
+src_test() {
+ # We need to specify additional root paths because otherwise the
+ # recently-built GAP doesn't know where to look for the "required"
+ # packages (which must already be installed). The two paths we
+ # append to $S are where those packages wind up.
+ local gaproots="${S}/;"
+ gaproots+="${EPREFIX}/usr/$(get_libdir)/gap/;"
+ gaproots+="${EPREFIX}/usr/share/gap/"
+
+ # GAPARGS is a Makefile variable that exists for this purpose. We
+ # use "-A" to hide the warnings about missing autoloaded-but-not-
+ # required packages. The tee/pipefail works around a glitch in
+ # dev-gap/browse that can clobber your terminal.
+ eshopts_push -o pipefail
+ emake GAPARGS="-A -l '${gaproots}'" check | tee test-suite.log \
+ || die "test suite failed, see test-suite.log"
+ eshopts_pop
+}
+
+src_install() {
+ default
+
+ # Manually install Makefile.gappkg
+ insinto usr/share/gap/etc
+ doins etc/Makefile.gappkg
+
+ # la files removal
+ find "${ED}" -type f -name '*.la' -delete || die
+}