git: bc2786a965bb - 2022Q3 - math/linbox: fix build on armv7
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 31 Jul 2022 20:34:35 UTC
The branch 2022Q3 has been updated by thierry: URL: https://cgit.FreeBSD.org/ports/commit/?id=bc2786a965bbbbff92768279845f322dc6f2677a commit bc2786a965bbbbff92768279845f322dc6f2677a Author: Robert Clausecker <fuz@fuz.su> AuthorDate: 2022-07-31 15:26:50 +0000 Commit: Thierry Thomas <thierry@FreeBSD.org> CommitDate: 2022-07-31 20:34:01 +0000 math/linbox: fix build on armv7 - add missing casts in RNG initialisation - import an upstream patch to avoid unaligned memory access PR: 265483 Reported by: Robert Clausecker <fuz (at) fuz.su> (cherry picked from commit 5ce6a5a14720989cb67a86be605d174db4308dfb) --- math/linbox/Makefile | 5 ++++- math/linbox/distinfo | 4 +++- math/linbox/files/patch-linbox_randiter_ntl-zz.h | 11 +++++++++++ math/linbox/files/patch-linbox_ring_ntl_ntl-gf2e.h | 20 ++++++++++++++++++++ .../linbox/files/patch-linbox_ring_ntl_ntl-lzz__pe.h | 20 ++++++++++++++++++++ .../files/patch-linbox_ring_ntl_ntl-lzz__pex.h | 20 ++++++++++++++++++++ .../linbox/files/patch-linbox_ring_ntl_ntl-lzz__px.h | 20 ++++++++++++++++++++ math/linbox/files/patch-linbox_ring_ntl_ntl-zz__pe.h | 20 ++++++++++++++++++++ 8 files changed, 118 insertions(+), 2 deletions(-) diff --git a/math/linbox/Makefile b/math/linbox/Makefile index db1a5b688afd..65bf65910144 100644 --- a/math/linbox/Makefile +++ b/math/linbox/Makefile @@ -2,10 +2,13 @@ PORTNAME= linbox PORTVERSION= 1.6.3 -PORTREVISION= 9 DISTVERSIONPREFIX= v +PORTREVISION= 10 CATEGORIES= math +PATCH_SITES= https://github.com/linbox-team/linbox/commit/ +PATCHFILES= b79fb13522fceef79e291922ca9c7af0a09b65ae.diff:-p1 + MAINTAINER= thierry@FreeBSD.org COMMENT= C++ library for exact, high-performance linear algebra diff --git a/math/linbox/distinfo b/math/linbox/distinfo index 450b165b7199..b79454e5a150 100644 --- a/math/linbox/distinfo +++ b/math/linbox/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1588262204 +TIMESTAMP = 1658981912 SHA256 (linbox-team-linbox-v1.6.3_GH0.tar.gz) = ad3867b75b13c139ad30ccb9ade68a0a9c158ca99deb69d81cce1646f58e3b5e SIZE (linbox-team-linbox-v1.6.3_GH0.tar.gz) = 2311437 +SHA256 (b79fb13522fceef79e291922ca9c7af0a09b65ae.diff) = 12f65fda0d4dd6dde4c0b077719cd2596a3ce70a23f7754cbe26bde3847a4822 +SIZE (b79fb13522fceef79e291922ca9c7af0a09b65ae.diff) = 5144 diff --git a/math/linbox/files/patch-linbox_randiter_ntl-zz.h b/math/linbox/files/patch-linbox_randiter_ntl-zz.h new file mode 100644 index 000000000000..c227e957ad16 --- /dev/null +++ b/math/linbox/files/patch-linbox_randiter_ntl-zz.h @@ -0,0 +1,11 @@ +--- linbox/randiter/ntl-zz.h.orig 2022-07-28 02:25:12 UTC ++++ linbox/randiter/ntl-zz.h +@@ -44,7 +44,7 @@ namespace LinBox + + _size = NTL::to_ZZ(std::string(size).data()); + +- if (seed == integer(0)) NTL::SetSeed (NTL::to_ZZ(time(NULL))); ++ if (seed == integer(0)) NTL::SetSeed (NTL::to_ZZ(static_cast<long>(time(NULL)))); + + else NTL::SetSeed(NTL::to_ZZ(std::string(seed).data())); + } diff --git a/math/linbox/files/patch-linbox_ring_ntl_ntl-gf2e.h b/math/linbox/files/patch-linbox_ring_ntl_ntl-gf2e.h new file mode 100644 index 000000000000..ecfc19a197e8 --- /dev/null +++ b/math/linbox/files/patch-linbox_ring_ntl_ntl-gf2e.h @@ -0,0 +1,20 @@ +--- linbox/ring/ntl/ntl-gf2e.h.orig 2022-07-28 02:52:14 UTC ++++ linbox/ring/ntl/ntl-gf2e.h +@@ -211,7 +211,7 @@ public : + _size(size), _seed(seed) + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } +@@ -221,7 +221,7 @@ public : + + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } diff --git a/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__pe.h b/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__pe.h new file mode 100644 index 000000000000..91f6f29cd477 --- /dev/null +++ b/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__pe.h @@ -0,0 +1,20 @@ +--- linbox/ring/ntl/ntl-lzz_pe.h.orig 2022-07-28 02:52:14 UTC ++++ linbox/ring/ntl/ntl-lzz_pe.h +@@ -400,7 +400,7 @@ namespace LinBox + _size(size), _seed(seed), _ring(F) + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } +@@ -411,7 +411,7 @@ namespace LinBox + + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } diff --git a/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__pex.h b/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__pex.h new file mode 100644 index 000000000000..b64c7cec7abc --- /dev/null +++ b/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__pex.h @@ -0,0 +1,20 @@ +--- linbox/ring/ntl/ntl-lzz_pex.h.orig 2022-07-28 02:52:14 UTC ++++ linbox/ring/ntl/ntl-lzz_pex.h +@@ -533,7 +533,7 @@ namespace LinBox + _size(size), _seed(seed), _ring(F) + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } +@@ -545,7 +545,7 @@ namespace LinBox + + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } diff --git a/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__px.h b/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__px.h new file mode 100644 index 000000000000..ce93d36215a9 --- /dev/null +++ b/math/linbox/files/patch-linbox_ring_ntl_ntl-lzz__px.h @@ -0,0 +1,20 @@ +--- linbox/ring/ntl/ntl-lzz_px.h.orig 2022-07-28 02:52:14 UTC ++++ linbox/ring/ntl/ntl-lzz_px.h +@@ -587,7 +587,7 @@ namespace LinBox + _size(size), _seed(seed), _ring(F) + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } +@@ -598,7 +598,7 @@ namespace LinBox + + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed))); + } diff --git a/math/linbox/files/patch-linbox_ring_ntl_ntl-zz__pe.h b/math/linbox/files/patch-linbox_ring_ntl_ntl-zz__pe.h new file mode 100644 index 000000000000..fc97a4905b07 --- /dev/null +++ b/math/linbox/files/patch-linbox_ring_ntl_ntl-zz__pe.h @@ -0,0 +1,20 @@ +--- linbox/ring/ntl/ntl-zz_pe.h.orig 2022-07-28 02:52:14 UTC ++++ linbox/ring/ntl/ntl-zz_pe.h +@@ -385,7 +385,7 @@ namespace LinBox + _size(size), _seed(seed), _ring(F) + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ(static_cast<long>(time(0)))); + else { + NTL::ZZ x; + std::stringstream s; +@@ -414,7 +414,7 @@ namespace LinBox + + { + if(_seed == 0) +- NTL::SetSeed(NTL::to_ZZ(time(0))); ++ NTL::SetSeed(NTL::to_ZZ( static_cast<long>(time(0)))); + else + NTL::SetSeed(NTL::to_ZZ( static_cast<long>(_seed)) ); + }