summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli Neishabouri2015-06-22 19:11:48 +0100
committerAli Neishabouri2015-06-22 19:11:48 +0100
commit87408be2766572e70702fc79cc58da032f852bb8 (patch)
tree2c6db45f2577f34202e0dc70fadd59abe152de7e
downloadaur-87408be2766572e70702fc79cc58da032f852bb8.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD53
-rw-r--r--patch.diff64
3 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c1a654db5df0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = neuron
+ pkgdesc = Empirically-based simulations of neurons and networks of neurons
+ pkgver = 7.3
+ pkgrel = 8
+ url = http://www.neuron.yale.edu
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = interviews
+ depends = openmpi
+ depends = python
+ optdepends = python-numpy
+ optdepends = python-scipy
+ optdepends = mpich2
+ options = libtool
+ source = http://www.neuron.yale.edu/ftp/neuron/versions/v7.3/nrn-7.3.tar.gz
+ source = patch.diff
+ md5sums = 993e539cb8bf102ca52e9fefd644ab61
+ md5sums = ba01405ea8ff911a3802459ac2c27b01
+
+pkgname = neuron
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3dd3054b385a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Ali Neishabouri <ali at neishabouri.net>
+# Contributor: David Campbell <davekong@archlinux.us>
+
+pkgname=neuron
+pkgver=7.3
+pkgrel=8
+pkgdesc="Empirically-based simulations of neurons and networks of neurons"
+arch=('i686' 'x86_64')
+url="http://www.neuron.yale.edu"
+license=('GPL')
+depends=('interviews' 'openmpi' 'python')
+optdepends=('python-numpy' 'python-scipy' 'mpich2')
+source=("http://www.neuron.yale.edu/ftp/neuron/versions/v$pkgver/nrn-$pkgver.tar.gz" "patch.diff")
+options=('libtool')
+md5sums=('993e539cb8bf102ca52e9fefd644ab61' 'ba01405ea8ff911a3802459ac2c27b01')
+
+build() {
+ cd "$srcdir/nrn-$pkgver"
+
+ # We do this so the python libraries actually get installed in the package prefix
+ sed -i "s_ac\_pysetup='--home=\$(prefix)'_ac\_pysetup='--home=$pkgdir/usr'_g" "$srcdir/nrn-$pkgver/configure"
+ sed -i 's_exec\_prefix="${prefix}/${host\_cpu}"_exec\_prefix="${prefix}"_g' "$srcdir/nrn-$pkgver/configure"
+
+ # Python 3 complains about a prototype (see http://www.neuron.yale.edu/phpbb/viewtopic.php?f=2&t=3060).
+ # This part patches some code according to http://www.neuron.yale.edu/hg/neuron/nrn/rev/dce1de58303d.
+ patch -p1 < $srcdir/patch.diff
+
+ ./configure --prefix=/usr --libdir=/usr/lib --bindir=/usr/bin --with-paranrn --with-nrnpython=`which python`
+ make
+}
+
+package() {
+ cd "$srcdir/nrn-$pkgver"
+ DESTDIR="$pkgdir"
+ sed -i "s_package\_dir\ =\ {'':instdir+'/share/nrn/lib/python'}\,_package\_dir\ =\ {'':'$pkgdir/usr/share/nrn/lib/python'}\,_g" src/nrnpython/setup.py
+ make DESTDIR="$pkgdir" install
+ #rm -f "$pkgdir/usr/lib/libnrnmpi.la"
+ #rm -f "$pkgdir/usr/lib/libmeschach.la"
+ #rm -f "$pkgdir/usr/lib/libivoc.la"
+ #rm -f "$pkgdir/usr/lib/libscopmath.la"
+ #rm -f "$pkgdir/usr/lib/libneuron_gnu.la"
+ #rm -f "$pkgdir/usr/lib/libmemacs.la"
+ #rm -f "$pkgdir/usr/lib/libnrnoc.la"
+ #rm -f "$pkgdir/usr/lib/libnrnpython.la"
+ #rm -f "$pkgdir/usr/lib/liboc.la"
+ #rm -f "$pkgdir/usr/lib/libnrniv.la"
+ #rm -f "$pkgdir/usr/lib/libsundials.la"
+ #rm -f "$pkgdir/usr/lib/libsparse13.la"
+ #rm -f "$pkgdir/usr/lib/libocxt.la"
+
+ cd "src/nrnpython/"
+ python setup.py install --root="$pkgdir/"
+}
diff --git a/patch.diff b/patch.diff
new file mode 100644
index 000000000000..f9daec39aed7
--- /dev/null
+++ b/patch.diff
@@ -0,0 +1,64 @@
+
+# HG changeset patch
+# User Michael Hines <michael.hines@yale.edu>
+# Date 1398115465 14400
+# Node ID dce1de58303d5f733ca4fa6701083455ce0d10c8
+# Parent 840b0bd992336e3bc047c829a18a5e609f71de56
+Python 3.4 complained about a prototype.
+
+diff -r 840b0bd99233 -r dce1de58303d src/nrnpython/nrnpython.cpp
+--- a/src/nrnpython/nrnpython.cpp Mon Apr 21 13:33:19 2014 -0400
++++ b/src/nrnpython/nrnpython.cpp Mon Apr 21 17:24:25 2014 -0400
+@@ -17,11 +17,11 @@
+ extern int nrnpy_nositeflag;
+ extern char* hoc_ctp;
+ extern FILE* hoc_fin;
+-extern char* hoc_promptstr;
++extern const char* hoc_promptstr;
+ extern char* neuronhome_forward();
+ //extern char*(*PyOS_ReadlineFunctionPointer)(FILE*, FILE*, char*);
+ #if ((PY_MAJOR_VERSION >= 3) || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 2))
+-static char* nrnpython_getline(FILE*, FILE*, char*);
++static char* nrnpython_getline(FILE*, FILE*, const char*);
+ #else
+ static char* nrnpython_getline(char*);
+ #endif
+@@ -207,7 +207,7 @@
+ }
+
+ #if ((PY_MAJOR_VERSION >= 3) || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 2))
+-static char* nrnpython_getline(FILE*, FILE*, char* prompt) {
++static char* nrnpython_getline(FILE*, FILE*, const char* prompt) {
+ #else
+ static char* nrnpython_getline(char* prompt) {
+ #endif
+diff -r 840b0bd99233 -r dce1de58303d src/oc/hoc.c
+--- a/src/oc/hoc.c Mon Apr 21 13:33:19 2014 -0400
++++ b/src/oc/hoc.c Mon Apr 21 17:24:25 2014 -0400
+@@ -122,6 +122,7 @@
+ #endif
+
+ #if READLINE
++extern char* readline(const char* prompt);
+ extern void rl_deprep_terminal(void);
+ extern void add_history(const char*);
+ #endif
+@@ -146,7 +147,7 @@
+ #define CBUFSIZE 512
+ HocStr* hoc_tmpbuf;
+ HocStr* hoc_cbufstr;
+-char* hoc_promptstr;
++const char* hoc_promptstr;
+ static CHAR *cbuf;
+ CHAR *ctp;
+ int hoc_ictp;
+@@ -1692,7 +1693,7 @@
+ }
+ }else{
+ #if READLINE
+- if (nrn_fw_eq(fin, stdin) && nrn_istty_) { char *line, *readline(); int n;
++ if (nrn_fw_eq(fin, stdin) && nrn_istty_) { char *line; int n;
+ #if INTERVIEWS
+ #ifdef MINGW
+ IFGUI
+