diff --git a/security/nflib/Makefile b/security/nflib/Makefile index 7f69a0b25581..dcc7c0a1e0f6 100644 --- a/security/nflib/Makefile +++ b/security/nflib/Makefile @@ -1,33 +1,33 @@ PORTNAME= nflib DISTVERSIONPREFIX= v DISTVERSION= 1.0.0-23 DISTVERSIONSUFFIX= -g5cf40ed -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security math MAINTAINER= yuri@FreeBSD.org COMMENT= NTT-based fast lattice cryptography library WWW= https://github.com/quarkslab/NFLlib LICENSE= MIT LICENSE_FILE= ${WRKSRC}/MIT_LICENSE.txt ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= unconditionally includes amd64 assembler code BUILD_DEPENDS= as:devel/binutils LIB_DEPENDS= libmpfr.so:math/mpfr \ libgmp.so:math/gmp USES= cmake:testing compiler:c++11-lang localbase USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= quarkslab GH_PROJECT= NFLlib .if !defined(WITH_DEBUG) CMAKE_ON= NFL_OPTIMIZED .endif .include diff --git a/security/nflib/files/patch-include_nfl_arch.hpp b/security/nflib/files/patch-include_nfl_arch.hpp new file mode 100644 index 000000000000..07f9c34daff6 --- /dev/null +++ b/security/nflib/files/patch-include_nfl_arch.hpp @@ -0,0 +1,19 @@ +--- include/nfl/arch.hpp.orig 2023-07-24 21:28:33 UTC ++++ include/nfl/arch.hpp +@@ -3,14 +3,10 @@ + + #include "nfl/arch/common.hpp" + +-#ifdef NFL_OPTIMIZED +- +-#if defined __AVX2__ && defined NTT_AVX2 ++#if defined __AVX2__ && defined __SSE4_2__ + #define CC_SIMD nfl::simd::avx2 +-#elif defined __SSE4_2__ && defined NTT_SSE ++#elif defined __SSE4_2__ && !defined __AVX2__ + #define CC_SIMD nfl::simd::sse +-#endif +- + #endif + + #ifndef CC_SIMD diff --git a/security/nflib/files/patch-include_nfl_ops.hpp b/security/nflib/files/patch-include_nfl_ops.hpp new file mode 100644 index 000000000000..958354773ca1 --- /dev/null +++ b/security/nflib/files/patch-include_nfl_ops.hpp @@ -0,0 +1,23 @@ +--- include/nfl/ops.hpp.orig 2023-07-24 21:30:23 UTC ++++ include/nfl/ops.hpp +@@ -281,18 +281,14 @@ struct _make_op, expr