svn commit: r485656 - in head/math/mprime: . files

Steve Wills swills at FreeBSD.org
Fri Nov 23 13:04:15 UTC 2018


Author: swills
Date: Fri Nov 23 13:04:12 2018
New Revision: 485656
URL: https://svnweb.freebsd.org/changeset/ports/485656

Log:
  math/mprime: update to 29.4b7
  
  PR:		233261
  Submitted by:	rozhuk.im at gmail.com (maintainer)

Modified:
  head/math/mprime/Makefile   (contents, props changed)
  head/math/mprime/distinfo   (contents, props changed)
  head/math/mprime/files/patch-commonc.c   (contents, props changed)
  head/math/mprime/files/patch-ecm.c   (contents, props changed)
  head/math/mprime/files/patch-gwnum_gwnum.c   (contents, props changed)
  head/math/mprime/files/patch-gwnum_gwutil.c   (contents, props changed)
  head/math/mprime/files/patch-gwnum_makemsys   (contents, props changed)
  head/math/mprime/files/patch-linux64_makebsd   (contents, props changed)
  head/math/mprime/files/patch-linux_makebsd   (contents, props changed)

Modified: head/math/mprime/Makefile
==============================================================================
--- head/math/mprime/Makefile	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/Makefile	Fri Nov 23 13:04:12 2018	(r485656)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	mprime
-PORTVERSION=	28.10
+PORTVERSION=	29.4b7
 CATEGORIES=	math benchmarks net
 MASTER_SITES=	http://www.mersenne.org/ftp_root/gimps/ \
 		ftp://mersenne.org/gimps/
@@ -18,7 +18,9 @@ LICENSE_PERMS=	dist-mirror pkg-mirror auto-accept
 
 ONLY_FOR_ARCHS=	amd64 i386
 
-LIB_DEPENDS=	libcurl.so:ftp/curl
+LIB_DEPENDS=	libcurl.so:ftp/curl					\
+		libhwloc.so:devel/hwloc					\
+		libgmp.so:math/gmp
 
 USES=		zip
 NO_WRKSUBDIR=	yes

Modified: head/math/mprime/distinfo
==============================================================================
--- head/math/mprime/distinfo	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/distinfo	Fri Nov 23 13:04:12 2018	(r485656)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1495315765
-SHA256 (p95v2810.source.zip) = fdde4652ea12a66487245fbef7980237b2707c595f613cac013e97a489301060
-SIZE (p95v2810.source.zip) = 44979437
+TIMESTAMP = 1542398806
+SHA256 (p95v294b7.source.zip) = 15682e9587af2b86647de9786f97dc8c5d7a4a679a0440f7d1d1936a48c5aa45
+SIZE (p95v294b7.source.zip) = 47931498

Modified: head/math/mprime/files/patch-commonc.c
==============================================================================
--- head/math/mprime/files/patch-commonc.c	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-commonc.c	Fri Nov 23 13:04:12 2018	(r485656)
@@ -12,7 +12,7 @@
  		if (w->k != 1.0) sprintf (buf+strlen(buf), "%g", fmod (w->k, 1000000.0));
  		sprintf (buf+strlen(buf), "_%ld", p);
 -		if (abs(w->c) != 1) sprintf (buf+strlen(buf), "_%d", abs(w->c) % 1000);
