Ticket #51457: Portfile

File Portfile, 1.9 KB (added by toy, 8 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6name                primegen
7version             0.97
8categories          math
9platforms           darwin
10maintainers         yandex.com:bstj openmaintainer
11license             public-domain
12
13description         Binary and library to generate prime numbers
14long_description    primegen is a small, fast library to generate prime \
15                    numbers in order. Can generate primes up to \
16                    1000000000000000, although it is not optimized for primes \
17                    past 32 bits. It uses the Sieve of Atkin instead of the \
18                    traditional Sieve of Eratosthenes.
19
20homepage            http://cr.yp.to/primegen.html
21master_sites        http://cr.yp.to/primegen/
22
23checksums           rmd160  6f18fb8819e5589b0d7701f2dd69a2d8be4138b3 \
24                    sha256  54285baf8eed9e421ff2220a2112d38cfb20c1ebef6014ef3f0004c22c95f40d
25
26configure {
27  reinplace "s|gcc|${configure.cc} [get_canonical_archflags cc]|" ${worksrcpath}/conf-cc
28  reinplace "s|gcc|${configure.cc} [get_canonical_archflags ld]|" ${worksrcpath}/conf-ld
29}
30
31build.target        it
32
33destroot {
34  xinstall -m 755 ${worksrcpath}/primegaps ${worksrcpath}/primes ${destroot}${prefix}/bin
35  xinstall -m 644 ${worksrcpath}/primegen.h ${destroot}${prefix}/include
36  xinstall -m 644 ${worksrcpath}/primegen.a ${destroot}${prefix}/lib
37
38  xinstall -m 644 ${worksrcpath}/primegaps.0 ${worksrcpath}/primes.0 ${destroot}${prefix}/share/man/cat1
39  xinstall -m 644 ${worksrcpath}/primegen.0 ${destroot}${prefix}/share/man/cat3
40  xinstall -m 644 ${worksrcpath}/primegaps.1 ${worksrcpath}/primes.1 ${destroot}${prefix}/share/man/man1
41  xinstall -m 644 ${worksrcpath}/primegen.3 ${destroot}${prefix}/share/man/man3
42}
43
44livecheck.type      regex
45livecheck.url       ${homepage}
46livecheck.regex     primegen-(\[0-9.\]+)${extract.suffix}