From 6beb198dc65f95ccc86bbb32bf906eb6dfddecfb Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 21 Dec 2023 10:39:21 -0500 Subject: [PATCH] sci-mathematics/gap: PDEPEND on autoloaded packages without USE=minimal This completes the rest of the dependency circle for GAP and the packages that it sort-of depends on. Signed-off-by: Michael Orlitzky --- ...-4.12.2-r1.ebuild => gap-4.12.2-r2.ebuild} | 27 +++++++++++++++++-- sci-mathematics/gap/metadata.xml | 5 ++++ 2 files changed, 30 insertions(+), 2 deletions(-) rename sci-mathematics/gap/{gap-4.12.2-r1.ebuild => gap-4.12.2-r2.ebuild} (75%) diff --git a/sci-mathematics/gap/gap-4.12.2-r1.ebuild b/sci-mathematics/gap/gap-4.12.2-r2.ebuild similarity index 75% rename from sci-mathematics/gap/gap-4.12.2-r1.ebuild rename to sci-mathematics/gap/gap-4.12.2-r2.ebuild index 833f8f3633512..18e8a1dfb0046 100644 --- a/sci-mathematics/gap/gap-4.12.2-r1.ebuild +++ b/sci-mathematics/gap/gap-4.12.2-r2.ebuild @@ -12,7 +12,7 @@ SRC_URI="https://github.com/gap-system/gap/releases/download/v${PV}/${P}-core.ta LICENSE="GPL-2+" SLOT="0/8" KEYWORDS="~amd64" -IUSE="cpu_flags_x86_popcnt debug emacs memcheck readline test valgrind" +IUSE="cpu_flags_x86_popcnt debug emacs memcheck minimal readline test valgrind" REQUIRED_USE="?? ( memcheck valgrind )" RESTRICT="!test? ( test )" @@ -25,6 +25,29 @@ REQUIRED_PKGS=" 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} )" @@ -37,7 +60,7 @@ RDEPEND="${DEPEND}" # If you _really_ want to install GAP without the set of required # packages, use package.provided. -PDEPEND="${REQUIRED_PKGS}" +PDEPEND="${REQUIRED_PKGS} !minimal? ( ${AUTOLOADED_PKGS} )" pkg_setup() { if use valgrind; then diff --git a/sci-mathematics/gap/metadata.xml b/sci-mathematics/gap/metadata.xml index 26c5fc567f827..c0a92adb90fe8 100644 --- a/sci-mathematics/gap/metadata.xml +++ b/sci-mathematics/gap/metadata.xml @@ -28,6 +28,11 @@ Enable memory checking + + Install only the GAP packages that are strictly required for GAP + to run. GAP will complain about the others unless you either start + it with the "-A" flag or set "AutoloadPackages" in your gap.ini. + gap-system/gap