summaryrefslogtreecommitdiff
path: root/sci-mathematics/gap
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-22 16:48:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-22 16:48:54 +0000
commitce163dcd0944d81d8406c9532b457535efca7a6d (patch)
treef7deea170544ce69e03c037101b7b5c1277966b4 /sci-mathematics/gap
parent05ee8049e2326946a2cd1720f98384c864f0a804 (diff)
gentoo auto-resync : 22:01:2024 - 16:48:54
Diffstat (limited to 'sci-mathematics/gap')
-rw-r--r--sci-mathematics/gap/Manifest3
-rw-r--r--sci-mathematics/gap/gap-4.12.2-r3.ebuild142
-rw-r--r--sci-mathematics/gap/metadata.xml40
3 files changed, 185 insertions, 0 deletions
diff --git a/sci-mathematics/gap/Manifest b/sci-mathematics/gap/Manifest
new file mode 100644
index 000000000000..21b9346c0594
--- /dev/null
+++ b/sci-mathematics/gap/Manifest
@@ -0,0 +1,3 @@
+DIST gap-4.12.2-core.tar.gz 37671069 BLAKE2B 7e2c35f0bb232fc5478ff09e98b9c4d021ee5df775f2ff4934b27f871c18a3781386c24b94f1255517c4193c1eb9ff6396ea70e8d6cf72ccbb5480ca837ef8eb SHA512 d16af2648b0a655df7ce28cf8e2c6b3d0e33eda806674844a9813b4cb5068b137005225c02b8651a25b608e9b76a184f54f2e291a957a4675c38a7883ef83a38
+EBUILD gap-4.12.2-r3.ebuild 4237 BLAKE2B a5742d700d7aa5ac217e240160deb77323f0da79e4399b86cbe6cde3d9e2c040f040430947b647422bd9c0ce3ec8d9ae9bd70aec5331629dcc5a8a2c5484b340 SHA512 42a6f2ab3a0f2f833b8a2cb6efaef8a477d2ff40bf7781d4bbca3719461e366e250654b4ad865853d69d287791ac376ccae1fa1a4044ce8a947a911c05d1aa33
+MISC metadata.xml 1582 BLAKE2B 9151244f139b0d675e327731c336c41d5d69c25856286c182944d57255fbb6d7b1f023195b3a01c829ff6f3ea1d5e6eb6edbcc796a30120deacde82b90b5f39c SHA512 f4490e9b13cee6604f14df39ea048d7578e080a8faa97b0bb22191a7dce56904416870ed64c289f91526087009f7488e8baed4e531c78f50a5b917e9e1684ce2
diff --git a/sci-mathematics/gap/gap-4.12.2-r3.ebuild b/sci-mathematics/gap/gap-4.12.2-r3.ebuild
new file mode 100644
index 000000000000..d44da14dfd8a
--- /dev/null
+++ b/sci-mathematics/gap/gap-4.12.2-r3.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+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/8"
+KEYWORDS="~amd64"
+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
+
+ # Prepend AC_CONFIG_MACRO_DIRS to configure.ac so that eautoreconf
+ # recreates aclocal.m4 correctly. Upstream bundles libtool-2.4.6,
+ # and Gentoo uses 2.4.7, so we need to regenerate aclocal.m4. BUT,
+ # upstream also uses m4_include directives in aclocal.m4 rather than
+ # AC_CONFIG_MACRO_DIRS in configure.ac. Without AC_CONFIG_MACRO_DIRS
+ # eautoreconf will omit all of the macros in cnf/m4.
+ sed -e '1s;^;AC_CONFIG_MACRO_DIRS([cnf/m4])\n;' -i configure.ac || die
+
+ default
+
+ # Fix feature detection with pathological CFLAGS
+ eautoreconf
+}
+
+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.
+ emake GAPARGS="-A -l '${gaproots}'" check
+}
+
+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
+}
diff --git a/sci-mathematics/gap/metadata.xml b/sci-mathematics/gap/metadata.xml
new file mode 100644
index 000000000000..c0a92adb90fe
--- /dev/null
+++ b/sci-mathematics/gap/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>frp.bissey@gmail.com</email>
+ <name>François Bissey</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Groups, Algorithms, Programming is a system for computational
+ discrete algebra, with particular emphasis on Computational Group
+ Theory. GAP provides a programming language, a library of thousands
+ of functions implementing algebraic algorithms written in the GAP
+ language as well as large data libraries of algebraic objects. GAP
+ is used in research and teaching for studying groups and their
+ representations, rings, vector spaces, algebras, combinatorial
+ structures, and more.
+ </longdescription>
+ <use>
+ <flag name="memcheck">Enable memory checking</flag>
+ <flag name="minimal">
+ 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.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">gap-system/gap</remote-id>
+ </upstream>
+</pkgmetadata>