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 82296 2011-08-12 11:20:23Z takanori@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name octave-devel |
---|
7 | version 3.4.3 |
---|
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 gnu:octave |
---|
22 | dist_subdir octave |
---|
23 | distname octave-${version} |
---|
24 | use_bzip2 yes |
---|
25 | |
---|
26 | checksums md5 185b08f4e4a7b646d76e4d33b77fa87e \ |
---|
27 | sha1 fe622c28a38f8730c59e46211bc7b18e7f51a679 \ |
---|
28 | rmd160 d6f43fca9097b40f163c140db853d8ac1383ab39 |
---|
29 | |
---|
30 | depends_build port:bison \ |
---|
31 | port:flex \ |
---|
32 | port:gawk \ |
---|
33 | port:gperf \ |
---|
34 | port:grep \ |
---|
35 | port:gsed \ |
---|
36 | path:bin/perl:perl5 \ |
---|
37 | port:texinfo |
---|
38 | |
---|
39 | depends_lib port:arpack \ |
---|
40 | port:atlas \ |
---|
41 | port:curl \ |
---|
42 | port:fftw-3 \ |
---|
43 | port:fftw-3-single \ |
---|
44 | port:ftgl \ |
---|
45 | port:ghostscript \ |
---|
46 | port:glpk \ |
---|
47 | port:GraphicsMagick \ |
---|
48 | port:gnuplot \ |
---|
49 | port:hdf5-18 \ |
---|
50 | port:less \ |
---|
51 | port:metis \ |
---|
52 | port:ncurses \ |
---|
53 | port:pcre \ |
---|
54 | port:readline \ |
---|
55 | port:qhull \ |
---|
56 | port:qrupdate \ |
---|
57 | port:SuiteSparse |
---|
58 | |
---|
59 | # allow non-Apple compilers to work with FLTK by removing the -arch |
---|
60 | # flag, which means this port cannot easily compile as universal. |
---|
61 | patchfiles-append patch-configure.diff |
---|
62 | |
---|
63 | universal_variant no |
---|
64 | |
---|
65 | configure.args --disable-dependency-tracking \ |
---|
66 | --without-x \ |
---|
67 | --disable-docs \ |
---|
68 | --with-cholmod="-lcholmod -lmetis" \ |
---|
69 | --without-framework-carbon |
---|
70 | |
---|
71 | # octave uses a number of other ports to create sources from template: |
---|
72 | # perl, gawk, gsed, flex, bison, texinfo. Make sure these are the |
---|
73 | # MacPorts' versions. Python is not used if perl is available, so |
---|
74 | # clear it out. grep is checked for in 'configure', but not used |
---|
75 | # except inside that script; include it here for completion. |
---|
76 | configure.perl ${prefix}/bin/perl |
---|
77 | configure.python ' ' |
---|
78 | configure.awk ${prefix}/bin/gawk |
---|
79 | configure.env-append GREP="${prefix}/bin/grep" \ |
---|
80 | FLTK_CONFIG=no \ |
---|
81 | SED="${prefix}/bin/gsed" \ |
---|
82 | TEXI2DVI="${prefix}/bin/texi2dvi" \ |
---|
83 | TEXI2PDF="${prefix}/bin/texi2pdf" |
---|
84 | configure.cppflags |
---|
85 | configure.ldflags |
---|
86 | |
---|
87 | test.run yes |
---|
88 | test.target check |
---|
89 | |
---|
90 | variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc46 gcc45 gcc44 g95 {} |
---|
91 | |
---|
92 | variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc46 gcc45 gcc43 g95 {} |
---|
93 | |
---|
94 | variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc46 gcc44 gcc43 g95 {} |
---|
95 | |
---|
96 | variant gcc46 description {build with the macports gcc45 toolchain} conflicts gcc45 gcc44 gcc43 g95 {} |
---|
97 | |
---|
98 | variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 gcc46 { |
---|
99 | depends_build-append port:g95 |
---|
100 | configure.f77 "${prefix}/bin/g95" |
---|
101 | } |
---|
102 | |
---|
103 | # check for GCC / G95 variants. The default here must match the |
---|
104 | # default found in the 'arpack' and 'atlas' ports. |
---|
105 | |
---|
106 | # check for setting the default variant (gcc44) |
---|
107 | if { ![variant_isset gcc43] && ![variant_isset gcc44] && \ |
---|
108 | ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset g95] } { |
---|
109 | default_variants +gcc44 |
---|
110 | } |
---|
111 | |
---|
112 | # check if the user disabled just the default variant: -gcc44 |
---|
113 | if { ![variant_isset gcc43] && ![variant_isset gcc44] && \ |
---|
114 | ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset g95] } { |
---|
115 | error "You cannot use the variant -gcc44 alone." |
---|
116 | } |
---|
117 | |
---|
118 | set gcc_version "" |
---|
119 | if {[variant_isset gcc43]} { |
---|
120 | set gcc_version "4.3" |
---|
121 | } elseif {[variant_isset gcc44]} { |
---|
122 | set gcc_version "4.4" |
---|
123 | } elseif {[variant_isset gcc45]} { |
---|
124 | set gcc_version "4.5" |
---|
125 | } elseif {[variant_isset gcc46]} { |
---|
126 | set gcc_version "4.6" |
---|
127 | } |
---|
128 | |
---|
129 | if {${gcc_version} != ""} { |
---|
130 | set gcc_version_join [join [split ${gcc_version} "."] ""] |
---|
131 | configure.ldflags "${prefix}/lib/gcc${gcc_version_join}/libstdc++.6.dylib" |
---|
132 | depends_build-append port:gcc${gcc_version_join} |
---|
133 | configure.compiler macports-gcc-${gcc_version} |
---|
134 | } |
---|
135 | |
---|
136 | variant docs description {Enable creation and installation of documentation} { |
---|
137 | configure.args-replace s|--disable-docs|--enable-docs| |
---|
138 | } |
---|
139 | |
---|
140 | variant x11 description {Enable use of X11} { |
---|
141 | configure.args-replace s|--without-x|--with-x| |
---|
142 | configure.args-append --x-includes=${prefix} |
---|
143 | } |
---|
144 | |
---|
145 | variant debug description {Produce debugging information in compiled code} { |
---|
146 | configure.cflags-delete -O2 |
---|
147 | configure.cxxflags-delete -O2 |
---|
148 | configure.fflags-delete -O2 |
---|
149 | configure.fcflags-delete -O2 |
---|
150 | configure.f90flags-delete -O2 |
---|
151 | configure.objcflags-delete -O2 |
---|
152 | configure.cflags-append -g3 -O0 |
---|
153 | configure.cxxflags-append -g3 -O0 |
---|
154 | configure.fcflags-append -g3 -O0 |
---|
155 | configure.f90flags-append -g3 -O0 |
---|
156 | configure.fflags-append -g3 -O0 |
---|
157 | configure.objcflags-append -g3 -O0 |
---|
158 | } |
---|
159 | |
---|
160 | # FLTK does work as of 1.3.x-r8635, so allow it as an option |
---|
161 | variant fltk description {Include FLTK for graphical front-end} { |
---|
162 | depends_lib-append port:fltk-devel |
---|
163 | configure.env-delete FLTK_CONFIG=no |
---|
164 | } |
---|
165 | |
---|
166 | livecheck.type regex |
---|
167 | livecheck.url http://www.gnu.org/software/octave/news.html |
---|
168 | livecheck.regex Version (\\d+(\\.\\d+)*) |
---|