Ticket #32703: Portfile

File Portfile, 6.8 KB (added by lukas.reichlin@…, 12 years ago)

octave36 3.5.91

Line 
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 88087 2011-12-18 15:31:05Z michaelld@macports.org $
3
4PortSystem 1.0
5
6name                octave36
7version             3.5.91
8revision            1
9conflicts           octave
10categories          math science
11maintainers         michaelld openmaintainer
12platforms           darwin
13description         a Matlab-like environment for numerical analysis
14long_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
21homepage            http://www.gnu.org/software/octave/
22# master_sites        gnu:octave
23master_sites        http://alpha.gnu.org/gnu/octave/
24dist_subdir         octave
25distname            octave-${version}
26# use_bzip2           yes
27
28checksums           md5     8a8aa118b5037ea66918fc42217ae030 \
29                    sha1    e1859e0688c98e37b64553a12c5e9b9c563b23cd \
30                    rmd160  2f88afb52c72aa1ff7c1e6eec0927f35dd1a1e38
31
32depends_build       port:bison \
33                    port:flex \
34                    port:gawk \
35                    port:gperf \
36                    port:grep \
37                    port:gsed \
38                    path:bin/perl:perl5 \
39                    port:texinfo
40
41depends_lib         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 us to disable checking for FLTK
60# via the environment variable "FLTK_CONFIG"
61patchfiles-append   patch-configure.diff
62
63universal_variant   no
64
65# do not use CLANG (yet)
66if {${configure.compiler} == "clang"} {
67    configure.compiler llvm-gcc-4.2
68}
69
70configure.args      --disable-dependency-tracking \
71                    --without-x \
72                    --disable-docs \
73                    --with-cholmod="-lcholmod -lmetis"
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.
82configure.perl      ${prefix}/bin/perl
83configure.python    ' '
84configure.awk       ${prefix}/bin/gawk
85configure.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"
90configure.cppflags
91configure.ldflags
92
93test.run            yes
94test.target         check
95
96platform 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
102variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc47 gcc46 gcc45 gcc44 g95 {}
103
104variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc47 gcc46 gcc45 gcc43 g95 {}
105
106variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc47 gcc46 gcc44 gcc43 g95 {}
107
108variant gcc46 description {build with the macports gcc46 toolchain} conflicts gcc47 gcc45 gcc44 gcc43 g95 {}
109
110variant gcc47 description {build with the macports gcc47 toolchain} conflicts gcc46 gcc45 gcc44 gcc43 g95 {}
111
112variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 {
113    depends_build-append    port:g95
114    configure.f77           "${prefix}/bin/g95"
115}
116
117variant atlas description {use BLAS from ATLAS} conflicts accelerate {
118    depends_lib-append port:atlas
119}
120
121variant accelerate description {use BLAS from Apple's Accelerate.framework} conflicts atlas {
122    depends_lib-append      port:dotwrp
123    configure.args-append   --with-blas="-ldotwrp -Wl,-framework -Wl,Accelerate"
124    configure.args-append   --with-lapack="-Wl,-framework -Wl,Accelerate"
125}
126
127if {[variant_isset g95]} {
128    default_variants +accelerate
129} elseif {![variant_isset accelerate]} {
130    default_variants +atlas
131}
132
133# check for GCC / G95 variants.  The default here must match the
134# default found in the 'atlas' port (but, this is not checked for).
135
136# check for setting the default variant (gcc44)
137if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
138         ![variant_isset gcc45] && ![variant_isset gcc46] && \
139         ![variant_isset gcc47] && ![variant_isset g95] } {
140    default_variants +gcc44
141}
142
143# check if the user disabled just the default variant: -gcc44
144if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
145         ![variant_isset gcc45] && ![variant_isset gcc46] && \
146         ![variant_isset gcc47] && ![variant_isset g95] } {
147    error "You cannot use the variant -gcc44 alone."
148}
149
150set gcc_version ""
151if {[variant_isset gcc43]} {
152    set gcc_version "4.3"
153} elseif {[variant_isset gcc44]} {
154    set gcc_version "4.4"
155} elseif {[variant_isset gcc45]} {
156    set gcc_version "4.5"
157} elseif {[variant_isset gcc46]} {
158    set gcc_version "4.6"
159} elseif {[variant_isset gcc47]} {
160    set gcc_version "4.7"
161}
162
163if {${gcc_version} != ""} {
164    set gcc_version_join [join [split ${gcc_version} "."] ""]
165    configure.ldflags    "${prefix}/lib/gcc${gcc_version_join}/libstdc++.6.dylib"
166    depends_build-append port:gcc${gcc_version_join}
167    configure.compiler   macports-gcc-${gcc_version}
168}
169
170variant docs description {Enable creation and installation of documentation} {
171    depends_run-append port:texlive-basic
172    configure.args-replace s|--disable-docs|--enable-docs|
173}
174
175variant x11 description {Enable use of X11} {
176    configure.args-replace s|--without-x|--with-x|
177    configure.args-append --x-includes=${prefix}
178}
179
180variant fltk description {Include FLTK for graphical front-end} {
181    depends_lib-append port:fltk-devel
182    depends_run-append  port:epstool \
183                        port:transfig \
184                        port:pstoedit
185    configure.env-delete FLTK_CONFIG=no
186}
187
188livecheck.type      regex
189livecheck.url       http://www.gnu.org/software/octave/news.html
190livecheck.regex     Version (\\d+(\\.\\d+)*)