Ticket #27980: Portfile

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

Modified Portfile from octave-devel @3.3.52

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 71264 2010-09-07 11:27:56Z michaelld@macports.org $
3
4PortSystem 1.0
5
6name                octave-devel
7version             3.3.55
8revision            0
9conflicts           octave
10categories          math science
11maintainers         nomaintainer
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     10506a43e80d7e46921b5a2520f5f15a \
27                    sha1    7a8fd21d2466e672d4f983c9e7f5c82ae0271006 \
28                    rmd160  2dc968bc96f27c12801ed9e64140f53937cc4aca
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
58if {${build_arch} == "i386" || ${build_arch} == "ppc"} {
59    # FLTK is not 64-bit yet; use it only for 32-bit installs
60    depends_lib-append port:fltk
61
62    # allow non-Apple compilers to work with FLTK by removing the
63    # -arch flag, which means this port cannot easy compile as
64    # universal.
65    patchfiles-append patch-configure.diff
66}
67
68platform darwin 10 {
69    # for 10.6 only
70    patchfiles-append patch-lo-specfun.cc.diff
71}
72
73universal_variant   no
74
75post-patch {
76    # make sure to include the METIS library when using CHOLMOD
77    reinplace "s|-lcholmod|-lcholmod -lmetis|g" ${worksrcpath}/configure
78
79    # remove 'dirfd' from libgnu's dirent.in.h;
80    # it causes an error, and isn't used in this version of Octave.
81    reinplace "54,78d" ${worksrcpath}/libgnu/dirent.in.h
82}
83
84configure.args      --without-x \
85                    --enable-shared \
86                    --enable-dl \
87                    --disable-docs \
88                    --disable-openmp
89
90# do not build static libraries; just shared
91#                    --enable-static
92
93### the following are probably not necessary, but are included for
94### completion.  Ordering is the same as in './configure --help'.
95configure.args-append \
96                    --enable-readline \
97                    --with-qhull \
98                    --with-z \
99                    --with-hdf5 \
100                    --with-fftw3 \
101                    --with-fftw3f \
102                    --with-glpk \
103                    --with-curl \
104                    --with-blas \
105                    --with-lapack \
106                    --with-qrupdate \
107                    --with-amd \
108                    --with-camd \
109                    --with-colamd \
110                    --with-ccolamd \
111                    --with-cholmod \
112                    --with-cxsparse \
113                    --with-umfpack \
114                    --with-arpack
115
116### the following are probably not necessary, but are included for
117### completion.
118# octave uses a number of other ports to create sources from template:
119# perl, gawk, gsed, flex, bison, texinfo.  python is not used if perl
120# is available, so clear it out.
121configure.perl      ${prefix}/bin/perl
122configure.python    ' '
123configure.awk       ${prefix}/bin/gawk
124configure.env-append SED="${prefix}/bin/gsed" \
125                     TEXI2DVI="${prefix}/bin/texi2dvi" \
126                     TEXI2PDF="${prefix}/bin/texi2pdf"
127
128### parallel build is supposed to work now
129# use_parallel_build  no
130
131test.run            yes
132test.target         check
133
134variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc45 gcc44 g95 {
135    depends_build-append    port:gcc43
136    configure.compiler      macports-gcc-4.3
137}
138
139variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc45 gcc43 g95 {
140    depends_build-append    port:gcc44
141    configure.compiler      macports-gcc-4.4
142}
143
144variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc44 gcc43 g95 {
145    depends_build-append    port:gcc45
146    configure.compiler      macports-gcc-4.5
147}
148
149variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 {
150    depends_build-append    port:g95
151    configure.f77           "${prefix}/bin/g95"
152}
153
154if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
155         ![variant_isset gcc45] && ![variant_isset g95] } {
156    default_variants +gcc44
157}
158
159variant docs description {Enable creation and installation of documentation} {
160    configure.args-replace s|--disable-docs|--enable-docs|
161}
162
163variant x11 description {Enable use of X11} {
164    configure.args-replace s|--without-x|--with-x|
165    configure.args-append --x-includes=${prefix}
166}
167
168variant debug description {Produce debugging information in compiled code} {
169    configure.cflags-delete    -O2
170    configure.cxxflags-delete  -O2
171    configure.fflags-delete    -O2
172    configure.fcflags-delete   -O2
173    configure.f90flags-delete  -O2
174    configure.objcflags-delete -O2
175    configure.cflags-append    -g3 -O0
176    configure.cxxflags-append  -g3 -O0
177    configure.fcflags-append   -g3 -O0
178    configure.f90flags-append  -g3 -O0
179    configure.fflags-append    -g3 -O0
180    configure.objcflags-append -g3 -O0
181}
182
183livecheck.type      regex
184livecheck.url       http://www.gnu.org/software/octave/news.html
185livecheck.regex     Version (\\d+(\\.\\d+)*)