From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 331261388BF for ; Fri, 15 Jan 2016 20:06:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C800F21C030; Fri, 15 Jan 2016 20:06:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 65D5021C030 for ; Fri, 15 Jan 2016 20:06:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77EAA33E5E4 for ; Fri, 15 Jan 2016 20:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A81B9A91 for ; Fri, 15 Jan 2016 20:06:13 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1452888350.ed17eafae70d603a08e343986b6dc6ad7b963c04.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/primegen/, sci-libs/primegen/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/primegen/files/primegen-0.97-man.patch sci-libs/primegen/files/primegen-0.97-missing-headers.patch sci-libs/primegen/primegen-0.97-r2.ebuild X-VCS-Directories: sci-libs/primegen/files/ sci-libs/primegen/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: ed17eafae70d603a08e343986b6dc6ad7b963c04 X-VCS-Branch: master Date: Fri, 15 Jan 2016 20:06:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9dca5f21-a1f8-4b81-a4dd-7f765bdc2e8c X-Archives-Hash: ea758d9ec376cf1f156bfd07d6d0cdb2 commit: ed17eafae70d603a08e343986b6dc6ad7b963c04 Author: David Seifert gentoo org> AuthorDate: Fri Jan 15 20:05:31 2016 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Jan 15 20:05:50 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed17eafa sci-libs/primegen: Fix man page to remove 'struct' keyword Gentoo-Bug: 562570 In addition, modernize to EAPI=6 and amend patches accordingly. Package-Manager: portage-2.2.26 sci-libs/primegen/files/primegen-0.97-man.patch | 19 ++++++-- .../files/primegen-0.97-missing-headers.patch | 20 ++++---- sci-libs/primegen/primegen-0.97-r2.ebuild | 55 ++++++++++++++++++++++ 3 files changed, 80 insertions(+), 14 deletions(-) diff --git a/sci-libs/primegen/files/primegen-0.97-man.patch b/sci-libs/primegen/files/primegen-0.97-man.patch index 025b88c..069409f 100644 --- a/sci-libs/primegen/files/primegen-0.97-man.patch +++ b/sci-libs/primegen/files/primegen-0.97-man.patch @@ -1,7 +1,18 @@ -diff -Naurp primegen-0.97-orig/primegen.3 primegen-0.97/primegen.3 ---- primegen-0.97-orig/primegen.3 2008-07-23 22:27:52.000000000 +0200 -+++ primegen-0.97/primegen.3 2008-07-23 22:26:52.000000000 +0200 -@@ -21,6 +21,9 @@ uint64 \fIbound\fR; +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. diff --git a/sci-libs/primegen/files/primegen-0.97-missing-headers.patch b/sci-libs/primegen/files/primegen-0.97-missing-headers.patch index 4f919d9..51f1aaa 100644 --- a/sci-libs/primegen/files/primegen-0.97-missing-headers.patch +++ b/sci-libs/primegen/files/primegen-0.97-missing-headers.patch @@ -1,5 +1,5 @@ ---- eratspeed.c.orig 2009-03-27 09:16:52.000000000 -0300 -+++ eratspeed.c 2009-03-27 09:18:29.000000000 -0300 +--- 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) @@ -9,32 +9,32 @@ #include "timing.h" #include "uint32.h" ---- primegaps.c.orig 2009-03-27 09:17:07.000000000 -0300 -+++ primegaps.c 2009-03-27 09:17:19.000000000 -0300 +--- 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 +#include #include "primegen.h" primegen pg; ---- primes.c.orig 2009-03-27 09:19:08.000000000 -0300 -+++ primes.c 2009-03-27 09:19:14.000000000 -0300 +--- 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 +#include #include "primegen.h" #include "fs64.h" ---- primespeed.c.orig 2009-03-27 09:17:41.000000000 -0300 -+++ primespeed.c 2009-03-27 09:18:54.000000000 -0300 +--- 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 +#include #include "timing.h" #include "primegen.h" #include "primegen_impl.h" ---- error.h.orig 2009-09-11 19:40:53.000000000 +0100 -+++ error.h 2009-09-11 19:41:02.000000000 +0100 +--- 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 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 0000000..3698de3 --- /dev/null +++ b/sci-libs/primegen/primegen-0.97-r2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 +}