Ticket #28154: Portfile

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

octave-devel 3.3.91_0

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 75513 2011-01-27 20:03:50Z michaelld@macports.org $
3
4PortSystem 1.0
5
6name                octave-devel
7version             3.3.91
8revision            0
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/
22master_sites        ftp://alpha.gnu.org/gnu/octave
23distname            octave-${version}
24use_bzip2           yes
25
26checksums           md5     cdde45192b40b0a30ab8d20b93943269 \
27                    sha1    da75ce3240fed8ccaa82e2dd45cb9f8bc8ada172 \
28                    rmd160  5bdc374a3ddd10bd0e4404db41d5a5fa2c68db04
29
30depends_build       port:bison \
31                    port:flex \
32                    port:gawk \
33                    port:gperf \
34                    port:gsed \
35                    path:bin/perl:perl5 \
36                    port:texinfo
37
38depends_lib         port:arpack \
39                    port:atlas \
40                    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 non-Apple compilers to work with FLTK by removing the -arch
59# flag, which means this port cannot easy compile as universal.
60patchfiles-append patch-configure.diff
61
62universal_variant   no
63
64configure.args      --without-x \
65                    --enable-shared \
66                    --enable-dl \
67                    --disable-docs \
68                    --disable-openmp
69
70# do not build static libraries; just shared
71#                    --enable-static
72
73### the following are probably not necessary (except possibly the
74### 'cholmod' one), but are included for completion.  Ordering is the
75### same as in './configure --help'.
76configure.args-append \
77                    --enable-readline \
78                    --enable-extra-warning-flags \
79                    --with-qhull \
80                    --with-z \
81                    --with-hdf5 \
82                    --with-fftw3 \
83                    --with-fftw3f \
84                    --with-glpk \
85                    --with-curl \
86                    --with-blas \
87                    --with-lapack \
88                    --with-qrupdate \
89                    --with-amd \
90                    --with-camd \
91                    --with-colamd \
92                    --with-ccolamd \
93                    --with-cholmod="-lcholmod -lmetis" \
94                    --with-cxsparse \
95                    --with-umfpack \
96                    --with-arpack
97
98### the following are probably not necessary, but are included for
99### completion.
100# octave uses a number of other ports to create sources from template:
101# perl, gawk, gsed, flex, bison, texinfo.  python is not used if perl
102# is available, so clear it out.  FLTK doesn't work as of 1.3.x-r7794,
103# so disable it entirely (via "no" here and a configure patch).
104configure.perl      ${prefix}/bin/perl
105configure.python    ' '
106configure.awk       ${prefix}/bin/gawk
107configure.env-append SED="${prefix}/bin/gsed" \
108                     TEXI2DVI="${prefix}/bin/texi2dvi" \
109                     TEXI2PDF="${prefix}/bin/texi2pdf" \
110                     FLTK_CONFIG=no
111configure.cppflags
112configure.ldflags
113
114test.run            yes
115test.target         check
116
117variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc45 gcc44 g95 {}
118
119variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc45 gcc43 g95 {}
120
121variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc44 gcc43 g95 {}
122
123variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 {
124    depends_build-append    port:g95
125    configure.f77           "${prefix}/bin/g95"
126}
127
128# check for default variant
129if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
130         ![variant_isset gcc45] && ![variant_isset g95] } {
131    default_variants +gcc44
132}
133
134# check for just -gcc44
135if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
136         ![variant_isset gcc45] && ![variant_isset g95] } {
137    error "You cannot use the variant -gcc44 alone."
138}
139
140set gcc_version ""
141if {[variant_isset gcc43]} {
142    set gcc_version "4.3"
143} elseif {[variant_isset gcc44]} {
144    set gcc_version "4.4"
145} elseif {[variant_isset gcc45]} {
146    set gcc_version "4.5"
147}
148
149if {${gcc_version} != ""} {
150    set gcc_version_join [join [split ${gcc_version} "."] ""]
151    configure.ldflags    "${prefix}/lib/gcc${gcc_version_join}/libstdc++.6.dylib"
152    depends_build-append port:gcc${gcc_version_join}
153    configure.compiler   macports-gcc-${gcc_version}
154}
155
156variant docs description {Enable creation and installation of documentation} {
157    configure.args-replace s|--disable-docs|--enable-docs|
158}
159
160variant x11 description {Enable use of X11} {
161    configure.args-replace s|--without-x|--with-x|
162    configure.args-append --x-includes=${prefix}
163}
164
165variant debug description {Produce debugging information in compiled code} {
166    configure.cflags-delete    -O2
167    configure.cxxflags-delete  -O2
168    configure.fflags-delete    -O2
169    configure.fcflags-delete   -O2
170    configure.f90flags-delete  -O2
171    configure.objcflags-delete -O2
172    configure.cflags-append    -g3 -O0
173    configure.cxxflags-append  -g3 -O0
174    configure.fcflags-append   -g3 -O0
175    configure.f90flags-append  -g3 -O0
176    configure.fflags-append    -g3 -O0
177    configure.objcflags-append -g3 -O0
178}
179
180#variant fltk description {Include FLTK option} {
181#    depends_lib-append port:fltk-devel
182#    post-patch {
183#        # fix use of #include Fl -> FL
184#        reinplace "/include/s,Fl/,FL/,g"
185#            ${worksrcpath}/src/DLD-FUNCTIONS/__init_fltk__.cc
186#    }
187#}
188
189#if {![variant_isset fltk]} {
190#    configure.env-append FLTK_CONFIG=no
191#}
192
193livecheck.type      regex
194livecheck.url       http://www.gnu.org/software/octave/news.html
195livecheck.regex     Version (\\d+(\\.\\d+)*)