Ticket #40457: Portfile-neuron.5

File Portfile-neuron.5, 3.9 KB (added by neurodroid (Christoph Schmidt-Hieber), 10 years ago)

Portfile for NEURON - build fixes, py34 support

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