summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/eztrace/package.py
blob: 7c17cf51ac29bf502dd32896300dc39606e12b5f (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 2013-2021 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 Eztrace(AutotoolsPackage):
    """EZTrace is a tool to automatically generate execution traces
       of HPC applications."""

    homepage = "http://eztrace.gforge.inria.fr"
    url      = "https://gitlab.com/eztrace/eztrace/-/archive/eztrace-1.1-10/eztrace-eztrace-1.1-10.tar.gz"
    maintainers = ['trahay']

    version('1.1-10', sha256='97aba8f3b3b71e8e2f7ef47e00c262234e27b9cb4a870c85c525317a83a3f0d4')

    depends_on('mpi')

    # Does not work on Darwin due to MAP_POPULATE
    conflicts('platform=darwin')

    def patch(self):
        filter_file(
            '"DEFAULT_OUTFILE"',
            '" DEFAULT_OUTFILE "',
            'extlib/gtg/extlib/otf/tools/otfshrink/otfshrink.cpp',
            string=True
        )

    def setup_build_environment(self, env):
        if self.spec.satisfies('%fj'):
            env.set('LDFLAGS', '--linkfortran')

    def configure_args(self):
        args = ["--with-mpi={0}".format(self.spec["mpi"].prefix)]
        return args

    @run_before('build')
    def fix_libtool(self):
        if self.spec.satisfies('%fj'):
            libtools = ['extlib/gtg/libtool',
                        'extlib/opari2/build-frontend/libtool']
            for f in libtools:
                filter_file('wl=""', 'wl="-Wl,"', f, string=True)