From fc1125ea4b3373e327ba0e157daa1d7e8aee15f9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 12 Sep 2023 10:40:56 +0100 Subject: gentoo auto-resync : 12:09:2023 - 10:40:55 --- sci-libs/primegen/Manifest | 2 + .../files/primegen-0.97-main-rettype.patch | 13 +++++ sci-libs/primegen/primegen-0.97-r3.ebuild | 58 ++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 sci-libs/primegen/files/primegen-0.97-main-rettype.patch create mode 100644 sci-libs/primegen/primegen-0.97-r3.ebuild (limited to 'sci-libs/primegen') diff --git a/sci-libs/primegen/Manifest b/sci-libs/primegen/Manifest index ec2e511989b1..051a9a8aba72 100644 --- a/sci-libs/primegen/Manifest +++ b/sci-libs/primegen/Manifest @@ -1,6 +1,8 @@ +AUX primegen-0.97-main-rettype.patch 209 BLAKE2B 13f1268a64d5a549e140dc2aecc3a818259639b69053f64123bf792899ba991e0774cebc0014b6f507fcb12e44e70af7a17319a249cbd35150c81ab52485a491 SHA512 71fbd287b1cf8e4c0b554b66679d05ed60149b6bc92af266768431741f6c4f040cce81f42f05e8650ab1ee8a09cb4d11a620318bdfdca3d1132ffd3b997a4b00 AUX primegen-0.97-man.patch 714 BLAKE2B 3fc121138c95e14b0c418dce18d96843ec337a8fe3a9b4be9f962f928352a4e20a179cefa0fe6b424af956fa3f8470ede8d8b1bb5d6e42517b71214d135651ac SHA512 246569896e1e6fa7295ed8319445d869c54f36e5ce4c3c0037f94eafb7d0cc5efb4ee4395fb0c5d237f11e4eac1212a1228fc797660df65fa1b217cdaf9594a7 AUX primegen-0.97-missing-headers.patch 777 BLAKE2B 613d33c795e70e66cb198e64dd77dfda439ef44db50994cb9888ac9d2bee10705ac14b59ed5454f606ea7195fb4a4f4552b96695d252f2873eea1da8fa1be63c SHA512 561dad1e31bb229367955e719040ae77b50b56f37a4232815d31173468faa9cd31257774005e1f986e340b72db16666cfd4557bf88b8af0914d271955728d8f6 AUX primegen-0.97-respect-ar-ranlib.patch 315 BLAKE2B fc6bdb8292a2d15f409b762828293ed1efb03706d8994090b50353fbc271a7f5ddd132361f0dc2d0f698d43c30ba3ef403f84f5707da2740c3e387f633d059ea SHA512 c9b68905b6073711fe8e13f8684108cbc06986da2f266355dba2a0f4bc7c6c8b6e7d4cdabf6776549481cac346e8bf223fcc95f3e6d7031f20f163203f543de5 DIST primegen-0.97.tar.gz 31491 BLAKE2B d9e48075a38456da30a23aa95dcf98143f5ad59e8ec56469ea06b6f33b8b2376261fd254fdb9c40ca55f76fae58b89c82329194dd99be3a6bbb356416f294337 SHA512 d6d8de4d9866dbbec20afd4d4b563e3383528138cd3ec849f706211045d735c28bbf7aa6931b8aa54163664e87c2e7ad028c68f407040ac88efce7856bc8b6f4 EBUILD primegen-0.97-r2.ebuild 1446 BLAKE2B 36b52f422b643af74f88622e77bd691ee8a6483e835251bd3fd8a94320ad94fd46ebf3d742ae92139dad57f4ef5d88d6acd35db26ae0fe3ecff0dc12ab242726 SHA512 3916596b8c9c81ea7c486e7f4767ca321f97c7724b4157b2a62717087ed5fa91efcea0be870d317eb59788b5b3518976cb3c315fa50654f721821d6234a67648 +EBUILD primegen-0.97-r3.ebuild 1494 BLAKE2B 089f02ab700ad1085056e58d0cb9a56c57c809810246bd9eca5649efcc6c43a31f99e7eb1e9703db635167bb132c3e3784c7171a2aef319133c6b3f744b2e34c SHA512 67bbc9be40ed30b4105d620bc89d8803ccf0b754ecc59d4d91114660f26443e406b07b414c593f0db03ba0d8f58db92a52fa1555af3960ee4c802914b051bc75 MISC metadata.xml 723 BLAKE2B 8fc21f26c55b232c88771380451cfb0b5aa179587d57f49c56c9dd3b33a65f89527b8f306e434713487c455fc8b2d452f9071ed4ff2fb8d38d4f31e886132d4a SHA512 e2dc892db1fc31d86eec69b2d2d81907dff143f343929971380e784d778a1be659d160b41dd7eeb0e4f5e41f6f55e3544cf50abf664f15f56b9cebe8c2bf7c65 diff --git a/sci-libs/primegen/files/primegen-0.97-main-rettype.patch b/sci-libs/primegen/files/primegen-0.97-main-rettype.patch new file mode 100644 index 000000000000..660dc193ab2b --- /dev/null +++ b/sci-libs/primegen/files/primegen-0.97-main-rettype.patch @@ -0,0 +1,13 @@ +Adding return type to main function +Bug: https://bugs.gentoo.org/898288 +--- a/eratspeed.c ++++ b/eratspeed.c +@@ -402,7 +402,7 @@ void countit() + timing t; + timing told; + +-main() ++int main() + { + int L = 1; + diff --git a/sci-libs/primegen/primegen-0.97-r3.ebuild b/sci-libs/primegen/primegen-0.97-r3.ebuild new file mode 100644 index 000000000000..5ee9dfed93fb --- /dev/null +++ b/sci-libs/primegen/primegen-0.97-r3.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Small, fast library to generate primes in order" +HOMEPAGE="https://cr.yp.to/primegen.html" +SRC_URI="https://cr.yp.to/primegen/${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" + +PATCHES=( + "${FILESDIR}"/${P}-man.patch + "${FILESDIR}"/${P}-missing-headers.patch + "${FILESDIR}"/${P}-respect-ar-ranlib.patch + "${FILESDIR}"/${PN}-0.97-main-rettype.patch +) + +src_prepare() { + default + + local file + while IFS="" read -d $'\0' -r file; do + sed -i -e 's:\(primegen.a\):lib\1:' "${file}" || die + done < <(find . -type f -print0) + mkdir usr || die +} + +src_configure() { + # Fixes bug #161015 + append-flags -fsigned-char + echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS}" > conf-cc || die + echo "${S}/usr" > conf-home || die + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die + tc-export AR RANLIB +} + +src_test() { + [[ $(./primes 1 100000000 | md5sum ) == "4e2b0027288a27e9c99699364877c9db "* ]] || die "test failed" +} + +src_install() { + dobin primegaps primes primespeed + doman primegaps.1 primes.1 primespeed.1 primegen.3 + dolib.a libprimegen.a + # include the 2 typedefs to avoid collision (bug #248327) + sed -i \ + -e "s/#include \"uint32.h\"/$(grep typedef uint32.h)/" \ + -e "s/#include \"uint64.h\"/$(grep typedef uint64.h)/" \ + primegen.h || die + + doheader primegen.h + dodoc BLURB CHANGES README TODO +} -- cgit v1.2.3