summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/htop/package.py
blob: 655cb064c246a0405a625f00662dc2088be1f8b5 (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
# Copyright 2013-2022 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 Htop(AutotoolsPackage):
    """htop is an interactive text-mode process viewer for Unix systems."""

    homepage = "https://github.com/htop-dev/htop/"
    url      = "https://github.com/htop-dev/htop/archive/refs/tags/3.1.1.tar.gz"
    maintainers = ['sethrj']

    version('3.2.0', sha256='1a1dd174cc828521fe5fd0e052cff8c30aa50809cf80d3ce3a481c37d476ac54')
    version('3.1.2', sha256='fe9559637c8f21f5fd531a4c072048a404173806acbdad1359c6b82fd87aa001')
    version('3.1.1', sha256='b52280ad05a535ec632fbcd47e8e2c40a9376a9ddbd7caa00b38b9d6bb87ced6')
    version('3.0.5', sha256='4c2629bd50895bd24082ba2f81f8c972348aa2298cc6edc6a21a7fa18b73990c')
    version('2.2.0', sha256='d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57', url='https://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz')
    version('2.0.2', sha256='179be9dccb80cee0c5e1a1f58c8f72ce7b2328ede30fb71dcdf336539be2f487', url='https://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz')

    variant('unicode', default=True, description='Enable Unicode support dependency')
    variant('hwloc', default=False, description='Enable hwloc support for CPU affinity')
    variant('debug', default=False, description='Enable asserts and internal sanity checks')

    depends_on('ncurses')
    depends_on('ncurses@6:', when='@3:')
    depends_on('m4', type='build', when='@3:')
    depends_on('autoconf', type='build', when='@3:')
    depends_on('automake', type='build', when='@3:')
    depends_on('libtool', type='build', when='@3:')
    depends_on('hwloc', when='+hwloc')
    depends_on('python+pythoncmd', type='build')

    def configure_args(self):
        args = []
        args += self.enable_or_disable('unicode')
        args += self.enable_or_disable('hwloc')
        args += self.enable_or_disable('debug')
        return args