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