1 |
commit: e244f8cbcac97753cc33aa2cda2d1e0822b9fa97 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 23 20:26:01 2021 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 24 13:05:42 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e244f8cb |
7 |
|
8 |
sci-mathematics/primesieve: new CLI/library to quickly generate primes. |
9 |
|
10 |
This package will soon be a dependency of SageMath, transitively via |
11 |
the forthcoming sci-mathematics/primecount that uses it. Based on the |
12 |
sage-on-gentoo ebuild by François Bissey. |
13 |
|
14 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
15 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
16 |
|
17 |
sci-mathematics/primesieve/Manifest | 1 + |
18 |
sci-mathematics/primesieve/metadata.xml | 24 ++++++++++++ |
19 |
sci-mathematics/primesieve/primesieve-7.7.ebuild | 50 ++++++++++++++++++++++++ |
20 |
3 files changed, 75 insertions(+) |
21 |
|
22 |
diff --git a/sci-mathematics/primesieve/Manifest b/sci-mathematics/primesieve/Manifest |
23 |
new file mode 100644 |
24 |
index 000000000000..50af85cf5844 |
25 |
--- /dev/null |
26 |
+++ b/sci-mathematics/primesieve/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST primesieve-7.7.tar.gz 101558 BLAKE2B cfaa91ddcf661e265d403f8a93461fe297ac48db843b096d0dd7828c4e3d11cdba60cb102197248359c79950fe2ac66c8e9295ab17b0d6bd0eed5a6260c7d115 SHA512 bbcc141a12afdf54386d2408e067b1c6af2dd9b5c9f44d71290269ddefc7c46ba6794064cde6728c8356724553cb6bc2e765bf18c24a18b6d5d1f472d2c6e6dd |
29 |
|
30 |
diff --git a/sci-mathematics/primesieve/metadata.xml b/sci-mathematics/primesieve/metadata.xml |
31 |
new file mode 100644 |
32 |
index 000000000000..e2285b80a8b4 |
33 |
--- /dev/null |
34 |
+++ b/sci-mathematics/primesieve/metadata.xml |
35 |
@@ -0,0 +1,24 @@ |
36 |
+<?xml version="1.0" encoding="UTF-8"?> |
37 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
38 |
+<pkgmetadata> |
39 |
+ <maintainer type="person"> |
40 |
+ <email>mjo@g.o</email> |
41 |
+ </maintainer> |
42 |
+ |
43 |
+ <maintainer type="person" proxied="yes"> |
44 |
+ <email>frp.bissey@×××××.com</email> |
45 |
+ <name>François Bissey</name> |
46 |
+ </maintainer> |
47 |
+ <maintainer type="project" proxied="proxy"> |
48 |
+ <email>proxy-maint@g.o</email> |
49 |
+ <name>Proxy Maintainers</name> |
50 |
+ </maintainer> |
51 |
+ |
52 |
+ <use> |
53 |
+ <flag name="executable">Build the primesieve CLI executable</flag> |
54 |
+ </use> |
55 |
+ |
56 |
+ <upstream> |
57 |
+ <remote-id type="github">kimwalisch/primesieve</remote-id> |
58 |
+ </upstream> |
59 |
+</pkgmetadata> |
60 |
|
61 |
diff --git a/sci-mathematics/primesieve/primesieve-7.7.ebuild b/sci-mathematics/primesieve/primesieve-7.7.ebuild |
62 |
new file mode 100644 |
63 |
index 000000000000..5d26f8b6a858 |
64 |
--- /dev/null |
65 |
+++ b/sci-mathematics/primesieve/primesieve-7.7.ebuild |
66 |
@@ -0,0 +1,50 @@ |
67 |
+# Copyright 1999-2021 Gentoo Authors |
68 |
+# Distributed under the terms of the GNU General Public License v2 |
69 |
+ |
70 |
+EAPI=8 |
71 |
+ |
72 |
+inherit cmake |
73 |
+ |
74 |
+DESCRIPTION="CLI and library for quickly generating prime numbers." |
75 |
+HOMEPAGE="https://github.com/kimwalisch/primesieve" |
76 |
+SRC_URI="https://github.com/kimwalisch/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
77 |
+LICENSE="BSD-2" |
78 |
+SLOT="0/9" # subslot is first component of libprimesieve.so version |
79 |
+KEYWORDS="~amd64" |
80 |
+IUSE="doc +executable test" |
81 |
+RESTRICT="!test? ( test )" |
82 |
+ |
83 |
+BDEPEND="doc? ( app-doc/doxygen app-text/texlive media-gfx/graphviz )" |
84 |
+DEPEND="" |
85 |
+RDEPEND="" |
86 |
+ |
87 |
+DOCS=( |
88 |
+ ChangeLog |
89 |
+ README.md |
90 |
+ doc/ALGORITHMS.md |
91 |
+ doc/CPP_Examples.md |
92 |
+ doc/C_Examples.md |
93 |
+) |
94 |
+ |
95 |
+src_configure() { |
96 |
+ local mycmakeargs=( |
97 |
+ -DBUILD_DOC="$(usex doc)" |
98 |
+ -DBUILD_PRIMESIEVE="$(usex executable)" |
99 |
+ -DBUILD_STATIC_LIBS="OFF" |
100 |
+ -DBUILD_TESTS="$(usex test)" |
101 |
+ ) |
102 |
+ |
103 |
+ if use doc; then |
104 |
+ DOCS+=( |
105 |
+ "${BUILD_DIR}/doc/html" |
106 |
+ "${BUILD_DIR}/doc/latex/refman.pdf" |
107 |
+ ) |
108 |
+ fi |
109 |
+ |
110 |
+ cmake_src_configure |
111 |
+} |
112 |
+ |
113 |
+src_compile() { |
114 |
+ cmake_src_compile |
115 |
+ use doc && cmake_build doc |
116 |
+} |