summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2017-09-25 14:58:13 +0200
committerChristoph Junghans <christoph.junghans@gmail.com>2017-09-25 06:58:13 -0600
commit330211468a418e04a05ddd45ead763e1fb43f2cc (patch)
tree5d90c606e491f53555b7025642c697a86ddab8e7 /var
parent99cefcc955a0f25855ac65576765a958be2a2e02 (diff)
downloadspack-330211468a418e04a05ddd45ead763e1fb43f2cc.tar.gz
spack-330211468a418e04a05ddd45ead763e1fb43f2cc.tar.bz2
spack-330211468a418e04a05ddd45ead763e1fb43f2cc.tar.xz
spack-330211468a418e04a05ddd45ead763e1fb43f2cc.zip
add assimp package. link against it in dealii (#5463)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/assimp/package.py41
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py15
2 files changed, 56 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/assimp/package.py b/var/spack/repos/builtin/packages/assimp/package.py
new file mode 100644
index 0000000000..af38cb0bec
--- /dev/null
+++ b/var/spack/repos/builtin/packages/assimp/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Assimp(CMakePackage):
+ """Open Asset Import Library (Assimp) is a portable Open Source library to
+ import various well-known 3D model formats in a uniform manner."""
+
+ homepage = "https://www.assimp.org"
+ url = "https://github.com/assimp/assimp/archive/v3.3.1.tar.gz"
+
+ version('4.0.1', '23a6301c728a413aafbfa1cca19ba91f')
+
+ depends_on('boost')
+
+ def cmake_args(self):
+ args = ['-DASSIMP_BUILD_TESTS=OFF']
+ return args
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 64bff6ae4b..8d07965928 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -49,6 +49,8 @@ class Dealii(CMakePackage):
version('develop', git='https://github.com/dealii/dealii.git', branch='master')
variant('mpi', default=True, description='Compile with MPI')
+ variant('assimp', default=False,
+ description='Compile with Assimp')
variant('arpack', default=True,
description='Compile with Arpack and PArpack (only with MPI)')
variant('adol-c', default=False,
@@ -121,6 +123,7 @@ class Dealii(CMakePackage):
depends_on("mpi", when="+mpi")
depends_on("adol-c@2.6.4:", when='@9.0:+adol-c')
depends_on("arpack-ng+mpi", when='+arpack+mpi')
+ depends_on("assimp", when='@9.0:+assimp')
depends_on("doxygen+graphviz", when='+doc')
depends_on("graphviz", when='+doc')
depends_on("gsl", when='@8.5.0:+gsl')
@@ -148,6 +151,7 @@ class Dealii(CMakePackage):
depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre", when="+trilinos+mpi+int64")
# check that the combination of variants makes sense
+ conflicts('+assimp', when='@:8.5.1')
conflicts('+nanoflann', when='@:8.5.1')
conflicts('+sundials', when='@:8.5.1')
conflicts('+adol-c', when='@:8.5.1')
@@ -286,6 +290,17 @@ class Dealii(CMakePackage):
'-DDEAL_II_WITH_ARPACK=OFF'
])
+ # Assimp
+ if '+assimp' in spec:
+ options.extend([
+ '-DEAL_II_WITH_ASSIMP=ON',
+ '-DASSIMP_DIR=%s' % spec['assimp'].prefix
+ ])
+ else:
+ options.extend([
+ '-DEAL_II_WITH_ASSIMP=OFF'
+ ])
+
# since Netcdf is spread among two, need to do it by hand:
if '+netcdf' in spec and '+mpi' in spec:
# take care of lib64 vs lib installed lib locations: