dev-gap/grape: new package, add 4.9.0

Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
Michael Orlitzky
2023-12-21 12:27:33 -05:00
parent bba08c6a02
commit 1e3186bf17
4 changed files with 96 additions and 0 deletions

1
dev-gap/grape/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST grape-4.9.0.tar.gz 1941458 BLAKE2B b1bf1bce13897fb12989e9f31593078d3fe21a487e699fe19b7d1f9080703c631718f44aee7fd8f6571c35d2d832ac53ddb0baa325a3d2651a5b7bfdf46a7205 SHA512 6c160afd3d287aa408f72950c40ff72cd411a4db599003a417acadd2f91417db38d2e6b0f6b9dff3b7164124000c2d0f4e8d379227196fae4791f54350396ecc

View File

@@ -0,0 +1,21 @@
diff --git a/lib/grape.g b/lib/grape.g
index 683abb6..3f5fdf0 100644
--- a/lib/grape.g
+++ b/lib/grape.g
@@ -39,13 +39,12 @@ GRAPE_RANDOM := false; # Determines if certain random methods are to be used
GRAPE_NRANGENS := 18; # The number of random generators taken for a subgroup
# when GRAPE_RANDOM=true.
-GRAPE_NAUTY := true; # Use nauty when true, else use bliss.
+GRAPE_NAUTY := @nauty@; # Use nauty when true, else use bliss.
-GRAPE_DREADNAUT_EXE :=
- ExternalFilename(DirectoriesPackagePrograms("grape"),"dreadnaut");
+GRAPE_DREADNAUT_EXE := "@GENTOO_PORTAGE_EPREFIX@/usr/bin/dreadnaut";
# filename of dreadnaut or dreadnautB executable
-GRAPE_BLISS_EXE := ExternalFilename(DirectoriesSystemPrograms(),"bliss");
+GRAPE_BLISS_EXE := "@GENTOO_PORTAGE_EPREFIX@/usr/bin/bliss";
# filename of bliss executable
GRAPE_DREADNAUT_INPUT_USE_STRING := false;

View File

@@ -0,0 +1,41 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit gap-pkg prefix
DESCRIPTION="GRaph Algorithms using PErmutation groups"
SLOT="0"
SRC_URI="https://github.com/gap-packages/${PN}/releases/download/v${PV}/${P}.tar.gz"
LICENSE="Apache-2.0 GPL-2+"
KEYWORDS="~amd64"
IUSE="bliss"
RDEPEND="bliss? ( sci-libs/bliss )
!bliss? ( sci-mathematics/nauty )"
PATCHES=( "${FILESDIR}/${PN}-4.9.0-exec.patch" )
DOCS=( README.md CHANGES.md )
GAP_PKG_HTML_DOCDIR="htm"
GAP_PKG_EXTRA_INSTALL=( grh )
gap-pkg_enable_tests
src_prepare() {
# The ./configure script and Makefile are only used to build
# the "dreadnaut" executable that we don't want anyway (we
# use the system copy; see $PATCHES).
rm -r nauty2_8_6 || die
rm configure Makefile.in || die
default
local nauty="true"
use bliss && nauty="false"
sed -i "s:@nauty@:${nauty}:" lib/grape.g || die
eprefixify lib/grape.g
}

View File

@@ -0,0 +1,33 @@
<?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">
GRAPE is a package for computing with graphs and groups, and is
primarily designed for constructing and analysing graphs related to
groups, finite geometries, and designs.
</longdescription>
<use>
<flag name="bliss">
Use <pkg>sci-libs/bliss</pkg> instead of
<pkg>sci-mathematics/nauty</pkg> as the backend.
</flag>
</use>
<upstream>
<remote-id type="github">gap-packages/grape</remote-id>
</upstream>
</pkgmetadata>