Ticket #27980: Portfile3390

File Portfile3390, 6.4 KB (added by lukas.reichlin@…, 14 years ago)

Portfile for octave-devel 3.3.90

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