Ticket #7979: Portfile

File Portfile, 1.7 KB (added by ralf@…, 18 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        }
39
40        build.args-append CC=gcc${gcc-suffix} CPP=cpp${gcc-suffix} CXX=g++${gcc-suffix}
41}
42
43variant gmp {
44        depends_lib-append      port:gmp
45        configure.args-append   "NTL_GMP_LIP=on GMP_PREFIX=${prefix}"
46}
47
48post-destroot {
49        system "cd ${destroot}${prefix}/share/doc && mv NTL tmp && mv tmp ntl"
50        xinstall -m 0644 ${worksrcpath}/../README \
51                         ${destroot}${prefix}/share/doc/${name}
52        xinstall -m 0644 ${worksrcpath}/../doc/copying.txt \
53                         ${destroot}${prefix}/share/doc/${name}/LICENSE
54}