Ticket #13332: math-octave-Portfile

File math-octave-Portfile, 3.1 KB (added by alakazam@…, 17 years ago)

Portfile for octave-3.0.0

Line 
1# $Id: Portfile 33572 2008-01-30 14:21:35Z nox@macports.org $
2
3PortSystem       1.0
4name             octave
5version          3.0.0
6categories       math science
7maintainers      stechert@macports.org
8platforms        darwin
9description      a Matlab-like environment for numerical analysis
10long_description Octave provides a convenient command line interface \
11                 for solving linear and nonlinear problems numerically, \
12                 using a language that is mostly compatible with Matlab. \
13                 It is easily extensible and customizable via \
14                 user-defined functions or using dynamically loaded \
15                 modules written in e.g. C++, C or Fortran.
16
17homepage         http://www.octave.org
18master_sites     ftp://ftp.octave.org/pub/octave/bleeding-edge/
19
20use_bzip2        yes
21checksums        md5 d5512acdf60ac04398ff258cbc37f3c4 \
22                 sha1 874b3d40db5d882e37614ffa6cdb9fdd71e173f8 \
23                 rmd160 02fc58b63210ec99cfcad9dc2cee2ad1b6d11326
24
25patch.args -p1
26patchfiles patch-configure \
27           patch-configure-2 \
28           patch-dynamic-ld-cc
29
30depends_build bin:texinfo:texinfo \
31              bin:tex:teTeX \
32              port:gawk \
33              port:gsed
34
35depends_lib port:readline \
36            port:hdf5 \
37            port:fftw-3 \
38            port:metis \
39            port:SuiteSparse \
40            port:pcre \
41            port:glpk \
42            port:gnuplot
43
44configure.args --enable-shared \
45               --enable-dl \
46               --disable-static \
47               --with-hdf5 \
48               --with-fftw \
49               --without-mpi \
50               --with-blas="-framework Accelerate"
51
52configure.env-append AWK="${prefix}/bin/gawk" \
53                     SED="${prefix}/bin/gsed"
54build.env-append     AWK="${prefix}/bin/gawk" \
55                     SED="${prefix}/bin/gsed"
56
57# post-patch {
58#     # Avoid using heimdal's broken fnmatch.h
59#     reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/liboctave/glob-match.cc
60# }
61
62pre-destroot {
63    file copy ${worksrcpath}/src/defaults.h ${worksrcpath}/src/defaults.h.tmp
64    file copy ${worksrcpath}/src/oct-conf.h ${worksrcpath}/src/oct-conf.h.tmp
65}
66destroot.destdir prefix=${destroot}${prefix}
67post-destroot {
68    file rename -force ${worksrcpath}/src/defaults.h.tmp ${destroot}${prefix}/include/${name}-${version}/${name}/defaults.h
69    file rename -force ${worksrcpath}/src/oct-conf.h.tmp ${destroot}${prefix}/include/${name}-${version}/${name}/oct-conf.h
70}
71
72if {![variant_isset g95]} {
73    depends_lib-append port:gcc42
74    configure.compiler macports-gcc-4.2
75}
76
77default_variants +test
78variant test    {
79    depends_build-append bin:runtest:dejagnu
80    test.run             yes
81    test.target          check
82}
83
84variant ptex {
85    depends_build-delete bin:tex:teTeX
86    depends_build-append bin:tex:pTeX
87}
88
89variant g95 {
90    depends_lib-append   port:g95
91    configure.f77        "${prefix}/bin/g95"
92    configure.env-append FFLAGS=-O2 MACOSX_DEPLOYMENT_TARGET=10.4
93}
94
95livecheck.check regex
96livecheck.url   http://www.gnu.org/software/octave/news.html
97livecheck.regex Version (\\d+(\\.\\d+)*) dis now available