Ticket #7979: Portfile.2

File Portfile.2, 1.8 KB (added by ralf@…, 19 years ago)

updated Portfile for math/ntl (ntl-5.4)

Line 
1# $Id: Portfile,v 1.1 2005/10/19 21:17:23 mww Exp $
2
3PortSystem 1.0
4name            ntl
5version         5.4
6categories      math
7maintainers     ralf@fimaluka.org
8description     NTL: A Library for doing Number Theory
9long_description NTL is a high-performance, portable C++ library providing\
10                 data structures and algorithms for arbitrary length\
11                 integers\; for vectors, matrices, and polynomials over the\
12                 integers and over finite fields\; and for arbitrary\
13                 precision floating point arithmetic.
14
15homepage                http://shoup.net/ntl/
16master_sites    ${homepage}
17checksums       md5 1d2a683ecbc12cdf03bf92dbc97c0dd4
18
19depends_build   bin:perl:perl5.8
20
21configure.env   LDFLAGS="-L${prefix}/lib" \
22                CPPFLAGS="-I${prefix}/include"
23
24test.run        no
25
26configure.pre_args      "PREFIX=${prefix} DOCDIR=${prefix}/share/doc"
27configure.args          "NTL_STD_CXX=on"
28
29worksrcdir      ${name}-${version}/src
30
31destroot.destdir "PREFIX=${destroot}${prefix} DOCDIR=${destroot}${prefix}/share/doc"
32
33platform darwin 8 {
34        set fl [open "| gcc --version"]
35        set data [read $fl]
36        if {[regexp "build 4061" $data]} {
37            set gcc-suffix "-3.3"
38        } else {
39            set gcc-suffix ""
40        }
41        close $fl
42
43        build.args-append CC=gcc${gcc-suffix} CPP=cpp${gcc-suffix} CXX=g++${gcc-suffix}
44}
45
46variant gmp {
47        depends_lib-append      port:gmp
48        configure.args-append   "NTL_GMP_LIP=on GMP_PREFIX=${prefix}"
49}
50
51post-destroot {
52        system "cd ${destroot}${prefix}/share/doc && mv NTL tmp && mv tmp ntl"
53        xinstall -m 0644 ${worksrcpath}/../README \
54                         ${destroot}${prefix}/share/doc/${name}
55        xinstall -m 0644 ${worksrcpath}/../doc/copying.txt \
56                         ${destroot}${prefix}/share/doc/${name}/LICENSE
57}