summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuoi2022-08-28 23:17:13 +0100
committerKuoi2022-08-28 23:17:13 +0100
commit0cdb0651603cbaaec39be2042d203ada29164437 (patch)
tree2f34b14cfa51e4a0e9f981e0dd036cd91ea69b55
parent3425567192b51c19c696de326f4a7c561e3223d5 (diff)
downloadaur-avida.tar.gz
2.14.0
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD77
-rw-r--r--apto.patch19
-rw-r--r--avida.patch77
4 files changed, 135 insertions, 58 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9f96b2c9f073..6130af6c2804 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,25 @@
pkgbase = avida
pkgdesc = A software platform to study evolution of digital organisms
- pkgver = 2.12.4
- pkgrel = 1
- url = http://avida.devosoft.org/
+ pkgver = 2.14.0
+ pkgrel = 2
+ url = https://github.com/devosoft/avida
arch = i686
arch = x86_64
license = GPL3
license = custom
makedepends = cmake
+ makedepends = git
depends = gcc-libs
depends = ncurses
- source = http://downloads.sourceforge.net/avida/avida-2.12.4-src.tar.gz
+ source = avida-2.14.0.tar.gz::https://github.com/devosoft/avida/archive/refs/tags/2.14.0.tar.gz
+ source = apto::git+https://github.com/dmbryson/apto.git
+ source = documentation::git+https://github.com/devosoft/avida.wiki.git
source = avida.patch
- md5sums = db4a687190f9fcc8b8ae84613d536d0a
- md5sums = a7ac844269d3f169f53e8e30005755f5
+ source = apto.patch
+ sha256sums = 65f141a0835d251f6d51dc6c949d34fd1db799512c805516caa3cac68fc73062
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = ee332d5ee62b88be57592d5fb512c086284b3ebc93c57bb71c6d1751932bae1f
+ sha256sums = 76789e7fccce71edf676bbb3c5a7724c3cf2abf18ebf3a747dbe6b43cc7ad0c8
pkgname = avida
-
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}
}
diff --git a/apto.patch b/apto.patch
new file mode 100644
index 000000000000..de251abebd50
--- /dev/null
+++ b/apto.patch
@@ -0,0 +1,19 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 949804e..02b3fa4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,12 +3,14 @@ PROJECT(APTO CXX)
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+ # Default location for installed software/configs/ docs is the build directory.
++IF(NOT CMAKE_INSTALL_PREFIX)
+ SET(CMAKE_INSTALL_PREFIX
+ "${PROJECT_BINARY_DIR}"
+ CACHE PATH
+ "Install path prefix, prepended onto install directories."
+ FORCE
+ )
++ENDIF(NOT CMAKE_INSTALL_PREFIX)
+
+ # Final software is built directly into the work subdirectory.
+ SET(EXECUTABLE_OUTPUT_PATH
diff --git a/avida.patch b/avida.patch
index fffe9fcbb869..2fb0cae451ff 100644
--- a/avida.patch
+++ b/avida.patch
@@ -1,20 +1,57 @@
---- 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
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 30008d6..c9f1912 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,10 +23,11 @@ ENDIF(NOT WIN32)
+ ADD_SUBDIRECTORY(avida-core)
+
+ # Default location for installed software/configs/ docs is the build directory.
++IF(NOT CMAKE_INSTALL_PREFIX)
+ SET(CMAKE_INSTALL_PREFIX
+ "${PROJECT_BINARY_DIR}"
+ CACHE PATH
+ "Install path prefix, prepended onto install directories."
+ FORCE
+ )
+-
++ENDIF(NOT CMAKE_INSTALL_PREFIX)
+diff --git a/avida-core/CMakeLists.txt b/avida-core/CMakeLists.txt
+index d9d063e..30c4f6a 100644
+--- a/avida-core/CMakeLists.txt
++++ b/avida-core/CMakeLists.txt
+@@ -12,13 +12,14 @@ ENDIF(COMMAND cmake_policy)
+ # PROJECT_BINARY_DIR, since the project didn't exist yet.
+
+ # Default location for installed software/configs/ docs is the build directory.
++IF(NOT CMAKE_INSTALL_PREFIX)
+ SET(CMAKE_INSTALL_PREFIX
+ "${PROJECT_BINARY_DIR}"
+ CACHE PATH
+ "Install path prefix, prepended onto install directories."
+ FORCE
+ )
+-
++ENDIF(NOT CMAKE_INSTALL_PREFIX)
+ # Final software is built directly into the work subdirectory.
+ SET(EXECUTABLE_OUTPUT_PATH
+ "${PROJECT_BINARY_DIR}/bin"
+diff --git a/libs/tcmalloc-1.4/CMakeLists.txt b/libs/tcmalloc-1.4/CMakeLists.txt
+index 59f8f1a..54873b1 100644
+--- a/libs/tcmalloc-1.4/CMakeLists.txt
++++ b/libs/tcmalloc-1.4/CMakeLists.txt
+@@ -3,13 +3,14 @@ PROJECT(TCMALLOC CXX)
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+ # Default location for installed software/configs/ docs is the build directory.
++IF(NOT CMAKE_INSTALL_PREFIX)
+ SET(CMAKE_INSTALL_PREFIX
+ "${PROJECT_BINARY_DIR}"
+ CACHE PATH
+ "Install path prefix, prepended onto install directories."
+ FORCE
+ )
+-
++ENDIF(NOT CMAKE_INSTALL_PREFIX)
+ # Final software is built directly into the work subdirectory.
+ SET(EXECUTABLE_OUTPUT_PATH
+ "${PROJECT_BINARY_DIR}/bin"