git: 1b5f64609540 - main - math/primesum: New port: Sum of the primes below x

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 08 Dec 2022 21:05:36 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1b5f64609540ceecf96082b5a288946fd18425fb

commit 1b5f64609540ceecf96082b5a288946fd18425fb
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-12-08 15:59:01 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-12-08 21:05:32 +0000

    math/primesum: New port: Sum of the primes below x
---
 math/Makefile           |  1 +
 math/primesum/Makefile  | 27 +++++++++++++++++++++++++++
 math/primesum/distinfo  |  3 +++
 math/primesum/pkg-descr |  3 +++
 math/primesum/pkg-plist | 15 +++++++++++++++
 5 files changed, 49 insertions(+)

diff --git a/math/Makefile b/math/Makefile
index 3a143ba3bffa..d12ef087bdd8 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -849,6 +849,7 @@
     SUBDIR += primecount
     SUBDIR += primegen
     SUBDIR += primesieve
+    SUBDIR += primesum
     SUBDIR += primme
     SUBDIR += prng
     SUBDIR += pspp
diff --git a/math/primesum/Makefile b/math/primesum/Makefile
new file mode 100644
index 000000000000..0f9e589011d6
--- /dev/null
+++ b/math/primesum/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	primesum
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.7-19
+DISTVERSIONSUFFIX=	-gac22b96
+CATEGORIES=	math
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Sum of the primes below x
+WWW=		https://github.com/kimwalisch/primesum
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+USES=		cmake:testing compiler:c++11-lang
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	kimwalisch
+
+CMAKE_ON=	BUILD_SHARED_LIBS
+CMAKE_OFF=	BUILD_STATIC_LIBS
+
+do-test:
+	@cd ${TEST_WRKSRC} && \
+		${SETENV} LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib ${STAGEDIR}${PREFIX}/bin/primesum --test
+
+.include <bsd.port.mk>
diff --git a/math/primesum/distinfo b/math/primesum/distinfo
new file mode 100644
index 000000000000..fc1a149dbe1e
--- /dev/null
+++ b/math/primesum/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1670527143
+SHA256 (kimwalisch-primesum-v1.7-19-gac22b96_GH0.tar.gz) = 309fdde003b33d0ae7b83e652373eef3ab319ee42988591dcd86e8affb8e4b14
+SIZE (kimwalisch-primesum-v1.7-19-gac22b96_GH0.tar.gz) = 241887
diff --git a/math/primesum/pkg-descr b/math/primesum/pkg-descr
new file mode 100644
index 000000000000..84aa4720f162
--- /dev/null
+++ b/math/primesum/pkg-descr
@@ -0,0 +1,3 @@
+primesum is a command-line program that computes the sum of the primes below an
+integer x <= 1031 as quickly as possible using a modified version of the
+combinatorial prime counting function algorithm.
diff --git a/math/primesum/pkg-plist b/math/primesum/pkg-plist
new file mode 100644
index 000000000000..d0fca0de92bb
--- /dev/null
+++ b/math/primesum/pkg-plist
@@ -0,0 +1,15 @@
+bin/primesum
+include/primesieve.h
+include/primesieve.hpp
+include/primesieve/StorePrimes.hpp
+include/primesieve/iterator.h
+include/primesieve/iterator.hpp
+include/primesieve/primesieve_error.hpp
+lib/cmake/primesieve/primesieveConfig.cmake
+lib/cmake/primesieve/primesieveConfigVersion.cmake
+lib/cmake/primesieve/primesieveShared-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/primesieve/primesieveShared.cmake
+lib/libprimesieve.so
+lib/libprimesieve.so.9
+lib/libprimesieve.so.9.6.0
+libdata/pkgconfig/primesieve.pc