Ticket #40457: Portfile

File Portfile, 3.9 KB (added by neurodroid (Christoph Schmidt-Hieber), 9 years ago)

Portfile for NEURON - updated to 7.4

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.4
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/
16distname            nrn-${version}
17distfiles           ${distname}.rel-1341${extract.suffix}
18checksums           ${distname}.rel-1341${extract.suffix} \
19                        rmd160  24d498876cc743a4fafa7086e7779f06de27068e \
20                        sha256  9d56b79290f8914457ac795d63342deeb999f0860843b0ae435e5f4a2eac1e5f
21
22# xorg-libX11 is required even if we build without gui.
23depends_lib         port:xorg-libX11 \
24                    port:gettext \
25                    port:libiconv \
26                    port:readline \
27                    port:ncurses
28
29configure.compiler gcc
30
31configure.cflags-append \
32                    -mmacosx-version-min=10.5 \
33                    -Wno-return-type
34configure.cxxflags-append \
35                    -mmacosx-version-min=10.5 \
36                    -Wno-return-type
37configure.ldflags-append \
38                    -mmacosx-version-min=10.5
39configure.pre_args  --prefix=${applications_dir}/NEURON/nrn
40configure.args      --without-iv
41
42variant gui description {Build with graphical user interface.} {
43    depends_lib-append \
44        port:neuron-iv
45
46    configure.args-delete \
47        --without-iv
48
49    configure.args-append \
50        --with-iv=${applications_dir}/NEURON/iv
51}
52
53variant python27 conflicts python33 python34 description {Build Python 2.7 module.} {
54    depends_lib-append \
55        port:python27 \
56        port:py27-numpy
57
58    configure.args-append \
59        --with-nrnpython=${prefix}/bin/python2.7 \
60        --enable-pysetup="--root=${destroot}"
61}
62
63variant python33 conflicts python27 python34 description {Build Python 3.3 module.} {
64    depends_lib-append \
65        port:python33 \
66        port:py33-numpy
67
68    configure.args-append \
69        --with-nrnpython=${prefix}/bin/python3.3 \
70        --enable-pysetup="--root=${destroot}"
71}
72
73variant python34 conflicts python27 python33 description {Build Python 3.4 module.} {
74    depends_lib-append \
75        port:python34 \
76        port:py34-numpy
77
78    configure.args-append \
79        --with-nrnpython=${prefix}/bin/python3.4 \
80        --enable-pysetup="--root=${destroot}"
81}
82
83variant openmpi conflicts mpich description {Use openmpi for parallelization.} {
84    depends_lib-append \
85        port:openmpi-default
86
87    configure.env-append \
88        MPICC=${prefix}/bin/mpicc-openmpi-mp \
89        MPICXX=${prefix}/bin/mpicxx-openmpi-mp
90
91    configure.args-append \
92        --with-paranrn
93}
94
95variant mpich conflicts openmpi description {Use mpich for parallelization.} {
96    depends_lib-append \
97        port:mpich-default
98
99    configure.env-append \
100        MPICC=${prefix}/bin/mpicc-mpich-mp \
101        MPICXX=${prefix}/bin/mpicxx-mpich-mp
102
103    configure.args-append \
104        --with-paranrn
105}
106
107if {![variant_isset python33] && ![variant_isset python34]} { 
108    default_variants +python27
109}
110
111if {![variant_isset mpich]} { 
112    default_variants-append +openmpi
113}
114
115default_variants-append +gui
116
117post-destroot {
118    set docdir ${destroot}${prefix}/share/doc/${name}
119    xinstall -d ${docdir}
120    xinstall -m 644 ${worksrcpath}/README ${docdir}
121}
122
123# Force installation of libtool la files
124pre-install {
125    set libdir ${destroot}${applications_dir}/NEURON/nrn/${build_arch}/lib
126    xinstall -d ${libdir}
127    xinstall -m 755 ${worksrcpath}/src/nrniv/libnrniv.la ${libdir}
128    xinstall -m 755 ${worksrcpath}/src/nrnoc/libnrnoc.la ${libdir}
129}