sci-mathematics/primesieve: new CLI/library to quickly generate primes.

This package will soon be a dependency of SageMath, transitively via
the forthcoming sci-mathematics/primecount that uses it. Based on the
sage-on-gentoo ebuild by François Bissey.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
Michael Orlitzky
2021-12-24 08:05:42 -05:00
parent 1f95459968
commit e244f8cbca
3 changed files with 75 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
DIST primesieve-7.7.tar.gz 101558 BLAKE2B cfaa91ddcf661e265d403f8a93461fe297ac48db843b096d0dd7828c4e3d11cdba60cb102197248359c79950fe2ac66c8e9295ab17b0d6bd0eed5a6260c7d115 SHA512 bbcc141a12afdf54386d2408e067b1c6af2dd9b5c9f44d71290269ddefc7c46ba6794064cde6728c8356724553cb6bc2e765bf18c24a18b6d5d1f472d2c6e6dd
+24
View File
@@ -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 primesieve CLI executable</flag>
</use>
<upstream>
<remote-id type="github">kimwalisch/primesieve</remote-id>
</upstream>
</pkgmetadata>
@@ -0,0 +1,50 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="CLI and library for quickly generating prime numbers."
HOMEPAGE="https://github.com/kimwalisch/primesieve"
SRC_URI="https://github.com/kimwalisch/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0/9" # subslot is first component of libprimesieve.so version
KEYWORDS="~amd64"
IUSE="doc +executable test"
RESTRICT="!test? ( test )"
BDEPEND="doc? ( app-doc/doxygen app-text/texlive media-gfx/graphviz )"
DEPEND=""
RDEPEND=""
DOCS=(
ChangeLog
README.md
doc/ALGORITHMS.md
doc/CPP_Examples.md
doc/C_Examples.md
)
src_configure() {
local mycmakeargs=(
-DBUILD_DOC="$(usex doc)"
-DBUILD_PRIMESIEVE="$(usex executable)"
-DBUILD_STATIC_LIBS="OFF"
-DBUILD_TESTS="$(usex test)"
)
if use doc; then
DOCS+=(
"${BUILD_DIR}/doc/html"
"${BUILD_DIR}/doc/latex/refman.pdf"
)
fi
cmake_src_configure
}
src_compile() {
cmake_src_compile
use doc && cmake_build doc
}