summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD77
1 files changed, 46 insertions, 31 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f611b757a52f..e3a7ee2b4b35 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,51 +2,66 @@
# Contributor: Dmitriy Morozov <archlinux@foxcub.org>
pkgname=avida
-pkgver=2.12.4
-pkgrel=1
+pkgver=2.14.0
+pkgrel=2
pkgdesc="A software platform to study evolution of digital organisms"
arch=('i686' 'x86_64')
-url="http://avida.devosoft.org/"
+url="https://github.com/devosoft/avida"
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')
+makedepends=('cmake' 'git')
+source=("avida-$pkgver.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz"
+"apto::git+https://github.com/dmbryson/apto.git"
+"documentation::git+https://github.com/devosoft/avida.wiki.git"
+'avida.patch'
+'apto.patch'
+ )
+sha256sums=('65f141a0835d251f6d51dc6c949d34fd1db799512c805516caa3cac68fc73062'
+ 'SKIP'
+ 'SKIP'
+ 'ee332d5ee62b88be57592d5fb512c086284b3ebc93c57bb71c6d1751932bae1f'
+ '76789e7fccce71edf676bbb3c5a7724c3cf2abf18ebf3a747dbe6b43cc7ad0c8')
-prepare() {
- cd "$srcdir/avida-$pkgver-src"
- patch -p 1 < ../avida.patch
+prepare(){
+ cd "${srcdir}"
+ cd avida-$pkgver
+ patch --strip=1 < ../${pkgname}.patch
+ # Fix depreciation -mno-fused-madd
+ # sed -i 's|-mno-fused-madd|-std=c89|g' avida-core/CMakeLists.txt
+ cd ../apto
+ patch --strip=1 < ../apto.patch
+ cd ..
+ cp -rf apto/* avida-$pkgver/libs/apto
+ rm -rf avida-$pkgver/libs/pdcurses
+ cp -rf documentation/* avida-$pkgver/documentation
}
build() {
- cd "$srcdir/avida-$pkgver-src"
- cmake .
+ cd "$srcdir"
+ test -d out && rm -rf out
+ mkdir out
+ cd out
+ # disable unit tests for apto
+ # console interface ON
+ cmake ../avida-$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
+ -DAPTO_UNIT_TESTS=OFF \
+ -DAVD_UNIT_TESTS=OFF \
+ -DAVD_GUI_NCURSES=ON \
+ -DCMAKE_BUILD_TYPE=Release
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}
+ cd $srcdir/out
+ make install DESTDIR="$pkgdir"
# Install documentation and Apto license
+ cd "$srcdir/avida-$pkgver"
mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
- cp -r avida-core/documentation/* "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r documentation/* "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm644 libs/apto/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE_APTO"
+
+ install -d ${pkgdir}/usr/bin
+ mv ${pkgdir}/usr/work/{avida,avida-viewer} ${pkgdir}/usr/bin
+ mv ${pkgdir}/usr/work ${pkgdir}/usr/lib/${pkgname}
}