-+		if (labs(w->c) != 1) sprintf (buf+strlen(buf), "_%d", labs(w->c) % 1000);
++		if (labs(w->c) != 1) sprintf (buf+strlen(buf), "_%ld", labs(w->c) % 1000);
  		rename (v258_filename, buf);
  		if (buf[0] == 'p') {
  			v258_filename[0] = buf[0] = 'q';

Modified: head/math/mprime/files/patch-ecm.c
==============================================================================
--- head/math/mprime/files/patch-ecm.c	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-ecm.c	Fri Nov 23 13:04:12 2018	(r485656)
@@ -9,12 +9,3 @@
  		giant	tmp = allocgiant ((bits >> 5) + 5);
  		if (tmp == NULL) return (OutOfMemory (thread_num));
  		ultog (w->b, tmp);
-@@ -1156,7 +1156,7 @@ int setN (
- /* Open file of known factors.  This code has been obsoleted by the */
- /* known factors list in worktodo.ini. */
- 
--	if (w->k != 1.0 || w->b != 2 || abs(w->c) != 1) return (0);
-+	if (w->k != 1.0 || w->b != 2 || labs(w->c) != 1) return (0);
- 	fd = fopen (w->c == 1 ? "lowp.txt" : "lowm.txt", "r");
- 	if (fd == NULL) return (0);
- 

Modified: head/math/mprime/files/patch-gwnum_gwnum.c
==============================================================================
--- head/math/mprime/files/patch-gwnum_gwnum.c	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-gwnum_gwnum.c	Fri Nov 23 13:04:12 2018	(r485656)
@@ -1,15 +1,6 @@
 --- gwnum/gwnum.c.orig	2016-10-30 14:22:26 UTC
 +++ gwnum/gwnum.c
-@@ -170,7 +170,7 @@ void *avx_carries_prctab[] = {
- /*	b or blank	(b > 2 or not) */
- /*	s4 or blank	(SSE4 or not) */
- /*	k or blank	(k for XMM_K_HI is zero or not) */
--/*	c1 or cm1 or blank (c=1, c=-1, abs(c)!=1) */
-+/*	c1 or cm1 or blank (c=1, c=-1, labs(c)!=1) */
- /* We also define a macro that will pick the correct entry from the array. */
- 
- #define avx_explode(macro)			avx_explode1(macro,yr)			avx_explode1(macro,yi)
-@@ -767,17 +767,17 @@ int gwinfo (			/* Return zero-padded fft flag or error
+@@ -865,17 +865,17 @@
  	log2k = log2 (k);
  	logbk = logb (k);
  	log2b = log2 (b);
@@ -20,27 +11,18 @@
  /* First, see what FFT length we would get if we emulate the k*b^n+c modulo */
 -/* with a zero padded FFT.  If k is 1 and abs (c) is 1 then we can skip this */
 +/* with a zero padded FFT.  If k is 1 and labs (c) is 1 then we can skip this */
- /* loop as we're sure to find an IBDWT that will do the job. */
+ /* loop as we're sure to find an IBDWT that will do the job. Also skip if called from */
+ /* gwmap_fftlen_to_max_exponent (n = 0) or we are QAing IBDWT FFTs (qa_pick_nth_fft >= 1000) */
  
  again:	zpad_jmptab = NULL;
  	generic_jmptab = NULL;
- 	if (! gwdata->force_general_mod &&
--	    (k > 1.0 || n < 500 || abs (c) > 1) &&
-+	    (k > 1.0 || n < 500 || labs (c) > 1) &&
- 	    gwdata->qa_pick_nth_fft < 1000) {
+-	if (! gwdata->force_general_mod && (k > 1.0 || (n > 0 && n < 500) || abs (c) > 1) && gwdata->qa_pick_nth_fft < 1000) {
++	if (! gwdata->force_general_mod && (k > 1.0 || (n > 0 && n < 500) || labs (c) > 1) && gwdata->qa_pick_nth_fft < 1000) {
  
  /* Use the proper 2^N-1 jmptable */
-@@ -984,7 +984,7 @@ next1:			while (zpad_jmptab->flags & 0x80000000) INC_J
- /* the bits per word.  An FFT result word cannot be more than 5 times */
- /* bits-per-word (bits-per-word are stored in the current word and the */
- /* 4 words we propagate carries to).  How many bits are in an FFT result */
--/* word?  Well, because of balanced representation the abs(input word) is */
-+/* word?  Well, because of balanced representation the labs(input word) is */
- /* (bits_per_word-1) bits long. An FFT result word contains multiplied data */
- /* words, that's (bits_per_word-1)*2 bits.  Adding up many multiplied data */
- /* words adds some bits proportional to the size of the FFT.  Experience */
-@@ -1789,13 +1789,13 @@ int gwsetup (
  
+@@ -1915,13 +1915,13 @@
+ 
  	if (c == 0)
  		gcd = 0;
 -	else if (k == 1.0 || abs (c) == 1)
@@ -55,7 +37,7 @@
  		gcdg (kg, cg);
  		gcd = cg->n[0];
  	}
-@@ -1809,7 +1809,7 @@ int gwsetup (
+@@ -1935,7 +1935,7 @@
  
  	if (gcd == 1 &&
  	    k * gwdata->maxmulbyconst <= MAX_ZEROPAD_K &&
@@ -64,7 +46,7 @@
  	    log2(b) * (double) n >= 350.0 &&
  	    (b == 2 || (gwdata->cpu_flags & (CPU_AVX | CPU_SSE2))) &&
  	    !gwdata->force_general_mod) {
-@@ -2429,12 +2429,12 @@ int internal_gwsetup (
+@@ -2555,12 +2555,12 @@
  	gwdata->NUM_B_PER_SMALL_WORD = (unsigned long) gwdata->avg_num_b_per_word;
  
  /* Set a flag if this is a rational FFT.  That is, an FFT where all the */
@@ -79,7 +61,7 @@
  
  /* Remember the maximum number of bits per word that this FFT length */
  /* supports.  We this in gwnear_fft_limit.  Note that zero padded FFTs */
-@@ -3688,7 +3688,7 @@ int internal_gwsetup (
+@@ -3814,7 +3814,7 @@
  		if (gwdata->ZERO_PADDED_FFT ||
  		    3.0 * gwdata->NUM_B_PER_SMALL_WORD * log2 (b) >
  				2.0 * ((gwdata->NUM_B_PER_SMALL_WORD + 1) * log2 (b) - 1) +
@@ -88,7 +70,7 @@
  			asm_data->SPREAD_CARRY_OVER_EXTRA_WORDS = FALSE;
  		else
  			asm_data->SPREAD_CARRY_OVER_EXTRA_WORDS = TRUE;
-@@ -6262,7 +6262,7 @@ void gw_as_string (
+@@ -6409,7 +6409,7 @@
  		sprintf (buf, "%.0f", k + c);
  	else if (k != 1.0)
  		sprintf (buf, "%.0f*%lu^%lu%c%lu", k, b, n,
@@ -97,7 +79,7 @@
  	else if (b == 2 && c == -1)
  		sprintf (buf, "M%lu", n);
  	else {
-@@ -6272,7 +6272,7 @@ void gw_as_string (
+@@ -6419,7 +6419,7 @@
  			sprintf (buf, "F%lu", cnt);
  		else
  			sprintf (buf, "%lu^%lu%c%lu", b, n,
@@ -106,7 +88,7 @@
  	}
  }
  
-@@ -6357,7 +6357,7 @@ double virtual_bits_per_word (
+@@ -6504,7 +6504,7 @@
  		weighted_bits_per_output_word =
  			2.0 * ((b_per_input_word + 1.0) * log2b - 1.0) +
  			0.6 * log2 (gwdata->FFTLEN) +
@@ -115,7 +97,7 @@
  		if (gwdata->k == 1.0 && gwdata->n % gwdata->FFTLEN == 0)
  			weighted_bits_per_output_word -= ((log2b <= 4.0) ? log2b : 1.4 * log2b);
  		else if (num_big_words == 1 && gwdata->k > 1.0)
-@@ -6756,7 +6756,7 @@ void gwsetaddin (
+@@ -6911,7 +6911,7 @@
  {
  	unsigned long word, b_in_word;
  
@@ -124,7 +106,7 @@
  
  /* In a zero-padded FFT, the value is added into ZPAD0 */
  
-@@ -7022,7 +7022,7 @@ void gianttogw (
+@@ -7177,7 +7177,7 @@
  /* Small numbers can also be optimized for many moduli by zeroing all the */
  /* FFT data using memset and then setting only the affected FFT elements. */
  
@@ -133,16 +115,7 @@
  		uint32_t low_addin;
  		int	i;
  
-@@ -7639,7 +7639,7 @@ void specialmodg (
- 	}
- 
- /* Do the quick modulus code twice because in the case where */
--/* abs(c) > k once won't get us close enough. */
-+/* labs(c) > k once won't get us close enough. */
- 
- 	neg = FALSE;
- 	for (count = 0; count < 2; count++) {
-@@ -7647,7 +7647,7 @@ void specialmodg (
+@@ -7802,7 +7802,7 @@
  /* Handle negative input values */
  
  	    neg ^= (g->sign < 0);

Modified: head/math/mprime/files/patch-gwnum_gwutil.c
==============================================================================
--- head/math/mprime/files/patch-gwnum_gwutil.c	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-gwnum_gwutil.c	Fri Nov 23 13:04:12 2018	(r485656)
@@ -5,7 +5,7 @@
  #include <memory.h>
  #endif
 -#ifdef __APPLE__
-+#ifdef __APPLE__ || __FreeBSD__
++#if defined (__APPLE__) || defined (__FreeBSD__)
  #include <memory.h>
  #endif
  #include "gwcommon.h"

Modified: head/math/mprime/files/patch-gwnum_makemsys
==============================================================================
--- head/math/mprime/files/patch-gwnum_makemsys	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-gwnum_makemsys	Fri Nov 23 13:04:12 2018	(r485656)
@@ -5,14 +5,14 @@
  #
  
 -CC = gcc
--CFLAGS = -I.. -O2 -march=i486 -malign-double
+-CFLAGS = -I.. -I../sqlite-amalgamation-3180000 -O2 -march=i486 -malign-double
 +CC = cc
-+CFLAGS = -I.. -O2 -march=i486 
++CFLAGS = -I.. -I../sqlite-amalgamation-3180000 -O2 -march=i486
  
 -CPP = g++
 -CPPFLAGS = -I.. -I../qd -O2 -march=i486 -malign-double
 +CPP = cc
-+CPPFLAGS = -I.. -I../qd -O2 -march=i486 
++CPPFLAGS = -I.. -I../qd -O2 -march=i486
  
  AR = ar
  

Modified: head/math/mprime/files/patch-linux64_makebsd
==============================================================================
--- head/math/mprime/files/patch-linux64_makebsd	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-linux64_makebsd	Fri Nov 23 13:04:12 2018	(r485656)
@@ -1,7 +1,14 @@
 --- linux64/makebsd.orig	2016-10-30 18:42:16 UTC
 +++ linux64/makebsd
-@@ -4,13 +4,13 @@
+@@ -1,19 +1,19 @@
+ # Makefile for FreeBSD 10.0 64-bit mprime
  #
+-# Install the curl package.  This will be installed to /usr/local by default.
++# Install the curl package.  This will be installed to %%LOCALBASE%% by default.
+ #
+ # Hwloc can be downloaded from https://www.open-mpi.org/projects/hwloc/
+ # Configure hwloc with --enable-static --disable-shared --disable-pci --disable-cuda --disable-gl
+ #
  
  CC = cc
 -CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
@@ -11,9 +18,9 @@
  CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
  
 -LFLAGS = -L/usr/local/lib -Wl,-M
--LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lcurl -lstdc++ -lcompat
-+LFLAGS = -L%%LOCALBASE%%/lib -Wl,-M
-+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lcurl -lcompat
+-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread /usr/local/lib/libhwloc.a -lcurl -lstdc++ -lcompat -lgmp
++LFLAGS = -L%%LOCALBASE%%/lib
++LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lcompat -lgmp
  
  FACTOROBJ = factor64.o
  OBJS = prime.o menu.o

Modified: head/math/mprime/files/patch-linux_makebsd
==============================================================================
--- head/math/mprime/files/patch-linux_makebsd	Fri Nov 23 13:01:22 2018	(r485655)
+++ head/math/mprime/files/patch-linux_makebsd	Fri Nov 23 13:04:12 2018	(r485656)
@@ -1,22 +1,23 @@
 --- linux/makebsd.orig	2016-10-30 18:42:16 UTC
 +++ linux/makebsd
-@@ -1,14 +1,14 @@
- # Makefile for FreeBSD 32-bit mprime
+@@ -4,14 +4,14 @@
+ # Configure hwloc with --enable-static --disable-shared --disable-pci --disable-cuda --disable-gl
  #
  
 -CC = gcc
 -CFLAGS = -I.. -I../gwnum -I/usr/local/include -O2 -march=i486 -malign-double
 +CC = cc
-+CFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486 
++CFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486
  
- CPP = g++
+-CPP = g++
 -CPPFLAGS = -I.. -I../gwnum -I/usr/local/include -O2 -march=i486 -malign-double
-+CPPFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486 
++CPP = cc
++CPPFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486
  
--LFLAGS = -Wl,-M
--LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic /usr/local/lib/libcurl.a -lz -lcompat -lstdc++ -Wl,-Bdynamic -lssl
-+LFLAGS = -L%%LOCALBASE%%/lib -Wl,-M
-+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-lcurl  -lcompat  -Wl,
+-LFLAGS = -Wl,-M -L/usr/local/lib
+-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic /usr/local/lib/libhwloc.a -Wl,-Bstatic /usr/local/lib/libcurl.a -lz -lcompat -lstdc++ -Wl,-Bdynamic -lssl -lgmp
++LFLAGS = -L%%LOCALBASE%%/lib
++LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lcurl -lhwloc -lz -lcompat -lssl -lgmp
  
  FACTOROBJ = factor32.o
  OBJS = prime.o menu.o


More information about the svn-ports-head mailing list