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