public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/
@ 2024-02-05 15:13 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2024-02-05 15:13 UTC (permalink / raw
  To: gentoo-commits

commit:     0b6fa23e6ed561e1248bf2928202ba5966944388
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 15:00:39 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 15:13:45 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b6fa23e

sci-mathematics/gap: respect CC and CXX in the "gac" compiler

Closes: https://bugs.gentoo.org/922835
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch  | 42 ++++++++++++++++++++++
 .../{gap-4.12.2-r3.ebuild => gap-4.12.2-r4.ebuild} |  2 ++
 2 files changed, 44 insertions(+)

diff --git a/sci-mathematics/gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch b/sci-mathematics/gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch
new file mode 100644
index 000000000000..cfdfb4ac8a11
--- /dev/null
+++ b/sci-mathematics/gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch
@@ -0,0 +1,42 @@
+From 2933af2d8a986430a4fcf2ab4d577e5bb049662a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 2 Feb 2024 18:14:59 -0500
+Subject: [PATCH] cnf/gac.in: respect $CC and $CXX if they're non-null
+
+This allows the user to override the stored C and C++ compilers
+(typically obtained from sysinfo.gap) if desired. This is especially
+useful on rolling release and/or source-based distributions where the
+"current" compiler can change frequently and without user interaction.
+
+Closes: https://github.com/gap-system/gap/issues/5606
+---
+ cnf/gac.in | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/cnf/gac.in b/cnf/gac.in
+index 1faafba820..3a9fc6eb16 100644
+--- a/cnf/gac.in
++++ b/cnf/gac.in
+@@ -63,6 +63,22 @@ GAP_CFLAGS="${GAP_CFLAGS} ${GAC_CFLAGS}"
+ GAP_CXXFLAGS="${GAP_CXXFLAGS} ${GAC_CFLAGS}"
+ GAP_LDFLAGS="${GAP_LDFLAGS} ${GAC_LDFLAGS}"
+ 
++# Using the stored C/C++ compilers from sysinfo.gap is sometimes
++# undesirable. For example, if the compiler suite is upgraded or
++# downgraded, the particular executable used to build GAP itself may
++# no longer exist. The CC and CXX environment variables provide a
++# somewhat standard way for the user to indicate which compilers he
++# would like to use. So if those are set, we prefer them to the stored
++# values. This allows people who know what they are doing to override
++# the default behavior, while keeping the defaults safe for normal
++# people.
++if test -n "${CC}"; then
++    c_compiler="${CC}"
++    c_dyn_linker="${CC}"
++fi
++if test -n "${CXX}"; then
++    cxx_compiler="${CXX}"
++fi
+ 
+ # is output going to a terminal?
+ if test -t 1 && command -v tput >/dev/null 2>&1 ; then

diff --git a/sci-mathematics/gap/gap-4.12.2-r3.ebuild b/sci-mathematics/gap/gap-4.12.2-r4.ebuild
similarity index 98%
rename from sci-mathematics/gap/gap-4.12.2-r3.ebuild
rename to sci-mathematics/gap/gap-4.12.2-r4.ebuild
index d44da14dfd8a..f9f41bafaaab 100644
--- a/sci-mathematics/gap/gap-4.12.2-r3.ebuild
+++ b/sci-mathematics/gap/gap-4.12.2-r4.ebuild
@@ -62,6 +62,8 @@ RDEPEND="${DEPEND}"
 # packages, use package.provided.
 PDEPEND="${REQUIRED_PKGS} !minimal? ( ${AUTOLOADED_PKGS} )"
 
+PATCHES=( "${FILESDIR}/${P}-cc-and-cxx-for-gac.patch" )
+
 pkg_setup() {
 	if use valgrind; then
 		elog "If you enable the use of valgrind during building"


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/
@ 2024-03-19 20:50 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2024-03-19 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     7defea81a0e791ecb81999292862fb204f081b73
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 18 14:54:48 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Mar 19 20:45:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7defea81

sci-mathematics/gap: drop 4.12.2-r4

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

 sci-mathematics/gap/Manifest                       |   1 -
 .../gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch  |  42 ------
 sci-mathematics/gap/gap-4.12.2-r4.ebuild           | 144 ---------------------
 3 files changed, 187 deletions(-)

diff --git a/sci-mathematics/gap/Manifest b/sci-mathematics/gap/Manifest
index 17dbe0f804b4..09989d8cafce 100644
--- a/sci-mathematics/gap/Manifest
+++ b/sci-mathematics/gap/Manifest
@@ -1,2 +1 @@
-DIST gap-4.12.2-core.tar.gz 37671069 BLAKE2B 7e2c35f0bb232fc5478ff09e98b9c4d021ee5df775f2ff4934b27f871c18a3781386c24b94f1255517c4193c1eb9ff6396ea70e8d6cf72ccbb5480ca837ef8eb SHA512 d16af2648b0a655df7ce28cf8e2c6b3d0e33eda806674844a9813b4cb5068b137005225c02b8651a25b608e9b76a184f54f2e291a957a4675c38a7883ef83a38
 DIST gap-4.13.0-core.tar.gz 38666910 BLAKE2B 42e6ccd4c7474efec6f9faab7bbc67c264df7f3a3b62945faa53150a00d6944aa8a2cc5e5c9f99440541211d5279bdaed458ce8351375f8e14f0380f612e8c89 SHA512 d7326dc49f1c646853e66a48b83c8053bb80625289fbaa54b12b8f88c016d41cbf78d67333def0c3ac36d93f602811d2cb4ee5d56c37aa7efd13ce8ce6808f3c

diff --git a/sci-mathematics/gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch b/sci-mathematics/gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch
deleted file mode 100644
index cfdfb4ac8a11..000000000000
--- a/sci-mathematics/gap/files/gap-4.12.2-cc-and-cxx-for-gac.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 2933af2d8a986430a4fcf2ab4d577e5bb049662a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 2 Feb 2024 18:14:59 -0500
-Subject: [PATCH] cnf/gac.in: respect $CC and $CXX if they're non-null
-
-This allows the user to override the stored C and C++ compilers
-(typically obtained from sysinfo.gap) if desired. This is especially
-useful on rolling release and/or source-based distributions where the
-"current" compiler can change frequently and without user interaction.
-
-Closes: https://github.com/gap-system/gap/issues/5606
----
- cnf/gac.in | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/cnf/gac.in b/cnf/gac.in
-index 1faafba820..3a9fc6eb16 100644
---- a/cnf/gac.in
-+++ b/cnf/gac.in
-@@ -63,6 +63,22 @@ GAP_CFLAGS="${GAP_CFLAGS} ${GAC_CFLAGS}"
- GAP_CXXFLAGS="${GAP_CXXFLAGS} ${GAC_CFLAGS}"
- GAP_LDFLAGS="${GAP_LDFLAGS} ${GAC_LDFLAGS}"
- 
-+# Using the stored C/C++ compilers from sysinfo.gap is sometimes
-+# undesirable. For example, if the compiler suite is upgraded or
-+# downgraded, the particular executable used to build GAP itself may
-+# no longer exist. The CC and CXX environment variables provide a
-+# somewhat standard way for the user to indicate which compilers he
-+# would like to use. So if those are set, we prefer them to the stored
-+# values. This allows people who know what they are doing to override
-+# the default behavior, while keeping the defaults safe for normal
-+# people.
-+if test -n "${CC}"; then
-+    c_compiler="${CC}"
-+    c_dyn_linker="${CC}"
-+fi
-+if test -n "${CXX}"; then
-+    cxx_compiler="${CXX}"
-+fi
- 
- # is output going to a terminal?
- if test -t 1 && command -v tput >/dev/null 2>&1 ; then

diff --git a/sci-mathematics/gap/gap-4.12.2-r4.ebuild b/sci-mathematics/gap/gap-4.12.2-r4.ebuild
deleted file mode 100644
index f9f41bafaaab..000000000000
--- a/sci-mathematics/gap/gap-4.12.2-r4.ebuild
+++ /dev/null
@@ -1,144 +0,0 @@
-# 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} )"
-
-PATCHES=( "${FILESDIR}/${P}-cc-and-cxx-for-gac.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
-
-	# 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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/
@ 2024-10-09 13:38 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2024-10-09 13:38 UTC (permalink / raw
  To: gentoo-commits

commit:     69eb7e19b70a4eedbbc6699b8cd5045a49e0e244
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  9 13:34:00 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Oct  9 13:36:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69eb7e19

sci-mathematics/gap: revbump with an upstream patch

Backport https://github.com/gap-system/gap/pull/5796 because it's
causing failures in the SageMath test suite when dev-gap/grape also
happens to be installed.

Thanks to Dima Pasechnik for the pointer.

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

 .../gap/files/gap-4.13.1-hash-fixes.patch          | 178 +++++++++++++++++++++
 sci-mathematics/gap/gap-4.13.1-r1.ebuild           | 140 ++++++++++++++++
 2 files changed, 318 insertions(+)

diff --git a/sci-mathematics/gap/files/gap-4.13.1-hash-fixes.patch b/sci-mathematics/gap/files/gap-4.13.1-hash-fixes.patch
new file mode 100644
index 000000000000..c99b39ab91c6
--- /dev/null
+++ b/sci-mathematics/gap/files/gap-4.13.1-hash-fixes.patch
@@ -0,0 +1,178 @@
+diff --git a/lib/dicthf.gi b/lib/dicthf.gi
+index 5ee7341..e4349ac 100644
+--- a/lib/dicthf.gi
++++ b/lib/dicthf.gi
+@@ -152,16 +152,37 @@ end);
+ ##
+ InstallMethod(SparseIntKey,"for bounded tuples",true,
+     [ IsList,IsList and IsCyclotomicCollection ], 0,
+-function(m,v)
+-local c;
+-  if Length(m)<>3 or m[1]<>"BoundedTuples" then
++function(m, v)
++  if Length(m)<> 3 or m[1]<>"BoundedTuples" then
+     TryNextMethod();
+   fi;
+-  c:=[1,Maximum(m[2])+1];
+-  return function(a)
+-    return a*c;
++  # Due to the way BoundedTuples are presently implemented we expect the input
++  # to the hash function to always be a list of positive immediate integers. This means
++  # that using HashKeyWholeBag should be safe.
++  return function(x)
++    Assert(1, IsPositionsList(x));
++    if not IsPlistRep(x) then
++      x := AsPlist(x);
++    fi;
++    return HashKeyWholeBag(x, 1);
+   end;
+ 
++  # alternative code w/o HashKeyBag
++  ## build a weight vector to distinguish lists. Make entries large while staying clearly within
++  ## immediate int (2^55 replacing 2^60, since we take subsequent primes).
++  #step:=NextPrimeInt(QuoInt(2^55,Maximum(m[2])*m[3]));
++  #weights:=[1];
++  #len:=Length(v);
++  ## up to 56 full, then increasingly reduce
++  #len:=Minimum(len,8*RootInt(len));
++  #while Length(weights)<len do
++  #  Add(weights,weights[Length(weights)]+step);
++  #  step:=NextPrimeInt(step);
++  #od;
++  #return function(a)
++  #  return a*weights;
++  #end;
++
+ end);
+ 
+ BindGlobal( "SparseIntKeyVecListAndMatrix", function(d,m)
+diff --git a/lib/oprt.gi b/lib/oprt.gi
+index c1def0b..00e2953 100644
+--- a/lib/oprt.gi
++++ b/lib/oprt.gi
+@@ -3565,6 +3565,7 @@ InstallMethod(DomainForAction,"permutations on lists of integers",true,
+ function(pnt,acts,act)
+   local m;
+   if not (Length(pnt)>0 and ForAll(pnt,IsPosInt) and
++    ForAll(acts,IsPerm) and
+     (act=OnSets or act=OnPoints or act=OnRight or act=\^)) then
+     TryNextMethod();
+   fi;
+diff --git a/lib/vecmat.gi b/lib/vecmat.gi
+index 017c3c6..93ba828 100644
+--- a/lib/vecmat.gi
++++ b/lib/vecmat.gi
+@@ -2142,7 +2142,8 @@ InstallMethod(DomainForAction,"matrix/matrix",IsElmsCollsX,
+ function(pnt,acts,act)
+ local l,f;
+   if (not ForAll(acts,IsMatrix)) or
+-    (act<>OnPoints and act<>OnSubspacesByCanonicalBasis and act<>OnRight) then
++    (act<>OnPoints and act<>OnSubspacesByCanonicalBasis and act<>OnRight and act<>OnSets and
++    act<>OnTuples) then
+     TryNextMethod(); # strange operation, might extend the domain
+   fi;
+   l:=NaturalActedSpace(acts,pnt);
+diff --git a/tst/testbugfix/2024-09-14-actdomain.tst b/tst/testbugfix/2024-09-14-actdomain.tst
+new file mode 100644
+index 0000000..84f8b50
+--- /dev/null
++++ b/tst/testbugfix/2024-09-14-actdomain.tst
+@@ -0,0 +1,85 @@
++# Fix #5786 and error reported by Len Soicher in support list
++gap>   gg:=SpecialUnitaryGroup(4,2);;
++gap>    hl:=Z(2)*[
++>                 [0,0,1,0],
++>                 [1,1,0,0],
++>                 [0,1,0,1],
++>                 [0,1,1,0],
++>                 [1,1,0,1]];;
++gap> o:=Orbit(gg,Set(hl),OnSets);;
++gap> Length(o);
++216
++gap> set:=[ 1,10,15,24,29,33,38,40,44,59, 60, 63, 69, 74, 77,79,85, 86, 90,
++>   95, 99, 103, 105, 110, 122, 125, 143, 148, 149, 153, 162, 165, 174, 182,
++>   185, 191, 197, 198, 202, 218, 223, 227, 228, 235, 236, 240, 243, 248,
++>   254,
++>   256, 259, 270, 275, 288, 291, 295, 298, 302, 305, 310, 312, 315, 325,
++>   329,
++>   333, 340, 341, 350, 356, 366, 369, 381, 385, 390, 397, 402, 412, 414,
++>   419,
++>   421, 425, 428, 433, 436, 445, 447, 451, 452, 453, 454, 461, 466, 474,
++>   479,
++>   481, 489, 490, 493, 497, 507, 509, 512, 513, 519, 521 ];;
++gap> gp:=Group(
++> (  1,340,124,306,216,492,100, 25,108,270,220,332)(  2,138, 54,161,132,159,198,
++>  336,439,269, 89,419)(  3,467,177,404,505,437,379,312,481,271,223,135)
++> (  4,510, 79,504,259,234,378,251,272,268,360,303)(  5,278,176,191,231,275,263,
++>  190,230,146,265,192)(  6,486,126,523,490,448,375,237,288,400,243,329)
++> (  7,131,123,516, 48,392,350,333,418, 16,139,175)(  8,289,125,386,241, 29,376,
++>  334,242,417,442,331)(  9,430, 32, 59,446,367,377,335,411,416,515,330)
++> ( 10,391, 56,407,475,414,200,328,165,473, 86,119)( 11,368, 35,390,522,408,199,
++>  415,440,326, 87,503)( 12,412, 55,457,399,245,201, 33,438,431, 88,317)
++> ( 13,471, 40,348,452,292, 43,346,373, 77, 41,347)( 14,137,174,162, 60, 69,321,
++>  487, 61,158,322,370)( 15,101,114,109,130,160,488,489,352,351,420, 17)
++> ( 18,339,167,290,202,385, 99, 22, 90,323,217,129)( 19, 26, 93,304, 96,342)
++> ( 20,338,166,305,215,141, 97, 24, 51,150,219,507)( 21,337, 63,186,214,424, 98,
++>  23,107,382,218,349)( 27, 91,445,451,525, 67,519,239,144,203,155,353)
++> ( 28,324,444,128, 70,428,496,238,286,300,283, 64)( 30,236,287,441,387,354)
++> ( 31,345,366,517, 45,344,413,521, 46,248,244,121)( 34,314,394,402,222,447, 81,
++>  282,262,173,246,435)( 36,482,178,364,148,495,179,363,140,102,113,111)
++> ( 37,253,273,168,294,302,226,183, 72,480,154,233)( 38,483,520,393,403,465,362,
++>  298,143,356,153,369)( 39,157,320,472)( 42,228,277,264)( 44,343,147,501)
++> ( 47, 73,308,380,184,389,310,327,163,295,151,425)( 49,221,456, 80,474,260,405,
++>  325,164,524,152,449)( 50,479,365,477,461,459,497,169,296,247,134,117)
++> ( 52,361,299,285,355,188,423,464,434,453,133,118)( 53,257,509, 68,511,458,293,
++>  204,384,374, 75, 82)( 57,116,112,149,514,396,470,485,493,249,421,120)
++> ( 58,500,266,250,429,122)( 62,156,319,311)( 65,187,225,357,127, 71,388,235,
++>  460,252,274,371)( 66,106,462,291,205,383,372, 76, 92,410,280,498)
++> ( 74,401,381,476,409,281,171,104,297,307,426,182)( 78, 84,261,256,180,436,512,
++>  313,181,491,224,499)( 83,466,255,508,506,395,469,422,142,103,115,110)
++> ( 85,468,258,502,267,136)( 94,341)( 95,211)(105,478,195,432,518,316,197,484,
++>  494,455,196,170)(145,513,359,232,227,254)(172,209,398,207,279,206)
++> (185,194,309,443)(189,406,463,318,450,427,433,454,315,301,284,358)
++> (193,229,276,240)(208,397)(210,213,212)
++> ,(  1,379,148, 48,128,430,416)(  2, 34,338, 35,235,131,521)(  3,512,352, 47,
++>  318,289,237)(  4,272,506, 49,434,486,282)(  5,524,485, 10,483,340, 55)
++> (  6,458, 36,487, 60,121, 16)(  7,313,140,336,127,435,270)(  8, 85,147,489,
++>   98,201,417)(  9,469, 94,488,129,329,400)( 11,291, 26, 54,234,473,169)
++> ( 12,207,339, 56,233,503,515)( 13,426,337, 40,232,295,500)( 14, 32,414, 27,
++>  167,130,472)( 15, 33,188, 38,382,109,501)( 17, 31,459, 37,496,132,517)
++> ( 18,263,294,446,451,134,497)( 19,198,525,241,441,244,470)( 20,100,199,490,
++>  242,429,413)( 21,378,403,216,523,421, 58)( 22,124,159, 77, 63,123,292)
++> ( 23,176,275,431,168, 86,293)( 24,177,492,326,104,151,290)( 25, 79,437,269,
++>  163,152,144)( 28,462,150,162, 62,120,415)( 29,239, 83,311, 61,117,260)
++> ( 30,452,149,370, 39,122,389)( 41,468, 73,254,277,432,371)( 42,210,319,502,
++>  373,205,283)( 43,387,194,212,320,508, 99)( 44,396,349,331,399,250,420)
++> ( 45,411,461,375,475,377,418)( 46,344,409,519,522,477,419)( 50,253,278,433,
++>  231, 88,422)( 51,482,138,358,229,463,381)( 52, 91,467,221,230,518,484)
++> ( 53,390,510,494,228,454, 92)( 57,310,460,118,259,367,363)( 59,281,227,274,
++>  505,402,215)( 64,125,245, 76, 93,160,471)( 65,126,408, 75,166, 69,264)
++> ( 66,302,186,116,257,424,327)( 67,187,297,479,217,425,171)( 68,303,296,345,
++>  280,226,273)( 70,240,359,366,364, 97,200)( 71,265,360,394,393,133,423)
++> ( 72,251,146,164,268, 87,312)( 74,252,276,406,513, 89,181)( 78,395,158,185,
++>  315,287,333)( 80,136,351,156,316,286,334)( 81,511,350,184,317,288,335)
++> ( 82,261,392,183,105,309,238)( 84,224,439,182,284,193,236)( 90,466,391,357,
++>  443,170,465)( 95,321,509,353,203,243,197)( 96,516,498,354,300,246,401)
++> (101,405,453,464,154,112,341)(102,139,450,208,388,365,111)(103,440,520,285,
++>  192,266,343)(106,308,218,119,262,448,298)(107,219,368,356,442,301,209)
++> (108,514,412,355,376,474,222)(110,495,137,478,361,444,380)(113,255,342,175,
++>  173,247,305)(114,256,141,328,153,307,304)(115,258,385,325,172,214,306)
++> (135,493,157,455,362,445,407)(142,346,189,398,323,161,499)(143,190,145,436,
++>  271,165,314)(155,195,211,174,404,374,204)(178,507,332,330,248,249,179)
++> (180,372,202,386,196,213,322)(191,267,491,384,438,279,225)(206,428,299,369,
++>  480,220,449)(223,481,383,427,397,324,504)(347,457,447,410,348,456,476));;
++gap> Length(Orbit(gp,set,OnSets));
++241920
+diff --git a/tst/teststandard/hash2.tst b/tst/teststandard/hash2.tst
+index 6bfa4d3..d47452e 100644
+--- a/tst/teststandard/hash2.tst
++++ b/tst/teststandard/hash2.tst
+@@ -32,4 +32,8 @@ gap> Length(Orbit(h,h.1[1],OnRight));
+ 2079
+ gap> Length(Orbit(h,h.2^5,OnPoints));
+ 693
++gap> Length(Orbit(SymmetricGroup(14), [1 .. 7], OnSets));
++3432
++gap> Length(Orbit(SymmetricGroup(16), [1 .. 8], OnSets));
++12870
+ gap> STOP_TEST( "hash2.tst", 1);

diff --git a/sci-mathematics/gap/gap-4.13.1-r1.ebuild b/sci-mathematics/gap/gap-4.13.1-r1.ebuild
new file mode 100644
index 000000000000..45cb0c98749e
--- /dev/null
+++ b/sci-mathematics/gap/gap-4.13.1-r1.ebuild
@@ -0,0 +1,140 @@
+# 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="~amd64 ~riscv"
+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.13.1-hash-fixes.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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/
@ 2024-11-24 14:36 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2024-11-24 14:36 UTC (permalink / raw
  To: gentoo-commits

commit:     aa676b404b96cc55e5596728261f37794591dc72
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 24 14:23:12 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Nov 24 14:33:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa676b40

sci-mathematics/gap: backport another upstream patch

In particular, this fixes bug 944744, a test failure with the new
dev-gap/grape.

Closes: https://bugs.gentoo.org/944744
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../gap/files/gap-4.13.1-more-hash-fixes.patch     | 50 ++++++++++++++++++++++
 .../{gap-4.13.1-r1.ebuild => gap-4.13.1-r2.ebuild} |  5 ++-
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/gap/files/gap-4.13.1-more-hash-fixes.patch b/sci-mathematics/gap/files/gap-4.13.1-more-hash-fixes.patch
new file mode 100644
index 000000000000..5a464a0fda49
--- /dev/null
+++ b/sci-mathematics/gap/files/gap-4.13.1-more-hash-fixes.patch
@@ -0,0 +1,50 @@
+From 19484a75098d43e75e3facfdd05dccefc358e43f Mon Sep 17 00:00:00 2001
+From: Max Horn <max@quendi.de>
+Date: Fri, 11 Oct 2024 14:54:29 +0200
+Subject: [PATCH] Fix hashing for integer plists (#5807)
+
+---
+ lib/dicthf.gi                            |  2 +-
+ tst/testbugfix/2024-10-11-orbit-hash.tst | 20 ++++++++++++++++++++
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+ create mode 100644 tst/testbugfix/2024-10-11-orbit-hash.tst
+
+diff --git a/lib/dicthf.gi b/lib/dicthf.gi
+index e4349ac940..119d5329f6 100644
+--- a/lib/dicthf.gi
++++ b/lib/dicthf.gi
+@@ -164,7 +164,7 @@ function(m, v)
+     if not IsPlistRep(x) then
+       x := AsPlist(x);
+     fi;
+-    return HashKeyWholeBag(x, 1);
++    return HashKeyBag(x, 1, 0, Length(x) * GAPInfo.BytesPerVariable);
+   end;
+ 
+   # alternative code w/o HashKeyBag
+diff --git a/tst/testbugfix/2024-10-11-orbit-hash.tst b/tst/testbugfix/2024-10-11-orbit-hash.tst
+new file mode 100644
+index 0000000000..3735537e6f
+--- /dev/null
++++ b/tst/testbugfix/2024-10-11-orbit-hash.tst
+@@ -0,0 +1,20 @@
++# Fix a bug reported by Leonard Soicher caused by a bug in
++# the hash function for lists of small positive integers.
++gap> n:=280;;
++gap> G:=OnePrimitiveGroup(NrMovedPoints,n,Size,604800*2);
++J_2.2
++gap> blocks := [ [ 1, 2, 3, 28, 108, 119, 155, 198, 216, 226 ],
++>  [ 1, 2, 3, 118, 119, 140, 193, 213, 218, 226 ] ];;
++gap> Append(blocks[2],[1..1000]); for i in [1..1000] do Remove(blocks[2]); od;
++gap> Append(blocks[2],[1..1000]); for i in [1..1000] do Remove(blocks[2]); od;
++gap> ForAll(blocks,IsSet);
++true
++gap> orb1:=Orbit(G,blocks[1],OnSets);;
++gap> Length(orb1);
++12096
++gap> orb2:=Orbit(G,blocks[2],OnSets);;
++gap> Length(orb2);
++1008
++gap> orbs:=Orbits(G,blocks,OnSets);;
++gap> List(orbs,Length); # this code gave wrong results
++[ 12096, 1008 ]

diff --git a/sci-mathematics/gap/gap-4.13.1-r1.ebuild b/sci-mathematics/gap/gap-4.13.1-r2.ebuild
similarity index 97%
rename from sci-mathematics/gap/gap-4.13.1-r1.ebuild
rename to sci-mathematics/gap/gap-4.13.1-r2.ebuild
index 45cb0c98749e..49b0fd13f52a 100644
--- a/sci-mathematics/gap/gap-4.13.1-r1.ebuild
+++ b/sci-mathematics/gap/gap-4.13.1-r2.ebuild
@@ -65,7 +65,10 @@ RDEPEND="${DEPEND}"
 # packages, use package.provided.
 PDEPEND="${REQUIRED_PKGS} !minimal? ( ${AUTOLOADED_PKGS} )"
 
-PATCHES=( "${FILESDIR}/gap-4.13.1-hash-fixes.patch" )
+PATCHES=(
+	"${FILESDIR}/gap-4.13.1-hash-fixes.patch"
+	"${FILESDIR}/gap-4.13.1-more-hash-fixes.patch"
+)
 
 pkg_setup() {
 	if use valgrind; then


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-24 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-24 14:36 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2024-10-09 13:38 Michael Orlitzky
2024-03-19 20:50 Michael Orlitzky
2024-02-05 15:13 Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox