From f8f09cb5f6adaa0e7ca7f539d2ce4e59ea7e8063 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 20 Nov 2024 19:07:42 -0500 Subject: [PATCH] sci-mathematics/gap: add 4.14.0_beta1 Signed-off-by: Michael Orlitzky --- sci-mathematics/gap/Manifest | 1 + sci-mathematics/gap/gap-4.14.0_beta1.ebuild | 138 ++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 sci-mathematics/gap/gap-4.14.0_beta1.ebuild diff --git a/sci-mathematics/gap/Manifest b/sci-mathematics/gap/Manifest index 7b5f575d35fb7..86a1ed01c5704 100644 --- a/sci-mathematics/gap/Manifest +++ b/sci-mathematics/gap/Manifest @@ -1 +1,2 @@ DIST gap-4.13.1-core.tar.gz 38673913 BLAKE2B a63cbd2211430bfbf1bc9bb489a68a2ee7182858ccb326dfe5e6d3a7b8fb6a8c34b56a539c8b9cf3a22a1cc3a4ffe22d365b0e5229ba2c2b6d0ce6bacf0e645b SHA512 e3b74558c05e5963ea87aa77baba0edc068634072ff97b8ea0880289e53213eed82b01784db2675263d6f47547bfef259b80353ed2843ce90a77a0252c551919 +DIST gap-4.14.0-beta1-core.tar.gz 38686095 BLAKE2B dec27a1d04cc9a75e3d896e8e08c07ff2f1e7e27cbb2a5a302a840fd9ed878abc91c8efa5b172118adf96949491badc809e86c43bbdca0bb6a78ce47b6ae53e5 SHA512 e56d768a2a84a3ba82cfcfb4c3d9f39f862410cf32f04c1a173376c7e2ca5beb55ab7a7519388ca5e3b2f8118d604033a0c405d1bfa26bb974a7ac8c02f574ea diff --git a/sci-mathematics/gap/gap-4.14.0_beta1.ebuild b/sci-mathematics/gap/gap-4.14.0_beta1.ebuild new file mode 100644 index 0000000000000..2675a46831734 --- /dev/null +++ b/sci-mathematics/gap/gap-4.14.0_beta1.ebuild @@ -0,0 +1,138 @@ +# 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" + +S="${WORKDIR}/${P/_/-}" + +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} )" + +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 +}