summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2016-12-17 17:57:33 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2016-12-17 08:57:33 -0800
commit0ef55b831fab41be7efe837a54dae22eeb04562c (patch)
tree0593719a6a2eab5db5553471d2c10fd178ab5e93 /var
parenta1a41bb4c71a8b74d9fb85d4cd97a1d889a44dcb (diff)
downloadspack-0ef55b831fab41be7efe837a54dae22eeb04562c.tar.gz
spack-0ef55b831fab41be7efe837a54dae22eeb04562c.tar.bz2
spack-0ef55b831fab41be7efe837a54dae22eeb04562c.tar.xz
spack-0ef55b831fab41be7efe837a54dae22eeb04562c.zip
dealii: fix config for Netcdf with lib64 (#2616)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 9884056354..d126971a05 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
class Dealii(CMakePackage):
@@ -203,12 +204,22 @@ class Dealii(CMakePackage):
# since Netcdf is spread among two, need to do it by hand:
if '+netcdf' in spec:
+ # take care of lib64 vs lib installed lib locations:
+ if os.path.isdir(spec['netcdf-cxx'].prefix.lib):
+ netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib
+ else:
+ netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib64
+ if os.path.isdir(spec['netcdf'].prefix.lib):
+ netcdf_lib_dir = spec['netcdf'].prefix.lib
+ else:
+ netcdf_lib_dir = spec['netcdf'].prefix.lib64
+
options.extend([
'-DNETCDF_FOUND=true',
'-DNETCDF_LIBRARIES=%s;%s' % (
- join_path(spec['netcdf-cxx'].prefix.lib,
+ join_path(netcdfcxx_lib_dir,
'libnetcdf_c++.%s' % dso_suffix),
- join_path(spec['netcdf'].prefix.lib,
+ join_path(netcdf_lib_dir,
'libnetcdf.%s' % dso_suffix)),
'-DNETCDF_INCLUDE_DIRS=%s;%s' % (
spec['netcdf-cxx'].prefix.include,