From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yNAfLmx0dWQ2BwEASxT56A (envelope-from ) for ; Tue, 30 May 2023 05:58:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GGD/LWx0dWTcPQAAauVa8A (envelope-from ) for ; Tue, 30 May 2023 05:58:36 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 583B342E96 for ; Tue, 30 May 2023 05:58:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3qUn-0005Jq-Vz; Mon, 29 May 2023 23:58:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3qUl-0005IM-Ep for guix-patches@gnu.org; Mon, 29 May 2023 23:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3qUl-00054y-5J for guix-patches@gnu.org; Mon, 29 May 2023 23:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3qUl-00038h-12 for guix-patches@gnu.org; Mon, 29 May 2023 23:58:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56729] [RFC PATCH v3 11/32] gnu: Add sympow. Resent-From: vicvbcun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 May 2023 03:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56729 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56729@debbugs.gnu.org Cc: Andreas Enge Received: via spool by 56729-submit@debbugs.gnu.org id=B56729.168541907312012 (code B ref 56729); Tue, 30 May 2023 03:58:02 +0000 Received: (at 56729) by debbugs.gnu.org; 30 May 2023 03:57:53 +0000 Received: from localhost ([127.0.0.1]:59638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3qUa-00037e-Gt for submit@debbugs.gnu.org; Mon, 29 May 2023 23:57:53 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([81.169.146.182]:46403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3qUN-00036I-Lu for 56729@debbugs.gnu.org; Mon, 29 May 2023 23:57:41 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1685419057; cv=none; d=strato.com; s=strato-dkim-0002; b=GI00qBcKxM9kEcKfxeOdPjlDM5TTL57unjMFlJCQwF1R0hxZ6RTVeo+tc+9FvT93Lx XtHkD4KzuEEqjIafSsIS8gknpW6KhgmtV0pXS+3KBaQ1fzWfGhaetSNpngeB0vKLMQHk d0uXu36vLhDN+NRyM69+NkVW9uIW2xFQAGsK+LKdN4tbal3XzmAu4jBCaP6q+GFZpAmR 3nplbV7By7wXizTMsljbvJX+oUKFYmdL4eU1kq+djByZRrVxkuIOhh3bJ954ZPnql9Mm cz9helTVa6K5r+iDXave4PaJd1dzq8Wq7/BHxj2Ld0JxFGsL0xtFDTbhb5z5YDVN6n86 XN3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685419057; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=kpFXvVjpscLF5cWje9nvX9FNJOVMke97OPU1U9Y0oys=; b=K77l46iJ7BV+S/M79QrCwHTDgK3Md9Bmrqa8uedyLP51Ve+AZNF5JWoAIE4jOhui9O plL56MBuw7O8TKcHQ850NYIjYAFQfVgnhVqsCWZ71JwmyBgmYfeiC8db/5tki1okug6e dTYD/uTZt9a4DvTedDwcqgrbGF2e1jat9BE+My0Pk90rV0f+MjzzMt/oRHHQIZhh9gAe mKTfG+rITxoxN0sDQRz89x37+iHrzLsuaVVvoS8C8qpGQ+S/KCaYhRmZVVXCmAgs2oFa yDL1fhpLJa9tLlcqW2IeOjCrblkR6SVdvvGODrzFZnj3vsxpLsJ8DBtPYEY6qWlRNvia Uemg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685419057; s=strato-dkim-0002; d=ikherbers.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=kpFXvVjpscLF5cWje9nvX9FNJOVMke97OPU1U9Y0oys=; b=FixPxhzIeJagl7kCB2/jp75MVZugRJ5q3KPiPoWMDLDOSdWGcTkxeakT9LlhTD5BeM iY3VPhD9eLjEcukQtJmcNYybiTvlGw5OeJNs8Fd06qN0PbXFKS2yO6NVS9vGZDkswzJi 9PhLopm5RtZdeQ0O2OE2bfoXIcqAOjA/dNTFLZ8PnXTwRbQ9myda6QZXkYs/xrSV+/4Y 4CVLr8ACPgX9spTHbPNU8muTqSvoh6fGh934M4KFNizl8xbXnmv6d94lKUDB3C44dYqb twzqx9Gr6NfBmC7BNLA7NXjL2/rtUqYMe0WbHE9oCJL7bQ2pjyBWWRBDEwlv4/Dkl+qc cEaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685419057; s=strato-dkim-0003; d=ikherbers.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=kpFXvVjpscLF5cWje9nvX9FNJOVMke97OPU1U9Y0oys=; b=1eKHucFQdS6rzMMdbx86Q0snTnMO9/SyELZp+Og/jM3j9vEZk50NdfGnn+wyeUqEYN deHxavjkykVvUkjNJRCQ== X-RZG-AUTH: ":IUwNfkitaf3qOWm2b/jA5tveVwUUcwH3PkiYp6DPxTDDEo4xO9elHkvI0r6JTEEwPZQIGpITRHJw3QBV19xfC5caujhgQnTJiaYr" X-RZG-CLASS-ID: mo05 Received: from lambda.localdomain by smtp.strato.de (RZmta 49.4.0 AUTH) with ESMTPSA id z055e6z4U3vbnYG (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 30 May 2023 05:57:37 +0200 (CEST) From: vicvbcun Date: Mon, 29 May 2023 22:38:20 +0200 Message-Id: <1ba8f917eb764c920eab9c766026dca251ec1f3c.1685391447.git.guix@ikherbers.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=2; s=key1; d=yhetil.org; t=1685419116; a=rsa-sha256; cv=fail; b=S7NK3+BVnWwjbjvpWOfNHtHEz8WqT4Jz2C2LD6LShw3pHrKyy1zKa+jzbKu+prt6/A11rE +j4NXrxtyM8dWKNnuixTUNT7tDMeXG4wgTc/JfTW40Z8qqStuPqvloPfzyZ+w5+TWgPfgX +wVFYja8AaMoKhMqbr+6WTIIbjvqpSJs647IOeECyf53QZWJHszrpBgL9vg/4PncWZYPEh oyOXhKZqqU4jumOFp52RtLOQpVJVXJ4/Wx3s/u9FjxffUSCwBni/l7yOPPqP9yx0A/PY1H 32DYJ8MdP3EdCY8jT2ZwaukyqE0qmw0ZVX93eZNnkhkc1FIq72fVYUimwW9s1g== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=FixPxhzI; dkim=fail ("headers eddsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0003 header.b=1eKHucFQ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:strato.com:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685419116; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kpFXvVjpscLF5cWje9nvX9FNJOVMke97OPU1U9Y0oys=; b=fdsglWUjAOVC8au+OJn3sFq2Z4OTGBzgyhcRH+EKvjAdeoQopCT/Im6IEXhoBbFYPpTa6G v3qhOjBgw+zpxdI2gJg2WMMcBRAgqSZ4Xe4ne9MSqj7/qxi7RxWroH7zWqYE0q86h+F5mY GEDirkNedn9TcgUf9Ky7yn2MLs8IWdTmWIbaigRVIxVyOHKL83DGvbuGmSbcTDC+ZPsBfk 4jmA8LDNCt48Rmc+PX4KfXpsEQWaW4rFfT2d1RxaIGB1r02vI7TG4fCO0/YQuKHsE323AA ULsFfOMqyCqJrxwWGc4JUEcTNZ23lNMT8eLPp4I+UxaSH8AI3WTPb7fHowXn8w== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=FixPxhzI; dkim=fail ("headers eddsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0003 header.b=1eKHucFQ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:strato.com:reject}") X-Migadu-Spam-Score: 2.76 X-Spam-Score: 2.76 X-Migadu-Queue-Id: 583B342E96 X-TUID: d27r6SKYmEjr * gnu/packages/patches/sympow-enable-cross-compilation.patch, gnu/packages/patches/sympow-null-terminate-dupdir.patch: New files. * gnu/local.mk (dist_patch_DATA): Register here. * gnu/packages/algebra.scm (sympow): New variable. --- gnu/local.mk | 2 + gnu/packages/algebra.scm | 52 ++++++++ .../sympow-enable-cross-compilation.patch | 124 ++++++++++++++++++ .../sympow-null-terminate-dupdir.patch | 15 +++ 4 files changed, 193 insertions(+) create mode 100644 gnu/packages/patches/sympow-enable-cross-compilation.patch create mode 100644 gnu/packages/patches/sympow-null-terminate-dupdir.patch diff --git a/gnu/local.mk b/gnu/local.mk index 18e8235140..683c36c383 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1933,6 +1933,8 @@ dist_patch_DATA = \ %D%/packages/patches/symmetrica-int32.patch \ %D%/packages/patches/symmetrica-return_values.patch \ %D%/packages/patches/symmetrica-sort_sum_rename.patch \ + %D%/packages/patches/sympow-enable-cross-compilation.patch \ + %D%/packages/patches/sympow-null-terminate-dupdir.patch \ %D%/packages/patches/t1lib-CVE-2010-2642.patch \ %D%/packages/patches/t1lib-CVE-2011-0764.patch \ %D%/packages/patches/t1lib-CVE-2011-1552+.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 92a9faa04f..ee08378058 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -34,6 +34,7 @@ (define-module (gnu packages algebra) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) @@ -49,6 +50,7 @@ (define-module (gnu packages algebra) #:use-module (gnu packages graphviz) #:use-module (gnu packages image) #:use-module (gnu packages java) + #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages mpi) #:use-module (gnu packages multiprecision) @@ -1655,6 +1657,56 @@ (define-public symmetrica polynomials, and the representation theory of Hecke algebras of type A_n.") (license license:public-domain))) +(define-public sympow + (package + (name "sympow") + (version "2.023.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/rezozer/forks/sympow") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0anvrb0pkchc1c6hs1nlx0vpahbsn02mbms2kldszsfiizwmv72f")) + (patches (search-patches "sympow-enable-cross-compilation.patch" + "sympow-null-terminate-dupdir.patch")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; no tests + #:phases #~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + ;; sympow tries to write to /var/cache + ;; silence warnings when running as non-root user + (substitute* "sympow.h" + (("VERBOSE_DEFAULT 1") + "VERBOSE_DEFAULT 0")) + (substitute* "Configure" + (("RM=") + (string-append "RM=" (search-input-file inputs "/bin/rm"))) + (("GREP=") + (string-append "GREP=" (search-input-file inputs "/bin/grep"))) + (("GP=") + (string-append "GP=" (search-input-file inputs "/bin/gp"))) + (("SED=") + (string-append "SED=" (search-input-file inputs "/bin/sed"))) + (("SH=") + (string-append "SH=" (search-input-file inputs "/bin/sh")))) + (setenv "PREFIX" #$output) + (setenv "CC" #$(cc-for-target)) + (invoke "./Configure")))))) + (inputs (list bash-minimal coreutils grep pari-gp sed)) + (native-inputs (list grep help2man pari-gp sed which)) + (home-page "https://gitlab.com/rezozer/forks/sympow") + (synopsis "Package to compute elliptic curve L-functions") + (description + "SYMPOW is a package to compute special values of symmetric power +elliptic curve L-functions. It can compute up to about 64 digits of +precision.") + (license (license:non-copyleft "file:///COPYING")))) + (define-public m4rie (package (name "m4rie") diff --git a/gnu/packages/patches/sympow-enable-cross-compilation.patch b/gnu/packages/patches/sympow-enable-cross-compilation.patch new file mode 100644 index 0000000000..0ffc63c788 --- /dev/null +++ b/gnu/packages/patches/sympow-enable-cross-compilation.patch @@ -0,0 +1,124 @@ +Separate build-time from run-time binaries + +diff --git a/Configure b/Configure +index 1ef9756..0b42b6b 100755 +--- a/Configure ++++ b/Configure +@@ -12,36 +12,20 @@ VARPREFIX=${VARPREFIX:-"/var"} + + FILE="Makefile.new" + CONFIG="config.h" +-RM=`which \rm` +-if [ -z "$RM" ]; +-then +-echo "**ERROR**: Could not find rm"; exit; +-fi +-$RM -f $FILE +-$RM -f $CONFIG ++RM= ++rm -f $FILE ++rm -f $CONFIG + VERSION=2.023.6 + echo "#define PREFIX \"$PREFIX\"" >> $CONFIG + echo "#define VARPREFIX \"$VARPREFIX\"" >> $CONFIG + echo "#define VERSION \"$VERSION\"" >> $CONFIG + echo "VERSION = $VERSION" >> $FILE + +-GREP=`which \grep` +-if [ -z "$GREP" ]; +-then +-echo "*WARNING*: Could not find grep --- will not be able to build new_data" +-fi ++GREP= + +-GP=`which \gp` +-if [ -z "$GP" ]; +-then +-echo "*WARNING*: Could not find gp --- will not be able to build new_data" +-fi ++GP= + +-SED=`which \sed` && echo "SED = $SED" >> $FILE +-if [ -z "$SED" ]; +-then +-echo "*WARNING*: Could not find sed --- will not be able to build new_data" +-fi ++SED= + + if [ "x$ADDBINPATH" = "xyes" ]; then + echo "#define RM \"$RM\"" >> $CONFIG +@@ -58,9 +42,8 @@ fi + [ -n "$GREP" ] && [ -n "$GP" ] && [ -n "$SED" ]\ + && echo "#define NEW_DATA" >> $CONFIG + +-SH=/bin/sh ++SH= + echo "#define SH \"$SH\"" >> $CONFIG +-echo "SH = $SH" >> $FILE + + CC=${CC:-gcc} && echo "CC = $CC" >> $FILE + ##if [ -z "$CC" ]; +@@ -283,22 +266,6 @@ echo "TILDES = *~ datafiles/*~" >> $FILE + 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 +-if [ -z "$CP" ]; +-then +-echo "**ERROR**: Could not find cp"; exit; +-fi +-MKDIR=`which \mkdir` && echo "MKDIR = $MKDIR" >> $FILE +-if [ -z "$MKDIR" ]; +-then +-echo "**ERROR**: Could not find mkdir"; exit; +-fi +-TOUCH=`which \touch` && echo "TOUCH = $TOUCH" >> $FILE +-if [ -z "$TOUCH" ]; +-then +-echo "**ERROR**: Could not find touch"; exit; +-fi + ####TAR=`which \tar` && echo "TAR = $TAR" >> $FILE + ####if [ -z "$TAR" ]; + ####then +@@ -319,19 +286,19 @@ echo " \$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(OPT) -o \$@ \$(DEFS) \$(OBJS) \$(LDFLAG + echo "%.o : %.c \$(HEADERS) Makefile" >> $FILE + echo " \$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(OPT) \$(DEFS) -c -o \$@ \$<" >> $FILE + echo "datafiles/param_data: \$(OTHERb)" >> $FILE +-echo " \$(MKDIR) -p datafiles" >> $FILE +-echo " \$(TOUCH) datafiles/param_data" >> $FILE +-echo " \$(SH) armd.sh" >> $FILE +-echo " \$(SED) -i -e '/logfile =/d' datafiles/*.txt" >> $FILE ++echo " mkdir -p datafiles" >> $FILE ++echo " touch datafiles/param_data" >> $FILE ++echo " sh armd.sh" >> $FILE ++echo " sed -i -e '/logfile =/d' datafiles/*.txt" >> $FILE + echo "sympow.1: sympow" >> $FILE + echo " \$(HELP2MAN) \$(H2MFLAGS) -s 1 -n \"SYMPOW program\" -I sympow.h2m -o \$@ ./\$<" >> $FILE + echo "clean:" >> $FILE + ##echo " \$(RM) -f \$(OBJSf) sympow \$(TILDES) \$(TARS)" >> $FILE +-echo " \$(RM) -f \$(OBJS) sympow sympow.1 \$(TILDES)" >> $FILE +-echo " \$(RM) -rf datafiles" >> $FILE ++echo " rm -f \$(OBJS) sympow sympow.1 \$(TILDES)" >> $FILE ++echo " rm -rf datafiles" >> $FILE + echo "distclean: clean" >> $FILE +-echo " \$(RM) -f \$(CONFEXE)" >> $FILE +-echo " \$(RM) -f config.h Makefile" >> $FILE ++echo " rm -f \$(CONFEXE)" >> $FILE ++echo " rm -f config.h Makefile" >> $FILE + echo "install-arch: build-arch" >> $FILE + echo " install -d \$(DESTDIR)$PREFIX/bin" >> $FILE + echo " install -d \$(DESTDIR)$PREFIX/share/man/man1" >> $FILE +@@ -361,9 +328,9 @@ echo "install: install-arch install-indep" >> $FILE + ####echo " \$(RM) -rf \$(WDIR)" >> $FILE + ####fi + +-$RM -f Makefile +-$CP -f Makefile.new Makefile +-$RM -f Makefile.new ++rm -f Makefile ++cp -f Makefile.new Makefile ++rm -f Makefile.new + + echo "Makefile has been re-made. Use make if you wish to build SYMPOW" + echo "" diff --git a/gnu/packages/patches/sympow-null-terminate-dupdir.patch b/gnu/packages/patches/sympow-null-terminate-dupdir.patch new file mode 100644 index 0000000000..2640175b80 --- /dev/null +++ b/gnu/packages/patches/sympow-null-terminate-dupdir.patch @@ -0,0 +1,15 @@ +https://gitlab.com/rezozer/forks/sympow/-/merge_requests/5 + +diff --git a/main.c b/main.c +index 1d018dfc76888790212c7a203154c45b88acb383..0ab1386b5f3a62a79cc08adceb2e3e9553e08a4d 100644 +--- a/main.c ++++ b/main.c +@@ -97,7 +97,7 @@ char * dupdirname(const char *name) { + if (eofn!=name) { + const size_t ublofn=eofn-name; + size_t cdx=0; const char * dim=NULL; char * dam=NULL; int flag=0; +- foldername=(char *)(malloc(ublofn)); memset(foldername,'\0',ublofn); ++ foldername=(char *)(malloc(ublofn+1)); memset(foldername,'\0',ublofn+1); + for(cdx=0,dim=name,dam=foldername;cdx