From 246d03cb9eff0d9ae6268bc52a11f5fe8564f5d7 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Tue, 28 May 2019 02:49:49 +0000 Subject: [PATCH] New port: security/picosha2: C++ header-only SHA256 hash generator --- security/Makefile | 1 + security/picosha2/Makefile | 33 +++++++++++++++++++++++++++++++++ security/picosha2/distinfo | 3 +++ security/picosha2/pkg-descr | 7 +++++++ 4 files changed, 44 insertions(+) create mode 100644 security/picosha2/Makefile create mode 100644 security/picosha2/distinfo create mode 100644 security/picosha2/pkg-descr diff --git a/security/Makefile b/security/Makefile index 07adba80bce8..d681976773f6 100644 --- a/security/Makefile +++ b/security/Makefile @@ -802,6 +802,7 @@ SUBDIR += php73-openssl SUBDIR += php73-sodium SUBDIR += phpsecinfo + SUBDIR += picosha2 SUBDIR += pidentd SUBDIR += pidgin-encryption SUBDIR += pidgin-otr diff --git a/security/picosha2/Makefile b/security/picosha2/Makefile new file mode 100644 index 000000000000..9da20b3e0093 --- /dev/null +++ b/security/picosha2/Makefile @@ -0,0 +1,33 @@ +# $FreeBSD$ + +PORTNAME= picosha2 +DISTVERSIONPREFIX= v +DISTVERSION= 1.0.0-23 +DISTVERSIONSUFFIX= -gb699e6c +CATEGORIES= security + +MAINTAINER= yuri@FreeBSD.org +COMMENT= C++ header-only SHA256 hash generator + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USE_GITHUB= yes +GH_ACCOUNT= okdshin +GH_PROJECT= PicoSHA2 + +NO_BUILD= yes +NO_ARCH= yes + +PLIST_FILES= include/picosha2.h + +do-install: + ${INSTALL_DATA} ${WRKSRC}/picosha2.h ${STAGEDIR}${PREFIX}/include + +do-test: + @cd ${WRKSRC}/test && \ + ${CXX} -o test test.cpp -I.. && \ + ./test && \ + ${ECHO} "Tests succeeded" + +.include diff --git a/security/picosha2/distinfo b/security/picosha2/distinfo new file mode 100644 index 000000000000..31e2369ebe6d --- /dev/null +++ b/security/picosha2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1559011289 +SHA256 (okdshin-PicoSHA2-v1.0.0-23-gb699e6c_GH0.tar.gz) = 4d5b17c33d3da4663838ec9ba987dc4c1f2fac4ac7d5c4690fae3a968ef95fa2 +SIZE (okdshin-PicoSHA2-v1.0.0-23-gb699e6c_GH0.tar.gz) = 7204 diff --git a/security/picosha2/pkg-descr b/security/picosha2/pkg-descr new file mode 100644 index 000000000000..d2fcd4771a8d --- /dev/null +++ b/security/picosha2/pkg-descr @@ -0,0 +1,7 @@ +PicoSHA2 is a tiny SHA256 hash generator for C++ with following properties: + +* header-file only +* no external dependencies (only uses standard C++ libraries) +* STL-friendly + +WWW: https://github.com/okdshin/PicoSHA2