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 92837 2012-05-09 00:51:48Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name octave-devel |
---|
7 | version 3.6.2 |
---|
8 | revision 3 |
---|
9 | conflicts octave |
---|
10 | categories math science |
---|
11 | maintainers michaelld openmaintainer |
---|
12 | platforms darwin |
---|
13 | description a Matlab-like environment for numerical analysis |
---|
14 | long_description Octave provides a convenient command line interface \ |
---|
15 | for solving linear and nonlinear problems numerically, \ |
---|
16 | using a language that is mostly compatible with Matlab. \ |
---|
17 | It is easily extensible and customizable via \ |
---|
18 | user-defined functions or using dynamically loaded \ |
---|
19 | modules written in e.g. C++, C or Fortran. |
---|
20 | |
---|
21 | homepage http://www.gnu.org/software/octave/ |
---|
22 | master_sites gnu:octave |
---|
23 | dist_subdir octave |
---|
24 | distname octave-${version} |
---|
25 | use_bzip2 yes |
---|
26 | |
---|
27 | checksums md5 9a0ecca8e40749ef5c884b1a0265f038 \ |
---|
28 | sha1 145fef0122268086727a60e1c33e29d56fd546d7 \ |
---|
29 | rmd160 1bf26b238d2bba461c5902d091088533c733439b |
---|
30 | |
---|
31 | depends_build port:bison \ |
---|
32 | port:flex \ |
---|
33 | port:gawk \ |
---|
34 | port:gperf \ |
---|
35 | port:grep \ |
---|
36 | port:gsed \ |
---|
37 | path:bin/perl:perl5 \ |
---|
38 | port:texinfo |
---|
39 | |
---|
40 | depends_lib port:curl \ |
---|
41 | port:fftw-3 \ |
---|
42 | port:fftw-3-single \ |
---|
43 | port:ftgl \ |
---|
44 | port:ghostscript \ |
---|
45 | port:glpk \ |
---|
46 | port:GraphicsMagick \ |
---|
47 | port:gnuplot \ |
---|
48 | port:hdf5-18 \ |
---|
49 | port:less \ |
---|
50 | port:metis \ |
---|
51 | port:ncurses \ |
---|
52 | port:pcre \ |
---|
53 | port:readline \ |
---|
54 | port:qhull \ |
---|
55 | port:qrupdate \ |
---|
56 | port:SuiteSparse |
---|
57 | |
---|
58 | # allow us to disable checking for FLTK |
---|
59 | # via the environment variable "FLTK_CONFIG" |
---|
60 | patchfiles-append patch-configure.diff |
---|
61 | |
---|
62 | universal_variant no |
---|
63 | |
---|
64 | # do not use CLANG (yet) |
---|
65 | if {${configure.compiler} == "clang"} { |
---|
66 | configure.compiler llvm-gcc-4.2 |
---|
67 | } |
---|
68 | |
---|
69 | configure.args --disable-dependency-tracking \ |
---|
70 | --without-x \ |
---|
71 | --disable-docs \ |
---|
72 | --with-cholmod="-lcholmod -lmetis" \ |
---|
73 | --with-umfpack="-lumfpack -lSuiteSparse" |
---|
74 | |
---|
75 | # --without-framework-carbon |
---|
76 | |
---|
77 | # octave uses a number of other ports to create sources from template: |
---|
78 | # perl, gawk, gsed, flex, bison, texinfo. Make sure these are the |
---|
79 | # MacPorts' versions. Python is not used if perl is available, so |
---|
80 | # clear it out. grep is checked for in 'configure', but not used |
---|
81 | # except inside that script; include it here for completion. |
---|
82 | configure.perl ${prefix}/bin/perl |
---|
83 | configure.python ' ' |
---|
84 | configure.awk ${prefix}/bin/gawk |
---|
85 | configure.env-append GREP="${prefix}/bin/grep" \ |
---|
86 | FLTK_CONFIG=no \ |
---|
87 | SED="${prefix}/bin/gsed" \ |
---|
88 | TEXI2DVI="${prefix}/bin/texi2dvi" \ |
---|
89 | TEXI2PDF="${prefix}/bin/texi2pdf" |
---|
90 | configure.cppflags |
---|
91 | configure.ldflags |
---|
92 | |
---|
93 | test.run yes |
---|
94 | test.target check |
---|
95 | |
---|
96 | platform darwin 11 { |
---|
97 | # 10.7 requires an extra patch; this patch will break the build on |
---|
98 | # 10.6 and prior, so apply it only under 10.7. |
---|
99 | patchfiles-append patch-src-display.cc.diff |
---|
100 | } |
---|
101 | |
---|
102 | platform darwin 12 { |
---|
103 | # In 10.8 patch is required as above, also |
---|
104 | # the LANG environment variable needs to |
---|
105 | # be set to "C" otherwise /usr/bin/sed |
---|
106 | # fails with an error, if you installed gsed |
---|
107 | # with default name this should have no effect. |
---|
108 | |
---|
109 | patchfiles-append patch-src-display.cc.diff |
---|
110 | build.args-append LANG="C" |
---|
111 | } |
---|
112 | |
---|
113 | |
---|
114 | variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc47 gcc46 gcc45 gcc44 g95 {} |
---|
115 | |
---|
116 | variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc47 gcc46 gcc45 gcc43 g95 {} |
---|
117 | |
---|
118 | variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc47 gcc46 gcc44 gcc43 g95 {} |
---|
119 | |
---|
120 | variant gcc46 description {build with the macports gcc45 toolchain} conflicts gcc47 gcc45 gcc44 gcc43 g95 {} |
---|
121 | |
---|
122 | variant gcc47 description {build with the macports gcc47 toolchain} conflicts gcc45 gcc46 gcc44 gcc43 g95 {} |
---|
123 | |
---|
124 | variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 gcc46 { |
---|
125 | depends_build-append port:g95 |
---|
126 | configure.f77 "${prefix}/bin/g95" |
---|
127 | } |
---|
128 | |
---|
129 | variant atlas description {use BLAS from ATLAS} conflicts accelerate { |
---|
130 | depends_lib-append port:atlas |
---|
131 | } |
---|
132 | |
---|
133 | variant accelerate description {use BLAS from Apple's Accelerate.framework} conflicts atlas { |
---|
134 | depends_lib-append port:dotwrp |
---|
135 | configure.args-append --with-blas="-ldotwrp -framework Accelerate" |
---|
136 | configure.args-append --with-lapack="-framework Accelerate" |
---|
137 | } |
---|
138 | |
---|
139 | if {[variant_isset g95]} { |
---|
140 | default_variants +accelerate |
---|
141 | } elseif {![variant_isset accelerate]} { |
---|
142 | default_variants +atlas |
---|
143 | } |
---|
144 | |
---|
145 | # check for GCC / G95 variants. The default here must match the |
---|
146 | # default found in the 'atlas' port (but, this is not checked for). |
---|
147 | |
---|
148 | # check for setting the default variant (gcc44) |
---|
149 | if { ![variant_isset gcc43] && ![variant_isset gcc44] && \ |
---|
150 | ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset g95] } { |
---|
151 | default_variants +gcc45 |
---|
152 | } |
---|
153 | |
---|
154 | # check if the user disabled just the default variant: -gcc44 |
---|
155 | if { ![variant_isset gcc43] && ![variant_isset gcc44] && \ |
---|
156 | ![variant_isset gcc45] && ![variant_isset gcc46] && \ |
---|
157 | ![variant_isset gcc47] && ![variant_isset g95] } { |
---|
158 | pre-fetch { |
---|
159 | error "You must select one of the compiler variants." |
---|
160 | } |
---|
161 | } |
---|
162 | |
---|
163 | set gcc_version "" |
---|
164 | if {[variant_isset gcc43]} { |
---|
165 | set gcc_version "4.3" |
---|
166 | } elseif {[variant_isset gcc44]} { |
---|
167 | set gcc_version "4.4" |
---|
168 | } elseif {[variant_isset gcc45]} { |
---|
169 | set gcc_version "4.5" |
---|
170 | } elseif {[variant_isset gcc46]} { |
---|
171 | set gcc_version "4.6" |
---|
172 | } elseif {[variant_isset gcc47]} { |
---|
173 | set gcc_version "4.7" |
---|
174 | } |
---|
175 | |
---|
176 | if {${gcc_version} != ""} { |
---|
177 | set gcc_version_join [join [split ${gcc_version} "."] ""] |
---|
178 | configure.ldflags "${prefix}/lib/gcc${gcc_version_join}/libstdc++.6.dylib" |
---|
179 | depends_build-append port:gcc${gcc_version_join} |
---|
180 | configure.compiler macports-gcc-${gcc_version} |
---|
181 | } |
---|
182 | |
---|
183 | variant docs description {Enable creation and installation of documentation} { |
---|
184 | depends_run-append port:texlive-basic |
---|
185 | configure.args-replace s|--disable-docs|--enable-docs| |
---|
186 | } |
---|
187 | |
---|
188 | variant x11 description {Enable use of X11} { |
---|
189 | configure.args-replace s|--without-x|--with-x| |
---|
190 | configure.args-append --x-includes=${prefix} |
---|
191 | } |
---|
192 | |
---|
193 | variant fltk description {Include FLTK for graphical front-end} { |
---|
194 | depends_lib-append port:fltk-devel |
---|
195 | depends_run-append port:epstool \ |
---|
196 | port:transfig \ |
---|
197 | port:pstoedit |
---|
198 | configure.env-delete FLTK_CONFIG=no |
---|
199 | } |
---|
200 | |
---|
201 | livecheck.type regex |
---|
202 | livecheck.url http://www.gnu.org/software/octave/news.html |
---|
203 | livecheck.regex Version (\\d+(\\.\\d+)*) |
---|