Ticket #40457: Portfile-neuron.1

File Portfile-neuron.1, 3.4 KB (added by neurodroid (Christoph Schmidt-Hieber), 11 years ago)

Portfile for NEURON

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6name                neuron
7version             7.3
8categories          science
9platforms           darwin
10license             GPL-2
11maintainers         gmx.de:christsc
12description         Empirically-based simulations of neurons and networks of neurons
13long_description    NEURON is a simulation environment for developing and exercising models of neurons and networks of neurons.
14homepage            http://www.neuron.yale.edu
15master_sites        http://www.stimfit.org/neuron/
16patch_sites         http://www.stimfit.org/neuron/
17distname            nrn-${version}
18distfiles           ${distname}.rel-884${extract.suffix}
19patchfiles          patch-destdir
20checksums           ${distname}.rel-884${extract.suffix} \
21                        rmd160  1c1bdbc11aadfcdf863ead73fda3ffa645aff8fb \
22                        sha256  a1120bdac87d4f2552074ce0bdc56666f6fbf567706b470ef7c949fa5a0aa2db \
23                    patch-destdir \
24                        rmd160  e1dca10a1a3d4df247bbf5b7c703a1419ef71440 \
25                        sha256  70e370d72518d3a7b3a3bdcd42a6ca87be8414c9364e3eac4a90619903178564
26
27# xorg-libX11 is required even if we build without gui.
28depends_lib         port:xorg-libX11 \
29                    port:gettext \
30                    port:libiconv \
31                    port:readline \
32                    port:ncurses
33
34configure.cflags-append \
35                    -Wno-return-type
36configure.cxxflags-append \
37                    -Wno-return-type
38configure.pre_args  --prefix=${applications_dir}/NEURON/nrn
39configure.args      --without-iv
40
41variant gui description {Build with graphical user interface.} {
42    depends_lib-append \
43        port:neuron-iv
44
45    configure.args-delete \
46        --without-iv
47
48    configure.args-append \
49        --with-iv=${applications_dir}/NEURON/iv
50}
51
52variant python27 conflicts python33 description {Build Python 2.7 module.} {
53    depends_lib-append \
54        port:python27 \
55        port:py27-numpy
56
57    configure.args-append \
58        --with-nrnpython=${prefix}/bin/python2.7 \
59        --enable-pysetup="--root=${destroot}"
60}
61
62variant python33 conflicts python27 description {Build Python 3.3 module.} {
63    depends_lib-append \
64        port:python33 \
65        port:py33-numpy
66
67    configure.args-append \
68        --with-nrnpython=${prefix}/bin/python3.3 \
69        --enable-pysetup="--root=${destroot}"
70}
71
72variant openmpi conflicts mpich description {Use openmpi for parallelization.} {
73    depends_lib-append \
74        port:openmpi
75
76    configure.env-append \
77        MPICC=${prefix}/bin/openmpicc \
78        MPICXX=${prefix}/bin/openmpic++
79
80    configure.args-append \
81        --with-paranrn
82}
83
84variant mpich conflicts openmpi description {Use mpich for parallelization.} {
85    depends_lib-append \
86        port:mpich
87
88    configure.env-append \
89        MPICC=${prefix}/bin/mpicc \
90        MPICXX=${prefix}/bin/mpic++
91
92    configure.args-append \
93        --with-paranrn
94}
95
96if {![variant_isset python33]} { 
97    default_variants +python27
98}
99
100if {![variant_isset mpich]} { 
101    default_variants-append +openmpi
102}
103
104default_variants-append +gui
105
106destroot.destdir    DESTDIR=${destroot}
107
108post-destroot {
109    set docdir ${destroot}${prefix}/share/doc/${name}
110    xinstall -d ${docdir}
111    xinstall -m 644 ${worksrcpath}/COPYING ${docdir}
112}