diff options
author | wiz <wiz@pkgsrc.org> | 2020-06-08 13:45:35 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2020-06-08 13:45:35 +0000 |
commit | 4a572b864e9299c95959430ddc31dce33274f32b (patch) | |
tree | 7249c5741cfae4916867c9cfffccc4d72a1ba561 /security/HElib | |
parent | 4b3986e8197876120e87b504e763b05d562a0c58 (diff) | |
download | pkgsrc-4a572b864e9299c95959430ddc31dce33274f32b.tar.gz |
HElib: update to 1.0.1.
Use github tarball instead of snapshot.
Fix HOMEPAGE
7 years of changes; I didn't find a concise changelog.
Diffstat (limited to 'security/HElib')
-rw-r--r-- | security/HElib/Makefile | 27 | ||||
-rw-r--r-- | security/HElib/PLIST | 72 | ||||
-rw-r--r-- | security/HElib/distinfo | 15 | ||||
-rw-r--r-- | security/HElib/patches/patch-IndexMap.h | 40 | ||||
-rw-r--r-- | security/HElib/patches/patch-Makefile | 46 | ||||
-rw-r--r-- | security/HElib/patches/patch-NumbTh.h | 24 | ||||
-rw-r--r-- | security/HElib/patches/patch-timing.cpp | 42 |
7 files changed, 83 insertions, 183 deletions
diff --git a/security/HElib/Makefile b/security/HElib/Makefile index 9cb12c06218..578466912b9 100644 --- a/security/HElib/Makefile +++ b/security/HElib/Makefile @@ -1,31 +1,20 @@ -# $NetBSD: Makefile,v 1.3 2017/07/30 22:32:20 wiz Exp $ +# $NetBSD: Makefile,v 1.4 2020/06/08 13:45:35 wiz Exp $ -DISTNAME= HElib-20130501 +DISTNAME= HElib-1.0.1 CATEGORIES= security -MASTER_SITES= ${MASTER_SITE_LOCAL} -EXTRACT_SUFX= .zip +MASTER_SITES= ${MASTER_SITE_GITHUB:=homenc/} +GITHUB_TAG= v${PKGVERSION_NOREV} MAINTAINER= agc@NetBSD.org -HOMEPAGE= https://github.com/shaih/HElib/ +HOMEPAGE= https://github.com/homenc/HElib/ COMMENT= Homeomorphic Encryption library -LICENSE= gnu-gpl-v2 +LICENSE= apache-2.0 -WRKSRC= ${WRKDIR}/HElib-master/src +WRKSRC= ${WRKDIR}/${DISTNAME}/src +USE_CMAKE= yes USE_LANGUAGES+= c++ -USE_TOOLS+= gmake - -TEST_TARGET= check - -AUTO_MKDIRS= yes - -pre-patch: - for f in ${WRKSRC}/Makefile ${WRKSRC}/NumbTh.h; do \ - ${TR} -d '\r' < $${f} > $${f}.new; \ - ${MV} $${f}.new $${f}; \ - done .include "../../devel/gmp/buildlink3.mk" .include "../../math/ntl/buildlink3.mk" - .include "../../mk/bsd.pkg.mk" diff --git a/security/HElib/PLIST b/security/HElib/PLIST index 2e21bc87097..463c2b13682 100644 --- a/security/HElib/PLIST +++ b/security/HElib/PLIST @@ -1,16 +1,56 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2013/05/18 18:36:25 agc Exp $ -FHE/CModulus.h -FHE/Ctxt.h -FHE/DoubleCRT.h -FHE/EncryptedArray.h -FHE/FHE.h -FHE/FHEContext.h -FHE/IndexMap.h -FHE/IndexSet.h -FHE/NumbTh.h -FHE/PAlgebra.h -FHE/SingleCRT.h -FHE/bluestein.h -FHE/replicate.h -FHE/timing.h -lib/libfhe.a +@comment $NetBSD: PLIST,v 1.2 2020/06/08 13:45:35 wiz Exp $ +include/helib/ArgMap.h +include/helib/CModulus.h +include/helib/Context.h +include/helib/CtPtrs.h +include/helib/Ctxt.h +include/helib/DoubleCRT.h +include/helib/EncryptedArray.h +include/helib/EvalMap.h +include/helib/FHE.h +include/helib/IndexMap.h +include/helib/IndexSet.h +include/helib/NumbTh.h +include/helib/PAlgebra.h +include/helib/PGFFT.h +include/helib/PolyMod.h +include/helib/PolyModRing.h +include/helib/PtrMatrix.h +include/helib/PtrVector.h +include/helib/Ptxt.h +include/helib/apiAttributes.h +include/helib/assertions.h +include/helib/binaryArith.h +include/helib/binaryCompare.h +include/helib/binio.h +include/helib/bluestein.h +include/helib/clonedPtr.h +include/helib/debugging.h +include/helib/exceptions.h +include/helib/fhe_stats.h +include/helib/helib.h +include/helib/hypercube.h +include/helib/intraSlot.h +include/helib/keySwitching.h +include/helib/keys.h +include/helib/matching.h +include/helib/matmul.h +include/helib/multicore.h +include/helib/norms.h +include/helib/permutations.h +include/helib/polyEval.h +include/helib/powerful.h +include/helib/primeChain.h +include/helib/randomMatrices.h +include/helib/range.h +include/helib/recryption.h +include/helib/replicate.h +include/helib/sample.h +include/helib/tableLookup.h +include/helib/timing.h +include/helib/zzX.h +lib/libhelib.a +share/cmake/helib/helibConfig.cmake +share/cmake/helib/helibConfigVersion.cmake +share/cmake/helib/helibTargets-noconfig.cmake +share/cmake/helib/helibTargets.cmake diff --git a/security/HElib/distinfo b/security/HElib/distinfo index 53f54612d54..86c077360ef 100644 --- a/security/HElib/distinfo +++ b/security/HElib/distinfo @@ -1,10 +1,7 @@ -$NetBSD: distinfo,v 1.5 2015/11/04 01:17:40 agc Exp $ +$NetBSD: distinfo,v 1.6 2020/06/08 13:45:35 wiz Exp $ -SHA1 (HElib-20130501.zip) = 4f10c723eda202442550b89d98da8b9f4fdca013 -RMD160 (HElib-20130501.zip) = 729115076c6e90584cf5380694903631764849fb -SHA512 (HElib-20130501.zip) = 2582e2a6d56dcfa8db268d302579e8ccad85a2658f673bf58d16af13ef040a97efb4ee91a2ca76783ba2d7306ce56e8eea69ebdaa649dc4f64ae282212f2f4e4 -Size (HElib-20130501.zip) = 2287320 bytes -SHA1 (patch-IndexMap.h) = f03a5c5d64370a233bf73fd3bff369e32f8a220a -SHA1 (patch-Makefile) = e3a867712039b83f2c49c4dec2e5ff0a6c26f6ac -SHA1 (patch-NumbTh.h) = f99493989f67d34595bc4e47b159dc75a952b158 -SHA1 (patch-timing.cpp) = 87e2638022326ef9bcb28c8617aa3d8d34c3aa85 +SHA1 (HElib-1.0.1.tar.gz) = f732f38a2919e59d387516d1e41f113a3ffa0448 +RMD160 (HElib-1.0.1.tar.gz) = b27214fa002750ead4eda97cf5cc1402b299674c +SHA512 (HElib-1.0.1.tar.gz) = 19bc63f74e61db82bc9ed4c0245c7da33e1e89bbdab26260100f248512757359c49ed76bd5bc5ec061415c292d1904a2a5e3a481ffbc366f3c7c1cd7c5498aa4 +Size (HElib-1.0.1.tar.gz) = 1579853 bytes +SHA1 (patch-timing.cpp) = e9f0f841de99b8189c7267beb4b8914069b95cb3 diff --git a/security/HElib/patches/patch-IndexMap.h b/security/HElib/patches/patch-IndexMap.h deleted file mode 100644 index cc53b535c6a..00000000000 --- a/security/HElib/patches/patch-IndexMap.h +++ /dev/null @@ -1,40 +0,0 @@ -$NetBSD: patch-IndexMap.h,v 1.1 2013/05/21 16:37:46 joerg Exp $ - ---- IndexMap.h.orig 2013-05-21 14:44:35.000000000 +0000 -+++ IndexMap.h -@@ -21,9 +21,14 @@ - **/ - - #include "IndexSet.h" --#include <tr1/unordered_map> - #include <iostream> - #include <cassert> -+#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION) -+#include <unordered_map> -+#else -+#include <tr1/unordered_map> -+using std::tr1::unordered_map; -+#endif - #include "cloned_ptr.h" - - using namespace std; -@@ -46,7 +51,7 @@ public: - //! flexible manner. - template < class T > class IndexMap { - -- tr1::unordered_map<long, T> map; -+ unordered_map<long, T> map; - IndexSet indexSet; - cloned_ptr< IndexMapInit<T> > init; - -@@ -78,8 +83,8 @@ public: - assert(indexSet.contains(j)); - // unordered_map does not support a const [] operator, - // so we have to artificially strip away the const-ness here -- tr1::unordered_map<long, T> & map1 = -- const_cast< tr1::unordered_map<long, T> & > (map); -+ unordered_map<long, T> & map1 = -+ const_cast< unordered_map<long, T> & > (map); - return map1[j]; - } - diff --git a/security/HElib/patches/patch-Makefile b/security/HElib/patches/patch-Makefile deleted file mode 100644 index 7d73cfc3f67..00000000000 --- a/security/HElib/patches/patch-Makefile +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-Makefile,v 1.3 2014/09/27 10:11:20 jperkin Exp $ - -adapt for pkgsrc -add an install target - ---- Makefile.orig 2013-04-30 14:31:26.000000000 -0700 -+++ Makefile 2013-05-07 11:20:59.000000000 -0700 -@@ -16,7 +16,7 @@ - CC = g++ - #CFLAGS = -g -Wall -O3 -I/usr/local/include - #CFLAGS = -g -Wall -I/usr/local/include --CFLAGS = -g -O2 -Wfatal-errors -Wshadow -Wall -I/usr/local/include -+CFLAGS = -g -Wall -O2 -I${PREFIX}/include - #CFLAGS = -pg -Wall -I/usr/local/include - LD = g++ - -@@ -41,12 +41,12 @@ - all: fhe.a - - check: Test_General_x -- Test_General_x R=1 k=10 p=2 r=1 d=1 -- Test_General_x R=1 k=10 p=2 r=2 d=1 -- Test_General_x R=1 k=10 p=2 r=1 d=2 -- Test_General_x R=1 k=10 p=3 r=1 d=1 -- Test_General_x R=1 k=10 p=3 r=2 d=1 -- Test_General_x R=1 k=10 p=3 r=1 d=2 -+ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=2 r=1 d=1 -+ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=2 r=2 d=1 -+ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=2 r=1 d=2 -+ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=3 r=1 d=1 -+ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=3 r=2 d=1 -+ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=3 r=1 d=2 - - test: $(TESTPROGS) - -@@ -64,3 +64,10 @@ - clean: - rm -f *.o *_x *_x.exe *.a core.* - rm -rf *.dSYM -+ -+install: -+ ${BSD_INSTALL_LIB} fhe.a ${DESTDIR}${PREFIX}/lib/libfhe.a -+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/FHE -+ for h in ${HEADER}; do \ -+ ${BSD_INSTALL_DATA} $$h ${DESTDIR}${PREFIX}/FHE/$$h; \ -+ done diff --git a/security/HElib/patches/patch-NumbTh.h b/security/HElib/patches/patch-NumbTh.h deleted file mode 100644 index 46f46664075..00000000000 --- a/security/HElib/patches/patch-NumbTh.h +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-NumbTh.h,v 1.3 2014/09/27 10:11:20 jperkin Exp $ - ---- NumbTh.h.orig 2013-05-21 14:43:10.000000000 +0000 -+++ NumbTh.h -@@ -32,13 +32,18 @@ - #include <NTL/mat_GF2E.h> - #include <NTL/lzz_pXFactoring.h> - #include <NTL/GF2XFactoring.h> -+#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION) -+#include <unordered_map> -+#else - #include <tr1/unordered_map> -+using std::tr1::unordered_map; -+#endif - #include <string> - NTL_CLIENT - - - //! @typedef --typedef tr1::unordered_map<string, const char *> argmap_t; -+typedef unordered_map<string, const char *> argmap_t; - - - //! @brief Code for parsing command line arguments. diff --git a/security/HElib/patches/patch-timing.cpp b/security/HElib/patches/patch-timing.cpp index f8446654394..dacd09eb400 100644 --- a/security/HElib/patches/patch-timing.cpp +++ b/security/HElib/patches/patch-timing.cpp @@ -1,34 +1,18 @@ -$NetBSD: patch-timing.cpp,v 1.1 2013/05/21 16:37:46 joerg Exp $ +$NetBSD: patch-timing.cpp,v 1.2 2020/06/08 13:45:35 wiz Exp $ ---- timing.cpp.orig 2013-05-21 14:42:27.000000000 +0000 +NetBSD provides CLOCK_MONOTONIC, but not CLOCK_MONOTONIC_RAW. + +--- timing.cpp.orig 2020-05-04 18:09:21.000000000 +0000 +++ timing.cpp -@@ -16,13 +16,19 @@ - #include <ctime> - #include <iostream> - #include "timing.h" --#include <tr1/unordered_map> - #include <vector> - #include <algorithm> - #include <utility> - #include <cmath> - #include <cstring> +@@ -18,6 +18,11 @@ + namespace helib { -+#if __cplusplus >= 201103L || defined(_LIBCPP_VERSION) -+#include <unordered_map> -+#else -+#include <tr1/unordered_map> -+using std::tr1::unordered_map; + #ifdef CLOCK_MONOTONIC ++ ++#ifndef CLOCK_MONOTONIC_RAW ++#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC +#endif + - using namespace std; - - //! A simple class to toggle timing information on and off -@@ -43,7 +49,7 @@ bool string_compare(const char *a, const - - bool FHEtimersOn=false; - --typedef tr1::unordered_map<const char*,FHEtimer>timerMap; -+typedef unordered_map<const char*,FHEtimer>timerMap; - static timerMap timers; - - // Reset a timer for some label to zero + unsigned long GetTimerClock() + { + timespec ts; |