diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2021-12-23 19:51:27 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2021-12-24 08:05:43 -0500 |
commit | 59700e9c437870c74b498e5f214571c4be5ea3a6 (patch) | |
tree | 2fa4c475d5239035dea6a5be3be41dc96789eaab /sci-mathematics/primecount | |
parent | sci-mathematics/primesieve: new CLI/library to quickly generate primes. (diff) | |
download | gentoo-59700e9c437870c74b498e5f214571c4be5ea3a6.tar.gz gentoo-59700e9c437870c74b498e5f214571c4be5ea3a6.tar.bz2 gentoo-59700e9c437870c74b498e5f214571c4be5ea3a6.zip |
sci-mathematics/primecount: new fast CLI/library to count primes.
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 <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/primecount')
-rw-r--r-- | sci-mathematics/primecount/Manifest | 1 | ||||
-rw-r--r-- | sci-mathematics/primecount/metadata.xml | 24 | ||||
-rw-r--r-- | sci-mathematics/primecount/primecount-7.2.ebuild | 48 |
3 files changed, 73 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + </maintainer> + + <maintainer type="person" proxied="yes"> + <email>frp.bissey@gmail.com</email> + <name>François Bissey</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + + <use> + <flag name="executable">Build the primecount CLI executable</flag> + </use> + + <upstream> + <remote-id type="github">kimwalisch/primecount</remote-id> + </upstream> +</pkgmetadata> 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 +} |