1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 75587 2011-01-31 19:49:27Z michaelld@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name octave-devel |
---|
7 | version 3.4.0 |
---|
8 | conflicts octave |
---|
9 | categories math science |
---|
10 | maintainers michaelld openmaintainer |
---|
11 | platforms darwin |
---|
12 | description a Matlab-like environment for numerical analysis |
---|
13 | long_description 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.gnu.org/software/octave/ |
---|
21 | master_sites ftp://ftp.gnu.org/gnu/octave/ |
---|
22 | distname octave-${version} |
---|
23 | use_bzip2 yes |
---|
24 | |
---|
25 | checksums md5 c8144cee1d37e645d3368a8e8a5f1856 \ |
---|
26 | sha1 936a8fc962abd96e7568fb5909ec2a4d7997a1a8 \ |
---|
27 | rmd160 8448fc8277e19dab8dbc5c0121e673e9198c74ec |
---|
28 | |
---|
29 | depends_build port:bison \ |
---|
30 | port:flex \ |
---|
31 | port:gawk \ |
---|
32 | port:gperf \ |
---|
33 | port:gsed \ |
---|
34 | path:bin/perl:perl5 \ |
---|
35 | port:texinfo |
---|
36 | |
---|
37 | depends_lib port:arpack \ |
---|
38 | port:atlas \ |
---|
39 | port:curl \ |
---|
40 | port:fftw-3 \ |
---|
41 | port:fftw-3-single \ |
---|
42 | port:ftgl \ |
---|
43 | port:ghostscript \ |
---|
44 | port:glpk \ |
---|
45 | port:GraphicsMagick \ |
---|
46 | port:gnuplot \ |
---|
47 | port:hdf5-18 \ |
---|
48 | port:less \ |
---|
49 | port:metis \ |
---|
50 | port:ncurses \ |
---|
51 | port:pcre \ |
---|
52 | port:readline \ |
---|
53 | port:qhull \ |
---|
54 | port:qrupdate \ |
---|
55 | port:SuiteSparse |
---|
56 | |
---|
57 | # allow non-Apple compilers to work with FLTK by removing the -arch |
---|
58 | # flag, which means this port cannot easy compile as universal. |
---|
59 | patchfiles-append patch-configure.diff |
---|
60 | |
---|
61 | universal_variant no |
---|
62 | |
---|
63 | configure.args --without-x \ |
---|
64 | --enable-shared \ |
---|
65 | --enable-dl \ |
---|
66 | --disable-docs \ |
---|
67 | --disable-openmp |
---|
68 | |
---|
69 | # do not build static libraries; just shared |
---|
70 | # --enable-static |
---|
71 | |
---|
72 | ### the following are probably not necessary (except possibly the |
---|
73 | ### 'cholmod' one), but are included for completion. Ordering is the |
---|
74 | ### same as in './configure --help'. |
---|
75 | configure.args-append \ |
---|
76 | --enable-readline \ |
---|
77 | --enable-extra-warning-flags \ |
---|
78 | --with-qhull \ |
---|
79 | --with-z \ |
---|
80 | --with-hdf5 \ |
---|
81 | --with-fftw3 \ |
---|
82 | --with-fftw3f \ |
---|
83 | --with-glpk \ |
---|
84 | --with-curl \ |
---|
85 | --with-blas \ |
---|
86 | --with-lapack \ |
---|
87 | --with-qrupdate \ |
---|
88 | --with-amd \ |
---|
89 | --with-camd \ |
---|
90 | --with-colamd \ |
---|
91 | --with-ccolamd \ |
---|
92 | --with-cholmod="-lcholmod -lmetis" \ |
---|
93 | --with-cxsparse \ |
---|
94 | --with-umfpack \ |
---|
95 | --with-arpack |
---|
96 | |
---|
97 | ### the following are probably not necessary, but are included for |
---|
98 | ### completion. |
---|
99 | # octave uses a number of other ports to create sources from template: |
---|
100 | # perl, gawk, gsed, flex, bison, texinfo. python is not used if perl |
---|
101 | # is available, so clear it out. FLTK doesn't work as of 1.3.x-r7794, |
---|
102 | # so disable it entirely (via "no" here and a configure patch). |
---|
103 | configure.perl ${prefix}/bin/perl |
---|
104 | configure.python ' ' |
---|
105 | configure.awk ${prefix}/bin/gawk |
---|
106 | configure.env-append SED="${prefix}/bin/gsed" \ |
---|
107 | TEXI2DVI="${prefix}/bin/texi2dvi" \ |
---|
108 | TEXI2PDF="${prefix}/bin/texi2pdf" \ |
---|
109 | FLTK_CONFIG=no |
---|
110 | configure.cppflags |
---|
111 | configure.ldflags |
---|
112 | |
---|
113 | test.run yes |
---|
114 | test.target check |
---|
115 | |
---|
116 | variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc45 gcc44 g95 {} |
---|
117 | |
---|
118 | variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc45 gcc43 g95 {} |
---|
119 | |
---|
120 | variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc44 gcc43 g95 {} |
---|
121 | |
---|
122 | variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 { |
---|
123 | depends_build-append port:g95 |
---|
124 | configure.f77 "${prefix}/bin/g95" |
---|
125 | } |
---|
126 | |
---|
127 | # check for default variant |
---|
128 | if { ![variant_isset gcc43] && ![variant_isset gcc44] && \ |
---|
129 | ![variant_isset gcc45] && ![variant_isset g95] } { |
---|
130 | default_variants +gcc44 |
---|
131 | } |
---|
132 | |
---|
133 | # check for just -gcc44 |
---|
134 | if { ![variant_isset gcc43] && ![variant_isset gcc44] && \ |
---|
135 | ![variant_isset gcc45] && ![variant_isset g95] } { |
---|
136 | error "You cannot use the variant -gcc44 alone." |
---|
137 | } |
---|
138 | |
---|
139 | set gcc_version "" |
---|
140 | if {[variant_isset gcc43]} { |
---|
141 | set gcc_version "4.3" |
---|
142 | } elseif {[variant_isset gcc44]} { |
---|
143 | set gcc_version "4.4" |
---|
144 | } elseif {[variant_isset gcc45]} { |
---|
145 | set gcc_version "4.5" |
---|
146 | } |
---|
147 | |
---|
148 | if {${gcc_version} != ""} { |
---|
149 | set gcc_version_join [join [split ${gcc_version} "."] ""] |
---|
150 | configure.ldflags "${prefix}/lib/gcc${gcc_version_join}/libstdc++.6.dylib" |
---|
151 | depends_build-append port:gcc${gcc_version_join} |
---|
152 | configure.compiler macports-gcc-${gcc_version} |
---|
153 | } |
---|
154 | |
---|
155 | variant docs description {Enable creation and installation of documentation} { |
---|
156 | configure.args-replace s|--disable-docs|--enable-docs| |
---|
157 | } |
---|
158 | |
---|
159 | variant x11 description {Enable use of X11} { |
---|
160 | configure.args-replace s|--without-x|--with-x| |
---|
161 | configure.args-append --x-includes=${prefix} |
---|
162 | } |
---|
163 | |
---|
164 | variant debug description {Produce debugging information in compiled code} { |
---|
165 | configure.cflags-delete -O2 |
---|
166 | configure.cxxflags-delete -O2 |
---|
167 | configure.fflags-delete -O2 |
---|
168 | configure.fcflags-delete -O2 |
---|
169 | configure.f90flags-delete -O2 |
---|
170 | configure.objcflags-delete -O2 |
---|
171 | configure.cflags-append -g3 -O0 |
---|
172 | configure.cxxflags-append -g3 -O0 |
---|
173 | configure.fcflags-append -g3 -O0 |
---|
174 | configure.f90flags-append -g3 -O0 |
---|
175 | configure.fflags-append -g3 -O0 |
---|
176 | configure.objcflags-append -g3 -O0 |
---|
177 | } |
---|
178 | |
---|
179 | #variant fltk description {Include FLTK option} { |
---|
180 | # depends_lib-append port:fltk-devel |
---|
181 | # post-patch { |
---|
182 | # # fix use of #include Fl -> FL |
---|
183 | # reinplace "/include/s,Fl/,FL/,g" |
---|
184 | # ${worksrcpath}/src/DLD-FUNCTIONS/__init_fltk__.cc |
---|
185 | # } |
---|
186 | #} |
---|
187 | |
---|
188 | #if {![variant_isset fltk]} { |
---|
189 | # configure.env-append FLTK_CONFIG=no |
---|
190 | #} |
---|
191 | |
---|
192 | livecheck.type regex |
---|
193 | livecheck.url http://www.gnu.org/software/octave/news.html |
---|
194 | livecheck.regex Version (\\d+(\\.\\d+)*) |
---|