diff mbox series

[bug#70924,07/10] gnu: Add primecount.

Message ID d7bd4f084396a0c24db5468c42c5a31c316f63b0.1715633288.git.monego@posteo.net
State New
Headers show
Series Add some SageMath standard packages. | expand

Commit Message

Vinicius Monego May 13, 2024, 8:52 p.m. UTC
* gnu/packages/maths.scm (primecount): New variable.

Change-Id: I03692a1be46cc4d0f3eabe95a3f76719a5c63d83
---
 gnu/packages/maths.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b7ebb2019c..1740a55cf4 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1335,6 +1335,31 @@  (define-public feedgnuplot
 in the terminal or with an external viewer.")
     (license license:gpl1+))) ;any version
 
+(define-public primecount
+  (package
+    (name "primecount")
+    (version "7.13")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/kimwalisch/primecount")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0v3zm6mw4fb6a33zi542x94w1nd54rvn7r8dav670jm9dn60jfsn"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
+                                     "-DBUILD_STATIC_LIBS=OFF"
+                                     "-DBUILD_TESTS=ON")))
+    (home-page "https://github.com/kimwalisch/primecount")
+    (synopsis "Fast prime counting function implementations")
+    (description "@code{primecount} is a command-line program and C/C++
+library that counts the number of primes ≤ x (maximum 1031) using highly
+optimized implementations of the combinatorial prime counting algorithms.")
+    (license license:bsd-2)))
+
 (define-public giza
   (package
     (name "giza")