summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2018-08-15 23:42:58 +0200
committerbartus2018-08-15 23:42:58 +0200
commitfeffeb65c2c9fb41fed8eee8c745b143df76e836 (patch)
tree10fe65126aa5d5bdf1bf6eff68a499462939ab0d
parentcfdb6068522099f8c3dbfed6f40b9d2555eee200 (diff)
downloadaur-feffeb65c2c9fb41fed8eee8c745b143df76e836.tar.gz
refactor dependencies
fix glm compiler error enable cosimulation module prepare cascade module, not enabled yet
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD56
-rw-r--r--glm.patch26
-rw-r--r--opencascade.patch13
4 files changed, 100 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1e9f41a9e0d..f30ee49c120 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,42 @@
pkgbase = chronoengine
pkgdesc = C++ library for physics simulation
pkgver = 3.0.0
- pkgrel = 1
+ pkgrel = 2
url = http://projectchrono.org/chronoengine/
arch = i686
arch = x86_64
license = custom
makedepends = cmake
makedepends = git
+ makedepends = boost
makedepends = glm
+ makedepends = glew
+ makedepends = glfw
makedepends = irrlicht
makedepends = glut
makedepends = openmpi
- depends = glew
- depends = glfw
+ makedepends = python
+ makedepends = swig
+ makedepends = blaze
+ makedepends = cuda
+ makedepends = opencascade7
+ depends = openmpi
+ depends = boost-libs
optdepends = irrlicht: Runtime visualization with Irrlicht.
- optdepends = glm: Runtime visualization with OpenGL.
+ optdepends = glew: Runtime visualization with OpenGL.
+ optdepends = glfw: Runtime visualization with OpenGL.
+ optdepends = freeglut: Runtime visualization with OpenGL.
+ optdepends = python: Python bindings
+ optdepends = nvidia-utils: CUDA support in PARALLEL module
+ optdepends = opencascade7: add 3D CAD file support (STEP format)
source = chronoengine::git+https://github.com/projectchrono/chrono.git
source = chronoengine.sh
+ source = glm.patch
+ source = opencascade.patch
sha1sums = SKIP
sha1sums = 8d8cb3fc9324e50cec8f5bb5dbf8a78817a32b81
+ sha1sums = 277e41186ff356fcc8c15153453d17ea61eca56a
+ sha1sums = 884f16fc90b8d084d1a67672bf59493b867a71f0
pkgname = chronoengine
diff --git a/PKGBUILD b/PKGBUILD
index db130243a2d..4a22ed73d0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,42 +1,65 @@
+# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
+
pkgname=chronoengine
pkgver=3.0.0
#fragment="#tag=${pkgver}"
-pkgrel=1
+pkgrel=2
pkgdesc="C++ library for physics simulation"
license=('custom')
arch=('i686' 'x86_64')
url="http://projectchrono.org/chronoengine/"
-depends=(glew glfw)
-makedepends=(cmake git glm irrlicht glut openmpi)
+depends=(openmpi boost-libs)
+makedepends=(cmake git boost glm glew glfw irrlicht glut openmpi)
+makedepends+=(python swig) # -DENABLE_MODULE_PYTHON requirement
+makedepends+=(blaze) # -DENABLE_MODULE_PARALLEL=ON requirement
+makedepends+=(cuda) # -DENABLE_MODULE_PARALLEL=ON optional
+makedepends+=(opencascade7) # -DENABLE_MODULE_CASCADE=ON required (version<=7.2)
#makedepends+=(intel-mkl) # -DENABLE_MODULE_MKL=ON requirement
-#makedepends+=(blaze) # -DENABLE_MODULE_PARALLEL=ON requirement
optdepends=(
"irrlicht: Runtime visualization with Irrlicht."
- "glm: Runtime visualization with OpenGL."
+ "glew: Runtime visualization with OpenGL."
+ "glfw: Runtime visualization with OpenGL."
+ "freeglut: Runtime visualization with OpenGL."
+ "python: Python bindings"
+ "nvidia-utils: CUDA support in PARALLEL module"
+ "opencascade7: add 3D CAD file support (STEP format)"
)
-#optdepends+=(
-# "blaze: Parallel solver module for Chrono."
-# "intel-mkl: This library is currently used in Chrono for its parallel direct solver (Pardiso)"
-#)
+#optdepends+=("intel-mkl: This library is currently used in Chrono for its parallel direct solver (Pardiso)")
+#options=(!buildflags) # discard arch buildflags as -fno-plt is not supported by gcc5 (cuda host compiler)
+#CPPFLAGS="-D_FORTIFY_SOURCE=2"
+#CXXFLAGS="-O2 -pipe -fstack-protector-strong"
+#CFLAGS=${CXXFLAGS}
source=("${pkgname}::git+https://github.com/projectchrono/chrono.git${fragment}"
- "chronoengine.sh")
+ "chronoengine.sh"
+ "glm.patch"
+ "opencascade.patch"
+ )
sha1sums=('SKIP'
- '8d8cb3fc9324e50cec8f5bb5dbf8a78817a32b81')
+ '8d8cb3fc9324e50cec8f5bb5dbf8a78817a32b81'
+ '277e41186ff356fcc8c15153453d17ea61eca56a'
+ '884f16fc90b8d084d1a67672bf59493b867a71f0')
CMAKE_FLAGS=( -DENABLE_MODULE_POSTPROCESS=ON
-DENABLE_MODULE_VEHICLE=ON
-DENABLE_MODULE_FEA=ON
- -DENABLE_MODULE_PYTHON=OFF
+ -DENABLE_MODULE_PYTHON=ON
-DENABLE_MODULE_IRRLICHT=ON
-DENABLE_MODULE_CASCADE=OFF
+ -DCH_CASCADE_DIR=/opt/opencascade7
-DENABLE_MODULE_OPENGL=ON
- -DENABLE_MODULE_PARALLEL=OFF
+ -DENABLE_MODULE_PARALLEL=ON
-DENABLE_MODULE_MKL=OFF
- -DENABLE_MODULE_COSIMULATION=OFF
+ -DENABLE_MODULE_COSIMULATION=ON
-DENABLE_MODULE_FSI=ON
+ -DCUDA_HOST_COMPILER=/opt/cuda/bin/gcc
)
-#COSIMULATION not working because of missing sys/filio.h
+# -DCMAKE_C_COMPILER=/usr/bin/gcc-5
+# -DCMAKE_CXX_COMPILER=/usr/bin/g++-5
+# )
+# -DCUDA_PROPAGATE_HOST_FLAGS=OFF
+# )
+#CUDA_PROPAGATE_HOST_FLAGS=OFF also could be used to discard arch buildflags but drops also all internaly defined ones.
#MKL works but building intel-mkl is such a paint that I skipped this feature
prepare() {
@@ -45,6 +68,8 @@ prepare() {
files+=($(find -name \*.cmake\*))
sed -i 's/lib64/lib/' ${files[@]}
sed -i 's|share/chrono/bin|bin/chronoengine|' CMakeLists.txt
+ git apply ${srcdir}/glm.patch
+ git apply ${srcdir}/opencascade.patch
}
build() {
@@ -63,4 +88,3 @@ package() {
install -D -m644 "../chronoengine/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D -m644 "../chronoengine.sh" "${pkgdir}/etc/profile.d/chronoengine.sh"
}
-
diff --git a/glm.patch b/glm.patch
new file mode 100644
index 00000000000..53d7d5e7ef1
--- /dev/null
+++ b/glm.patch
@@ -0,0 +1,26 @@
+diff --git a/src/chrono_opengl/ChOpenGLCamera.cpp b/src/chrono_opengl/ChOpenGLCamera.cpp
+index 32a0c62e1..7f352a9c6 100644
+--- a/src/chrono_opengl/ChOpenGLCamera.cpp
++++ b/src/chrono_opengl/ChOpenGLCamera.cpp
+@@ -16,6 +16,8 @@
+
+ #include "chrono_opengl/ChOpenGLCamera.h"
+
++#define GLM_ENABLE_EXPERIMENTAL
++
+ #include <glm/gtc/matrix_transform.hpp>
+ #include <glm/gtx/rotate_vector.hpp>
+ #include <glm/gtx/quaternion.hpp>
+diff --git a/src/chrono_opengl/ChOpenGLViewer.cpp b/src/chrono_opengl/ChOpenGLViewer.cpp
+index 68eb7c7e0..2f71c5051 100644
+--- a/src/chrono_opengl/ChOpenGLViewer.cpp
++++ b/src/chrono_opengl/ChOpenGLViewer.cpp
+@@ -53,6 +53,8 @@
+ #include "resources/cylinder.h"
+ #include "resources/cone.h"
+
++#define GLM_ENABLE_EXPERIMENTAL
++
+ #include <glm/gtc/type_ptr.hpp>
+ #include <glm/gtx/rotate_vector.hpp>
+ #include <glm/gtc/matrix_transform.hpp>
diff --git a/opencascade.patch b/opencascade.patch
new file mode 100644
index 00000000000..626c8fd3236
--- /dev/null
+++ b/opencascade.patch
@@ -0,0 +1,13 @@
+diff --git a/src/chrono_cascade/CMakeLists.txt b/src/chrono_cascade/CMakeLists.txt
+index bb79799bc..928f82244 100644
+--- a/src/chrono_cascade/CMakeLists.txt
++++ b/src/chrono_cascade/CMakeLists.txt
+@@ -50,7 +50,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ SET (CH_CASCADE_INCLUDES "${CH_CASCADE_DIR}/inc")
+ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ FIND_PATH(CH_CASCADE_INCLUDES Standard_Version.hxx
+- HINTS ${CH_CASCADE_INCLUDES} "${CH_CASCADE_DIR}/inc" "${CH_CASCADE_DIR}/include"
++ HINTS ${CH_CASCADE_INCLUDES} "${CH_CASCADE_DIR}/inc" "${CH_CASCADE_DIR}/include/opencascade"
+ PATHS
+ /usr/include/oce
+ /usr/local/include/oce