diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-30 11:44:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-30 11:44:06 +0100 |
commit | f516638b7fe9592837389826a6152a7e1b251c54 (patch) | |
tree | 8bfecb640b7b6403d7a3d662d923eed630033da7 /sci-mathematics/sympow | |
parent | 1a61119f9f7b057830e2ce0563f913ec86f282ad (diff) |
gentoo resync : 30.05.2020
Diffstat (limited to 'sci-mathematics/sympow')
5 files changed, 172 insertions, 0 deletions
diff --git a/sci-mathematics/sympow/Manifest b/sci-mathematics/sympow/Manifest new file mode 100644 index 000000000000..b97c2cec1e77 --- /dev/null +++ b/sci-mathematics/sympow/Manifest @@ -0,0 +1,5 @@ +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 +DIST sympow-v2.023.6.tar.gz 68142 BLAKE2B accff25cb1da5b6935a91179fa399d76148709be54bbd434c0dc6143e88e9cd0f0a3cd96c683da3214366a29d6d0dbb7236d2623ef3f9322b6d4d54c6bad9882 SHA512 efe3b09fff0629e136b029ea615aa09ac1a4f225c06636d653ac921c7de01bf75e2b392a138c3c1af92f2b4f889f5949beeeba5b6e5e6b49e02c605bb9c16ceb +EBUILD sympow-2.023.6.ebuild 1072 BLAKE2B 9862340cf5cc7262f660dec9eed43407ba0c3aa6642231677480983dc9d9b0ed6192023b7a3c92d4e849b8a43ec4640fd49726c0d266549695b640d682f61c69 SHA512 7b319c0994b88e87945c6bf535e13380dce1725070ebb3836e04076942bb26a24ca8b9e71fd534a8a08be6c9a8657c7fac0e2ce738b2f75ee90c2ca20b9f65ff +MISC metadata.xml 740 BLAKE2B f7bf31eef4f6a42b64105e8ce1725e4792d5303d0adb524a23fb7286430449d15f4f2ecef1afa64bdb0b4e6941928aa75d081b8fdb0c3f7b679afdb7c71c2052 SHA512 45e110738e271c8b71325023e4e371dbaee1d9e7b7318d82dcc72b6e1d094799ab230e0a14d282a3a5badbe53c54f2ca44933c4acad5f1bd24798848ac663318 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 + diff --git a/sci-mathematics/sympow/metadata.xml b/sci-mathematics/sympow/metadata.xml new file mode 100644 index 000000000000..a321d1a8e2a3 --- /dev/null +++ b/sci-mathematics/sympow/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + </maintainer> + <!-- + mjo: François maintained this package in the sage-on-gentoo overlay + long before I moved it into ::gentoo. You don't need an ACK from me + to merge his changes. + --> + <maintainer type="person"> + <email>frp.bissey@gmail.com</email> + <name>François Bissey</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + + <upstream> + <remote-id type="gitlab">rezozer/forks/sympow</remote-id> + </upstream> +</pkgmetadata> diff --git a/sci-mathematics/sympow/sympow-2.023.6.ebuild b/sci-mathematics/sympow/sympow-2.023.6.ebuild new file mode 100644 index 000000000000..4e5e5566a81b --- /dev/null +++ b/sci-mathematics/sympow/sympow-2.023.6.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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.gz" +S="${WORKDIR}/${PN}-v${PV}" + +LICENSE="Sympow-BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +# Pari is used at build time to generate data. +BDEPEND="sys-apps/help2man + sci-mathematics/pari" +DEPEND="" +RDEPEND="sci-mathematics/pari" + +PATCHES=( + "${FILESDIR}/${P}-dont-force-O3.patch" + "${FILESDIR}/${P}-no-pkgdatafilesbindir-warnings.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 +} |