summaryrefslogtreecommitdiff
path: root/sci-libs/primegen
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/primegen
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/primegen')
-rw-r--r--sci-libs/primegen/Manifest8
-rw-r--r--sci-libs/primegen/files/primegen-0.97-man.patch24
-rw-r--r--sci-libs/primegen/files/primegen-0.97-missing-headers.patch46
-rw-r--r--sci-libs/primegen/metadata.xml18
-rw-r--r--sci-libs/primegen/primegen-0.97-r1.ebuild51
-rw-r--r--sci-libs/primegen/primegen-0.97-r2.ebuild54
6 files changed, 201 insertions, 0 deletions
diff --git a/sci-libs/primegen/Manifest b/sci-libs/primegen/Manifest
new file mode 100644
index 000000000000..dcbb75900ccf
--- /dev/null
+++ b/sci-libs/primegen/Manifest
@@ -0,0 +1,8 @@
+AUX primegen-0.97-man.patch 738 SHA256 6246982b1e64c5c5c2fd0e0eb82e66d313277b6c1e7d844b9739934e9173818b SHA512 42b3748fe77eea9af4ffd531c9dabe28a6be49e05afbf705a47f7111c936fb7cb31517df475c04dc4a3157be9b7890bff64e5ae73a49d8c3517ab756d954f0e8 WHIRLPOOL a3cc5b3238ac508610cc5c42fb3b628783c64bd4d0f1f435d968dcc2b493ee26527c8177e821ae24fd6119ec09913534bcb3ccc33d1a024c49544a44960cf97c
+AUX primegen-0.97-missing-headers.patch 1282 SHA256 05df7c4d2d96c2adcd7fddd5ccda5e9b2a20da0bc00611f407938eacebf82e47 SHA512 4933f7fd107f8272ae863f4b5ccf976ea29a0f1a7eab7f93160ed8dc188fef3520e2cea62513eb802e51db46190d0199c4e440b770abfed4d39b0dc6cef582c1 WHIRLPOOL 9916f55ea93146c588ed687a03179774cfb336c1372faa4b259781c62f39a83bcca91dcff879f82dfd73c8379ce5d208c8c88d1a829ecc3a2315c498e900a53d
+DIST primegen-0.97.tar.gz 31491 SHA256 54285baf8eed9e421ff2220a2112d38cfb20c1ebef6014ef3f0004c22c95f40d SHA512 d6d8de4d9866dbbec20afd4d4b563e3383528138cd3ec849f706211045d735c28bbf7aa6931b8aa54163664e87c2e7ad028c68f407040ac88efce7856bc8b6f4 WHIRLPOOL aa5d65806af4059b3b6a50edf304a7588a5db8dc3a853452abf5348aadaed294d4d84652352bf24921ecebb305a036bf65d8f5ffb80b8fa922e75cf672382258
+EBUILD primegen-0.97-r1.ebuild 1315 SHA256 75599f9e10f8187123cffa21a670feae03a763ec13ee6d52185181dbb0878b8e SHA512 d0f4237601b08f9431af575143b8ff5a7ac471b9f4d40be3f90a32c860c8047f972a47a0f32548c69a252df76ca5f2ac8452bfd506ac9e83391e7d83fe34c4f7 WHIRLPOOL 8da9afaa9a9ab8c6bdd15cfeb8badce97e389a904f2965e6b9927c678322769f2ff4c3d131db75774a2cb5a308dac51779e713360d8cddb8d47819058b917d30
+EBUILD primegen-0.97-r2.ebuild 1385 SHA256 1893cf7a6da030c3de96fcda142db7bd83cb6af365358e04931cdb6b8e73113c SHA512 99222f8bdc801d758c6d98cd3eff24c2bf37dc6bb843b1a63fdf220d949b7c15a6401b3b0ecc85c56a7a69c2115323f676ff00c6304d4b9dcc4bbcd02bc2d3ea WHIRLPOOL 26fbb2a2e6115848a2f174b6ce04bc5b2f2807cfa3c16590cbc74f15617fed630172ea8a98b4ce29c27619e9661ae47f653c9d9bb6d04dbe1bffe89851aec381
+MISC ChangeLog 2860 SHA256 d025ed590a77cf2a8557e67b17c3884374b8c7e1061061c46537c87424935a19 SHA512 835a85c4a77ae0da983525a8784e2a34ed1fc8d6de12ff6664638b46b60197fe0fdcaaa335c15f460c7e6c3e821f95829f2d3967b61243ee13fae974757a6c8c WHIRLPOOL 81bfdea65e8cdcb0142bd80fd1ff42951065b63c29f49ac2d3f9435275d65eb64546d7a2d55ef251c272e68ba6db05682e634c0fb2f74c1d6d1715e9a0b5b483
+MISC ChangeLog-2015 2609 SHA256 5f23d96d2d8bbc78da73a049b73ed45522922be82b7700f95513e5090ede663a SHA512 af0ab3e1f472fb701c0b715b56ffead36fe8cbbbaf19d9df7422ef696da9dcae096b8a7536ed9817959e704336e5b032199588d12a821dc81a030121b83909d9 WHIRLPOOL 5b3edc6b9f3a0c70e10576f6af44a0e71e2030c297e021fe9706a30959fea6091e2d4482ea0c921f288443a3a56993f076ba0ba0c0f7b7ea03198123c51acd3d
+MISC metadata.xml 716 SHA256 ddea8d2b181230005d62a0793524c9e1cad4094a3c078ba903993660e42d9a43 SHA512 bd1aeec27107646716ede1bcefdd4b804cb7b30fac8d41251d824bcba0453352e7000cc62fcac6f3bde2d547dfda224baf49a92227c15a7d2f2577579f7589fd WHIRLPOOL 3ce62d574ac8e0b6dd4bc8604ecfa28d79057359f159929291901d943286acdc65155cf7019edaa1685b466ef948829ee5ebcbb58577fe0ca6d35f782b81c959
diff --git a/sci-libs/primegen/files/primegen-0.97-man.patch b/sci-libs/primegen/files/primegen-0.97-man.patch
new file mode 100644
index 000000000000..069409f1df76
--- /dev/null
+++ b/sci-libs/primegen/files/primegen-0.97-man.patch
@@ -0,0 +1,24 @@
+Fix incorrect man page and include mention of the possibility
+of linking to a static libary only.
+https://bugs.gentoo.org/show_bug.cgi?id=562570
+
+--- primegen-0.97/primegen.3
++++ primegen-0.97/primegen.3
+@@ -14,13 +14,16 @@
+ .br
+ void \fBprimegen_skipto\fP(&\fIpg\fR,\fIbound\fR);
+
+-struct primegen \fIpg\fR;
++primegen \fIpg\fR;
+ .br
+ uint64 \fIbound\fR;
+ .SH DESCRIPTION
+ The primegen library generates prime numbers in order:
+ 2, 3, 5, 7, etc.
+ It can generate primes as large as 10^15.
++Only a static version of this library is provided, so instead of
++linking your program with -lprimegen you will have to pass the
++full path to the library (e.g. /usr/lib/primegen.a) to the compiler.
+
+ The simplest way to use primegen
+ is to call
diff --git a/sci-libs/primegen/files/primegen-0.97-missing-headers.patch b/sci-libs/primegen/files/primegen-0.97-missing-headers.patch
new file mode 100644
index 000000000000..51f1aaac3823
--- /dev/null
+++ b/sci-libs/primegen/files/primegen-0.97-missing-headers.patch
@@ -0,0 +1,46 @@
+--- primegen-0.97/eratspeed.c.orig 2009-03-27 09:16:52.000000000 -0300
++++ primegen-0.97/eratspeed.c 2009-03-27 09:18:29.000000000 -0300
+@@ -1,6 +1,8 @@
+ #define B32 1001
+ #define B (B32 * 32)
+
++#include <stdio.h>
++#include <stdlib.h>
+ #include "timing.h"
+ #include "uint32.h"
+
+--- primegen-0.97/primegaps.c.orig 2009-03-27 09:17:07.000000000 -0300
++++ primegen-0.97/primegaps.c 2009-03-27 09:17:19.000000000 -0300
+@@ -1,4 +1,5 @@
+ #include <math.h>
++#include <stdio.h>
+ #include "primegen.h"
+
+ primegen pg;
+--- primegen-0.97/primes.c.orig 2009-03-27 09:19:08.000000000 -0300
++++ primegen-0.97/primes.c 2009-03-27 09:19:14.000000000 -0300
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "primegen.h"
+ #include "fs64.h"
+
+--- primegen-0.97/primespeed.c.orig 2009-03-27 09:17:41.000000000 -0300
++++ primegen-0.97/primespeed.c 2009-03-27 09:18:54.000000000 -0300
+@@ -1,3 +1,5 @@
++#include <stdio.h>
++#include <stdlib.h>
+ #include "timing.h"
+ #include "primegen.h"
+ #include "primegen_impl.h"
+--- primegen-0.97/error.h.orig 2009-09-11 19:40:53.000000000 +0100
++++ primegen-0.97/error.h 2009-09-11 19:41:02.000000000 +0100
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/sci-libs/primegen/metadata.xml b/sci-libs/primegen/metadata.xml
new file mode 100644
index 000000000000..b705e6b87a99
--- /dev/null
+++ b/sci-libs/primegen/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+ primegen is a small, fast library to generate prime numbers in
+ order. It generates the 50847534 primes up to 1000000000 in just 8
+ seconds on a Pentium II-350; it prints them in decimal in just 35
+ seconds.
+
+ primegen can generate primes up to 1000000000000000, although it
+ is not optimized for primes past 32 bits. It uses the Sieve of Atkin
+ instead of the traditional Sieve of Eratosthenes.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-libs/primegen/primegen-0.97-r1.ebuild b/sci-libs/primegen/primegen-0.97-r1.ebuild
new file mode 100644
index 000000000000..4dc121e56cd5
--- /dev/null
+++ b/sci-libs/primegen/primegen-0.97-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Small, fast library to generate primes in order"
+HOMEPAGE="http://cr.yp.to/primegen.html"
+SRC_URI="http://cr.yp.to/primegen/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-man.patch"
+ epatch "${FILESDIR}/${P}-missing-headers.patch"
+ find . -type f -exec \
+ sed -i -e 's:\(primegen.a\):lib\1:' {} \;
+ mkdir usr
+}
+
+src_configure() {
+ # Fixes bug #161015
+ append-flags -fsigned-char
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "${S}/usr" > conf-home
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+}
+
+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
+ insinto /usr/include
+ doins primegen.h
+ dodoc BLURB CHANGES README TODO
+}
diff --git a/sci-libs/primegen/primegen-0.97-r2.ebuild b/sci-libs/primegen/primegen-0.97-r2.ebuild
new file mode 100644
index 000000000000..a71a29ef2560
--- /dev/null
+++ b/sci-libs/primegen/primegen-0.97-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Small, fast library to generate primes in order"
+HOMEPAGE="http://cr.yp.to/primegen.html"
+SRC_URI="http://cr.yp.to/primegen/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}/${P}-man.patch"
+ "${FILESDIR}/${P}-missing-headers.patch"
+)
+
+src_prepare() {
+ default
+ 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}" > conf-cc || die
+ echo "${S}/usr" > conf-home || die
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
+}
+
+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
+ insinto /usr/include
+ doins primegen.h
+ dodoc BLURB CHANGES README TODO
+}