summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD52
-rw-r--r--avida.patch20
3 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..9f96b2c9f07
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = avida
+ pkgdesc = A software platform to study evolution of digital organisms
+ pkgver = 2.12.4
+ pkgrel = 1
+ url = http://avida.devosoft.org/
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ license = custom
+ makedepends = cmake
+ depends = gcc-libs
+ depends = ncurses
+ source = http://downloads.sourceforge.net/avida/avida-2.12.4-src.tar.gz
+ source = avida.patch
+ md5sums = db4a687190f9fcc8b8ae84613d536d0a
+ md5sums = a7ac844269d3f169f53e8e30005755f5
+
+pkgname = avida
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f611b757a52
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
+# Contributor: Dmitriy Morozov <archlinux@foxcub.org>
+
+pkgname=avida
+pkgver=2.12.4
+pkgrel=1
+pkgdesc="A software platform to study evolution of digital organisms"
+arch=('i686' 'x86_64')
+url="http://avida.devosoft.org/"
+license=('GPL3' 'custom')
+depends=('gcc-libs' 'ncurses')
+makedepends=('cmake')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz"
+ avida.patch)
+md5sums=('db4a687190f9fcc8b8ae84613d536d0a'
+ 'a7ac844269d3f169f53e8e30005755f5')
+
+prepare() {
+ cd "$srcdir/avida-$pkgver-src"
+ patch -p 1 < ../avida.patch
+}
+
+build() {
+ cd "$srcdir/avida-$pkgver-src"
+ cmake .
+ make
+}
+
+package() {
+ cd "$srcdir/avida-$pkgver-src"
+
+ # Install binaries and config files
+ mkdir -p "${pkgdir}/opt/${pkgname}"
+ install -m755 bin/avida* "${pkgdir}/opt/${pkgname}"
+ install -m664 -g users avida-core/support/config/*.{cfg,org} "${pkgdir}/opt/${pkgname}"
+
+ # Install headers and libraries
+ mkdir -p "${pkgdir}/usr/"{include,lib}
+ cp -r libs/apto/include/* "${pkgdir}/usr/include"
+ cp -r lib/* "${pkgdir}/usr/lib"
+
+ # Install launchers
+ mkdir -p "${pkgdir}/usr/bin"
+ echo 'cd /opt/avida && ./avida' > "${pkgdir}/usr/bin/avida"
+ echo 'cd /opt/avida && ./avida-viewer' > "${pkgdir}/usr/bin/avida-viewer"
+ chmod 755 "${pkgdir}/usr/bin/"{avida,avida-viewer}
+
+ # Install documentation and Apto license
+ mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r avida-core/documentation/* "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm644 libs/apto/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE_APTO"
+}
diff --git a/avida.patch b/avida.patch
new file mode 100644
index 00000000000..fffe9fcbb86
--- /dev/null
+++ b/avida.patch
@@ -0,0 +1,20 @@
+--- avida-2.12.3-src.orig/avida-core/source/analyze/cAnalyzeTreeStats_Gamma.cc 2012-02-02 22:50:29.000000000 +0600
++++ avida-2.12.3-src/avida-core/source/analyze/cAnalyzeTreeStats_Gamma.cc 2012-05-08 19:32:18.793044457 +0600
+@@ -27,6 +27,7 @@
+
+ #include <math.h>
+ #include <iostream>
++#include <cstdlib>
+
+ using namespace std;
+
+--- avida-2.12.3-src.orig/avida-core/source/tools/tArray.h 2012-02-02 22:50:29.000000000 +0600
++++ avida-2.12.3-src/avida-core/source/tools/tArray.h 2012-05-08 19:33:04.783042892 +0600
+@@ -24,6 +24,7 @@
+ #define tArray_h
+
+ #include <cassert>
++#include <cstdlib>
+
+ #ifndef NULL
+ #define NULL 0