summaryrefslogtreecommitdiff
path: root/sci-mathematics
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-05 03:03:37 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-05 03:03:37 +0000
commit564cd64dc5f2727c4df6aeb1bb51327503c84e78 (patch)
tree44f51d1887abfcdb7df61a570c2ffa0d6841d7db /sci-mathematics
parent3cc82055be7dba177f4aea15af9f5414b532da7e (diff)
gentoo auto-resync : 05:11:2024 - 03:03:37
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/Manifest.gzbin19342 -> 19343 bytes
-rw-r--r--sci-mathematics/sympow/Manifest4
-rw-r--r--sci-mathematics/sympow/files/sympow-2.023.7-more-cflag-care.patch53
-rw-r--r--sci-mathematics/sympow/files/sympow-2.023.7-no-which.patch89
-rw-r--r--sci-mathematics/sympow/sympow-2.023.7.ebuild45
5 files changed, 191 insertions, 0 deletions
diff --git a/sci-mathematics/Manifest.gz b/sci-mathematics/Manifest.gz
index 826fecd3a355..7ce541b13a48 100644
--- a/sci-mathematics/Manifest.gz
+++ b/sci-mathematics/Manifest.gz
Binary files differ
diff --git a/sci-mathematics/sympow/Manifest b/sci-mathematics/sympow/Manifest
index d4aeb42f95ef..96883d4c599d 100644
--- a/sci-mathematics/sympow/Manifest
+++ b/sci-mathematics/sympow/Manifest
@@ -1,5 +1,9 @@
AUX sympow-2.023.6-dont-force-O3.patch 2145 BLAKE2B 711d252e625690400ee7215f9f8d4e7c695945101d2114e18259d1c852795de9803f0b0866b37a6c99346ef3a398f45f6ee41fee949eb8aa8b5ae75042dc46d4 SHA512 6a60fb9f44867d2ba6aa33cfc34d6db7616da62a2d9c8a4ba1881459790c8760f162d0084b2d254938e8b5374fd929ca7f3a827312e76002587796ea516fbe6b
AUX sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch 2289 BLAKE2B 845125575e201767360ebe38ecbf321a254d01d5eadfeee4d36e7c350e939804d7726299d33de0c564f455b5a559c05542f0da5d54e6bcceb22c02907ec0599a SHA512 a5840039ff0bf6c99cd6ef5609bb46aeff48858a57a253e051a04b180839a0f8b36480fffee10e22ef76672073b08ca58a399cb078a477aa447bbbc0c05dd6cf
+AUX sympow-2.023.7-more-cflag-care.patch 2094 BLAKE2B 00f5d65d7f7e510a99e9e9c0e147762589532833d09eff69ad930830ca433f4fa53b44e2792003037023fa1fb28aaee5824faac91aace74dc7ac32a7e887787f SHA512 d082d8da9737077b93203e9a10faf97b5d7007506b9bd33725646c9febcceebb940ef3a82c4cfe621f493dfce3c4519f6320eb1cf2f729dc705e50ded2688c08
+AUX sympow-2.023.7-no-which.patch 2764 BLAKE2B 53c49fd912cdcbdec8671b19f0e052fde3eec9ec216efe13bc92d7466524c1d77b322216819c6aeae35ce44a4c193f017a3c86fb16c2c86be6300011cf556867 SHA512 d3ccccf8b16bbcbf74b69cdf1adea5932c280a1c330dba004e63dd4cc19f9d4a2fe9ae16dfaa5ffb8a8b41e21c367efb95ef57fecfa14dd37d50364b8352e8b1
DIST sympow-v2.023.6.tar.gz 68142 BLAKE2B accff25cb1da5b6935a91179fa399d76148709be54bbd434c0dc6143e88e9cd0f0a3cd96c683da3214366a29d6d0dbb7236d2623ef3f9322b6d4d54c6bad9882 SHA512 efe3b09fff0629e136b029ea615aa09ac1a4f225c06636d653ac921c7de01bf75e2b392a138c3c1af92f2b4f889f5949beeeba5b6e5e6b49e02c605bb9c16ceb
+DIST sympow-v2.023.7.tar.bz2 61652 BLAKE2B 1800ec8ae3f95e24c4bfe097d13586f0bb781cef15e41539c3cb67f85ad9830c38a9bde8ae3290c6696332e55f698fc153f96575561979be2264baa6857af9ec SHA512 7df4a038aa69acc989ef07085462ed2efb848b95c4515871809033a02ae649936eda83d68cac83366466d597b370b963eb14d1f1c8389fa0089d0063e299955f
EBUILD sympow-2.023.6.ebuild 1060 BLAKE2B d8f185de5bda0fd85b41aca210e1bc5f762ac56c76c5eab30e45c857661fea3d5c778758535ca3864e9048898b740a3bc9c85a0111af0f6733859982465f078f SHA512 3b79bb81ba2c985a2e2208a7306d17d4aa3a3a49be40b42cfa9b3ab7717a06d64c06752e1e80686f5bc436b5beaf486104fc70ad250776595327e62fb5708477
+EBUILD sympow-2.023.7.ebuild 1159 BLAKE2B 5b88f08e6fb81b03a3b1c25a9dc0e3547320c221f2a05b0fc1490e49838e852ba1c8e9663446a5783ed7a5f04def628fe122401b4c940a2d92c4220c0d6ee754 SHA512 b4bd1e4aef03938c21988751f8f1a273008cce675600c3a6cce4ae0bede71db95cb03b9a8bcbf3fd19d6ca4126f8ee3edc32fc3517255ef2e984784d47d508a7
MISC metadata.xml 771 BLAKE2B d98ac3ebc10b3e0dd9a62bc357e6499e4f1922626d1b7e677a71a33712cc64577aa384a6bdc64c7dcba053dfd3d510b9be99df737316e2dd6fb7ca34de5ea280 SHA512 5eed691be8f8a0d76a96ec60dcfffe3bcc345587eafc4c7bfb51a598ca6f4820b189ad47851b50e038baa01dc8ef152dde1c2ff837b640a1cd22d5fdabbb6cbb
diff --git a/sci-mathematics/sympow/files/sympow-2.023.7-more-cflag-care.patch b/sci-mathematics/sympow/files/sympow-2.023.7-more-cflag-care.patch
new file mode 100644
index 000000000000..13d550f4e7d5
--- /dev/null
+++ b/sci-mathematics/sympow/files/sympow-2.023.7-more-cflag-care.patch
@@ -0,0 +1,53 @@
+From b59b1fd567007d2565b708426c83221189c6d939 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 3 Nov 2024 21:22:32 -0500
+Subject: [PATCH] Configure: fix "last resort" flag logic
+
+Towards the end of ./Configure, there is a "last resort" attempt to
+add -ffloat-store and -O0 to the user's CFLAGS to make the program
+config/fpubits succeed. But the logic is wrong: the try_add_CFLAG()
+function always appends the given flag to CFLAGS, even if it builds a
+broken config/fpubits with it. If config/fpubits is failing for some
+other reason (like on a non-x86 architecture), the end result is that
+both -ffloat-store and -O0 will be added to the user's CFLAGS, even
+though they don't help.
+
+To fix this, the loop has been rewritten to attempt -ffloat-store
+only, and to revert the user's CFLAGS afterwards if adding that flag
+did not materially improve the situation. The -O0 flag is no longer
+tried because it should have no effect on the number of FPU bits.
+---
+ Configure | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/Configure b/Configure
+index 066d415..0733d88 100755
+--- a/Configure
++++ b/Configure
+@@ -148,12 +148,17 @@ for FLAG in '-DISOC99_FENV' '-DFPUCONTROLH' '-Dx86'; do
+ try_add_CFLAG $FLAG && break
+ done
+
+-# Some flags to try as last resort. These hurt performance, so only add
+-# them if needed.
+-for FLAG in '' '-ffloat-store' '-O0'; do
+- # Stop the loop if the FPU precision already is 53 bits
+- try_add_CFLAG $FLAG && break
+-done
++# Try to add -ffloat-store as a last resort, but only retain it if it
++# makes config/fpubits succeed. We run try_add_CFLAG() once beforehand
++# with no additional flags in case the last call to it resulted in a
++# broken config/fpubits.
++try_add_CFLAG ''
++if ! config/fpubits; then
++ _SAVED_CFLAGS="${CFLAGS}"
++ if ! try_add_CFLAG -ffloat-store; then
++ CFLAGS="${_SAVED_CFLAGS}"
++ fi
++fi
+
+ # Check the actual FPU precision with our new flags.
+ CC_ARGS="$ORIGINALCFLAGS -O3 $CFLAGS config/fpubits1.c config/fpubits2.c fpu.c -o config/fpubits"
+--
+2.47.0
+
diff --git a/sci-mathematics/sympow/files/sympow-2.023.7-no-which.patch b/sci-mathematics/sympow/files/sympow-2.023.7-no-which.patch
new file mode 100644
index 000000000000..be8b128d8f05
--- /dev/null
+++ b/sci-mathematics/sympow/files/sympow-2.023.7-no-which.patch
@@ -0,0 +1,89 @@
+From 4bbc2ec941fcca8525af30964e8683498b65de62 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sun, 3 Nov 2024 20:32:28 -0500
+Subject: [PATCH 1/2] Configure: replace `which foo` by $(command -v foo)
+
+The POSIX "command -v" is a more portable way to get the path to an
+executable than "which". The latter is non-standard and typically
+requires an extra package to be installed. Similarly, $(bar) is a
+superior alternative to `bar`. Unless you have a shell from the 1980s,
+both are portable, but the $() syntax is much more amenable to nesting
+and quoting.
+
+References:
+
+ * https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/command.html
+ * http://mywiki.wooledge.org/BashFAQ/082
+---
+ Configure | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/Configure b/Configure
+index 53b556e..a08fe08 100755
+--- a/Configure
++++ b/Configure
+@@ -12,7 +12,7 @@ VARPREFIX=${VARPREFIX:-"/var"}
+
+ FILE="Makefile.new"
+ CONFIG="config.h"
+-RM=`which \rm`
++RM=$(command -v rm)
+ if [ -z "$RM" ];
+ then
+ echo "**ERROR**: Could not find rm"; exit;
+@@ -25,19 +25,19 @@ echo "#define VARPREFIX \"$VARPREFIX\"" >> $CONFIG
+ echo "#define VERSION \"$VERSION\"" >> $CONFIG
+ echo "VERSION = $VERSION" >> $FILE
+
+-GREP=`which \grep`
++GREP=$(command -v grep)
+ if [ -z "$GREP" ];
+ then
+ echo "*WARNING*: Could not find grep --- will not be able to build new_data"
+ fi
+
+-GP=`which \gp`
++GP=$(command -v gp)
+ if [ -z "$GP" ];
+ then
+ echo "*WARNING*: Could not find gp --- will not be able to build new_data"
+ fi
+
+-SED=`which \sed` && echo "SED = $SED" >> $FILE
++SED=$(command -v sed) && echo "SED = $SED" >> $FILE
+ if [ -z "$SED" ];
+ then
+ echo "*WARNING*: Could not find sed --- will not be able to build new_data"
+@@ -75,7 +75,7 @@ export CC
+ ##echo "**ERROR**: Could not find uname"; exit;
+ ##fi
+
+-HELP2MAN=`which \help2man` && echo "HELP2MAN = $HELP2MAN" >> $FILE
++HELP2MAN=$(command -v help2man) && echo "HELP2MAN = $HELP2MAN" >> $FILE
+ if [ -z "$HELP2MAN" ];
+ then
+ echo "**ERROR**: Could not find help2man"; exit;
+@@ -284,17 +284,17 @@ df="datafiles"
+ echo "DATAFILES = $df/*M.txt $df/*S.txt $df/param_data" >> $FILE
+
+ echo "RM = $RM" >> $FILE
+-CP=`which \cp` && echo "CP = $CP" >> $FILE
++CP=$(command -v cp) && echo "CP = $CP" >> $FILE
+ if [ -z "$CP" ];
+ then
+ echo "**ERROR**: Could not find cp"; exit;
+ fi
+-MKDIR=`which \mkdir` && echo "MKDIR = $MKDIR" >> $FILE
++MKDIR=$(command -v mkdir) && echo "MKDIR = $MKDIR" >> $FILE
+ if [ -z "$MKDIR" ];
+ then
+ echo "**ERROR**: Could not find mkdir"; exit;
+ fi
+-TOUCH=`which \touch` && echo "TOUCH = $TOUCH" >> $FILE
++TOUCH=$(command -v touch) && echo "TOUCH = $TOUCH" >> $FILE
+ if [ -z "$TOUCH" ];
+ then
+ echo "**ERROR**: Could not find touch"; exit;
+--
+2.47.0
+
diff --git a/sci-mathematics/sympow/sympow-2.023.7.ebuild b/sci-mathematics/sympow/sympow-2.023.7.ebuild
new file mode 100644
index 000000000000..7d05aedd6f50
--- /dev/null
+++ b/sci-mathematics/sympow/sympow-2.023.7.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Symmetric power elliptic curve L-functions"
+HOMEPAGE="https://gitlab.com/rezozer/forks/sympow/"
+SRC_URI="https://gitlab.com/rezozer/forks/sympow/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
+S="${WORKDIR}/${PN}-v${PV}"
+
+LICENSE="Sympow-BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+
+# Pari is used at build time to generate data.
+BDEPEND="sys-apps/help2man
+ sci-mathematics/pari"
+RDEPEND="sci-mathematics/pari"
+
+PATCHES=(
+ "${FILESDIR}/sympow-2.023.6-dont-force-O3.patch"
+ "${FILESDIR}/sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch"
+ "${FILESDIR}/${P}-no-which.patch"
+ "${FILESDIR}/${P}-more-cflag-care.patch"
+)
+
+DOCS=( HISTORY README.md )
+
+src_configure() {
+ export ADDBINPATH=yes
+ export PREFIX="${EPREFIX}/usr"
+
+ # This location still won't be writable, but we can at least add
+ # the EPREFIX that belongs there. Sympow uses $HOME/.sympow as a
+ # fallback (what we want) when its first attempt doesn't work.
+ export VARPREFIX="${EPREFIX}/var"
+
+ ./Configure || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" all
+}