Ticket #29919: Portfile

File Portfile, 5.9 KB (added by lukas.reichlin@…, 13 years ago)

The entire new Portfile

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 78774 2011-05-21 20:24:05Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name                octave-devel
7version             3.4.2
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        gnu:octave
22dist_subdir         octave
23distname            octave-${version}
24use_bzip2           yes
25
26checksums           md5     31c744ab4555a2bf04d5e644b93f9b51 \
27                    sha1    12cac29ef7d1ab8374980e1e2fd14637b2f15ba5 \
28                    rmd160  ad2222ad0b3e0f1dd6db1ff8ca93c0666b95e3a0
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                    port:fltk-devel
58
59# allow non-Apple compilers to work with FLTK by removing the -arch
60# flag, which means this port cannot easy compile as universal.
61# patchfiles-append patch-configure.diff
62
63universal_variant   no
64
65configure.args      --without-x \
66                    --disable-docs
67
68# do not build static libraries; just shared
69#                    --enable-static
70
71### the following are probably not necessary (except possibly the
72### 'cholmod' one), but are included for completion.  Ordering is the
73### same as in './configure --help'.
74configure.args-append \
75                    --with-cholmod="-lcholmod -lmetis"
76
77### the following are probably not necessary, but are included for
78### completion.
79# octave uses a number of other ports to create sources from template:
80# perl, gawk, gsed, flex, bison, texinfo.  python is not used if perl
81# is available, so clear it out.  FLTK doesn't work as of 1.3.x-r7794,
82# so disable it entirely (via "no" here and a configure patch).
83#configure.perl      ${prefix}/bin/perl
84#configure.python    ' '
85#configure.awk       ${prefix}/bin/gawk
86#configure.env-append FLTK_CONFIG=no
87#configure.cppflags
88#configure.ldflags
89
90test.run            yes
91test.target         check
92
93variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc45 gcc44 g95 {}
94
95variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc45 gcc43 g95 {}
96
97variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc44 gcc43 g95 {}
98
99variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 {
100    depends_build-append    port:g95
101    configure.f77           "${prefix}/bin/g95"
102}
103
104# check for default variant
105if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
106         ![variant_isset gcc45] && ![variant_isset g95] } {
107#    default_variants +gcc44
108    default_variants +gcc45
109}
110
111# check for just -gcc44
112if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
113         ![variant_isset gcc45] && ![variant_isset g95] } {
114    error "You cannot use the variant -gcc44 alone."
115}
116
117set gcc_version ""
118if {[variant_isset gcc43]} {
119    set gcc_version "4.3"
120} elseif {[variant_isset gcc44]} {
121    set gcc_version "4.4"
122} elseif {[variant_isset gcc45]} {
123    set gcc_version "4.5"
124}
125
126if {${gcc_version} != ""} {
127    set gcc_version_join [join [split ${gcc_version} "."] ""]
128    configure.ldflags    "${prefix}/lib/gcc${gcc_version_join}/libstdc++.6.dylib"
129    depends_build-append port:gcc${gcc_version_join}
130    configure.compiler   macports-gcc-${gcc_version}
131}
132
133variant docs description {Enable creation and installation of documentation} {
134    configure.args-replace s|--disable-docs|--enable-docs|
135}
136
137variant x11 description {Enable use of X11} {
138    configure.args-replace s|--without-x|--with-x|
139    configure.args-append --x-includes=${prefix}
140}
141
142#variant debug description {Produce debugging information in compiled code} {
143#    configure.cflags-delete    -O2
144#    configure.cxxflags-delete  -O2
145#    configure.fflags-delete    -O2
146#    configure.fcflags-delete   -O2
147#    configure.f90flags-delete  -O2
148#    configure.objcflags-delete -O2
149#    configure.cflags-append    -g3 -O0
150#    configure.cxxflags-append  -g3 -O0
151#    configure.fcflags-append   -g3 -O0
152#    configure.f90flags-append  -g3 -O0
153#    configure.fflags-append    -g3 -O0
154#    configure.objcflags-append -g3 -O0
155#}
156
157#variant fltk description {Include FLTK option} {
158#    depends_lib-append port:fltk-devel
159#    post-patch {
160#        # fix use of #include Fl -> FL
161#        reinplace "/include/s,Fl/,FL/,g"
162#            ${worksrcpath}/src/DLD-FUNCTIONS/__init_fltk__.cc
163#    }
164#}
165
166#if {![variant_isset fltk]} {
167#    configure.env-append FLTK_CONFIG=no
168#}
169
170livecheck.type      regex
171livecheck.url       http://www.gnu.org/software/octave/news.html
172livecheck.regex     Version (\\d+(\\.\\d+)*)