Ticket #40457: Portfile-neuron.3

File Portfile-neuron.3, 3.5 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/
16distname            nrn-${version}
17distfiles           ${distname}.rel-983${extract.suffix}
18checksums           ${distname}.rel-983${extract.suffix} \
19                        rmd160  d84a0b3e012035db986a9e4cc42e1897ba97d891 \
20                        sha256  491c6b95edf55afeb682b6d90a1d573496201d00b988758d48fcef45f7af453f
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 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 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 openmpi conflicts mpich description {Use openmpi for parallelization.} {
72    depends_lib-append \
73        port:openmpi
74
75    configure.env-append \
76        MPICC=${prefix}/bin/openmpicc \
77        MPICXX=${prefix}/bin/openmpic++
78
79    configure.args-append \
80        --with-paranrn
81}
82
83variant mpich conflicts openmpi description {Use mpich for parallelization.} {
84    depends_lib-append \
85        port:mpich
86
87    configure.env-append \
88        MPICC=${prefix}/bin/mpicc \
89        MPICXX=${prefix}/bin/mpic++
90
91    configure.args-append \
92        --with-paranrn
93}
94
95if {![variant_isset python33]} { 
96    default_variants +python27
97}
98
99if {![variant_isset mpich]} { 
100    default_variants-append +openmpi
101}
102
103default_variants-append +gui
104
105post-destroot {
106    set docdir ${destroot}${prefix}/share/doc/${name}
107    xinstall -d ${docdir}
108    xinstall -m 644 ${worksrcpath}/COPYING ${docdir}
109}
110
111# Force installation of libtool la files
112pre-install {
113    set libdir ${destroot}${applications_dir}/NEURON/nrn/${build_arch}/lib
114    xinstall -d ${libdir}
115    xinstall -m 755 ${worksrcpath}/src/nrniv/libnrniv.la ${libdir}
116    xinstall -m 755 ${worksrcpath}/src/nrnoc/libnrnoc.la ${libdir}
117}