commit:     0cd0da223e5a7082ae02e5024f4dd90f4b029f17
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  2 00:04:27 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Sep  2 05:24:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cd0da22

sci-mathematics/gap: add 4.15.0_beta1 (no keywords)

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-mathematics/gap/Manifest                       |   1 +
 .../gap-4.15.0-dont-autoload-packagemanager.patch  |  31 +++++
 sci-mathematics/gap/gap-4.15.0_beta1.ebuild        | 139 +++++++++++++++++++++
 3 files changed, 171 insertions(+)

diff --git a/sci-mathematics/gap/Manifest b/sci-mathematics/gap/Manifest
index 82793ba3d69d..01e3f39d2d03 100644
--- a/sci-mathematics/gap/Manifest
+++ b/sci-mathematics/gap/Manifest
@@ -1 +1,2 @@
 DIST gap-4.14.0-core.tar.gz 38684144 BLAKE2B 
f9ae77f51dcfd53c4211e8019083d5c33a944835f5ab4d2c5c256f37469f70ee85159163771fe6795e36dd0e30f0423236d6294a666ea4c230cd297c7284c613
 SHA512 
fdc67bdb2e96727e2d9ae1077d3f2df127ee6c2f6875b298ee508d8afe8323cfb32b160ccaa8eed1c5d9e9c68548686f8391ab3b5e60c20325f4ae8a51ca9540
+DIST gap-4.15.0-beta1-core.tar.gz 38816463 BLAKE2B 
2b0e3463da4db480c17a0167131d12fd90eb6a53e2c0ac6f6c69b528294dea121d6865f369489ba72c6866bc6dd0f31ed73f43d6684f6a2c9c8405496e2398fa
 SHA512 
95a9df3001a3fd1a0e9282c295c1980f1407bd8c0b14b2f199fefa265e408b933502761efbba5cdc745f1dd75d9782dffa64d47a429340317faa97244d0c7b6d

diff --git 
a/sci-mathematics/gap/files/gap-4.15.0-dont-autoload-packagemanager.patch 
b/sci-mathematics/gap/files/gap-4.15.0-dont-autoload-packagemanager.patch
new file mode 100644
index 000000000000..f2950831c8d1
--- /dev/null
+++ b/sci-mathematics/gap/files/gap-4.15.0-dont-autoload-packagemanager.patch
@@ -0,0 +1,31 @@
+From a8b173d725f0c3baf6415fc109f58c2cb7e48537 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <[email protected]>
+Date: Tue, 2 Sep 2025 00:52:26 -0400
+Subject: [PATCH] lib/package.gi: don't load PackageManager by default
+
+That is, we revert:
+
+  https://github.com/gap-system/gap/commit/ea07baa0
+
+We don't package the GAP PackageManager, and would not want users to
+use it if we did.
+---
+ lib/package.gi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/package.gi b/lib/package.gi
+index 8916dc3..6c870c5 100644
+--- a/lib/package.gi
++++ b/lib/package.gi
+@@ -1948,7 +1948,7 @@ For backwards compatibility, the default lists most of 
packages \
+ that were autoloaded in &GAP; 4.4 (add or remove packages as you like)."
+     ],
+   default:= [ "autpgrp", "alnuth", "crisp", "ctbllib", "factint", "fga",
+-              "irredsol", "laguna", "PackageManager", "polenta", "polycyclic",
++              "irredsol", "laguna", "polenta", "polycyclic",
+               "resclasses", "sophus", "tomlib" ],
+   values:= function() return RecNames( GAPInfo.PackagesInfo ); end,
+   multi:= true,
+-- 
+2.51.0
+

diff --git a/sci-mathematics/gap/gap-4.15.0_beta1.ebuild 
b/sci-mathematics/gap/gap-4.15.0_beta1.ebuild
new file mode 100644
index 000000000000..9618339852c0
--- /dev/null
+++ b/sci-mathematics/gap/gap-4.15.0_beta1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2025 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";
+S="${WORKDIR}/${P/_/-}"
+
+LICENSE="GPL-2+"
+SLOT="0/10" # 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} )"
+
+PATCHES=( "${FILESDIR}/gap-4.15.0-dont-autoload-packagemanager.patch" )
+
+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
+}

Reply via email to