summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/loki/package.py
blob: 1f4cac66f0dbaa955d5834f996970ca6373d91c7 (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
31
# 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 Loki(MakefilePackage):
    """Loki is a C++ library of designs, containing flexible implementations
    of common design patterns and idioms."""

    homepage = "http://loki-lib.sourceforge.net"
    url      = "https://downloads.sourceforge.net/project/loki-lib/Loki/Loki%200.1.7/loki-0.1.7.tar.bz2"

    version('0.1.7', '33a24bcbb99fa2ec8fcbbab65649f3f6')

    variant('shared', default=True, description="Build shared libraries")

    def build(self, spec, prefix):
        if '+shared' in spec:
            make('-C', 'src', 'build-shared')
        else:
            make('-C', 'src', 'build-static')

    def install(self, spec, prefix):
        make('-C', 'include', 'install', 'prefix={0}'.format(prefix))
        if '+shared' in spec:
            make('-C', 'src', 'install-shared', 'prefix={0}'.format(prefix))
        else:
            make('-C', 'src', 'install-static', 'prefix={0}'.format(prefix))