muparser: minor fixes to 2.2.5 and add 2.2.6 with CMake (#9724)
* muparser: minor fixes to 2.2.5 and add 2.2.6 with CMake * dealii: make muparser optional
This commit is contained in:

committed by
Massimiliano Culpo

parent
da193a07a3
commit
8f4d6caf32
@@ -11,6 +11,9 @@ class Muparser(Package):
|
||||
homepage = "http://muparser.beltoforion.de/"
|
||||
url = "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz"
|
||||
|
||||
version('2.2.6.1', '410d29b4c58d1cdc2fc9ed1c1c7f67fe')
|
||||
# 2.2.6 presents itself as 2.2.5, don't add it to Spack
|
||||
# version('2.2.6', 'f197b2815ca0422b2091788a78f2dc8a')
|
||||
version('2.2.5', '02dae671aa5ad955fdcbcd3fee313fb7')
|
||||
|
||||
# Replace std::auto_ptr by std::unique_ptr
|
||||
@@ -18,10 +21,30 @@ class Muparser(Package):
|
||||
patch('auto_ptr.patch',
|
||||
when='@2.2.5')
|
||||
|
||||
depends_on('cmake@3.1.0:', when='@2.2.6:', type='build')
|
||||
|
||||
# Cmake build since 2.2.6
|
||||
@when('@2.2.6:')
|
||||
def install(self, spec, prefix):
|
||||
cmake_args = [
|
||||
'-DENABLE_SAMPLES=OFF',
|
||||
'-DENABLE_OPENMP=OFF',
|
||||
'-DBUILD_SHARED_LIBS=ON'
|
||||
]
|
||||
|
||||
cmake_args.extend(std_cmake_args)
|
||||
|
||||
with working_dir('spack-build', create=True):
|
||||
cmake('..', *cmake_args)
|
||||
make()
|
||||
make('install')
|
||||
|
||||
@when('@2.2.5')
|
||||
def install(self, spec, prefix):
|
||||
options = ['--disable-debug',
|
||||
'--disable-samples',
|
||||
'--disable-dependency-tracking',
|
||||
'CXXFLAGS=-std=c++11',
|
||||
'CXXFLAGS={0}'.format(self.compiler.cxx11_flag),
|
||||
'--prefix=%s' % prefix]
|
||||
|
||||
configure(*options)
|
||||
|
Reference in New Issue
Block a user