summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSukanka2022-05-14 21:56:07 +0800
committerSukanka2022-05-14 21:56:07 +0800
commit77409579949d6361bf05ca3e1846804a8abbafee (patch)
treeb868fdec199744690b28fc36c44f62c2017d7012
parent22badde5cad38be4b1cc84e83031eeef36e39cbf (diff)
downloadaur-77409579949d6361bf05ca3e1846804a8abbafee.tar.gz
update PKGBUILD
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD58
2 files changed, 53 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3f1606c9fc04..9b97450ec6e8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,14 @@
pkgbase = yade
pkgdesc = Yet Another Dynamic Engine, free software for discrete element modeling.
pkgver = 2022.01a
- pkgrel = 3
+ pkgrel = 4
url = https://yade-dem.org/doc/index.html
arch = x86_64
license = GPL2
+ makedepends = mpfrc++
+ makedepends = python-pygraphviz
+ makedepends = python-mpi4py
+ makedepends = utf8cpp
depends = cgal
depends = coin-or-clp
depends = freeglut
@@ -22,7 +26,9 @@ pkgbase = yade
optdepends = python-matplotlib: plotting graphs
optdepends = python-mpi4py: passing all tests
optdepends = tk: passing all tests
- source = yade-2022.01a-3.tar.gz::https://dl.sukanka.com/d/ali/software/yade/yade-2022.01a-3.tar.gz
- sha512sums = 7144b5e37b67c6def336ee949324ce102f31a39e71dd46605397a649fd56981df8db3d51a32e13a3b2bbe803521a43caa75cf780550a4d6e4e05b743e7485a67
+ options = !buildflags
+ options = !lto
+ source = trunk-2022.01a::git+https://gitlab.com/yade-dev/trunk.git?commit=fd04d864622a1c628296ccd1697efc93cda98c27
+ sha512sums = SKIP
pkgname = yade
diff --git a/PKGBUILD b/PKGBUILD
index baf5972797b0..18aa22585674 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Sukanka <su975853527 [AT] gmail.com>
pkgname=yade
pkgver=2022.01a
-pkgrel=3
+pkgrel=4
pkgdesc="Yet Another Dynamic Engine, free software for discrete element modeling."
arch=("x86_64")
url='https://yade-dem.org/doc/index.html'
@@ -12,33 +12,63 @@ depends=(
'python-mpmath' 'python-xlib' 'python-future' 'python-pyqt5'
'vtk'
)
-
+makedepends=(
+ 'mpfrc++' 'python-pygraphviz'
+ 'python-mpi4py'
+ 'utf8cpp'
+)
optdepends=(
'cuda: GPU acceleration'
'python-matplotlib: plotting graphs'
'python-mpi4py: passing all tests'
'tk: passing all tests'
)
-source=("${pkgname}-${pkgver}-${pkgrel}.tar.gz::https://dl.sukanka.com/d/ali/software/yade/yade-${pkgver}-${pkgrel}.tar.gz"
+source=("trunk-${pkgver}::git+https://gitlab.com/yade-dev/trunk.git?commit=fd04d864622a1c628296ccd1697efc93cda98c27"
)
-sha512sums=('7144b5e37b67c6def336ee949324ce102f31a39e71dd46605397a649fd56981df8db3d51a32e13a3b2bbe803521a43caa75cf780550a4d6e4e05b743e7485a67')
+sha512sums=('SKIP')
+options=('!buildflags' '!lto')
+
+prepare(){
+ # Follow https://yade-dem.org/doc/installation.html#compilation
+ test -d trunk && rm -rf trunk
+ mv trunk-${pkgver} trunk
+ test -d build || mkdir build
+ cd trunk
+# patch --strip=1 < ../${pkgname}.patch
+}
+
+
+build(){
+ cd build
+
+ cmake ../trunk \
+ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DNOSUFFIX=ON -DPYTHON_VERSION=-1 \
+ -DCHOLMOD_GPU=ON -DENABLE_DEFORM=ON -DENABLE_OAR=ON \
+ -DENABLE_MPFR=ON \
+ -DruntimePREFIX=/usr -DOpenGL_GL_PREFERENCE=GLVND \
+ -DENABLE_POTENTIAL_PARTICLES=ON -DENABLE_VTK=ON \
+ -DFORCE_FREEGLUT_PATH=/usr/include \
+ -DENABLE_SPH=ON -DENABLE_PROFILING=ON -DENABLE_LIQMIGRATION=ON \
+ -DENABLE_MASK_ARBITRARY=ON -DENABLE_PARTIALSAT=ON \
+ -DENABLE_USEFUL_ERRORS=ON \
+ -DENABLE_POTENTIAL_BLOCKS=ON -DVECTORIZE=ON \
+ -DCMAKE_CXX_FLAGS='-Wformat -Wformat-security -Wformat-nonliteral -Wall -Wextra -Wno-error=unused-result -Wnarrowing -Wreturn-type -Wuninitialized -Wfloat-conversion -Wcast-align -Wdisabled-optimization -Wtrampolines -Wpointer-arith -Wswitch-bool -Wwrite-strings -Wnon-virtual-dtor -Wreturn-local-addr -Wsuggest-override -Wswitch-default -Wno-error=shadow -Wno-error=use-after-free -Wno-error=maybe-uninitialized -Wno-error=dangling-pointer -Wno-error=cpp -fdce -fstack-protector-strong -DYADE_VTK -DYADE_OPENMP -fopenmp -DYADE_GTS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -DQGLVIEWER_FOUND -DYADE_OPENGL -DYADE_QT5 -DYADE_CGAL -DFLOW_ENGINE -DFLOW_ENGINE -DLINSOLV -pthread -DYADE_MPI -DTWOPHASEFLOW -DYADE_GL2PS -DLBM_ENGINE -DPARTIALSAT' \
+ -DCMAKE_CXX_FLAGS_RELEASE='-O3 -DNDEBUG'
+ make
+}
package(){
- mv $srcdir/usr ${pkgdir}
-
- # Fix ref to $srcdir
- rplc='\x0'
+ cd "$srcdir"/build
+ make install DESTDIR="${pkgdir}"
+
+ # need to add \x0 with length ${#srcdir}+1
+ rplc='\x0'
for ((i=1;i <=${#srcdir};i++))
do
rplc="$rplc\\x0"
done
msg2 'Stripping $srcdir'
- find ${pkgdir}/usr/lib/yade/* -type f -print0 | xargs -0 sed -i "s|${srcdir}/|${rplc}|g"
+ find ${pkgdir}/* -type f -print0 | xargs -0 sed -i "s|${srcdir}/|${rplc}|g"
# .py file should not contains \x0
sed -i 's/\x0//g' ${pkgdir}/usr/lib/yade/py/yade/config.py
-
- # Fix manpage
- cd ${pkgdir}/usr/share/man
- mkdir man1
- mv yade* man1
}