1 | # $Id: Portfile 24531 2007-04-27 17:07:50Z mww@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name octave |
---|
6 | version 2.9.10 |
---|
7 | revision 1 |
---|
8 | categories math science |
---|
9 | maintainers stechert@macports.org |
---|
10 | platforms darwin |
---|
11 | description A Matlab-like environment for numerical analysis |
---|
12 | long_description \ |
---|
13 | Octave provides a convenient command line interface \ |
---|
14 | for solving linear and nonlinear problems numerically, \ |
---|
15 | using a language that is mostly compatible with Matlab. \ |
---|
16 | It is easily extensible and customizable via \ |
---|
17 | user-defined functions or using dynamically loaded \ |
---|
18 | modules written in e.g. C++, C or Fortran. |
---|
19 | |
---|
20 | homepage http://www.octave.org |
---|
21 | master_sites ftp://ftp.octave.org/pub/octave/bleeding-edge/ |
---|
22 | |
---|
23 | use_bzip2 yes |
---|
24 | checksums md5 01b802e32ab3bb18a8f11aed1f6f34c1 |
---|
25 | |
---|
26 | patch.args -p1 |
---|
27 | patchfiles configure.diff __glpk__.cc.diff |
---|
28 | |
---|
29 | depends_build bin:texinfo:texinfo \ |
---|
30 | bin:tex:teTeX |
---|
31 | |
---|
32 | depends_lib port:readline \ |
---|
33 | port:hdf5 \ |
---|
34 | port:fftw-3 \ |
---|
35 | port:metis \ |
---|
36 | port:SuiteSparse \ |
---|
37 | port:pcre \ |
---|
38 | port:glpk \ |
---|
39 | port:curl \ |
---|
40 | port:gnuplot |
---|
41 | |
---|
42 | configure.env CFLAGS="-O2" \ |
---|
43 | CXXFLAGS="-O2" \ |
---|
44 | LDFLAGS="-L${prefix}/lib" \ |
---|
45 | CPPFLAGS="-I${prefix}/include" |
---|
46 | |
---|
47 | configure.args --enable-shared |
---|
48 | |
---|
49 | # post-patch { |
---|
50 | # # Avoid using heimdal's broken fnmatch.h |
---|
51 | # reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/liboctave/glob-match.cc |
---|
52 | # } |
---|
53 | |
---|
54 | # pre-destroot { |
---|
55 | # file copy ${worksrcpath}/src/defaults.h ${worksrcpath}/src/defaults.h.tmp |
---|
56 | # file copy ${worksrcpath}/src/oct-conf.h ${worksrcpath}/src/oct-conf.h.tmp |
---|
57 | # } |
---|
58 | |
---|
59 | destroot.destdir prefix=${destroot}${prefix} |
---|
60 | |
---|
61 | # post-destroot { |
---|
62 | # file rename -force ${worksrcpath}/src/defaults.h.tmp ${destroot}${prefix}/include/${name}-${version}/${name}/defaults.h |
---|
63 | # file rename -force ${worksrcpath}/src/oct-conf.h.tmp ${destroot}${prefix}/include/${name}-${version}/${name}/oct-conf.h |
---|
64 | # } |
---|
65 | |
---|
66 | platform powerpc { |
---|
67 | if {![variant_isset g95]} { |
---|
68 | depends_lib-append port:gcc40 |
---|
69 | configure.env-append F77="gfortran-dp-4.0" |
---|
70 | } |
---|
71 | } |
---|
72 | |
---|
73 | platform i386 { |
---|
74 | if {![variant_isset g95]} { |
---|
75 | depends_lib-append port:gcc42 |
---|
76 | configure.env-append F77="gfortran-mp-4.2" |
---|
77 | configure.env-append CC="gcc-mp-4.2" |
---|
78 | configure.env-append CXX="g++-mp-4.2" |
---|
79 | } |
---|
80 | } |
---|
81 | |
---|
82 | default_variants +test |
---|
83 | variant test { |
---|
84 | depends_build-append bin:runtest:dejagnu |
---|
85 | test.run yes |
---|
86 | test.target check |
---|
87 | } |
---|
88 | |
---|
89 | variant ptex { |
---|
90 | depends_build-delete bin:tex:teTeX |
---|
91 | depends_build-append bin:tex:pTeX |
---|
92 | } |
---|
93 | |
---|
94 | variant g95 { |
---|
95 | depends_lib-append port:g95 |
---|
96 | configure.env-append F77="${prefix}/bin/g95" FFLAGS=-O2 MACOSX_DEPLOYMENT_TARGET=10.4 |
---|
97 | } |
---|
98 | |
---|