From 59700e9c437870c74b498e5f214571c4be5ea3a6 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 23 Dec 2021 19:51:27 -0500 Subject: sci-mathematics/primecount: new fast CLI/library to count primes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a new dependency of SageMath. The SageMath ./configure script will detect primecount on the system and use it (rather than rebuilding a bundled copy) if installed. Based on the sage-on-gentoo ebuild contributed by François Bissey. Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Michael Orlitzky --- sci-mathematics/primecount/Manifest | 1 + sci-mathematics/primecount/metadata.xml | 24 ++++++++++++ sci-mathematics/primecount/primecount-7.2.ebuild | 48 ++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 sci-mathematics/primecount/Manifest create mode 100644 sci-mathematics/primecount/metadata.xml create mode 100644 sci-mathematics/primecount/primecount-7.2.ebuild (limited to 'sci-mathematics/primecount') diff --git a/sci-mathematics/primecount/Manifest b/sci-mathematics/primecount/Manifest new file mode 100644 index 000000000000..f723765658e3 --- /dev/null +++ b/sci-mathematics/primecount/Manifest @@ -0,0 +1 @@ +DIST primecount-7.2.tar.gz 340799 BLAKE2B 5ce3661e322be363e2fe79de1dd134b5c3009269cbb10d36dc69bee4c23c9f41d2117b3ed7aa4c5f852e494832573c84a8d9c37cbe92cf80a5024bdec9b22c69 SHA512 df14929012434eddfab94410ba9165642094327f8abd139a6a1ba87e508bba56df91cb0dc9411e873e90a9aa4aa3ba4007396c930d593f5954be8c715fa26e84 diff --git a/sci-mathematics/primecount/metadata.xml b/sci-mathematics/primecount/metadata.xml new file mode 100644 index 000000000000..524d8bf2ac66 --- /dev/null +++ b/sci-mathematics/primecount/metadata.xml @@ -0,0 +1,24 @@ + + + + + mjo@gentoo.org + + + + frp.bissey@gmail.com + François Bissey + + + proxy-maint@gentoo.org + Proxy Maintainers + + + + Build the primecount CLI executable + + + + kimwalisch/primecount + + diff --git a/sci-mathematics/primecount/primecount-7.2.ebuild b/sci-mathematics/primecount/primecount-7.2.ebuild new file mode 100644 index 000000000000..1e394a48459e --- /dev/null +++ b/sci-mathematics/primecount/primecount-7.2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +DESCRIPTION="Highly optimized CLI and library to count primes" +HOMEPAGE="https://github.com/kimwalisch/primecount" +SRC_URI="https://github.com/kimwalisch/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD-2" +SLOT="0/7" # subslot is first component of libprimecount.so version +KEYWORDS="~amd64" +IUSE="+executable openmp test" +RESTRICT="!test? ( test )" + +DEPEND="sci-mathematics/primesieve:=" +RDEPEND="${DEPEND}" + +DOCS=( + ChangeLog + README.md + doc/Credits.md + doc/Easy-Special-Leaves.md + doc/Hard-Special-Leaves.md + doc/Records.md + doc/References.md + doc/alpha-factor-dr.pdf + doc/alpha-factor-gourdon.pdf + doc/alpha-factor-lmo.pdf + doc/libprimecount.md +) + +pkg_pretend() { + use openmp && tc-check-openmp +} + +src_configure() { + local mycmakeargs=( + -DBUILD_LIBPRIMESIEVE="OFF" + -DBUILD_PRIMECOUNT="$(usex executable)" + -DBUILD_STATIC_LIBS="OFF" + -DBUILD_TESTS="$(usex test)" + -DWITH_OPENMP="$(usex openmp)" + ) + + cmake_src_configure +} -- cgit v1.2.3-65-gdbad