Skip to content

Commit

Permalink
math/primecount: addind fast prime counting function implementations
Browse files Browse the repository at this point in the history
primecount is a command-line program and C/C++ library that counts the
primes below an integer x ≤ 1031 using highly optimized implementations
of the combinatorial prime counting algorithms.

To be used by SageMath.
  • Loading branch information
thierry-FreeBSD committed Nov 28, 2021
1 parent 55a132b commit 818abd4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions math/Makefile
Expand Up @@ -778,6 +778,7 @@
SUBDIR += poly2tri
SUBDIR += polylib
SUBDIR += polymake
SUBDIR += primecount
SUBDIR += primegen
SUBDIR += primesieve
SUBDIR += primme
Expand Down
31 changes: 31 additions & 0 deletions math/primecount/Makefile
@@ -0,0 +1,31 @@
# Created by: thierry@pompo.net

PORTNAME= primecount
DISTVERSIONPREFIX= v
DISTVERSION= 7.1
CATEGORIES= math

MAINTAINER= thierry@FreeBSD.org
COMMENT= Fast prime counting function implementations

LICENSE= BSD2CLAUSE

BUILD_DEPENDS= libdivide>0:math/libdivide
LIB_DEPENDS= libprimesieve.so:math/primesieve

USE_GITHUB= yes
GH_ACCOUNT= kimwalisch

USES= cmake compiler:c++11-lang
USE_LDCONFIG= yes

CMAKE_ON= BUILD_SHARED_LIBS
CMAKE_OFF= BUILD_LIBPRIMESIEVE BUILD_STATIC_LIBS

do-test:
cd ${BUILD_WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions math/primecount/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1638108625
SHA256 (kimwalisch-primecount-v7.1_GH0.tar.gz) = 4f156f3945b613c9262156a25255f689abcaf30fff778c1d27b17126fcd1db72
SIZE (kimwalisch-primecount-v7.1_GH0.tar.gz) = 331976
5 changes: 5 additions & 0 deletions math/primecount/pkg-descr
@@ -0,0 +1,5 @@
primecount is a command-line program and C/C++ library that counts the primes
below an integer x <= 1031 using highly optimized implementations of the
combinatorial prime counting algorithms.

WWW: https://github.com/kimwalisch/primecount
7 changes: 7 additions & 0 deletions math/primecount/pkg-plist
@@ -0,0 +1,7 @@
bin/primecount
include/primecount.h
include/primecount.hpp
lib/libprimecount.so
lib/libprimecount.so.7
lib/libprimecount.so.7.1
man/man1/primecount.1.gz

0 comments on commit 818abd4

Please sign in to comment.