summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2022-06-13 07:20:59 -0400
committerMichael Orlitzky <mjo@gentoo.org>2022-06-13 07:30:30 -0400
commit5a1a7b1619c27f64b2a9d8a861ac94300cb7695b (patch)
tree73782c8360f81f6c8133d7c4db08f875b73577e6 /sci-mathematics/primecount
parentsci-mathematics/primesieve: new upstream v7.9. (diff)
downloadgentoo-5a1a7b1619c27f64b2a9d8a861ac94300cb7695b.tar.gz
gentoo-5a1a7b1619c27f64b2a9d8a861ac94300cb7695b.tar.bz2
gentoo-5a1a7b1619c27f64b2a9d8a861ac94300cb7695b.zip
sci-mathematics/primecount: new upstream v7.3.
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/primecount')
-rw-r--r--sci-mathematics/primecount/Manifest1
-rw-r--r--sci-mathematics/primecount/primecount-7.3.ebuild54
2 files changed, 55 insertions, 0 deletions
diff --git a/sci-mathematics/primecount/Manifest b/sci-mathematics/primecount/Manifest
index f723765658e3..5f86f3ae8775 100644
--- a/sci-mathematics/primecount/Manifest
+++ b/sci-mathematics/primecount/Manifest
@@ -1 +1,2 @@
DIST primecount-7.2.tar.gz 340799 BLAKE2B 5ce3661e322be363e2fe79de1dd134b5c3009269cbb10d36dc69bee4c23c9f41d2117b3ed7aa4c5f852e494832573c84a8d9c37cbe92cf80a5024bdec9b22c69 SHA512 df14929012434eddfab94410ba9165642094327f8abd139a6a1ba87e508bba56df91cb0dc9411e873e90a9aa4aa3ba4007396c930d593f5954be8c715fa26e84
+DIST primecount-7.3.tar.gz 360921 BLAKE2B 0d9ad7c791dba12b05e4c88703dc4bfc1f557a1443c8430f3921f1a6e99b740b437cb53f39e832d69c4148b597960b028e0f38e4f4d96e50434b1d020f4ea620 SHA512 56dcae60460c88368214e01f8e3618e6b61b13f2730bfd1f281721ef71d6136308ba6832e4bd25a1885e2c6142009c5772d6102f82c65e8522e990cb62c55e71
diff --git a/sci-mathematics/primecount/primecount-7.3.ebuild b/sci-mathematics/primecount/primecount-7.3.ebuild
new file mode 100644
index 000000000000..eb88741f1621
--- /dev/null
+++ b/sci-mathematics/primecount/primecount-7.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 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="cpu_flags_x86_popcnt +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() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && 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)"
+ -DWITH_POPCNT="$(usex cpu_flags_x86_popcnt)"
+ )
+
+ cmake_src_configure
+}