summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2020-05-16 07:02:32 -0400
committerMichael Orlitzky <mjo@gentoo.org>2020-05-17 20:57:49 -0400
commitfccf8fbb4fe4f89eb3fdfdc92680a9027b3a978a (patch)
treedee1395d7099214fa1d1eae9050a095089c10a74 /sci-mathematics/sympow/files
parentprofiles: add Sympow-BSD to the MISC-FREE license group. (diff)
downloadgentoo-fccf8fbb4fe4f89eb3fdfdc92680a9027b3a978a.tar.gz
gentoo-fccf8fbb4fe4f89eb3fdfdc92680a9027b3a978a.tar.bz2
gentoo-fccf8fbb4fe4f89eb3fdfdc92680a9027b3a978a.zip
sci-mathematics/sympow: new package for symmetric power L-functions.
This is an actively-maintained fork of Mark Watkins's original sympow package (that is now impossible to find) by Debian's Jérôme Benoit. Sympow is a dependency of SageMath, and SageMath will soon be able to use the system's copy of sympow. Having this in Gentoo therefore avoids pointless rebuilds of sympow for Gentoo users of SageMath. Closes: https://bugs.gentoo.org/230449 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/sympow/files')
-rw-r--r--sci-mathematics/sympow/files/sympow-2.023.6-dont-force-O3.patch53
-rw-r--r--sci-mathematics/sympow/files/sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch45
2 files changed, 98 insertions, 0 deletions
diff --git a/sci-mathematics/sympow/files/sympow-2.023.6-dont-force-O3.patch b/sci-mathematics/sympow/files/sympow-2.023.6-dont-force-O3.patch
new file mode 100644
index 000000000000..ae4924d468e3
--- /dev/null
+++ b/sci-mathematics/sympow/files/sympow-2.023.6-dont-force-O3.patch
@@ -0,0 +1,53 @@
+From d5fd3ce4221705c59dc289f14f5aefc2f974ba41 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 14 May 2020 18:45:59 -0400
+Subject: [PATCH 1/1] Configure: don't force -O3 in CFLAGS.
+
+The build system already respects the user's CFLAGS. It should respect
+lower -O levels as well. This is a "requirement" on Gentoo.
+---
+ Configure | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/Configure b/Configure
+index 1ef9756..fd5555c 100755
+--- a/Configure
++++ b/Configure
+@@ -104,15 +104,12 @@ CFLAGS=''
+ # return 2 if we did not add $FLAG.
+ try_add_CFLAG()
+ {
+- # We use -O3 here to really force generation of fused
+- # multiply-add instructions and to keep floats as much as
+- # possible in registers.
+ # We compile in the fpu.c which only does
+ # something if the macro x86 is defined.
+ local flag=$1 # first argument: C FLAG to test
+ local bypassfputest=${2:-nobypass} # second argument: whether or not bypass the numerical test (default: not)
+ local status=0
+- if $CC $ORIGINALCFLAGS -Werror $CFLAGS -O3 $flag config/fpubits1.c config/fpubits2.c fpu.c -o config/fpubits 2>/dev/null; then
++ if $CC $ORIGINALCFLAGS -Werror $CFLAGS $flag config/fpubits1.c config/fpubits2.c fpu.c -o config/fpubits 2>/dev/null; then
+ # Compiled successfully, now run it
+ config/fpubits >/dev/null 2>/dev/null
+ status=$?
+@@ -166,7 +163,7 @@ for FLAG in '' '-ffloat-store' '-O0'; do
+ done
+
+ # 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"
++CC_ARGS="$ORIGINALCFLAGS $CFLAGS config/fpubits1.c config/fpubits2.c fpu.c -o config/fpubits"
+ $CC $CC_ARGS
+ if [ $? -ne 0 ]; then
+ echo >&2 "Error: the command below failed:"
+@@ -256,7 +253,7 @@ echo "CONFEXE = config/endiantuple config/fpubits" >> $FILE
+ ##
+ ##echo "DEFS = $DEFS" >> $FILE
+
+-OPT="-O3 ${CFLAGS}" && echo "OPT = $OPT" >> $FILE
++OPT="${CFLAGS}" && echo "OPT = $OPT" >> $FILE
+
+ echo "H2MFLAGS = \\" >> $FILE
+ echo " --manual=\"SYMPOW package\" \\" >> $FILE
+--
+2.26.2
+
diff --git a/sci-mathematics/sympow/files/sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch b/sci-mathematics/sympow/files/sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch
new file mode 100644
index 000000000000..e3cbe823def7
--- /dev/null
+++ b/sci-mathematics/sympow/files/sympow-2.023.6-no-pkgdatafilesbindir-warnings.patch
@@ -0,0 +1,45 @@
+From cf182287eb4219b03e57352072449885e10543f3 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 15 May 2020 16:49:49 -0400
+Subject: [PATCH 1/1] main.c: hide pkgdatafilesbindir warnings behind VERBOSE
+ >= 2.
+
+The default "pkgdatafilesbindir" is something like /var/cache/sympow
+that will never be writable by unprivileged users (and cannot safely
+be made that way). There is already a fallback to $HOME in the code
+that works perfectly well, but by default sympow emits a warning when
+it realizes that it can't write to e.g. /var/cache/sympow on the first
+try. Since that's completely expected, we hide the warnings behind an
+additional level of verbosity (VERBOSE >= 2 instead of VERBOSE >= 1).
+---
+ main.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/main.c b/main.c
+index 1d018df..fecd7d1 100644
+--- a/main.c
++++ b/main.c
+@@ -136,17 +136,17 @@ static void prepare_main(char *argv0)
+ asprintf(&pkgdatafilesbindir,"%s/datafiles/"ENDIANTUPLE,pkgcachedir);
+ if (stat(pkgdatafilesbindir,&infodb)) {mode_t mask=umask(0);
+ if (mkdir(pkgdatafilesbindir,(S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX)))
+- {if (VERBOSE>=1) fprintf(stderr,"**WARNING** failed to create data bin package cache folder %s\n",pkgdatafilesbindir);
++ {if (VERBOSE>=2) fprintf(stderr,"**WARNING** failed to create data bin package cache folder %s\n",pkgdatafilesbindir);
+ free(pkgdatafilesbindir); pkgdatafilesbindir=NULL;}
+ else
+ {stat(pkgdatafilesbindir,&infodb); pkgdatamode= infodb.st_mode & ~MASK;}
+ umask(mask);}
+ else
+ {if (!S_ISDIR(infodb.st_mode))
+- {if (VERBOSE>=1) fprintf(stderr,"**WARNING** %s exists but is not a directory\n",pkgdatafilesbindir);
++ {if (VERBOSE>=2) fprintf(stderr,"**WARNING** %s exists but is not a directory\n",pkgdatafilesbindir);
+ free(pkgdatafilesbindir); pkgdatafilesbindir=NULL;}
+ else if (access(pkgdatafilesbindir,(R_OK|W_OK|X_OK)))
+- {if (VERBOSE>=1) fprintf(stderr,"**WARNING** %s yields insufficient permissions\n",pkgdatafilesbindir);
++ {if (VERBOSE>=2) fprintf(stderr,"**WARNING** %s yields insufficient permissions\n",pkgdatafilesbindir);
+ free(pkgdatafilesbindir); pkgdatafilesbindir=NULL;}
+ else {pkgdatamode= infodb.st_mode & ~MASK;}}
+ asprintf(&datafilesdir,"%s/datafiles",cachedir);
+--
+2.26.2
+