mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Fix issues in code that are causing error in Xcode 12 and caused warnings in previous versions. Namely include missing stdio.h, use int as return type for main and use return instead of exit in main. Closes: https://trac.macports.org/ticket/61870
50 lines
2.0 KiB
Tcl
50 lines
2.0 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
|
|
name primegen
|
|
version 0.97
|
|
categories math
|
|
platforms darwin
|
|
maintainers yandex.com:bstj openmaintainer
|
|
license public-domain
|
|
|
|
description Binary and library to generate prime numbers
|
|
|
|
long_description primegen is a small, fast library to generate prime \
|
|
numbers in order. 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.
|
|
|
|
homepage https://cr.yp.to/primegen.html
|
|
master_sites https://cr.yp.to/primegen/
|
|
|
|
checksums rmd160 6f18fb8819e5589b0d7701f2dd69a2d8be4138b3 \
|
|
sha256 54285baf8eed9e421ff2220a2112d38cfb20c1ebef6014ef3f0004c22c95f40d \
|
|
size 31491
|
|
|
|
configure {
|
|
reinplace "s|gcc|${configure.cc} [get_canonical_archflags cc]|" ${worksrcpath}/conf-cc
|
|
reinplace "s|gcc|${configure.cc} [get_canonical_archflags ld]|" ${worksrcpath}/conf-ld
|
|
}
|
|
|
|
build.target it
|
|
|
|
patchfiles patch-modernise.diff
|
|
|
|
destroot {
|
|
xinstall -m 755 ${worksrcpath}/primegaps ${worksrcpath}/primes ${destroot}${prefix}/bin
|
|
xinstall -m 644 ${worksrcpath}/primegen.h ${destroot}${prefix}/include
|
|
xinstall -m 644 ${worksrcpath}/primegen.a ${destroot}${prefix}/lib
|
|
|
|
xinstall -m 644 -W ${worksrcpath} primegaps.0 primes.0 ${destroot}${prefix}/share/man/cat1
|
|
xinstall -m 644 -W ${worksrcpath} primegen.0 ${destroot}${prefix}/share/man/cat3
|
|
xinstall -m 644 -W ${worksrcpath} primegaps.1 primes.1 ${destroot}${prefix}/share/man/man1
|
|
xinstall -m 644 -W ${worksrcpath} primegen.3 ${destroot}${prefix}/share/man/man3
|
|
}
|
|
|
|
livecheck.type regex
|
|
livecheck.url ${homepage}
|
|
livecheck.regex primegen-(\[0-9.\]+)${extract.suffix}
|