summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSukanka2022-02-14 21:35:23 +0800
committerSukanka2022-02-14 21:35:23 +0800
commitfd17c1a6ec0bb560b31092a2141c380efd89a5ba (patch)
treee9ac53531d3d68c58144e473e8372e7cfd2fafc2
parent3c7bb507c2faa723cfefa313558ab5041346f1e1 (diff)
downloadaur-fd17c1a6ec0bb560b31092a2141c380efd89a5ba.tar.gz
use prebuilt binary
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD88
-rw-r--r--yade.patch128
3 files changed, 34 insertions, 216 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 983f51703996..d90ea0715baf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,34 +1,28 @@
pkgbase = yade
pkgdesc = Yet Another Dynamic Engine, free software for discrete element modeling.
pkgver = 2022.01a
- pkgrel = 1
+ pkgrel = 2
url = https://yade-dem.org/doc/index.html
arch = x86_64
license = GPL2
- makedepends = mpfrc++
- makedepends = python-pygraphviz
- makedepends = python-mpi4py
- makedepends = utf8cpp
- depends = ipython
- depends = vtk
- depends = gl2ps
- depends = coin-or-clp
depends = cgal
+ depends = coin-or-clp
+ depends = freeglut
+ depends = gl2ps
+ depends = gts
+ depends = ipython
depends = libqglviewer
- depends = tk
- depends = python-matplotlib
+ depends = openmpi
depends = python-mpmath
depends = python-xlib
depends = python-future
depends = python-pyqt5
- depends = gts
- depends = openmpi
- depends = freeglut
- depends = python-sphinx
- optdepends = cuda: for GPU acceleration
- source = https://gitlab.com/yade-dev/trunk/-/archive/2022.01a/trunk-2022.01a.tar.bz2
- source = yade.patch
- sha512sums = b6524e9f4fb67b2728851015e3ef5a4fb52055e389ad70947b9d883965ebc7416669d95b545e933d0781c64912fcd8d0c78e294420064ef23a7fec123cdd206b
- sha512sums = df198ef68e282f70f13a377415946090440941e3861d6e13f0544fe8fc49de58a59e3e2df9f07395942dd29154f7a3c69eb527c7decb2c0b6442ef405420aedd
+ depends = vtk
+ optdepends = cuda: GPU acceleration
+ optdepends = python-matplotlib: plotting graphs
+ optdepends = python-mpi4py: passing all tests
+ optdepends = tk: passing all tests
+ source = yade-2022.01a.tar.gz::https://dl.sukanka.com/ali/software/yade/yade-2022.01a-2-x86_64.tar.gz
+ sha512sums = d75864a5f53130bd4f7f90107ce8fd5953afcf0ee55e65446b44374dbc57ac92f8c118b1e40f48622dee82344fee8ace912186eae9d00359b0fad4e3391ed47a
pkgname = yade
diff --git a/PKGBUILD b/PKGBUILD
index dbf496af5a76..6481415c48eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,81 +1,33 @@
# Maintainer: Sukanka <su975853527 [AT] gmail.com>
pkgname=yade
pkgver=2022.01a
-pkgrel=1
+pkgrel=2
pkgdesc="Yet Another Dynamic Engine, free software for discrete element modeling."
arch=("x86_64")
url='https://yade-dem.org/doc/index.html'
license=('GPL2')
-depends=('ipython' 'vtk' 'gl2ps' 'coin-or-clp' 'cgal' 'libqglviewer'
- 'tk' 'python-matplotlib'
- 'python-mpmath'
- 'python-xlib'
- 'python-future'
- 'python-pyqt5'
- 'gts'
- 'openmpi'
- 'freeglut'
- 'python-sphinx'
+depends=(
+ 'cgal' 'coin-or-clp' 'freeglut' 'gl2ps'
+ 'gts' 'ipython' 'libqglviewer' 'openmpi'
+ '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'
)
-optdepends=('cuda: for GPU acceleration')
-source=("https://gitlab.com/yade-dev/trunk/-/archive/${pkgver}/trunk-${pkgver}.tar.bz2"
-$pkgname.patch
+source=("${pkgname}-${pkgver}.tar.gz::https://dl.sukanka.com/ali/software/yade/yade-${pkgver}-2-x86_64.tar.gz"
)
-sha512sums=('b6524e9f4fb67b2728851015e3ef5a4fb52055e389ad70947b9d883965ebc7416669d95b545e933d0781c64912fcd8d0c78e294420064ef23a7fec123cdd206b'
- 'df198ef68e282f70f13a377415946090440941e3861d6e13f0544fe8fc49de58a59e3e2df9f07395942dd29154f7a3c69eb527c7decb2c0b6442ef405420aedd')
-
-
-_pyver=$(python -V | cut -d' ' -f2)
-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
- sed -i "s|(PY3_VERSIONS|(PY3_VERSIONS ${_pyver%.*}|g" CMakeLists.txt
-
-}
-
-# -DVECTORIZE=OFF
-# It could be a compiler bug in the memory alignment of variables.
-# In this case VECTORIZE=OFF (not using SSE instructions) would solve this.
-# This is the reason why SSE is not enabled by default.
-# It is still experimental.
-# See https://answers.launchpad.net/yade/+question/695081 #13
-
-build(){
- # WARNING: Package contains reference to $srcdir, but all to "$srcdir"/trunk, I think it's safe.
- # Anyway, I still want to deal with this, but need help.
- 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=OFF -DVECTORIZE=OFF
-
-# use stock build
-# cmake ../trunk \
-# -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DNOSUFFIX=ON
- make
-}
+sha512sums=('d75864a5f53130bd4f7f90107ce8fd5953afcf0ee55e65446b44374dbc57ac92f8c118b1e40f48622dee82344fee8ace912186eae9d00359b0fad4e3391ed47a')
package(){
- cd "$srcdir"/build
- make install DESTDIR="${pkgdir}"
-
- # need to add \x0 with length ${#srcdir}
-# msg2 'Stripping $srcdir'
-# find ${pkgdir}/* -type f -print0 | xargs -0 sed -i "s|${srcdir}/||g"
+ mv $srcdir/usr ${pkgdir}
+
+ # Fix manpage
+ cd ${pkgdir}/usr/share/man
+ mkdir man1
+ mv yade* man1
}
diff --git a/yade.patch b/yade.patch
deleted file mode 100644
index e0a6bd81fe73..000000000000
--- a/yade.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff --color --unified --recursive --text trunk-2022.01a/cMake/FindCLP.cmake trunk/cMake/FindCLP.cmake
---- trunk-2022.01a/cMake/FindCLP.cmake 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/cMake/FindCLP.cmake 2022-02-11 23:28:37.718904828 +0800
-@@ -4,16 +4,19 @@
- FIND_LIBRARY(CLP_LIBRARY NAMES Clp
- PATHS
- /usr/lib/x86_64-linux-gnu
-+ /usr/lib
- )
-
- FIND_LIBRARY(CLP2_LIBRARY NAMES OsiClp
- PATHS
- /usr/lib/x86_64-linux-gnu
-+ /usr/lib
- )
-
- FIND_LIBRARY(CLP3_LIBRARY NAMES CoinUtils
- PATHS
- /usr/lib/x86_64-linux-gnu
-+ /usr/lib
- )
-
-
-@@ -27,6 +30,7 @@
- CLP2_INCLUDE_DIR coinutils.pc
- PATHS
- /usr/lib/x86_64-linux-gnu/pkgconfig
-+ /usr/lib/pkgconfig
- )
-
- IF(CLP_INCLUDE_DIR AND CLP2_INCLUDE_DIR AND CLP_LIBRARY AND CLP2_LIBRARY AND CLP3_LIBRARY)
-diff --color --unified --recursive --text trunk-2022.01a/cMake/FindCuBlas.cmake trunk/cMake/FindCuBlas.cmake
---- trunk-2022.01a/cMake/FindCuBlas.cmake 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/cMake/FindCuBlas.cmake 2022-02-11 23:28:37.718904828 +0800
-@@ -4,8 +4,8 @@
- # CUBBLAS_LIBRARY, libraries to link against to use Cublas.
- # CUBLAS_FOUND, If false, do not try to use Cublas.
-
--FIND_LIBRARY(CUBLAS_LIBRARY NAMES cublas libcublas PATHS /usr/local/cuda/lib64 )
--FIND_LIBRARY(CUDART_LIBRARY NAMES cudart libcudart PATHS /usr/local/cuda/lib64 )
-+FIND_LIBRARY(CUBLAS_LIBRARY NAMES cublas libcublas PATHS /usr/local/cuda/lib64 /opt/cuda/lib64 )
-+FIND_LIBRARY(CUDART_LIBRARY NAMES cudart libcudart PATHS /usr/local/cuda/lib64 /opt/cuda/lib64 )
-
- # handle the QUIETLY and REQUIRED arguments and set LOKI_FOUND to TRUE if
- # all listed variables are TRUE
-diff --color --unified --recursive --text trunk-2022.01a/cMake/FindMissingVersions.cmake trunk/cMake/FindMissingVersions.cmake
---- trunk-2022.01a/cMake/FindMissingVersions.cmake 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/cMake/FindMissingVersions.cmake 2022-02-11 23:28:37.718904828 +0800
-@@ -29,7 +29,7 @@
-
- IF(ENABLE_GUI)
- FIND_PACKAGE(GLUT)
--find_path(FORCE_FREEGLUT_PATH freeglut_std.h ${GLUT_INCLUDE_DIR}/GL)
-+find_path(FORCE_FREEGLUT_PATH freeglut_std.h PATHS ${GLUT_INCLUDE_DIR}/GL "/usr/include/GL")
- message(STATUS "Found freeglut: ${FORCE_FREEGLUT_PATH}")
-
- execute_process(COMMAND "/usr/bin/md5sum" "${FORCE_FREEGLUT_PATH}/freeglut_std.h"
-diff --color --unified --recursive --text trunk-2022.01a/cMake/YadePythonHelpers.cmake trunk/cMake/YadePythonHelpers.cmake
---- trunk-2022.01a/cMake/YadePythonHelpers.cmake 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/cMake/YadePythonHelpers.cmake 2022-02-11 23:28:37.718904828 +0800
-@@ -140,7 +140,7 @@
- # Did findpythoninterp found the python version we want ? Output in PYTHON_VERSION_MATCH.
- FUNCTION(PYTHON_VERSION_MATCHES version_number)
- SET(PYTHON_VERSION_MATCH FALSE PARENT_SCOPE)
-- STRING(REGEX MATCHALL "[^\\.]" numbers_list ${version_number})
-+ STRING(REGEX MATCHALL "([0-9]+).([0-9]+)" numbers_list ${version_number})
- list(LENGTH numbers_list numbers_list_len)
-
- LIST(GET numbers_list 0 major)
-diff --color --unified --recursive --text trunk-2022.01a/CMakeLists.txt trunk/CMakeLists.txt
---- trunk-2022.01a/CMakeLists.txt 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/CMakeLists.txt 2022-02-11 23:28:37.718904828 +0800
-@@ -257,7 +257,7 @@
- SET(Boost_NO_BOOST_CMAKE ON) # solved issues on HPC/Nix, see https://github.com/YosysHQ/nextpnr/issues/322#issuecomment-536177724
- INCLUDE(YadePythonHelpers)
-
--SET(PY3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) #append newer python versions at the beginning here.
-+SET(PY3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) #append newer python versions at the beginning here.
- SET(PY2_VERSIONS 2.7 2.6)
-
- IF (DEFINED PYTHON_EXECUTABLE)
-@@ -727,7 +727,7 @@
- ((Boost_MINOR_VERSION EQUAL 53) OR (Boost_MINOR_VERSION GREATER 53)))
- #===========================================================
- IF(ENABLE_VTK)
-- FIND_PACKAGE(VTK COMPONENTS vtkIOParallelXML vtkCommonCore vtkIOImage vtkIOXML vtkFiltersCore vtkImagingCore vtkRenderingCore vtkImagingGeneral vtkImagingHybrid vtkFiltersGeneral vtkFiltersSources)
-+ FIND_PACKAGE(VTK COMPONENTS IOParallelXML CommonCore IOImage IOXML FiltersCore ImagingCore RenderingCore ImagingGeneral ImagingHybrid FiltersGeneral FiltersSources)
- IF(VTK_FOUND)
- INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
- LINK_DIRECTORIES( ${VTK_LIBRARY_DIRS} )
-diff --color --unified --recursive --text trunk-2022.01a/lib/triangulation/FlowBoundingSphereLinSolv.hpp trunk/lib/triangulation/FlowBoundingSphereLinSolv.hpp
---- trunk-2022.01a/lib/triangulation/FlowBoundingSphereLinSolv.hpp 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/lib/triangulation/FlowBoundingSphereLinSolv.hpp 2022-02-11 23:28:37.718904828 +0800
-@@ -151,13 +151,13 @@
- bool factorExists;
- #ifdef PFV_GPU
- #define CHOLMOD(name) cholmod_l_##name
-- void add_T_entry(cholmod_triplet* T, long r, long c, Real x)
-+ void add_T_entry(cholmod_triplet* __T, long r, long c, Real __x)
- {
-- size_t k = T->nnz;
-- ((long*)T->i)[k] = r;
-- ((long*)T->j)[k] = c;
-- ((Real*)T->x)[k] = x;
-- T->nnz++;
-+ size_t k = __T->nnz;
-+ ((long*)__T->i)[k] = r;
-+ ((long*)__T->j)[k] = c;
-+ ((Real*)__T->x)[k] = __x;
-+ __T->nnz++;
- }
- #else
- #define CHOLMOD(name) cholmod_##name
-diff --color --unified --recursive --text trunk-2022.01a/py/config.py.in trunk/py/config.py.in
---- trunk-2022.01a/py/config.py.in 2022-01-17 00:23:47.000000000 +0800
-+++ trunk/py/config.py.in 2022-02-12 00:56:42.716282478 +0800
-@@ -12,7 +12,10 @@
- if (libPATH[1:] == '{LIBRARY_OUTPUT_PATH}'): libPATH='lib'
-
- libDir=os.path.abspath(prefix+'/'+libPATH+'/yade${SUFFIX}')
--confDir=os.environ['HOME']+'/.yade${SUFFIX}'
-+if "XDG_CONFIG_HOME" in os.environ.keys():
-+ confDir=os.path.join(os.environ['XDG_CONFIG_HOME'],'/yade${SUFFIX}')
-+else:
-+ confDir=os.path.join(os.environ['HOME'],'.config','yade${SUFFIX}')
- libstdcxx='${libstdcxx}'
- highPrecisionBits =${REAL_PRECISION_BITS}
- highPrecisionDecimalPlaces=${REAL_DECIMAL_PLACES}