1 | # $Id: Portfile,v 1.1 2005/10/19 21:17:23 mww Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name ntl |
---|
5 | version 5.4 |
---|
6 | categories math |
---|
7 | maintainers ralf@fimaluka.org |
---|
8 | description NTL: A Library for doing Number Theory |
---|
9 | long_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 | |
---|
15 | homepage http://shoup.net/ntl/ |
---|
16 | master_sites ${homepage} |
---|
17 | checksums md5 1d2a683ecbc12cdf03bf92dbc97c0dd4 |
---|
18 | |
---|
19 | depends_build bin:perl:perl5.8 |
---|
20 | |
---|
21 | configure.env LDFLAGS="-L${prefix}/lib" \ |
---|
22 | CPPFLAGS="-I${prefix}/include" |
---|
23 | |
---|
24 | test.run no |
---|
25 | |
---|
26 | configure.pre_args "PREFIX=${prefix} DOCDIR=${prefix}/share/doc" |
---|
27 | configure.args "NTL_STD_CXX=on" |
---|
28 | |
---|
29 | worksrcdir ${name}-${version}/src |
---|
30 | |
---|
31 | destroot.destdir "PREFIX=${destroot}${prefix} DOCDIR=${destroot}${prefix}/share/doc" |
---|
32 | |
---|
33 | platform 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 | |
---|
43 | variant gmp { |
---|
44 | depends_lib-append port:gmp |
---|
45 | configure.args-append "NTL_GMP_LIP=on GMP_PREFIX=${prefix}" |
---|
46 | } |
---|
47 | |
---|
48 | post-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 | } |
---|