summaryrefslogtreecommitdiff
path: root/sci-mathematics/primecount
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/primecount')
-rw-r--r--sci-mathematics/primecount/Manifest3
-rw-r--r--sci-mathematics/primecount/files/primecount-7.13-gcc-15-buildfix.patch30
-rw-r--r--sci-mathematics/primecount/primecount-7.13-r1.ebuild55
3 files changed, 88 insertions, 0 deletions
diff --git a/sci-mathematics/primecount/Manifest b/sci-mathematics/primecount/Manifest
index 468b32e191d8..890823d384e3 100644
--- a/sci-mathematics/primecount/Manifest
+++ b/sci-mathematics/primecount/Manifest
@@ -1,3 +1,6 @@
+AUX primecount-7.13-gcc-15-buildfix.patch 1002 BLAKE2B 559087005bc7f476fb82a567337bec6ea100278d8b1f7a469da8789d90e95cafe7ba48ec1fdf8c72710646929d3c675f25874ccec6092116309d2be34fa130eb SHA512 1e4600453335eb861ee95947c0934f5b78fa683bd94a23782ddf137440bbe5fed0e9a16a3908f753c868d0da4435c7b2bb2b74bba8d952ffeb28c95904c840e2
+DIST primecount-7.13.tar.gz 431676 BLAKE2B a02ba71af2b545f2a89e83018c3e9f2ab6ad5e567e5e72e3a0e85ccc132f1bc54b7dcc8b51ccdb1e727f6edcf050a856cee15e4180cc46a54fa8c5fe834d8cd8 SHA512 836c181e586a691708049d3ba04672e1dd4922160e17b3b03737ea55512186d3a529e003af08ff2e78f7bf7349cce0819c98144cfb89bd8208e4bad8124ae17b
DIST primecount-7.6.tar.gz 382074 BLAKE2B f665db8724b32b2f057db96fdd6421d7a996ed4bda7f43cd405e6c05b59abab8672407c41b6fafdd9c68dae3f51b65305112c0724c95ce3fdb33b9dbfaadfbff SHA512 643372d9a011dba8a49f21eabc00068b77a5ef5dc6d12e6b55230b97f14dc9d1d855bb7ad662beda548e4ff1396f1b06d473e2fe4b81e7dbe9926aaadc4da360
+EBUILD primecount-7.13-r1.ebuild 1278 BLAKE2B 5e2656901d21e79053a151b7ef5ebbbdccc008b25d0f8034b02d6ed336ddc4e73af4f159564433015bcbf55a4c9183bbab904aa67de2b47ec69d492a5b713019 SHA512 d1af0d032a3924848a7300f17b331bd383c9dc958b98d8be23eeb1ba9a0e9a2390b6e9367b21a031d5cc117c55834ab87b7466be36540bfda60b2322c252447f
EBUILD primecount-7.6.ebuild 1284 BLAKE2B 899f461eb37ae77f62bdddd5650cf26d89b09c7b5ba043c786c1787adb24bc3ac1aef05c01800372895fea5d4c5303745917a86e29be361261839b8eef19e277 SHA512 299160fa362a1720ed11ae0bfad56e600a44c4323190d394e75b83fcb849e55a735b862fa9c234a8ac6b0319a435c578ea04eadbd44e47a2647b80d95372563e
MISC metadata.xml 674 BLAKE2B 2d8321166afee1e9d0a20723ae6849f17a7ef0d5d474dc3ec0b1650519b197ad5b1360641faa6985a60121501741a137812b8bcf03cd708766278a1b014615f7 SHA512 7a4fa0c1cae4880bdc230065c98ec46dfb5f1b1adae6ffa5eac275f6f04f38ce0c24042e62f5aac6117f9f816890244daec8fb1c920ec4b6a0a124385e5d7e33
diff --git a/sci-mathematics/primecount/files/primecount-7.13-gcc-15-buildfix.patch b/sci-mathematics/primecount/files/primecount-7.13-gcc-15-buildfix.patch
new file mode 100644
index 000000000000..6f483ba401ce
--- /dev/null
+++ b/sci-mathematics/primecount/files/primecount-7.13-gcc-15-buildfix.patch
@@ -0,0 +1,30 @@
+From a4512db281754a487314b64fadf4537f4620396d Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 30 Jul 2024 16:19:25 -0400
+Subject: [PATCH] include/libdivide.h: backport gcc-15 fix
+
+This is commit 572d2408 to upstream libdivide, backported to the copy
+bundled with primecount. The issue is also fixed in primecount but
+won't arrive until v7.14.
+---
+ include/libdivide.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/libdivide.h b/include/libdivide.h
+index 3779ebd..7336efb 100644
+--- a/include/libdivide.h
++++ b/include/libdivide.h
+@@ -2015,8 +2015,8 @@ public:
+ }
+
+ bool operator==(const divider<T, ALGO>& other) const {
+- return div.denom.magic == other.denom.magic &&
+- div.denom.more == other.denom.more;
++ return div.denom.magic == other.div.denom.magic &&
++ div.denom.more == other.div.denom.more;
+ }
+
+ bool operator!=(const divider<T, ALGO>& other) const {
+--
+2.44.2
+
diff --git a/sci-mathematics/primecount/primecount-7.13-r1.ebuild b/sci-mathematics/primecount/primecount-7.13-r1.ebuild
new file mode 100644
index 000000000000..62113042f54e
--- /dev/null
+++ b/sci-mathematics/primecount/primecount-7.13-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2024 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 ~riscv"
+IUSE="+executable openmp test"
+RESTRICT="!test? ( test )"
+
+DEPEND=">=sci-mathematics/primesieve-12.0:="
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-gcc-15-buildfix.patch" )
+
+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)"
+ )
+
+ cmake_src_configure
+}