/[gentoo-x86]/sci-libs/primegen/primegen-0.97-r1.ebuild
Gentoo

Contents of /sci-libs/primegen/primegen-0.97-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Aug 3 22:30:40 2012 UTC (20 months, 2 weeks ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +8 -8 lines
keyword amd64-linux x86-linux

(Portage version: 2.2.01.20796-prefix/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/primegen/primegen-0.97-r1.ebuild,v 1.4 2011/12/21 08:23:22 phajdan.jr Exp $
4
5 EAPI=4
6 inherit eutils flag-o-matic toolchain-funcs
7
8 DESCRIPTION="Small, fast library to generate primes in order"
9 HOMEPAGE="http://cr.yp.to/primegen.html"
10 SRC_URI="http://cr.yp.to/primegen/${P}.tar.gz"
11
12 LICENSE="public-domain"
13 SLOT="0"
14 KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
15 IUSE=""
16
17 DEPEND=""
18 RDEPEND=""
19
20 src_prepare() {
21 epatch "${FILESDIR}/${P}-man.patch"
22 epatch "${FILESDIR}/${P}-missing-headers.patch"
23 find . -type f -exec \
24 sed -i -e 's:\(primegen.a\):lib\1:' {} \;
25 mkdir usr
26 }
27
28 src_configure() {
29 # Fixes bug #161015
30 append-flags -fsigned-char
31 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
32 echo "${S}/usr" > conf-home
33 echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
34 }
35
36 src_test() {
37 [[ $(./primes 1 100000000 | md5sum ) == "4e2b0027288a27e9c99699364877c9db "* ]] || die "test failed"
38 }
39
40 src_install() {
41 dobin primegaps primes primespeed
42 doman primegaps.1 primes.1 primespeed.1 primegen.3
43 dolib.a libprimegen.a
44 # include the 2 typedefs to avoid collision (bug #248327)
45 sed -i \
46 -e "s/#include \"uint32.h\"/$(grep typedef uint32.h)/" \
47 -e "s/#include \"uint64.h\"/$(grep typedef uint64.h)/" \
48 primegen.h || die
49 insinto /usr/include
50 doins primegen.h
51 dodoc BLURB CHANGES README TODO
52 }

  ViewVC Help
Powered by ViewVC 1.1.20