summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantine Evans2022-09-07 16:08:52 +0100
committerConstantine Evans2022-09-09 14:28:43 +0100
commit8c74a79fffa31435610d4aace24cc328493ae38d (patch)
tree15c33b941f61a3e6b36f7e83de43028fcd9a6b99
downloadaur-8c74a79fffa31435610d4aace24cc328493ae38d.tar.gz
Initial non-git package.
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD58
-rw-r--r--oxdna-fiximport.patch10
-rw-r--r--oxdna-libname.patch38
4 files changed, 134 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..50a7d8905922
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = oxdna-cuda
+ pkgdesc = DNA/RNA/etc simulator, with CUDA support and analysis tools.
+ pkgver = 3.4.2
+ pkgrel = 2
+ url = https://github.com/lorenzo-rovigatti/oxDNA
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = cmake
+ makedepends = gsl
+ makedepends = cuda
+ makedepends = gcc11
+ makedepends = python-build
+ makedepends = python-wheel
+ makedepends = python-installer
+ depends = python3
+ depends = python-matplotlib
+ depends = python-scikit-learn
+ depends = python-setuptools
+ depends = python-biopython
+ depends = ipython
+ optdepends = python-matplotlib: for plotting
+ provides = oxdna
+ conflicts = oxdna
+ source = https://github.com/lorenzo-rovigatti/oxDNA/archive/refs/tags/v3.4.2.tar.gz
+ sha256sums = dc5ada4a1e2239e519bba0b578e530a049579d5984fbf945763d68b010929957
+
+pkgname = oxdna-cuda
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e6a8ca24fe4e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Constantine Evans <const@costi.eu>
+
+pkgname=oxdna-cuda
+
+pkgdesc="DNA/RNA/etc simulator, with CUDA support and analysis tools."
+
+url="https://github.com/lorenzo-rovigatti/oxDNA"
+
+pkgver=3.4.2
+arch=('x86_64')
+license=('GPL3')
+provides=('oxdna')
+conflicts=('oxdna')
+pkgrel=2
+
+depends=('python3' 'python-matplotlib' 'python-scikit-learn' 'python-setuptools' 'python-biopython' 'ipython')
+
+makedepends=('git' 'cmake' 'gsl' 'cuda' 'gcc11' 'python-build' 'python-wheel' 'python-installer')
+optdepends=('python-matplotlib: for plotting')
+
+source=("https://github.com/lorenzo-rovigatti/oxDNA/archive/refs/tags/v3.4.2.tar.gz")
+
+sha256sums=('dc5ada4a1e2239e519bba0b578e530a049579d5984fbf945763d68b010929957')
+
+build() {
+ cmake -B build -S "oxDNA-${pkgver}" \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DCMAKE_C_COMPILER='gcc-11' \
+ -DCMAKE_CXX_COMPILER='g++-11' \
+ -Wno-dev \
+ -DCUDA=ON \
+ -DPython=ON \
+ -DCMAKE_SKIP_RPATH=YES \
+ -DCMAKE_INSTALL_LIBDIR='lib/oxdna' \
+ -DOxpySystemInstall=ON
+
+ cmake --build build
+
+ cd "oxDNA-${pkgver}/analysis"
+ python -m build --no-isolation --wheel
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+
+ install -Dm755 "${srcdir}/build/bin/oxDNA" "${pkgdir}/usr/bin/oxDNA"
+ install -Dm755 "${srcdir}/build/bin/DNAnalysis" "${pkgdir}/usr/bin/DNAnalysis"
+ install -Dm755 "${srcdir}/build/bin/confGenerator" "${pkgdir}/usr/bin/confGenerator"
+
+ cd "oxDNA-${pkgver}/analysis"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ cd "${srcdir}/build/oxpy/python/oxpy"
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ install -Dm644 "${srcdir}/build/src/liboxdna_common.so" "${pkgdir}/usr/lib/liboxdna_common.so"
+}
diff --git a/oxdna-fiximport.patch b/oxdna-fiximport.patch
new file mode 100644
index 000000000000..177a53162980
--- /dev/null
+++ b/oxdna-fiximport.patch
@@ -0,0 +1,10 @@
+diff --git a/analysis/src/oxDNA_analysis_tools/external_force_utils/exclude_force.py b/analysis/src/oxDNA_analysis_tools/external_force_utils/exclude_force.py
+index e29b871f..2114a7b3 100644
+--- a/analysis/src/oxDNA_analysis_tools/external_force_utils/exclude_force.py
++++ b/analysis/src/oxDNA_analysis_tools/external_force_utils/exclude_force.py
+@@ -1,4 +1,4 @@
+-from external_force_utils.force_reader import read_force_file, write_force_file
++from oxDNA_analysis_tools.external_force_utils.force_reader import read_force_file, write_force_file
+ from sys import argv
+
+ force_file = argv[1]
diff --git a/oxdna-libname.patch b/oxdna-libname.patch
new file mode 100644
index 000000000000..75297ad54177
--- /dev/null
+++ b/oxdna-libname.patch
@@ -0,0 +1,38 @@
+diff --git a/oxpy/CMakeLists.txt b/oxpy/CMakeLists.txt
+index 3155fa48..1d9c1029 100644
+--- a/oxpy/CMakeLists.txt
++++ b/oxpy/CMakeLists.txt
+@@ -20,10 +20,10 @@ IF(Python)
+ SET(CMAKE_SHARED_LIBRARY_PREFIX "")
+
+ # we need the oxDNA "common" library to be compiled so that the resulting code is position-independent and the library can be linked dynamically
+- SET_TARGET_PROPERTIES(common PROPERTIES POSITION_INDEPENDENT_CODE ON)
++ SET_TARGET_PROPERTIES(oxdna_common PROPERTIES POSITION_INDEPENDENT_CODE ON)
+
+ ADD_LIBRARY(_oxpy_lib STATIC ${oxpy_SOURCES})
+- TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} common)
++ TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} oxdna_common)
+ SET_TARGET_PROPERTIES(_oxpy_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)
+ pybind11_add_module(core SHARED bindings.cpp)
+ TARGET_LINK_LIBRARIES(core PRIVATE _oxpy_lib)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index c2f39dfa..2485b701 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -2,13 +2,13 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+ IF(CMAKE_BUILD_TYPE MATCHES Debug)
+ SET(exe_name oxDNA_debug)
+- SET(lib_name common_debug)
++ SET(lib_name oxdna_common_debug)
+ ELSEIF(MPI)
+ SET(exe_name oxDNA_mpi)
+- SET(lib_name common)
++ SET(lib_name oxdna_common)
+ ELSE()
+ SET(exe_name oxDNA)
+- SET(lib_name common)
++ SET(lib_name oxdna_common)
+ ENDIF()
+
+ SET(observables_SOURCES