git: 910590811747 - main - math/sprng: make fetchable again with a silent update
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Mar 2026 17:30:16 UTC
The branch main has been updated by thierry:
URL: https://cgit.FreeBSD.org/ports/commit/?id=910590811747d07c652e5ee7aa74bf6de34f23a6
commit 910590811747d07c652e5ee7aa74bf6de34f23a6
Author: Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2026-03-16 21:49:21 +0000
Commit: Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2026-03-17 17:30:07 +0000
math/sprng: make fetchable again with a silent update
The tarball for SPRNG 5.0 has been rerolled.
This includes several minor points:
- format change (dos to unix);
- code reformat and linting;
- code cleaning;
but also some other modifications.
Full diff available at https://people.freebsd.org/~thierry/sprng5.diff .
PR: 293802
Reported by: Daniel Engberg
---
math/sprng/Makefile | 4 +-
math/sprng/distinfo | 6 +--
math/sprng/files/patch-SRC_pmlcg_longlong.h | 3 +-
math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp | 30 ++++++-------
math/sprng/files/patch-TESTS_mpitests_wolff.cpp | 56 ++++++++++++-------------
math/sprng/files/patch-TESTS_wolff.cpp | 56 ++++++++++++-------------
math/sprng/files/patch-TESTS_wolfftest.cpp | 56 ++++++++++++-------------
math/sprng/pkg-plist | 24 -----------
8 files changed, 103 insertions(+), 132 deletions(-)
diff --git a/math/sprng/Makefile b/math/sprng/Makefile
index 6b03d720ef51..5b07c63b2667 100644
--- a/math/sprng/Makefile
+++ b/math/sprng/Makefile
@@ -1,6 +1,6 @@
PORTNAME= SPRNG
PORTVERSION= 5.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= math science
MASTER_SITES= http://www.sprng.org/Version${PORTVERSION}/
DISTNAME= ${PORTNAME:tl}${PORTVERSION:R}
@@ -14,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libtestu01.so:math/testu01
-USES= compiler dos2unix fortran gmake localbase tar:bz2
+USES= compiler fortran gmake localbase tar:bz2
DOS2UNIX_GLOB= LICENSE
FFLAGS= -I${LOCALBASE}/include
diff --git a/math/sprng/distinfo b/math/sprng/distinfo
index 842f16fd6ab1..9f69180f74db 100644
--- a/math/sprng/distinfo
+++ b/math/sprng/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1607615633
-SHA256 (sprng5.tar.bz2) = 9172a495472cc24893e7489ce9b5654300dc60cba4430e436ce50d28eb749a66
-SIZE (sprng5.tar.bz2) = 648021
+TIMESTAMP = 1773689189
+SHA256 (sprng5.tar.bz2) = 696ef452bdd998d2e66586e73d81dac875082e35d08de419cede1a1bb2555b59
+SIZE (sprng5.tar.bz2) = 590000
diff --git a/math/sprng/files/patch-SRC_pmlcg_longlong.h b/math/sprng/files/patch-SRC_pmlcg_longlong.h
index a153cbb31087..988d6183fe5e 100644
--- a/math/sprng/files/patch-SRC_pmlcg_longlong.h
+++ b/math/sprng/files/patch-SRC_pmlcg_longlong.h
@@ -1,4 +1,4 @@
---- SRC/pmlcg/longlong.h.orig 2024-12-17 18:25:17 UTC
+--- SRC/pmlcg/longlong.h.orig 2021-01-15 16:37:37 UTC
+++ SRC/pmlcg/longlong.h
@@ -211,9 +211,8 @@ UDItype __umulsidi3 (USItype, USItype);
"r" ((USItype) (al)), \
@@ -12,4 +12,3 @@
" mov %0, %6, lsr #16\n" \
" bic %3, %5, %2, lsl #16\n" \
" bic %4, %6, %0, lsl #16\n" \
-
diff --git a/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp b/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp
index 590e6ca0e26c..f6d0109b7ed6 100644
--- a/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp
+++ b/math/sprng/files/patch-SRC_pmlcg_pmlcg.cpp
@@ -1,23 +1,19 @@
---- SRC/pmlcg/pmlcg.cpp.orig 2018-10-22 19:39:18 UTC
+--- SRC/pmlcg/pmlcg.cpp.orig 2021-04-08 18:13:59 UTC
+++ SRC/pmlcg/pmlcg.cpp
-@@ -853,14 +853,14 @@ int PMLCG::unpack_rng(char *packed)
+@@ -804,13 +804,13 @@ int PMLCG::unpack_rng (char *packed)
p += load_long64(p,8,&mult);
p += load_long64(p,8,&x);
#else /* No 64 bit type available */
-- p += load_int(p,4,&a_size);
-+ p += load_int(p,4,(unsigned int *)&a_size);
+- p += load_int (p, 4, &a_size);
++ p += load_int(p, 4, (unsigned int *)&a_size);
-- p += load_intarray(p,2,4,&m);
-- r[1] = m[1]&0xffffff;
-+ p += load_intarray(p,2,4,(unsigned int *)&m);
-+ r[1] = m[1]&0xffffff;
- r[0] = m[1]>>24 | m[0]<<8;
--
-- p += load_intarray(p,2,4,&m);
-- a[1] = m[1]&0xffffff;
-+
-+ p += load_intarray(p,2,4,(unsigned int *)&m);
-+ a[1] = m[1]&0xffffff;
- a[0] = m[1]>>24 | m[0]<<8;
- #endif
+- p += load_intarray (p, 2, 4, &m);
++ p += load_intarray(p, 2, 4, (unsigned int *)&m);
+ r[1] = m[1] & 0xffffff;
+ r[0] = m[1] >> 24 | m[0] << 8;
+- p += load_intarray (p, 2, 4, &m);
++ p += load_intarray (p, 2, 4, (unsigned int *)&m);
+ a[1] = m[1] & 0xffffff;
+ a[0] = m[1] >> 24 | m[0] << 8;
+ #endif
diff --git a/math/sprng/files/patch-TESTS_mpitests_wolff.cpp b/math/sprng/files/patch-TESTS_mpitests_wolff.cpp
index 30e2f0d3ecda..1d6625645765 100644
--- a/math/sprng/files/patch-TESTS_mpitests_wolff.cpp
+++ b/math/sprng/files/patch-TESTS_mpitests_wolff.cpp
@@ -1,37 +1,37 @@
---- TESTS/mpitests/wolff.cpp.orig 2011-08-06 15:58:22 UTC
+--- TESTS/mpitests/wolff.cpp.orig 2021-01-15 16:37:36 UTC
+++ TESTS/mpitests/wolff.cpp
-@@ -14,7 +14,7 @@ using namespace std;
+@@ -13,7 +13,7 @@ using namespace std;
/*#define PARALLEL*/
-int lattice_size, *spin, *stack, nsites;
+int lattice_size, *spin, *my_stack, nsites;
- Sprng **genptr; /* array of random number generators */
+ Sprng **genptr; /* array of random number generators */
int exponent, mask; /* Used for efficiency purposes */
double prob;
-@@ -73,12 +73,12 @@ void Single_Cluster_Update(void) /* update lattice spi
- if (genptr[i]->sprng() > prob)
- continue;
- spin[nnJ]=-spin[nnJ];
-- stack[++Ipt]=nnJ;
-+ my_stack[++Ipt]=nnJ;
- }
-
- if(Ipt>=0)
- {
-- i=stack[Ipt];
-+ i=my_stack[Ipt];
- Ipt--;
- }
- else i=-1;
-@@ -216,8 +216,8 @@ void minitialize(int rng_type, int seed, int param, in
-
+@@ -80,12 +80,12 @@ void Single_Cluster_Update (void) /* update lattice sp
+ if (genptr[i]->sprng () > prob)
+ continue;
+ spin[nnJ] = -spin[nnJ];
+- stack[++Ipt] = nnJ;
++ my_stack[++Ipt] = nnJ;
+ }
- spin = static_cast<int *>(malloc(nsites*sizeof(int)));
-- stack = static_cast<int *>(malloc(nsites*sizeof(int)));
-- if(!spin || !stack)
-+ my_stack = static_cast<int *>(malloc(nsites*sizeof(int)));
-+ if(!spin || !my_stack)
- {
- printf("\n\tMemory allocation failure, program exits!\n");
- exit(-1);
+ if (Ipt >= 0)
+ {
+- i = stack[Ipt];
++ i = my_stack[Ipt];
+ Ipt--;
+ }
+ else
+@@ -219,8 +219,8 @@ void minitialize (int rng_type, int seed, int param, i
+ Energy[i][j] = Cv[i][j] = 0.0;
+
+ spin = static_cast<int*> (malloc (nsites * sizeof(int)));
+- stack = static_cast<int*> (malloc (nsites * sizeof(int)));
+- if (!spin || !stack)
++ my_stack = static_cast<int*> (malloc (nsites * sizeof(int)));
++ if (!spin || !my_stack)
+ {
+ printf ("\n\tMemory allocation failure, program exits!\n");
+ exit (-1);
diff --git a/math/sprng/files/patch-TESTS_wolff.cpp b/math/sprng/files/patch-TESTS_wolff.cpp
index 7b5fcda07c83..fb13263bc10a 100644
--- a/math/sprng/files/patch-TESTS_wolff.cpp
+++ b/math/sprng/files/patch-TESTS_wolff.cpp
@@ -1,37 +1,37 @@
---- TESTS/wolff.cpp.orig 2011-08-06 15:58:04 UTC
+--- TESTS/wolff.cpp.orig 2021-01-15 16:35:52 UTC
+++ TESTS/wolff.cpp
-@@ -14,7 +14,7 @@ using namespace std;
+@@ -13,7 +13,7 @@ using namespace std;
/*#define PARALLEL*/
-int lattice_size, *spin, *stack, nsites;
+int lattice_size, *spin, *my_stack, nsites;
- Sprng **genptr; /* array of random number generators */
+ Sprng **genptr; /* array of random number generators */
int exponent, mask; /* Used for efficiency purposes */
double prob;
-@@ -73,12 +73,12 @@ void Single_Cluster_Update(void) /* update lattice spi
- if (genptr[i]->sprng() > prob)
- continue;
- spin[nnJ]=-spin[nnJ];
-- stack[++Ipt]=nnJ;
-+ my_stack[++Ipt]=nnJ;
- }
-
- if(Ipt>=0)
- {
-- i=stack[Ipt];
-+ i=my_stack[Ipt];
- Ipt--;
- }
- else i=-1;
-@@ -216,8 +216,8 @@ void minitialize(int rng_type, int seed, int param, in
-
+@@ -80,12 +80,12 @@ void Single_Cluster_Update (void) /* update lattice sp
+ if (genptr[i]->sprng () > prob)
+ continue;
+ spin[nnJ] = -spin[nnJ];
+- stack[++Ipt] = nnJ;
++ my_stack[++Ipt] = nnJ;
+ }
- spin = static_cast<int *>(malloc(nsites*sizeof(int)));
-- stack = static_cast<int *>(malloc(nsites*sizeof(int)));
-- if(!spin || !stack)
-+ my_stack = static_cast<int *>(malloc(nsites*sizeof(int)));
-+ if(!spin || !my_stack)
- {
- printf("\n\tMemory allocation failure, program exits!\n");
- exit(-1);
+ if (Ipt >= 0)
+ {
+- i = stack[Ipt];
++ i = my_stack[Ipt];
+ Ipt--;
+ }
+ else
+@@ -219,8 +219,8 @@ void minitialize (int rng_type, int seed, int param, i
+ Energy[i][j] = Cv[i][j] = 0.0;
+
+ spin = static_cast<int*> (malloc (nsites * sizeof(int)));
+- stack = static_cast<int*> (malloc (nsites * sizeof(int)));
+- if (!spin || !stack)
++ my_stack = static_cast<int*> (malloc (nsites * sizeof(int)));
++ if (!spin || !my_stack)
+ {
+ printf ("\n\tMemory allocation failure, program exits!\n");
+ exit (-1);
diff --git a/math/sprng/files/patch-TESTS_wolfftest.cpp b/math/sprng/files/patch-TESTS_wolfftest.cpp
index dc897c35383e..348880e0b71c 100644
--- a/math/sprng/files/patch-TESTS_wolfftest.cpp
+++ b/math/sprng/files/patch-TESTS_wolfftest.cpp
@@ -1,37 +1,37 @@
---- TESTS/wolfftest.cpp.orig 2009-06-13 21:46:10 UTC
+--- TESTS/wolfftest.cpp.orig 2021-01-15 16:35:53 UTC
+++ TESTS/wolfftest.cpp
-@@ -14,7 +14,7 @@ using namespace std;
+@@ -13,7 +13,7 @@ using namespace std;
/*#define PARALLEL*/
-int lattice_size, *spin, *stack, nsites;
+int lattice_size, *spin, *my_stack, nsites;
- Sprng **genptr; /* array of random number generators */
+ Sprng **genptr; /* array of random number generators */
int exponent, mask; /* Used for efficiency purposes */
double prob;
-@@ -74,12 +74,12 @@ void Single_Cluster_Update(void) /* update lattice spi
- if (genptr[i]->sprng() > prob)
- continue;
- spin[nnJ]=-spin[nnJ];
-- stack[++Ipt]=nnJ;
-+ my_stack[++Ipt]=nnJ;
- }
-
- if(Ipt>=0)
- {
-- i=stack[Ipt];
-+ i=my_stack[Ipt];
- Ipt--;
- }
- else i=-1;
-@@ -217,8 +217,8 @@ void minitialize(int rng_type, int seed, int param, in
-
+@@ -81,12 +81,12 @@ void Single_Cluster_Update (void) /* update lattice sp
+ if (genptr[i]->sprng () > prob)
+ continue;
+ spin[nnJ] = -spin[nnJ];
+- stack[++Ipt] = nnJ;
++ my_stack[++Ipt] = nnJ;
+ }
- spin = static_cast<int *>(malloc(nsites*sizeof(int)));
-- stack = static_cast<int *>(malloc(nsites*sizeof(int)));
-- if(!spin || !stack)
-+ my_stack = static_cast<int *>(malloc(nsites*sizeof(int)));
-+ if(!spin || !my_stack)
- {
- printf("\n\tMemory allocation failure, program exits!\n");
- exit(-1);
+ if (Ipt >= 0)
+ {
+- i = stack[Ipt];
++ i = my_stack[Ipt];
+ Ipt--;
+ }
+ else
+@@ -220,8 +220,8 @@ void minitialize (int rng_type, int seed, int param, i
+ Energy[i][j] = Cv[i][j] = 0.0;
+
+ spin = static_cast<int*> (malloc (nsites * sizeof(int)));
+- stack = static_cast<int*> (malloc (nsites * sizeof(int)));
+- if (!spin || !stack)
++ my_stack = static_cast<int*> (malloc (nsites * sizeof(int)));
++ if (!spin || !my_stack)
+ {
+ printf ("\n\tMemory allocation failure, program exits!\n");
+ exit (-1);
diff --git a/math/sprng/pkg-plist b/math/sprng/pkg-plist
index 68060d31f76a..072e2a436f1e 100644
--- a/math/sprng/pkg-plist
+++ b/math/sprng/pkg-plist
@@ -8,25 +8,14 @@ bin/check.clcg64
bin/check.clfg
bin/check.cmlfg
bin/check.cpmlcg
-bin/check.fcmrg
-bin/check.flcg
-bin/check.flfg
-bin/check.fmlfg
-bin/check.fpmlcg
bin/check_sim.ccmrg
bin/check_sim.clcg
bin/check_sim.clcg64
bin/check_sim.clfg
bin/check_sim.cmlfg
bin/check_sim.cpmlcg
-bin/check_sim.fcmrg
-bin/check_sim.flcg
-bin/check_sim.flfg
-bin/check_sim.fmlfg
-bin/check_sim.fpmlcg
bin/collisions.tmp
bin/convert.tmp
-bin/convertf.tmp
bin/coupon.tmp
bin/crush.tmp
bin/equidist.tmp
@@ -41,7 +30,6 @@ bin/metropolis.tmp
bin/perm.tmp
bin/pi-simple.tmp
%%MPICH%%bin/pi-simple_mpi.tmp
-bin/pif-simple.tmp
bin/poker.tmp
bin/rabbit.tmp
bin/random_walk.tmp
@@ -50,21 +38,14 @@ bin/seed-simple.tmp
%%MPICH%%bin/seed-simple_mpi.tmp
bin/seed.tmp
%%MPICH%%bin/seed_mpi.tmp
-bin/seedf-simple.tmp
-bin/seedf.tmp
bin/serial.tmp
bin/simple-simple.tmp
-bin/simplef-simple.tmp
bin/smallCrush.tmp
bin/spawn.tmp
-bin/spawnf.tmp
bin/sprng-simple.tmp
%%MPICH%%bin/sprng-simple_mpi.tmp
bin/sprng.tmp
%%MPICH%%bin/sprng_mpi.tmp
-bin/sprngf-simple.tmp
-bin/sprngf.tmp
-bin/subroutinef.tmp
bin/sum.tmp
bin/time.ccmrg
bin/time.clcg
@@ -72,11 +53,6 @@ bin/time.clcg64
bin/time.clfg
bin/time.cmlfg
bin/time.cpmlcg
-bin/time.fcmrg
-bin/time.flcg
-bin/time.flfg
-bin/time.fmlfg
-bin/time.fpmlcg
bin/wolff.tmp
bin/wolffind.tmp
bin/wolfftest.tmp