summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/muparser/package.py
blob: 81ad5c3a82089aadec76a328578dfa1ae6eec7bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Muparser(Package):
    """C++ math expression parser library."""
    homepage = "http://muparser.beltoforion.de/"
    url      = "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz"

    version('2.2.5', '02dae671aa5ad955fdcbcd3fee313fb7')

    # Replace std::auto_ptr by std::unique_ptr
    # https://github.com/beltoforion/muparser/pull/46
    patch('auto_ptr.patch',
          when='@2.2.5')

    def install(self, spec, prefix):
        options = ['--disable-debug',
                   '--disable-dependency-tracking',
                   'CXXFLAGS=-std=c++11',
                   '--prefix=%s' % prefix]

        configure(*options)

        make(parallel=False)
        make("install")